aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config.h.in
AgeCommit message (Collapse)AuthorFilesLines
2018-10-16Use autoconf to check for features needed by Networking TSJonathan Wakely1-0/+18
* config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for headers used by Networking TS. * include/experimental/executor: Include <condition_variable> instead of <mutex>. * include/experimental/internet: Use autoconf macros for available headers. Include <sys/socket.h> for. Remove <cstring> and use __builtin_memcpy and __builtin_strchr. (resolver_errc) [!_GLIBCXX_HAVE_NETDB_H]: Do not define. (address_v4::to_string, address_v6::to_string) [!_GLIBCXX_HAVE_ARPA_INET_H]: Likewise. (basic_resolver_results) [!_GLIBCXX_HAVE_NETDB_H]: Make private constructors report errors. [!_GLIBCXX_HAVE_NETINET_TCP_H] (tcp::no_delay): Do not define. * include/experimental/io_context: Likewise. * include/experimental/socket: Likewise. [!_GLIBCXX_HAVE_SYS_SOCKET_H, !_GLIBCXX_HAVE_POLL_H] (socket_base): Do not define nested types when relevant header not available. (__socket_impl::native_non_blocking) [!_GLIBCXX_HAVE_FCNTL_H]: Report an error. (__basic_socket_impl::open, __basic_socket_impl::local_endpoint) (__basic_socket_impl::bind) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (__basic_socket_impl::io_control) [!_GLIBCXX_HAVE_SYS_IOCTL_H]: Likewise. (basic_socket::at_mark, basic_socket::shutdown) (basic_socket::remote_endpoint, basic_socket::connect) (basic_socket::async_connect) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket::available) [_GLIBCXX_HAVE_SYS_IOCTL_H]: Check macro for <sys/ioctl.h> availability. (basic_socket::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise. (basic_datagram_socket::receive, basic_datagram_socket::async_receive) (basic_datagram_socket::receive_from) (basic_datagram_socket::async_receive_from) (basic_datagram_socket::send, basic_datagram_socket::async_send) (basic_datagram_socket::send_to, basic_datagram_socket::async_send_to) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_stream_socket::receive, basic_stream_socket::async_receive) (basic_stream_socket::send, basic_stream_socket::async_send) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket_acceptor::listen, basic_socket_acceptor::accept) (basic_socket_acceptor::async_accept) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise. (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise. From-SVN: r265203
2018-10-16Define _GLIBCXX_USE_DEV_RANDOM as replacement for _GLIBCXX_USE_RANDOM_TR1Jonathan Wakely1-0/+4
Define and use a new macro with a more descriptive name. Only use the old macro in <tr1/random.h>. * acinclude.m4 (GLIBCXX_CHECK_RANDOM_TR1): Replace with ... (GLIBCXX_CHECK_DEV_RANDOM): New macro with more descriptive name. Define _GLIBCXX_USE_DEV_RANDOM as well as _GLIBCXX_USE_RANDOM_TR1. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Use GLIBCXX_CHECK_DEV_RANDOM instead of GLIBCXX_CHECK_RANDOM_TR1. crossconfig.m4: Likewise. * include/bits/random.h (random_device): Use _GLIBCXX_USE_DEV_RANDOM instead of _GLIBCXX_USE_RANDOM_TR1. * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise. From-SVN: r265197
2018-06-18Fix bootstrap failure for bare metal due to autoconf link testsJonathan Wakely1-3/+3
The AC_CHECK_FUNCS tests cause the build to fail for bare metal cross compilers, where link tests are not allowed. Replace them with GCC_TRY_COMPILE_OR_LINK tests instead. Skip all the Filesystem dependency checks if not building the filesystem library. * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and symlink. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink. From-SVN: r261704
2018-05-31PR libstdc++/78870 support std::filesystem on WindowsJonathan Wakely1-0/+9
PR libstdc++/78870 support std::filesystem on Windows * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for link, readlink and symlink. * include/bits/fs_path.h (path::operator/=(const path&)): Move definition out of class body. (path::is_absolute(), path::_M_append(path)): Likewise. (operator<<(basic_ostream, const path&)): Use std::quoted directly. (operator>>(basic_istream, path&)): Likewise. (u8path): Reorder definitions and fix Windows implementation. (path::is_absolute()): Define inline and fix for Windows. [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)): Define POSIX version inline. (path::_M_append(path)): Define inline. * include/experimental/bits/fs_path.h (path::is_absolute()): Move definition out of class body. (operator<<(basic_ostream, const path&)): Fix type of delimiter and escape characters. (operator>>(basic_istream, path&)): Likewise. (path::is_absolute()): Define inline and fix for Windows. * src/filesystem/dir-common.h (__gnu_posix): New namespace. (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent) (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir): Define as adaptors for Windows functions/types or as using-declarations for POSIX functions/types. (_Dir_base, get_file_type): Qualify names to use declarations from __gnu_posix namespace. (_Dir_base::is_dor_or_dotdot): New helper functions. * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify names to use declarations from __gnu_posix namespace. * src/filesystem/ops-common.h (__gnu_posix): New nested namespace. (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type) (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t) (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd) (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime) (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type): Define as adaptors for Windows functions/types or as using-declarations for POSIX functions/types. (stat_type, do_copy_file): Qualify names to use declarations from __gnu_posix namespace. (do_space): Declare new function. (make_file_type): Only use S_ISLNK if defined. * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use path::value_type not char. (filesystem::copy, create_dir, filesystem::create_directory): Qualify names to use declarations from __gnu_posix namespace. (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and add implementation for Windows. (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro. (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd. [!_PC_PATH_MAX]: Don't use pathconf. [PATH_MAX]: Use if defined. (filesystem::current_path(const path&, error_code&)) (filesystem::equivalent, do_stat, filesystem::hard_link_count) (filesystem::last_write_time, filesystem::permissions): Use names from __gnu_posix. (filesystem::read_symlink): Check HAVE_READLINK autoconf macro. (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add implementation for Windows. (filesystem::rename, filesystem::resize_file): Use names from __gnu_posix. (filesystem::space): Use do_space. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory. (filesystem::status, filesystem::symlink_status): Use names from __gnu_posix. (filesystem::temp_directory_path): Add implementation for Windows. * src/filesystem/path.cc (dot): Define constant. (path::replace_extension): Use dot. (path::_M_find_extension): Likewise. Use path::string_type not std::string. (path::_M_split_cmpts): Use dot. (filesystem_error::_M_get_what): Use u8string() not native(). * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator): Qualify names to use declarations from __gnu_posix namespace. * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use correct error_code. (filesystem::absolute(const path&, error_code&)): Add implementation for Windows. (char_ptr, filesystem::canonical): Use path::value_type not char. (do_copy_file): Use names from __gnu_posix. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or sendfile. (filesystem::copy, create_dir, filesystem::create_directory): Qualify names to use declarations from __gnu_posix namespace. (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and add implementation for Windows. (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro. (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd. [!_PC_PATH_MAX]: Don't use pathconf. [PATH_MAX]: Use if defined. (filesystem::current_path(const path&, error_code&)) (filesystem::equivalent, do_stat, filesystem::hard_link_count) (filesystem::last_write_time, filesystem::permissions): Use names from __gnu_posix. (filesystem::read_symlink): Check HAVE_READLINK autoconf macro. (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add implementation for Windows. (filesystem::rename, filesystem::resize_file): Use names from __gnu_posix. (do_space): Define. (filesystem::space): Use do_space. (filesystem::status, filesystem::symlink_status): Use names from __gnu_posix. (filesystem::temp_directory_path): Add implementation for Windows. * src/filesystem/std-path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)): Define for Windows. (dot): Define constant. (path::replace_extension, is_dot): Use dot. (path::lexically_normal): Check _M_type instead of calling non-existent function. (path::_M_find_extension): Use dot. Use path::string_type not std::string. (path::_M_split_cmpts): Use dot. (filesystem_error::_M_get_what): Use u8string() not native(). * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not use symlinks. * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc: Likewise. * testsuite/27_io/filesystem/operations/absolute.cc: Use __gnu_test::root_path() instead of "/" and add Windows-specific tests. * testsuite/27_io/filesystem/operations/canonical.cc: Use path::string() to get narrow string, not path::native(). * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams with std::filesystem::path not std::basic_string. * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise. * testsuite/27_io/filesystem/operations/exists.cc: Use __gnu_test::root_path() instead of "/". * testsuite/27_io/filesystem/operations/is_empty.cc: Construct fstreams with std::filesystem::path not std::basic_string. * testsuite/27_io/filesystem/operations/last_write_time.cc: Use path::string() to get narrow string. * testsuite/27_io/filesystem/operations/space.cc: Check results for errors, expect sensible values otherwise. * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add helpers for adjusting the environment on Windows. * testsuite/27_io/filesystem/path/append/path.cc: Test Windows-specific behaviour. * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation of path::string_type objects. * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native string to wide string on Windows. * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow for backslash as root-directory. * testsuite/27_io/filesystem/path/decompose/stem.cc: Use path::string() to get narrow string. * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style paths. * testsuite/27_io/filesystem/path/native/string.cc: Use string_type not std::string. * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for different definintion of absolute paths on Windows. * testsuite/experimental/filesystem/iterators/directory_iterator.cc: Do not use symlinks. * testsuite/experimental/filesystem/operations/absolute.cc: Test Windows behaviour. * testsuite/experimental/filesystem/operations/copy.cc: Construct fstreams with NTCTS not std::basic_string. * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise. * testsuite/experimental/filesystem/operations/exists.cc: Use __gnu_test::root_path() instead of "/". * testsuite/experimental/filesystem/operations/is_empty.cc: Construct fstreams with NTCTS not std::basic_string. * testsuite/experimental/filesystem/operations/last_write_time.cc: Use path::string() to get narrow string. * testsuite/experimental/filesystem/operations/space.cc: Use __gnu_test::root_path() instead of "/". * testsuite/experimental/filesystem/operations/temp_directory_path.cc: Add helpers for adjusting the environment on Windows. * testsuite/experimental/filesystem/path/append/path.cc: Use path::string() to get narrow strings for comparisons. * testsuite/experimental/filesystem/path/concat/path.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/root_directory.cc: Likewise. * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise. * testsuite/experimental/filesystem/path/native/string.cc: Use string_type not std::string. * testsuite/experimental/filesystem/path/query/is_absolute.cc: Adjust for different definintion of absolute paths on Windows. * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New function. (__gnu_test::scoped_file): Construct fstreams with NTCTS not std::basic_string. From-SVN: r261034
2018-05-21Add support for opening file streams from wide character stringsJonathan Wakely1-0/+3
C++17 added new overloads to <fstream> class templates to support opening files from wide character strings "on systems where filesystem::path::value_type is not char". This patch adds those overloads conditional on _wfopen being available, and enables them for pre-C++17 modes as well. Add support for opening file streams from wide character strings. * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Define new overload. * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN] (__basic_file<char>::open(const wchar_t*, ios_base::openmode)): Declare new overload. * configure.ac: Check for _wfopen. * crossconfig.m4: Likewise. * configure: Regenerate. * config.h.in: Regenerate. * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Define new overload. * include/std/fstream [_GLIBCXX_HAVE__WFOPEN] (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)): Declare new overload. [_GLIBCXX_HAVE__WFOPEN] (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode)) (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define new overloads. * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New. * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New. From-SVN: r260479
2018-05-01PR libstdc++/84654 Disable __float128 specializations for -mno-float128Tulio Magno Quites Machado Filho1-3/+0
2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com> PR libstdc++/84654 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128. * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128. * configure: Regenerate. * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128 based on ENABLE_FLOAT128. * include/Makefile.in: Regenerate. * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128. [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine _GLIBCXX_USE_FLOAT128. From-SVN: r259813
2018-01-18configure.ac (AC_CHECK_HEADERS): Add linux/types.h.Uros Bizjak1-0/+3
* configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally include linux/types.h when checking linux/random.h header. * config.h.in: Regenerate. * configure: Ditto. * src/c++11/random.cc: Conditionally include linux/types.h. From-SVN: r256859
2017-05-23PR libstdc++/67578 Implement non-trivial std::random_device::entropyXi Ruoyao1-0/+3
2017-05-23 Xi Ruoyao <ryxi@stu.xidian.edu.cn> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/67578 * acinclude.m4: Bump libtool_VERSION. * config/abi/pre/gnu.ver: Create GLIBCXX_3.4.24 with new symbol. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Add test for <linux/random.h>. * doc/xml/manual/abi.xml: Document new library version. * include/bits/random.h (random_device::entropy) [_GLIBCXX_USE_RANDOM_TR1]: Add call to new _M_getentropy member. (random_device::_M_getentropy): Declare. * src/c++11/random.cc (random_device::_M_getentropy): Define. * testsuite/util/testsuite_abi.cc: Add GLIBCXX_3.4.24 to known versions, and make it the latest version. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r248374
2017-03-15Fix typo in config.h.in commentJonathan Wakely1-1/+1
* acinclude.m4 (GLIBCXX_CHECK_S_ISREG_OR_S_IFREG): Fix typo in comment. * config.h.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. From-SVN: r246165
2017-01-09PR79017 workaround incomplete C99 math on darwinJonathan Wakely1-0/+3
PR libstdc++/79017 * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround functions separately on darwin and if they're missing define _GLIBCXX_NO_C99_ROUNDING_FUNCS. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint) (llrintf, llrintl, llround, llroundf, llroundl): Do not define. From-SVN: r244231
2017-01-04PR78968 add configure check for __cxa_thread_atexit in libcJonathan Wakely1-0/+3
PR libstdc++/78968 * config.h.in: Regenerate. * configure: Likewise. * configure.ac: Check for __cxa_thread_atexit. * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]: Don't define __cxa_thread_atexit if libc provides it. From-SVN: r244057
2017-01-04Support exception propagation without lock-free atomic intPauli Nieminen1-0/+3
2017-01-04 Pauli Nieminen <suokkos@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/64735 * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define. * config.h.in: Regenerate. * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make exports for exception_ptr, nested_exception, and future conditional. [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add exports for exception_ptr, nested_exception, and future conditional. * configure: Regenerate. * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER. * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE * libsupc++/eh_atomics.h: New file for internal use only. (__eh_atomic_inc, __eh_atomic_dec): New. * libsupc++/eh_ptr.cc (exception_ptr::_M_addref) (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup) (rethrow_exception): Use eh_atomics.h reference counting helpers. * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise. * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise. * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE. * libsupc++/exception_ptr.h: Likewise. * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro. * libsupc++/nested_exception.cc: Remove check for ATOMIC_INT_LOCK_FREE. * libsupc++/nested_exception.h: Likewise. * src/c++11/future.cc: Likewise. * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks. * testsuite/18_support/nested_exception/*: Likewise. * testsuite/30_threads/async/*: Likewise. * testsuite/30_threads/future/*: Likewise. * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise. * testsuite/30_threads/packaged_task/*: Likewise. * testsuite/30_threads/promise/*: Likewise. * testsuite/30_threads/shared_future/*: Likewise. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r244051
2016-11-21Don't define libstdc++-internal macros in Solaris 10+ <math.h>Rainer Orth1-2/+7
libstdc++-v3: * acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Update comments. (__CORRECT_ISO_CPP11_MATH_H_PROTO): Rename to ... (__CORRECT_ISO_CPP11_MATH_H_PROTO_FP): ... this. Add test for C++11 <math.h> integral overloads. * configure: Regenerate. * config.h.in: Regenerate. * include/c_global/cmath [__cplusplus >= 201103L]: Reflect __CORRECT_ISO_CPP11_MATH_H_PROTO to __CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename. * include/c_global/cmath [_GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC && __cplusplus >= 201103L] (std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO_INT. (std::isfinite): Likewise. (std::isinf): Likewise. (std::isnan): Likewise. (std::isnormal): Likewise. (std::signbit): Likewise. (std::isgreater): Likewise. (std::isgreaterequal): Likewise. (std::isless): Likewise. (std::islessequal): Likewise. (std::islessgreater): Likewise. (std::isunordered): Likewise. [__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1] (std::acosh): Likewise. (std::asinh): Likewise. (std::atanh): Likewise. (std::cbrt): Likewise. (std::copysign): Likewise. (std::erf): Likewise. (std::erfc): Likewise. (std::exp2): Likewise. (std::expm1): Likewise. (std::fdim): Likewise. (std::fma): Likewise. (std::fmax): Likewise. (std::fmin): Likewise. (std::hypot): Likewise. (std::ilogb): Likewise. (std::lgamma): Likewise. (std::llrint): Likewise. (std::llround): Likewise. (std::log1p): Likewise. (std::log2): Likewise. (std::logb): Likewise. (std::lrint): Likewise. (std::lround): Likewise. (std::nearbyint): Likewise. (std::nextafter): Likewise. (std::nexttoward): Likewise. (std::remainder): Likewise. (std::remquo): Likewise. (std::rint): Likewise. (std::round): Likewise. (std::scalbln): Likewise. (std::scalbn): Likewise. (std::tgamma): Likewise. (std::trunc): Likewise. * include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1 && __cplusplus >= 201103L]: Reflect __CORRECT_ISO_CPP11_MATH_H_PROTO to __CORRECT_ISO_CPP11_MATH_H_PROTO_FP rename. fixincludes: * inclhack.def (solaris_math_12): New fix. (hpux11_fabsf): Replace bypass by *-hp-hpux11* mach selector. * fixincl.x: Regenerate. * tests/base/math.h [SOLARIS_MATH_12_CHECK]: New test. From-SVN: r242671
2016-09-30libstdc++/77795 Only declare ::gets for C++98 and C++11Jonathan Wakely1-1/+1
PR libstdc++/77795 * acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check for gets. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare for C++98 and C++11. * include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise. * testsuite/27_io/headers/cstdio/functions_neg.cc: New test. From-SVN: r240672
2016-09-09Implement P0035R4, C++17 new of over-aligned types.Jason Merrill1-0/+12
gcc/cp/ * cp-tree.h (enum cp_tree_index): Add CPTI_ALIGN_TYPE. (align_type_node): New macro. * call.c (build_operator_new_call): Handle C++17 aligned new. (second_parm_is_size_t, build_op_delete_call): Likewise. (non_placement_deallocation_fn_p): Likewise. Rename to usual_deallocation_fn_p. (aligned_allocation_fn_p, aligned_deallocation_fn_p): New. * decl.c (cxx_init_decl_processing): Add aligned new support. * init.c (type_has_new_extended_alignment): New. (build_new_1): Handle aligned new. * tree.c (vec_copy_and_insert): New. gcc/c-family/ * c.opt: Add -faligned-new and -Waligned-new. * c-common.c (max_align_t_align): Split out from... (cxx_fundamental_alignment_p): ...here. * c-common.h: Declare it. * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new. libstdc++-v3/ * libsupc++/new: Declare aligned new/delete operators. * config/abi/pre/gnu.ver: Export them. * configure.ac: Check for aligned_alloc, posix_memalign, memalign, _aligned_malloc. * libsupc++/new_opa.cc: New. * libsupc++/new_opant.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/new_opva.cc: New. * libsupc++/del_opa.cc: New. * libsupc++/del_opant.cc: New. * libsupc++/del_opsa.cc: New. * libsupc++/del_opva.cc: New. * libsupc++/del_opvant.cc: New. * libsupc++/del_opvsa.cc: New. * libsupc++/Makefile.am: Build them. From-SVN: r240056
2016-05-25Fix configure test for sendfile()Jonathan Wakely1-1/+1
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Fix test for sendfile. * configure: Regenerate. * config.h.in: Regenerate. From-SVN: r236730
2016-02-04Test for C99 stdlib.h functions with -std=c++98Jonathan Wakely1-0/+4
PR libstdc++/69626 * acinclude.m4 (GLIBCXX_ENABLE_C99): Check C99 stdlib.h functions with -std=c++98 and define _GLIBCXX98_USE_C99_STDLIB. * config.h.in: Regenerate. * configure: Regenerate. * testsuite/21_strings/c_strings/char/69626.cc: New. From-SVN: r233161
2016-01-28re PR libstdc++/69450 (libstdc++-v3/include/math.h:66:1 2: error: 'constexpr ↵John David Anglin1-2/+5
bool std::isnan(double)' conflicts with a previous declaration) PR libstdc++/69450 * acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Split check for obsolete isinf and isnan functions into two independent checks. Check on hpux. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cmath (isinf(double), isnan(double)): Use _GLIBCXX_HAVE_OBSOLETE_ISINF and _GLIBCXX_HAVE_OBSOLETE_ISNAN, respectively. From-SVN: r232925
2016-01-15libstdc++: Make certain exceptions transaction_safe.Torvald Riegel1-0/+3
From-SVN: r232454
2016-01-13Use ::isinf and ::isnan if libc defines themJonathan Wakely1-0/+3
PR libstdc++/48891 * acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): Check for obsolete isinf and isnan functions. * config.h.in: Regenerate. * configure: Regenerate. * include/c_global/cmath (isinf(double), isnan(double)) [_GLIBCXX_HAVE_OBSOLETE_ISINF_ISNAN]: Import via using-directive. * testsuite/26_numerics/headers/cmath/48891.cc: New. From-SVN: r232327
2015-11-24Handle C++11 <math.h> overloads on Solaris 12Rainer Orth1-0/+5
* acinclude.m4 (GLIBCXX_CHECK_MATH11_PROTO): New test. * configure.ac: Use it. * configure: Regenerate. * config.h.in: Regenerate. * include/c_global/cmath [__cplusplus >= 201103L] (std::fpclassify): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO. (std::isfinite): Likewise. (std::isinf): Likewise. (std::isnan): Likewise. (std::isnormal): Likewise. (std::signbit): Likewise. (std::isgreater): Likewise. (std::isgreaterequal): Likewise. (std::isless): Likewise. (std::islessequal): Likewise. (std::islessgreater): Likewise. (std::isunordered): Likewise. (std::acosh): Likewise. (std::asinh): Likewise. (std::atanh): Likewise. (std::cbrt): Likewise. (std::copysign): Likewise. (std::erf): Likewise. (std::erfc): Likewise. (std::exp2): Likewise. (std::expm1): Likewise. (std::fdim): Likewise. (std::fma): Likewise. (std::fmax): Likewise. (std::fmin): Likewise. (std::hypot): Likewise. (std::ilogb): Likewise. (std::lgamma): Likewise. (std::llrint): Likewise. (std::llround): Likewise. (std::log1p): Likewise. (std::log2): Likewise. (std::logb): Likewise. (std::lrint): Likewise. (std::lround): Likewise. (std::nearbyint): Likewise. (std::nextafter): Likewise. (std::nexttoward): Likewise. (std::remainder): Likewise. (std::remquo): Likewise. (std::rint): Likewise. (std::round): Likewise. (std::scalbln): Likewise. (std::scalbn): Likewise. (std::tgamma): Likewise. (std::trunc): Likewise. * include/tr1/cmath [_GLIBCXX_USE_C99_MATH_TR1] (std::tr1::acosh): Wrap in !__CORRECT_ISO_CPP11_MATH_H_PROTO. (std::tr1::asinh): Likewise. (std::tr1::atanh): Likewise. (std::tr1::cbrt): Likewise. (std::tr1::copysign): Likewise. (std::tr1::erf): Likewise. (std::tr1::erfc): Likewise. (std::tr1::exp2): Likewise. (std::tr1::expm1): Likewise. (std::tr1::fabs): Likewise. (std::tr1::fdim): Likewise. (std::tr1::fma): Likewise. (std::tr1::fmax): Likewise. (std::tr1::fmin): Likewise. (std::tr1::hypot): Likewise. (std::tr1::ilogb): Likewise. (std::tr1::lgamma): Likewise. (std::tr1::llrint): Likewise. (std::tr1::llround): Likewise. (std::tr1::log1p): Likewise. (std::tr1::log2): Likewise. (std::tr1::logb): Likewise. (std::tr1::lrint): Likewise. (std::tr1::lround): Likewise. (std::tr1::nearbyint): Likewise. (std::tr1::nextafter): Likewise. (std::tr1::nexttoward): Likewise. (std::tr1::remainder): Likewise. (std::tr1::remquo): Likewise. (std::tr1::rint): Likewise. (std::tr1::scalbln): Likewise. (std::tr1::scalbn): Likewise. (std::tr1::tgamma): Likewise. (std::tr1::trunc): Likewise. (std::tr1::pow): Likewise. * testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc: Restrict dg-xfail-if, dg-excess-errors to *-*-solaris2.1[01]*. From-SVN: r230807
2015-11-13More fine-grained autoconf checks for C99 libraryJennifer Yao1-9/+38
2015-11-13 Jennifer Yao <jenny.hyphen.fa@gmail.com> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/58393 PR libstdc++/61580 * acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with -std=c++11 as well as -std=c++98, and define separate macros for each. Cache the results of checking for complex math and wide character functions. Reformat for readability. * config.h.in: Regenerate. * include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to language standard in use. * config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * config/locale/generic/c_locale.h (std::__convert_from_v): Likewise. * config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise. * config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR. * configure: Regenerate. * include/bits/basic_string.h: Make numeric conversion functions depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99. * include/ext/vstring.h: Likewise. * include/bits/locale_facets.tcc (std::num_put::_M_insert_float): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/bits/locale_facets_nonio.tcc (std::money_put::do_put): Likewise. * include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH. * include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * src/c++98/locale_facets.cc (std::__num_base::_S_format_float): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * testsuite/18_support/exception_ptr/60612-terminate.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc (test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stof.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoi.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stol.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stold.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoll.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoul.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ stoull.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/ to_wstring.cc: Likewise. * testsuite/26_numerics/headers/cstdlib/13943.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise. * testsuite/lib/libstdc++.exp (check_v3_target_string_conversions): Change preprocessor #if conditional so that it uses _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99. * testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH. * testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB. * testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise. * testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR. * testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r230324
2015-09-23Fix semantics of Filesystem TS directory iteratorsJonathan Wakely1-3/+3
[class.directory_iterator] p4 and [directory_iterator.members] p4 require that only the default constructor and ignored permission denied errors can create the end iterator. * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Remove _GLIBCXX_ prefix from HAVE_STRUCT_DIRENT_D_TYPE. * config.h.in: Regenerate. * configure: Regenerate. * include/experimental/fs_dir.h (operator==, operator==): Use owner_before instead of pointer equality. (directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove. * src/filesystem/dir.cc (ErrorCode): Remove. (_Dir::advance): Change ErrorCode parameter to error_code*, add directory_options parameter and check it on error. (opendir): Rename to open_dir to avoid clashing with macro. Change ErrorCode parameter to error_code*. (make_shared_dir): Remove. (native_readdir) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Don't set errno. (directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove. (directory_iterator(const path&, directory_options, error_code*)): Pass options to _Dir::advance and create non-end iterator on error. (recursive_directory_iterator(const path&, directory_options, error_code*)): Clear error_code on ignored error, create non-end iterator otherwise. (recursive_directory_iterator::increment): Pass _M_options to _Dir::advance. (recursive_directory_iterator::pop): Likewise. * testsuite/experimental/filesystem/iterators/directory_iterator.cc: New. * testsuite/experimental/filesystem/iterators/ recursive_directory_iterator.cc: New. From-SVN: r228042
2015-09-16Implement filesystem::canonical() without realpathJonathan Wakely1-1/+1
PR libstdc++/67173 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check _XOPEN_VERSION and PATH_MAX for _GLIBCXX_USE_REALPATH. * config.h.in: Regenerate. * configure: Regenerate. * src/filesystem/ops.cc: (canonical) [!_GLIBCXX_USE_REALPATH]: Add alternative implementation. * testsuite/experimental/filesystem/operations/canonical.cc: New. * testsuite/experimental/filesystem/operations/exists.cc: Add more tests. * testsuite/experimental/filesystem/operations/absolute.cc: Add test variables. * testsuite/experimental/filesystem/operations/copy.cc: Likewise. * testsuite/experimental/filesystem/operations/current_path.cc: Likewise. * testsuite/experimental/filesystem/operations/file_size.cc: Likewise. * testsuite/experimental/filesystem/operations/status.cc: Likewise. * testsuite/experimental/filesystem/operations/temp_directory_path.cc: Likewise. From-SVN: r227836
2015-09-04Add C++11 header <cuchar>.Edward Smith-Rowland1-0/+7
2015-09-04 Edward Smith-Rowland <3dw4rd@verizon.net> Jonathan Wakely <jwakely@redhat.com> * acinclude.m4 (GLIBCXX_CHECK_UCHAR_H): Define. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for <uchar.h>. * include/Makefile.am: Add new headers. * include/Makefile.in: Regenerate. * include/c/cuchar: New. * include/c_compatibility/uchar.h: New. * include/c_global/cuchar: New. * include/c_std/cuchar: New. * include/precompiled/stdc++.h: Include <cuchar>. * testsuite/17_intro/headers/c++200x/stdc++.cc: Include <uchar.h>. * testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc: Include <uchar.h>. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r227488
2015-05-14re PR libstdc++/66011 (call to '__open_missing_mode' declared with attribute ↵Jonathan Wakely1-0/+6
error) PR libstdc++/66011 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmod and sendfile. * config.h.in: Regenerate. * configure: Regenerate. * src/filesystem/ops.cc (do_copy_file): Fix arguments to open(). Do not return after copying contents. Use fchmod, fchmodat, and sendfile when available. (current_path, permissions, space): Use errno not return value. From-SVN: r223196
2015-05-14re PR libstdc++/66018 (opendir configure test not working when ↵Jonathan Wakely1-16/+4
GCC_NO_EXECUTABLES) PR libstdc++/66018 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for struct dirent.d_type. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac (AC_STRUCT_DIRENT_D_TYPE): Remove. From-SVN: r223194
2015-05-13sjlj.m4: New file.Eric Botcazou1-3/+0
config/ * sjlj.m4: New file. libgcc/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * config.in: Regenerate. * configure: Likewise. * config.host: Replace enable_sjlj_exceptions by ac_cv_sjlj_exceptions. libjava/ * configure.ac: Include config/sjlj.m4. Remove manual SJLJ check, add GCC_CHECK_SJLJ_EXCEPTIONS and adjust. * include/config.h.in: Regenerate. * configure: Likewise. * exception.cc: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * stacktrace.cc: Likewise. * include/default-signal.h: Likewise. * sysdep/i386/backtrace.h: Likewise. libobjc/ * configure.ac: Remove manual SJLJ check. * config.h.in: Regenerate. * configure: Likewise. * exception.c: Replace SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. libstdc++-v3/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Delete. * configure.ac: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_personality.cc: Replace _GLIBCXX_SJLJ_EXCEPTIONS by __USING_SJLJ_EXCEPTIONS__. * libsupc++/eh_throw.cc: Likewise. * libsupc++/eh_ptr.cc: Likewise. * doc/html/manual/appendix_porting.html: Remove GLIBCXX_ENABLE_SJLJ_EXCEPTIONS * doc/xml/manual/build_hacking.xml: Likewise. * doc/html/manual/configure.html: Remove --enable-sjlj-exceptions. * doc/xml/manual/configure.xml: Likewise. From-SVN: r223181
2015-05-01acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h> is not ↵Jonathan Wakely1-0/+6
available. * acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Disable when <dirent.h> is not available. (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for fchmodat. * configure: Regenerate. * config.h.in: Regenerate. * configure.ac: Check for utime.h * include/experimental/fs_path.h (path::string<>) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove stray typename keyword. * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H] (DIR, opendir, closedir, dirent, readdir_r): Replace dummy functions with #error. (native_readdir, _Dir::advance): Use readdir when readdir_r is missing. * src/filesystem/ops.cc (do_stat, is_set): Make inline. (last_write_time) [!_GLIBCXX_USE_UTIMENSAT]: Use utime. (permissions) [!_GLIBCXX_USE_FCHMODAT]: Use chmod. (space, temp_directory_path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Set error_code. From-SVN: r222703
2015-04-30Implement N4100 File System TSJonathan Wakely1-0/+34
* acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Define. (GLIBCXX_CHECK_FILESYSTEM_DEPS): Define. * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Enable filesystem TS and check its dependencies. * include/Makefile.am: Add new headers. * include/Makefile.in: Regenerate. * include/bits/locale_conv.h (__do_str_code_cvt, __str_codecvt_in, __str_codecvt_out): Move code conversion logic from wstring_convert into new global functions. (wstring_convert::to_bytes, wstring_convert::from_bytes): Use new functions. (wstring_convert::_M_conv): Remove. * include/bits/quoted_string.h (_Quoted_string): Split out of iomanip. * include/experimental/filesystem: New. * include/experimental/fs_dir.h: New. * include/experimental/fs_fwd.h: New. * include/experimental/fs_ops.h: New. * include/experimental/fs_path.h: New. * include/std/iomanip (_Quoted_string): Move to bits/quoted_string.h. * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Add. * src/Makefile.am (SUBDIRS): Add filesystem. * src/Makefile.in: Regenerate. * src/filesystem/Makefile.am: New. * src/filesystem/Makefile.in: New. * src/filesystem/dir.cc: New. * src/filesystem/ops.cc: New. * src/filesystem/path.cc: New. * testsuite/experimental/filesystem/operations/absolute.cc: New. * testsuite/experimental/filesystem/operations/copy.cc: New. * testsuite/experimental/filesystem/operations/current_path.cc: New. * testsuite/experimental/filesystem/path/append/path.cc: New. * testsuite/experimental/filesystem/path/assign/assign.cc: New. * testsuite/experimental/filesystem/path/assign/copy.cc: New. * testsuite/experimental/filesystem/path/compare/compare.cc: New. * testsuite/experimental/filesystem/path/compare/path.cc: New. * testsuite/experimental/filesystem/path/compare/strings.cc: New. * testsuite/experimental/filesystem/path/concat/path.cc: New. * testsuite/experimental/filesystem/path/concat/strings.cc: New. * testsuite/experimental/filesystem/path/construct/copy.cc: New. * testsuite/experimental/filesystem/path/construct/default.cc: New. * testsuite/experimental/filesystem/path/construct/locale.cc: New. * testsuite/experimental/filesystem/path/construct/range.cc: New. * testsuite/experimental/filesystem/path/decompose/extension.cc: New. * testsuite/experimental/filesystem/path/decompose/filename.cc: New. * testsuite/experimental/filesystem/path/decompose/parent_path.cc: New. * testsuite/experimental/filesystem/path/decompose/relative_path.cc: New. * testsuite/experimental/filesystem/path/decompose/root_directory.cc: New. * testsuite/experimental/filesystem/path/decompose/root_name.cc: New. * testsuite/experimental/filesystem/path/decompose/root_path.cc: New. * testsuite/experimental/filesystem/path/decompose/stem.cc: New. * testsuite/experimental/filesystem/path/generic/generic_string.cc: New. * testsuite/experimental/filesystem/path/itr/traversal.cc: New. * testsuite/experimental/filesystem/path/modifiers/clear.cc: New. * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc: New. * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc: New. * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc: New. * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc: New. * testsuite/experimental/filesystem/path/modifiers/swap.cc: New. * testsuite/experimental/filesystem/path/nonmember/hash_value.cc: New. * testsuite/experimental/filesystem/path/query/empty.cc: New. * testsuite/experimental/filesystem/path/query/has_extension.cc: New. * testsuite/experimental/filesystem/path/query/has_filename.cc: New. * testsuite/experimental/filesystem/path/query/has_parent_path.cc: New. * testsuite/experimental/filesystem/path/query/has_relative_path.cc: New. * testsuite/experimental/filesystem/path/query/has_root_directory.cc: New. * testsuite/experimental/filesystem/path/query/has_root_name.cc: New. * testsuite/experimental/filesystem/path/query/has_root_path.cc: New. * testsuite/experimental/filesystem/path/query/has_stem.cc: New. * testsuite/experimental/filesystem/path/query/is_relative.cc: New. * testsuite/util/testsuite_fs.h: New. From-SVN: r222654
2015-03-18acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t.Jonathan Wakely1-0/+3
2015-03-18 Jonathan Wakely <jwakely@redhat.com> Torvald Riegel <triegel@redhat.com> * acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for pthread_rwlock_t. * config.h.in: Regenerate. * configure: Regenerate. * include/std/shared_mutex: Check _GLIBCXX_USE_PTHREAD_RWLOCK_T. (shared_timed_mutex::_M_rwlock): Use PTHREAD_RWLOCK_INITIALIZER. (shared_timed_mutex::lock_shared()): Retry on EAGAIN. (shared_timed_mutex::try_lock_shared_until()): Retry on EAGAIN and EDEADLK. Co-Authored-By: Torvald Riegel <triegel@redhat.com> From-SVN: r221484
2014-01-23acinclude.m4 (GLIBCXX_CHECK_TMPNAM): New check for tmpnam function.Bernhard Reutner-Fischer1-0/+3
2014-01-23 Bernhard Reutner-Fischer <aldot@gcc.gnu.org> Steve Ellcey <sellcey@mips.com> * acinclude.m4 (GLIBCXX_CHECK_TMPNAM): New check for tmpnam function. * configure.ac: Use GLIBCXX_CHECK_TMPNAM. * (configure, config.h.in): Regenerate. * include/c_global/cstdio: Guard ::tmpnam with _GLIBCXX_USE_TMPNAM Co-Authored-By: Steve Ellcey <sellcey@mips.com> From-SVN: r207009
2013-08-06Commit the vtable verification feature.Caroline Tice1-3/+4
Commit the vtable verification feature. This feature is designed to detect, at run time, if/when the vtable pointer in a C++ object has been corrupted, before allowing virtual calls through that pointer. If pointer corruption is detected, execution of the program is halted. libstdc++-v3 ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * fragment.am: Add XTEMPLATE_FLAGS. * configure.ac: Add definitions for --enable-vtable-verify. * acinclude.m4: Add --enable-vtable-verify and --disable-vtable-verify; define --enable-vtable-verify; define VTV_CXXFLAGS, VTV_PCH_CXXFLAGS and VTV_CXXLINKFLAGS. * config/abi/pre/gnu.ver: Export symbols for vtable verification. * libsupc++/Makefile.am: Define vtv_sources and add it to libsupc___la_SOURCES and libsupc__convenience_la_SOURCES. * libsupc++/vtv_stubs.cc: New file. * include/Makefile.am: Add VTV_PCH_CXXFLAGS to PCHFLAGS. * src/Makefile.am: Add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXLINKFLAGS to CXXLINK. * src/c++98/Makefile.am: Comment out XTEMPLATE_FLAGS; add VTV_CXXFLAGS to AM_CXXFLAGS; add VTV_CXXXLINKFLAGS to CXXLINK. * src/C++11/Makefile.am: Ditto. * doc/xml/manual/configure.xml: Add entry for --enable-vtable-verify. * scripts/testsuite_flags.in: Add cxxvtvflags to Usage; cause cxxvtvflags to use VTV_CXXFLAGS and VTV_CXXLINKFLAGS. * testsuite/lib/libstdc++.exp: Add cxxvtvflags; add code to locate libvtv if --enable-vtable-verify was used; set cxxvtvflags; add cxxvtvflags to cxx_final. * testsuite/18_support/bad_exception/23591_thread-1.c: Add -fvtable-verify=none to compiler flags. * testsuite/17_intro/freestanding.cc: Add -fvtable-verify=none to compiler flags. * configure: Regenerated. * Makefile.in: Regenerated. * python/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * libsupc++/Makefile.in: Regenerated. * config.h.in: Regenerated. * po/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. * src/c++98/Makefile.in: Regenerated. * src/c++11/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. top level ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * configure.ac: Add target-libvtv to target_libraries; disable libvtv on non-linux systems; add target-libvtv to noconfigdirs; add libsupc++/.libs to C++ library search paths. * configure: Regenerated. * Makefile.def: Add libvtv to target_modules; make libvtv depend on libstdc++ and libgcc. * Makefile.in: Regenerated. include/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * vtv-change-permission.h: New file. contrib/ChangeLog: 2013-08-06 Caroline Tice4 <cmtice@google.com> * gcc_update: Add libvtv files. libgcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> config.host (extra_parts): Add vtv_start.o, vtv_end.o vtv_start_preinit.o and vtv_end_preinit.o. configure.ac: Add code to check/set enable_vtable_verify. Makefile.in: Add rules to build vtv_*.o, if enable_vtable_verify is true. vtv_start_preinit.c: New file. vtv_end_preinit.c: New file. vtv_start.c: New file. vtv_end.c: New file. configure: Regenerated. gcc/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * gcc.c (VTABLE_VERIFICATION_SPEC): New definition. (LINK_COMMAND_SPEC): Add VTABLE_VERIFICATION_SPEC. * tree-pass.h: Add pass_vtable_verify. * varasm.c (assemble_variable): Add code to properly set the comdat section and name for the .vtable_map_vars section. (assemble_vtyv_preinit_initializer): New function. (default_sectin_type_flags): Make sure .vtable_map_vars section has LINK_ONCE flag. * output.h: Add function decl for assemble_vtv_preinit_initializer. * vtable-verify.c: New file. * vtable-verify.h: New file. * flag-types.h (enum vtv_priority): Defintions for flag_vtable_verify initialiation levels. * timevar.def (TV_VTABLE_VERIFICATION): New definition. * passes.def: Insert pass_vtable_verify. * aclocal.m4: Reorder includes. * doc/invoke.texi: Add documentation for the flags -fvtable-verify=, -fvtv-debug and -fvtv-counts. * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add vtv_start*.o, as appropriate, if -fvtable-verify=... is used. (GNU_USER_TARGET_ENDFILE_SPEC): Add vtv_end*.o as appropriate, if -fvtable-verify=... is used. * Makefile.in (OBJS): Add vtable-verify.o to list. (vtable-verify.o): Add new build rule. (GTFILES): Add vtable-verify.c to list. * common.opt (fvtable-verify=): New flag. (vtv_priority): Values for fvtable-verify= flag. (fvtv-counts): New flag. (fvtv-debug): New flag. * tree.h (save_vtable_map_decl): New extern function decl. gcc/cp/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> * Make-lang.in (*CXX_AND_OBJCXX_OBJS): Add vtable-class-hierarchy.o to list. (vtable-class-hierarchy.o): Add build rule. * cp-tree.h (vtv_start_verification_constructor_init_function): New extern function decl. (vtv_finish_verification_constructor_init_function): New extern function decl. (build_vtbl_address): New extern function decl. (get_mangled_vtable_map_var_name): New extern function decl. (vtv_compute_class_hierarchy_transitive_closure): New extern function decl. (vtv_generate_init_routine): New extern function decl. (vtv_save_class_info): New extern function decl. (vtv_recover_class_info): New extern function decl. (vtv_build_vtable_verify_fndecl): New extern function decl. * class.c (finish_struct_1): Add call to vtv_save_class_info if flag_vtable_verify is true. * config-lang.in: Add vtable-class-hierarchy.c to gtfiles list. * vtable-class-hierarchy.c: New file. * mangle.c (get_mangled_vtable_map_var_name): New function. * decl2.c (start_objects): Update function comment. (cp_write_global_declarations): Call vtv_recover_class_info, vtv_compute_class_hierarchy_transitive_closure and vtv_build_vtable_verify_fndecl, before calling finalize_compilation_unit, and call vtv_generate_init_rount after, IFF flag_vtable_verify is true. (vtv_start_verification_constructor_init_function): New function. (vtv_finish_verification_constructor_init_function): New function. * init.c (build_vtbl_address): Remove static qualifier from function. libvtv/ChangeLog: 2013-08-06 Caroline Tice <cmtice@google.com> Initial check-in of new vtable verification feature. * configure.ac : New file. * acinclude.m4 : New file. * Makefile.am : New file. * aclocal.m4 : New file. * configure.tgt : New file. * configure: New file (generated). * Makefile.in: New file (generated). * vtv_set.h : New file. * vtv_utils.cc : New file. * vtv_utils.h : New file. * vtv_malloc.cc : New file. * vtv_rts.cc : New file. * vtv_malloc.h : New file. * vtv_rts.h : New file. * vtv_fail.cc : New file. * vtv_fail.h : New file. * vtv_map.h : New file. * scripts/run-testsuite.sh : New file. * scripts/sum-vtv-counts.c : New file. * testsuite/parts-test-main.h : New file. * testusite/dataentry.cc : New file. * testsuite/temp_deriv.cc : New file. * testsuite/register_pair.cc : New file. * testsuite/virtual_inheritance.cc : New file. * testsuite/field-test.cc : New file. * testsuite/nested_vcall_test.cc : New file. * testsuite/template-list-iostream.cc : New file. * testsuite/register_pair_inserts.cc : New file. * testsuite/register_pair_inserts_mt.cc : New file. * testsuite/event.list : New file. * testsuite/parts-test-extra-parts-views.cc : New file. * testsuite/parts-test-extra-parts-views.h : New file. * testsuite/environment-fail-32.s : New file. * testsuite/parts-test-extra-parts.h : New file. * testsuite/temp_deriv2.cc : New file. * testsuite/dlopen_mt.cc : New file. * testsuite/event.h : New file. * testsuite/template-list.cc : New file. * testsuite/replace-fail.cc : New file. * testsuite/Makefile.am : New file. * testsuite/Makefile.in: New file (generated). * testsuite/mempool_negative.c : New file. * testsuite/parts-test-main.cc : New file. * testsuite/event-private.cc : New file. * testsuite/thunk.cc : New file. * testsuite/event-defintiions.cc : New file. * testsuite/event-private.h : New file. * testsuite/parts-test.list : New file. * testusite/register_pair_mt.cc : New file. * testsuite/povray-derived.cc : New file. * testsuite/event-main.cc : New file. * testsuite/environment.cc : New file. * testsuite/template-list2.cc : New file. * testsuite/thunk_vtable_map_attack.cc : New file. * testsuite/parts-test-extra-parts.cc : New file. * testsuite/environment-fail-64.s : New file. * testsuite/dlopen.cc : New file. * testsuite/so.cc : New file. * testsuite/temp_deriv3.cc : New file. * testsuite/const_vtable.cc : New file. * testsuite/mempool_positive.c : New file. * testsuite/dup_name.cc : New file. From-SVN: r201555
2013-05-24chrono.cc: If _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, include unistd.h and ↵Jakub Jelinek1-0/+3
sys/syscall.h. * src/c++11/chrono.cc: If _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, include unistd.h and sys/syscall.h. If _GLIBCXX_COMPATIBILITY_CXX0X, don't define system_clock::is_steady, system_clock::now() and steady_clock::is_steady. (std::chrono::system_clock::now()): If _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL, call syscall (SYS_clock_gettime, ...) instead of clock_gettime (...). (std::chrono::system_clock::now()): Likewise. Add weak attribute if _GLIBCXX_COMPATIBILITY_CXX0X and compatibility-chrono.cc will be non-empty. * src/Makefile.am (cxx11_sources): Add compatibility-chrono.cc. (compatibility-chrono.lo, compatibility-chrono.o): New goals. * src/c++11/compatibility-chrono.cc: New file. * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): On linux*, check for syscall (SYS_clock_gettime, CLOCK_MONOTONIC, &tp). * testsuite/util/testsuite_abi.cc (check_version): Add GLIBCXX_3.4.20 version and make it the latest. * config/abi/pre/gnu.ver (_ZNSt6chrono12steady_clock3nowEv): Export also @@GLIBCXX_3.4.19. Move all symbols so far added for GCC 4.9 to @@GLIBCXX_3.4.20 instead. * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Regenerated. * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Regenerated. * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Regenerated. * config/abi/post/solaris2.10/baseline_symbols.txt: Regenerated. * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Regenerated. * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Regenerated. * config/abi/post/solaris2.9/baseline_symbols.txt: Regenerated. * config/abi/post/solaris2.9/sparcv9/baseline_symbols.txt: Regenerated. * config.h.in: Regenerated. * src/Makefile.in: Regenerated. * configure: Regenerated. From-SVN: r199307
2013-04-09configure, [...]: Rebuild.Tom Tromey1-1/+1
* configure, config.h.in: Rebuild. * configure.ac: Use GLIBCXX_CHECK_SDT_H. Don't check for sys/sdt.h. * acinclude.m4 (GLIBCXX_CHECK_SDT_H): New defun. From-SVN: r197649
2013-03-15unwind-cxx.h: Include sys/sdt.h if detected.Tom Tromey1-0/+3
* libsupc++/unwind-cxx.h: Include sys/sdt.h if detected. (PROBE2): New macro. * libsupc++/eh_throw.cc (__cxa_throw, __cxa_rethrow): Add probe. * libsupc++/eh_catch.cc (__cxa_begin_catch): Add probe. * configure.ac: Check for sys/sdt.h. * configure, config.h.in: Rebuild. From-SVN: r196674
2013-02-25configure.ac: Check for __cxa_thread_atexit_impl.Jason Merrill1-0/+3
* configure.ac: Check for __cxa_thread_atexit_impl. * libsupc++/atexit_thread.cc (__cxa_thread_atexit): Just forward to it if available. * config.h.in, configure: Regenerate. From-SVN: r196276
2013-02-11linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New.Jason Merrill1-0/+6
* linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New. (GLIBCXX_CHECK_STDLIB_SUPPORT): Check for atexit and at_quick_exit. * include/c_std/cstdlib: Add atexit and at_quick_exit. * include/c_global/cstdlib: Add atexit and at_quick_exit. * testsuite/18_support/quick_exit/quick_exit.cc: New. From-SVN: r195948
2012-12-20re PR libstdc++/55741 (bootstrap fails in libstdc++-v3/src/c++11/thread.cc)Jonathan Wakely1-0/+3
PR libstdc++/55741 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for Sleep. * config.h.in: Regenerate. * configure: Regenerate. * src/c++11/thread.cc (__sleep_for): Use Sleep if available. From-SVN: r194635
2012-11-23re PR libstdc++/52680 (std::this_thread::sleep_for #ifdef'd out by ↵Jonathan Wakely1-0/+6
_GLIBCXX_USE_NANOSLEEP) PR libstdc++/52680 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for usleep and sleep if nanosleep is not available. Bump libtool revision. * config.h.in: Regenerate. * configure: Likewise. * config/abi/pre/gnu.ver (GLIBCXX_3.4.18): Add __sleep_for. * include/std/thread (this_thread::__sleep_for): Add. (this_thread::yield, this_thread::sleep_until, this_thread::sleep_for): Declare unconditionally. * src/c++11/thread.cc (this_thread::__sleep_for): Define. * testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Rename to check_v3_target_sleep. * testsuite/lib/dg-options.exp (dg-require-nanosleep): Rename to dg-require-sleep. * testsuite/30_threads/condition_variable_any/53830.cc: Update. * testsuite/30_threads/this_thread/2.cc: Likewise. * testsuite/30_threads/this_thread/3.cc: Likewise. * testsuite/30_threads/this_thread/4.cc: Likewise. * testsuite/30_threads/async/54297.cc: Likewise. From-SVN: r193769
2012-09-10re PR libstdc++/43852 (Embedded systems friendly libstdc++)Sebastian Huber1-0/+3
2012-09-10 Sebastian Huber <sebastian.huber@embedded-brains.de> Jonathan Wakely <jwakely.gcc@gmail.com> PR libstdc++/43852 * acinclude.m4 (GLIBCXX_ENABLE_VERBOSE): Define. * configure.ac (GLIBCXX_ENABLE_VERBOSE): Use it. * config.h.in: Regenerate. * configure: Likewise. * libsupc++/eh_term_handler.cc (_GLIBCXX_VERBOSE): Check new macro. * libsupc++/pure.cc (_GLIBCXX_VERBOSE): Likewise. * doc/xml/manual/configure.xml (--disable-libstdcxx-verbose): Document. * doc/html/manual/configure.html: Regenerate. Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com> From-SVN: r191121
2012-09-09re PR bootstrap/54419 (Compiling libstdc++-v3/src/c++11/random.cc fails on ↵Ulrich Drepper1-0/+3
platforms not knowing rdrand) 2012-09-09 Ulrich Drepper <drepper@gmail.com> Dominique d'Humieres <dominiq@lps.ens.fr> Jack Howarth <howarth@bromo.med.uc.edu> PR bootstrap/54419 * acinclude.m4: Define GLIBCXX_CHECK_X86_RDRAND. * configure.ac: Use GLIBCXX_CHECK_X86_RDRAND to test for rdrand support in assembler. * src/c++11/random.cc (__x86_rdrand): Depend on _GLIBCXX_X86_RDRAND. (random_device::_M_init): Likewise. (random_device::_M_getval): Likewise. * configure: Regenerated. * config.h.in: Regenerated. Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr> Co-Authored-By: Jack Howarth <howarth@bromo.med.uc.edu> From-SVN: r191111
2012-03-14Remove obsolete Solaris 8 supportRainer Orth1-15/+0
libstdc++-v3: * config/os/solaris/solaris2.8: Rename to ... * config/os/solaris/solaris2.9: ... this. * config/abi/post/solaris2.8: Rename to ... * config/abi/post/solaris2.9: ... this. * configure.host (os_include_dir): Remove solaris2.8. Reflect renaming. (abi_baseline_pair): Remove *-*-solaris2.8. Reflect renaming. * configure.ac (GLIBCXX_CHECK_MATH_PROTO): Remove (GLIBCXX_CHECK_STDLIB_PROTO): Remove. * acinclude.m4 (GLIBCXX_CHECK_MATH_PROTO): Remove (GLIBCXX_CHECK_STDLIB_PROTO): Remove. (GLIBCXX_CHECK_GTHREADS): Remove Solaris 8 handling. * crossconfig.m4 (GLIBCXX_CROSSCONFIG): Remove *-solaris2.8 handling. * configure: Regenerate. * config.h.in: Regenerate. * config/os/solaris/solaris2.9/os_defines.h (__CORRECT_ISO_CPP_MATH_H_PROTO): Define. (__CORRECT_ISO_CPP_STDLIB_H_PROTO): Define. * include/c_global/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1 to __CORRECT_ISO_CPP_MATH_H_PROTO. [!__CORRECT_ISO_CPP_MATH_H_PROTO2]: Remove. * include/tr1/cmath: Rename __CORRECT_ISO_CPP_MATH_H_PROTO1 to __CORRECT_ISO_CPP_MATH_H_PROTO. * doc/xml/manual/configure.xml (Configure, --enable-libstdcxx-threads): Remove Solaris 8 reference. * testsuite/27_io/basic_istream/extractors_arithmetic/char/12.cc: Don't xfail on *-*-solaris2.8. * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/12.cc: Likewise. * testsuite/ext/enc_filebuf/char/13598.cc: Don't xfail on *-*-solaris2.8. libjava: * configure.ac (THREADLIBS): Remove *-*-solaris2.8 handling. * configure: Regenerate. libgcc: * config/i386/sol2-unwind.h (x86_fallback_frame_state): Remove Solaris 8 handling. * config/sparc/sol2-unwind.h (sparc64_is_sighandler): Remove Solaris 8 handling. (sparc_is_sighandler): Likewise. libcpp: * lex.c: Remove Solaris 8 reference. gcc/testsuite: * g++.dg/warn/miss-format-1.C: Remove *-*-solaris2.8 handling. * gcc.dg/c99-stdint-6.c: Likewise. * gcc.dg/lto/20090210_0.c: Likewise. * gcc.dg/pr28796-2.c: Don't skip on sparc*-sun-solaris2.8. * gcc.dg/pragma-init-fini.c: Don't skip on i?86-*-solaris2.8. * gcc.dg/pragma-init-fini-2.c: Likewise. * gcc.dg/torture/pr47917.c: Remove *-*-solaris2.8 handling. * gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.8 handling. * gcc.target/i386/pr22152.c: Likewise. * gcc.target/i386/vect8-ret.c: Likewise. * lib/target-supports.exp (add_options_for_tls): Remove Solaris 8 handling. gcc: * config.gcc (enable_obsolete): Remove *-*-solaris2.8*. (*-*-solaris2.[0-8], *-*-solaris2.[0-8].*): Mark unsupported. (i[34567]86-*-solaris2*, x86_64-*-solaris2.1[0-9]*): Remove Solaris 8 support. * configure.ac (gcc_cv_ld_hidden): Remove *-*-solaris2.8*. (ld_tls_support): Remove Solaris 8 references. (lwp_dir, lwp_spec): Remove support for alternate thread library. * acinclude.m4 (gcc_cv_initfini_array): Remove *-*-solaris2.* tests. * configure: Regenerate. * config.in: Regenerate. * config/sol2.h (LINK_SPEC): Remove LIB_THREAD_LDFLAGS_SPEC. * config/i386/sol2.h: Remove Solaris 8 references. * doc/install.texi (Specific, i?86-*-solaris2.[89]): Rename to ... (i?86-*-solaris2.9): ... this. Remove Solaris 8 references. (Specific, *-*-solaris2*): Document Solaris 8 removal. Remove Solaris 8 references. fixincludes: * inclhack.def (math_exception): Remove duplicate. (solaris_cond_init): Remove. (solaris_sys_va_list): Remove Solaris 8 support. * fixincl.x: Regenerate. * tests/base/pthread.h [SOLARIS_COND_INIT_CHECK]: Remove. From-SVN: r185392
2012-03-02re PR libstdc++/51785 (gets not anymore declared)Benjamin Kosnik1-0/+3
2012-03-01 Benjamin Kosnik <bkoz@redhat.com> Ramana Radhakrishnan <ramana@gcc.gnu.org> PR libstdc++/51785 * acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): New. * configure.ac: Call it. * configure: Regenerate. * config.h.in: Same. * config/os/gnu-linux/os_defines.h: Conditionally undefine _GLIBCXX_HAVE_GETS. * include/c_global/cstdio: Conditionally declare deprecated gets. * include/c_std/cstdio: Same. Co-Authored-By: Ramana Radhakrishnan <ramana@gcc.gnu.org> From-SVN: r184774
2011-12-01acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove size-specific macros.Benjamin Kosnik1-13/+2
2011-11-30 Benjamin Kosnik <bkoz@redhat.com> * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1, _GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4, _GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to indicate use of C++11 atomic builtins. * config.h.in: Regenerate. * configure: Regenerate. * include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h. * include/Makefile.in: Regenerate. * libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x. * libsupc++/Makefile.in: Regenerate. * include/bits/atomic_base.h: Move lock-free property macros... * libsupc++/atomic_lockfree_defines.h: ...here. * include/std/future: Use C++11 macros. * libsupc++/eh_ptr.cc: Same. * libsupc++/eh_throw.cc: Same. * libsupc++/exception: Same. * libsupc++/exception_ptr.h: Same. * libsupc++/guard.cc: Same. * libsupc++/nested_exception.cc: Same. * libsupc++/nested_exception.h: Same. * src/future.cc: Same. * include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS. * doc/doxygen/user.cfg.in * doc/xml/manual/concurrency_extensions.xml * testsuite/18_support/exception_ptr/lifespan.cc * testsuite/lib/libstdc++.exp From-SVN: r181869
2011-11-07acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define.Jonathan Wakely1-0/+9
* acinclude.m4 (GLIBCXX_CHECK_SC_NPROC_ONLN): Define. (GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP): Define. (GLIBCXX_CHECK_SYSCTL_HW_NCPU): Define. * configure.ac: Use new checks. * configure: Regenerate. * config.h.in: Regenerate. * src/thread.cc: Check new config macros. * testsuite/lib/libstdc++.exp: Likewise. From-SVN: r181084
2011-11-07acinclude.m4: Check for <stdalign.h>Jonathan Wakely1-0/+3
* acinclude.m4: Check for <stdalign.h> * configure: Regenerate. * config.h.in: Likewise. * include/Makefile.am: Add <cstdalign>. * include/Makefile.in: Regenerate. * include/c_global/cstdalign: New. * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: New. * doc/xml/manual/backwards_compatibility.xml: Update. * doc/xml/manual/status_cxx2011.xml: Update. From-SVN: r181076
2011-11-02Move gthr to toplevel libgccRainer Orth1-4/+0
gcc: * gthr-single.h, gthr.h: Move to ../libgcc. * gthr-aix.h: Move to ../libgcc/config/rs6000. * gthr-dce.h: Move to ../libgcc/config/pa. * gthr-lynx.h: Move to ../libgcc/config. * gthr-mipssde.h: Move to ../libgcc/config/mips. * gthr-posix.h: Move to ../libgcc/config. * gthr-rtems.h: Likewise. * gthr-tpf.h: Move to ../libgcc/config/s390. * gthr-vxworks.h: Move to ../libgcc/config. * gthr-win32.h: Move to ../libgcc/config/i386. * configure.ac (gthread_flags): Remove (gthr-default.h): Don't create. (thread_file): Don't substitute. * configure: Regenerate. * Makefile.in (GCC_THREAD_FILE): Remove. (GTHREAD_FLAGS): Remove. (libgcc.mvars): Remove GTHREAD_FLAGS. * config/t-vxworks (EXTRA_HEADERS): Remove. gcc/po: * EXCLUDES (gthr-aix.h, gthr-dce.h, gthr-posix.c, gthr-posix.h) (gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h) (gthr-win32.h, gthr.h): Remove. libgcc: * gthr-single.h, gthr.h: New files. * config/gthr-lynx.h, config/gthr-posix.h., config/gthr-rtems.h, config/gthr-vxworks.h, config/i386/gthr-win32.h, config/mips/gthr-mipssde.h, config/pa/gthr-dce.h, config/rs6000/gthr-aix.h, config/s390/gthr-tpf.h: New files. * config/i386/gthr-win32.c: Include "gthr-win32.h". * configure.ac (thread_header): New variable. Set it depending on target_thread_file. (gthr-default.h): Link from $thread_header. * configure: Regenerate. * Makefile.in (LIBGCC2_CFLAGS): Remove $(GTHREAD_FLAGS). libgfortran: * Makefile.am (AM_CPPFLAGS): Add -I$(srcdir)/$(MULTISRCTOP)../libgcc, -I$(MULTIBUILDTOP)../libgcc. * Makefile.in: Regenerate. * acinclude.m4 (LIBGFOR_CHECK_GTHR_DEFAULT): Remove. * configure.ac (LIBGFOR_CHECK_GTHR_DEFAULT): Likewise. * configure: Regenerate. * config.h.in: Regenerate. libobjc: * Makefile.in (INCLUDES): Add -I$(MULTIBUILDTOP)../libgcc. * configure.ac (target_thread_file, HAVE_GTHR_DEFAULT): Remove. * configure: Regenerate. * config.h.in: Regenerate. libstdc++-v3: * acinclude.m4 (GLIBCXX_CONFIGURE): Determine and substitute toplevel_builddir. (GLIBCXX_ENABLE_THREADS): Remove glibcxx_thread_h, HAVE_GTHR_DEFAULT, enable_thread. (GLIBCXX_CHECK_GTHREADS): Reflect gthr move to libgcc. * include/Makefile.am (thread_host_headers): Remove ${host_builddir}/gthr-tpf.h. (${host_builddir}/gthr.h): Reflect gthr move to libgcc. Use $<. (${host_builddir}/gthr-single.h): Likewise. (${host_builddir}/gthr-posix.h): Likewise. (${host_builddir}/gthr-tpf.h): Remove. (${host_builddir}/gthr-default.h): Likewise. * configure, config.h.in: Regenerate. * Makefile.in, doc/Makefile.in, include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in, src/Makefile.intestsuite/Makefile.in: Regenerate. From-SVN: r180776
2011-10-14configure.host: Use config/os/mingw32-w64 instead of config/os/mingw32 if ↵Jonathan Yong1-1/+2
vendor key is "w64". 2011-10-14 Jonathan Yong <jon_y@users.sourceforge.net> * configure.host: Use config/os/mingw32-w64 instead of config/os/mingw32 if vendor key is "w64". * config/os/mingw32-w64: Duplicate from config/os/mingw32. * config/os/mingw32-w64/os_defines.h: Enable _GLIBCXX_FULLY_DYNAMIC_STRING if undefined. * acinclude.m4: Set fully-dynamic-string to 1 when enabled, 0 when disabled or undefined if unset by user. * include/bits/basic_string.h: Check if _GLIBCXX_FULLY_DYNAMIC_STRING is set to 0 instead of undefined. include/bits/basic_string.tcc: Likewise. * configure: Regenerated. * config.h.in: Likewise. From-SVN: r179961
2011-09-21limits.cc: Replace everywhere __int128_t -> __int128, and __uint128_t -> ↵Paolo Carlini1-1/+1
unsigned __int128. 2011-09-21 Paolo Carlini <paolo.carlini@oracle.com> * src/limits.cc: Replace everywhere __int128_t -> __int128, and __uint128_t -> unsigned __int128. * include/std/type_traits: Likewise. * include/std/limits: Likewise. * testsuite/18_support/numeric_limits/dr559.cc: Likewise. * testsuite/18_support/numeric_limits/lowest.cc: Likewise. * testsuite/18_support/numeric_limits/40856.cc: Likewise. * testsuite/18_support/numeric_limits/max_digits10.cc: Likewise. * testsuite/util/testsuite_common_types.h: Likewise. * testsuite/20_util/make_signed/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/make_signed/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/is_floating_point/value.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc: Likewise. * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc: Likewise. * testsuite/20_util/is_signed/value.cc: Likewise. * testsuite/20_util/is_unsigned/value.cc: Likewise. * testsuite/20_util/is_integral/value.cc: Likewise. * config/abi/pre/gnu.ver: Likewise. * acinclude.m4: Likewise. * configure: Regenerate. * config.h.in: Likewise. From-SVN: r179044