Ville Voutilainen
e12880f96f
re PR libstdc++/71313 ([Filesystem TS] remove_all fails to remove directory contents recursively)
...
PR libstdc++/71313
* src/filesystem/ops.cc (remove_all(const path&, error_code&)):
Call remove_all for children of a directory.
* testsuite/experimental/filesystem/operations/create_directories.cc:
Adjust.
From-SVN: r237978
2016-07-04 15:52:49 +03:00
François Dumont
29dbb034cb
re PR libstdc++/71181 (Reserving in unordered_map doesn't reserve enough)
...
2016-06-20 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/71181
* include/tr1/hashtable_policy.h
(_Prime_rehash_policy::_M_next_bkt): Make past-the-end iterator
dereferenceable to avoid check on lower_bound result.
(_Prime_rehash_policy::_M_bkt_for_elements): Call latter.
(_Prime_rehash_policy::_M_need_rehash): Likewise.
* src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
Always return a value greater than input value. Set _M_next_resize to
max value when reaching highest prime number.
* src/shared/hashtable-aux.cc (__prime_list): Add comment about sentinel
being now useless.
* testsuite/23_containers/unordered_set/hash_policy/71181.cc: New.
* testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc
(test02): New.
* testsuite/23_containers/unordered_set/hash_policy/prime_rehash.cc: New.
* testsuite/23_containers/unordered_set/hash_policy/rehash.cc:
Fix indentation.
From-SVN: r237617
2016-06-20 20:04:25 +00:00
Jonathan Wakely
94229fb6dc
libstdc++/71320 Add or remove file permissions correctly
...
PR libstdc++/71320
* src/filesystem/ops.cc (permissions(const path&, perms, error_code&)):
Add or remove permissions according to perms argument.
* testsuite/experimental/filesystem/operations/permissions.cc: New
test.
From-SVN: r237136
2016-06-06 16:50:01 +01:00
Jonathan Wakely
3d73ae6ea9
libstdc++/71049 fix --disable-libstdcxx-dual-abi bootstrap
...
PR libstdc++/71049
* src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_DUAL_ABI]: Don't define
exception constructors with __sso_string parameters.
From-SVN: r236118
2016-05-11 13:39:28 +01:00
Jonathan Wakely
6fe673ad0f
libstdc++/71038 fix error checks in filesystem::copy_file
...
PR libstdc++/71038
* src/filesystem/ops.cc (do_copy_file): Fix backwards conditions.
* testsuite/experimental/filesystem/operations/copy_file.cc: New test.
From-SVN: r236084
2016-05-10 16:39:14 +01:00
Jonathan Wakely
f9a39467b6
libstdc++/71036 Handle EEXIST in filesystem::create_directory
...
PR libstdc++/71036
* src/filesystem/ops.cc (create_dir): Handle EEXIST from mkdir.
* testsuite/experimental/filesystem/operations/create_directory.cc:
New test.
From-SVN: r236076
2016-05-10 14:04:21 +01:00
Jonathan Wakely
6f0800d418
libstdc++/71037 Add base path to filesystem::canonical exceptions
...
PR libstdc++/71037
* src/filesystem/ops.cc (canonical(const path&, const path&)): Add
base path to exception.
* testsuite/experimental/filesystem/operations/canonical.cc: Test
paths contained in exception.
From-SVN: r236074
2016-05-10 13:22:32 +01:00
Chris Gregory
f92ab29ffa
Remove trailing whitespace from libstdc++-v3 files
...
2016-04-29 Chris Gregory <czipperz@gmail.com>
* config/*: Remove trailing whitespace.
* src/*: Likewise.
* testsuite/tr1/*: Likewise.
* testsuite/util/*: Likewise.
From-SVN: r235645
2016-04-29 17:11:43 +01:00
Jonathan Wakely
a1e1ec7605
Fix std::codecvt_utf8* for big-endian targets
...
PR libstdc++/69703
* src/c++11/codecvt.cc (__codecvt_utf8_base<char16_t>::do_in,
__codecvt_utf8_utf16_base<char16_t>::do_in): Fix mask operations.
From-SVN: r235293
2016-04-20 18:40:02 +01:00
Jonathan Wakely
29ca91f72e
libstdc++/69703 ignore endianness in codecvt_utf8
...
PR libstdc++/69703
* src/c++11/codecvt.cc (__codecvt_utf8_base<char16_t>::do_in)):
Override endianness bit in mode.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: New test.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: Test
that little_endian mode is ignored.
* testsuite/experimental/filesystem/path/native/string.cc: New test.
From-SVN: r235216
2016-04-19 19:02:46 +01:00
Jonathan Wakely
1490525104
libstdc++/70609 fix filesystem::copy()
...
PR libstdc++/70609
* src/filesystem/ops.cc (close_fd): New function.
(do_copy_file): Set permissions before copying file contents. Check
result of closing file descriptors. Don't copy streambuf when file
is empty.
(copy(const path&, const path&, copy_options, error_code&)): Use
lstat for source file when copy_symlinks is set.
* testsuite/experimental/filesystem/operations/copy.cc: Test copy().
From-SVN: r235215
2016-04-19 19:02:39 +01:00
Jonathan Wakely
9c476ad426
Add noexcept to Filesystem TS operators
...
* include/experimental/bits/fs_fwd.h (operator&, operator|, operator^,
operator~ operator&=, operator|=, operator^=): Add noexcept to
overloaded operators for copy_options, perms and directory_options.
* src/filesystem/ops.cc (make_file_type, make_file_status,
is_not_found_errno, file_time): Add noexcept.
From-SVN: r235214
2016-04-19 19:02:32 +01:00
Eric Botcazou
49a52ebcc0
Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
...
* src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
* src/Makefile.in: Regenerate.
From-SVN: r234782
2016-04-06 15:07:49 +00:00
Jonathan Wakely
87cec93ee0
Ensure std::thread helpers have internal linkage
...
PR libstdc++/70503
* src/c++11/thread.cc (execute_native_thread_routine,
execute_native_thread_routine_compat): Give internal linkage.
* testsuite/30_threads/thread/70503.cc: New test.
From-SVN: r234746
2016-04-05 14:35:32 +01:00
Torvald Riegel
9585381acd
libstdc++: Fix usage of __GXX_WEAK__ in TM TS support.
...
* include/bits/c++config (_GLIBCXX_USE_WEAK_REF): New.
(_GLIBCXX_TXN_SAFE, _GLIBCXX_TXN_SAFE_DYN): Use _GLIBCXX_USE_WEAK_REF
and move after its definition.
* config/os/aix/os_defines.h (_GLIBCXX_USE_WEAK_REF): Override.
* src/c++11/cow-stdexcept.cc: Use _GLIBCXX_USE_WEAK_REF instead of
__GXX_WEAK__, and only provide transactional clones if
_GLIBCXX_USE_WEAK_REF is true. Don't provide stubs of libitm
functions.
From-SVN: r232539
2016-01-18 20:09:55 +00:00
Jonathan Wakely
f5460595a4
Fix libstdc++ build with -fno-exceptions
...
PR libstdc++/69340
* src/c++11/cow-stdexcept.cc (_txnal_cow_string_C1_for_exceptions):
Use macros for exception handling and fix unused parameter warning.
From-SVN: r232502
2016-01-18 11:24:20 +00:00
Torvald Riegel
7a5d1d34ee
libstdc++: Fix static_assert.
...
* src/c++11/cow-stdexcept.cc (txnal_read_ptr): Fix static_assert.
From-SVN: r232483
2016-01-17 17:43:37 +00:00
Torvald Riegel
a04d5fc95d
libstdc++: Make certain exceptions transaction_safe.
...
From-SVN: r232454
2016-01-15 22:42:41 +00:00
Jakub Jelinek
818ab71a41
Update copyright years.
...
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Ville Voutilainen
ca2c1b3283
Fix a regression introduced by the fix of libstdc++/68276.
...
2015-12-18 Ville Voutilainen <ville.voutilainen@gmail.com>
Fix a regression introduced by the fix of libstdc++/68276.
* src/c++11/ios.cc (_M_grow_words): Catch bad_alloc again so that
bad_array_new_length is handled properly.
From-SVN: r231839
2015-12-18 23:27:53 +02:00
Ville Voutilainen
03d5d0c353
re PR libstdc++/68276 (ios_base::_M_grow_words should use new (std::nothrow))
...
2015-12-18 Ville Voutilainen <ville.voutilainen@gmail.com>
PR libstdc++/68276
* src/c++11/ios.cc (_M_grow_words): Use nothrow new.
* testsuite/27_io/ios_base/storage/11584.cc: Adjust.
From-SVN: r231819
2015-12-18 17:17:09 +02:00
Jonathan Wakely
55089c2b5c
libstdc++/68921 add timeout argument to futex(2)
...
PR libstdc++/68921
* src/c++11/futex.cc
(__atomic_futex_unsigned_base::_M_futex_wait_until): Use null pointer
as timeout argument.
From-SVN: r231676
2015-12-16 10:40:04 +00:00
Jennifer Yao
23c64853c8
More fine-grained autoconf checks for C99 library
...
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-11-13 14:51:25 +00:00
Jonathan Wakely
f55e699d3d
Loop in std::this_thread sleep functions
...
PR libstdc++/60421
* include/std/thread (this_thread::sleep_for): Retry on EINTR.
(this_thread::sleep_until): Retry if time not reached.
* src/c++11/thread.cc (__sleep_for): Retry on EINTR.
* testsuite/30_threads/this_thread/60421.cc: Test interruption and
non-steady clocks.
From-SVN: r230183
2015-11-11 17:08:51 +00:00
Jonathan Wakely
f4cfe221bf
Fix comments saying why headers are included
...
* src/c++98/locale.cc: Fix comment.
* src/c++98/locale_init.cc: Likewise.
From-SVN: r228446
2015-10-03 13:09:31 +01:00
Jonathan Wakely
8b75621078
Enable dual ABI for Filesystem library
...
* src/filesystem/Makefile.am: Add cxx11_abi_sources.
* src/filesystem/Makefile.in: Regenerate.
* src/filesystem/cow-dir.cc: New.
* src/filesystem/cow-ops.cc: New.
* src/filesystem/cow-path.cc: New.
* src/filesystem/dir.cc: Define macro for new ABI.
* src/filesystem/ops.cc: Likewise.
* src/filesystem/path.cc: Likewise.
From-SVN: r228437
2015-10-03 00:21:41 +01:00
Jonathan Wakely
7fcdbdd21d
Allow Filesystem TS to compile without wchar_t
...
* include/bits/locale_conv.h [!_GLIBCXX_USE_WCHAR_T]
(__do_str_codecvt, __str_codecvt_in, __str_codecvt_out): Enable.
* include/experimental/fs_path.h [!_GLIBCXX_USE_WCHAR_T]
(path::wstring, path::generic_wstring): Disable.
* src/filesystem/path.cc (path::_S_convert_loc)
[!_GLIBCXX_USE_WCHAR_T]: Skip conversion.
* testsuite/experimental/filesystem/path/assign/assign.cc: Check for
wchar_t support.
* testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
* testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
From-SVN: r228417
2015-10-02 20:38:38 +01:00
Jonathan Wakely
7b65155f1c
PR libstdc++/67747 use readdir instead of readdir_r
...
PR libstdc++/67747
* src/filesystem/dir.cc (native_readdir): Remove.
(_Dir::advance): Use readdir instead of native_readdir.
(recursive_directory_iterator(const path&, directory_options,
error_code*)): Use swap instead of reset.
From-SVN: r228404
2015-10-02 17:34:34 +01:00
François Dumont
9702ee6a6f
messages_members.cc (Catalog_info, Catalogs): Move...
...
2015-09-30 François Dumont <fdumont@gcc.gnu.org>
Jonathan Wakely <jwakely@redhat.com>
* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs):
Move...
* config/locale/gnu/c++locale_internal.h: ...here in std namespace.
* config/locale/gnu/c_locale.cc: Move implementation of latter here.
* src/c++98/Makefile.am: Compile c++locale.cc with -fimplicit-templates.
* src/c++98/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Adjust.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r228305
2015-09-30 20:04:43 +00:00
Jonathan Wakely
ce535a9685
Reduce space and time overhead of std::thread
...
PR libstdc++/65393
* config/abi/pre/gnu.ver: Export new symbols.
* include/std/thread (thread::_State, thread::_State_impl): New types.
(thread::_M_start_thread): Add overload taking unique_ptr<_State>.
(thread::_M_make_routine): Remove.
(thread::_S_make_state): Add.
(thread::_Impl_base, thread::_Impl, thread::_M_start_thread)
[_GLIBCXX_THREAD_ABI_COMPAT] Only declare conditionally.
* src/c++11/thread.cc (execute_native_thread_routine): Rename to
execute_native_thread_routine_compat and re-define to use _State.
(thread::_State::~_State()): Define.
(thread::_M_make_thread): Define new overload.
(thread::_M_make_thread) [_GLIBCXX_THREAD_ABI_COMPAT]: Only define old
overloads conditionally.
From-SVN: r228242
2015-09-29 13:54:05 +01:00
Jonathan Wakely
80400b0477
LWG 2135: terminate() in condition_variable::wait()
...
* include/std/condition_variable (condition_variable::wait): Add
noexcept.
* src/c++11/condition_variable.cc (condition_variable::wait): Call
std::terminate on error (DR 2135).
From-SVN: r228217
2015-09-28 19:44:40 +01:00
Jonathan Wakely
07dc170b6f
Limit number of symlinks that canonical() will resolve
...
* src/filesystem/ops.cc (canonical): Simplify error handling and
limit number of symlinks that can be resolved.
From-SVN: r228043
2015-09-23 12:26:50 +01:00
Jonathan Wakely
429ee11aa3
Fix semantics of Filesystem TS directory iterators
...
[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-23 12:26:45 +01:00
Jonathan Wakely
366703118c
Fix filesystem::create_directories() function
...
* src/filesystem/ops.cc (is_dot, is_dotdot): Define new helpers.
(create_directories): Fix error handling.
* testsuite/experimental/filesystem/operations/create_directories.cc:
New.
From-SVN: r228041
2015-09-23 12:25:59 +01:00
Catherine Moore
05c0e3eb54
debug.cc: Include <cstdio>.
...
2015-09-17 Catherine Moore <clm@codesourcery.com>
* src/c++11/debug.cc: Include <cstdio>.
From-SVN: r227888
2015-09-17 19:16:53 -04:00
Gerald Pfeifer
0b546684ad
Include <cerrno> in src/c++11/random.cc
...
2015-09-17 Gerald Pfeifer <gerald@pfeifer.com>
* src/c++11/random.cc: Include <cerrno>.
From-SVN: r227887
2015-09-17 22:28:00 +01:00
François Dumont
814e52ca21
2015-09-17 François Dumont <fdumont@gcc.gnu.org>
...
* include/debug/formatter.h
(_Error_formatter::_Parameter::_M_print_field): Deprecate.
(_Error_formatter::_Parameter::_M_print_description): Likewise.
(_Error_formatter::_M_format_word): Likewise.
(_Error_formatter::_M_print_word): Likewise.
(_Error_formatter::_M_print_string): Likewise.
(_Error_formatter::_M_get_max_length): Likewise.
(_Error_formatter::_M_max_length): Delete.
(_Error_formatter::_M_indent): Likewise.
(_Error_formatter::_M_column): Likewise.
(_Error_formatter::_M_first_line): Likewise.
(_Error_formatter::_M_wordwrap): Likewise.
* src/c++11/debug.cc: Adapt.
From-SVN: r227885
2015-09-17 19:23:26 +00:00
Jonathan Wakely
a2b4d73daf
Make std::random_device retry after short reads
...
PR libstdc++/65142
* src/c++11/random.cc (random_device::_M_getval()): Retry after short
reads.
From-SVN: r227872
2015-09-17 16:06:42 +01:00
Jonathan Wakely
3036299861
Implement filesystem::canonical() without realpath
...
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-16 23:50:28 +01:00
Jonathan Wakely
7c928f726d
Fix filesystem::canonical on Solaris 10.
...
PR libstdc++/67173
* src/filesystem/ops.cc (filesystem::canonical): Allocate buffer for
realpath on Solaris 10.
From-SVN: r227689
2015-09-11 15:20:32 +01:00
Jonathan Wakely
42b6aad9ef
Check read() result in std::random_device.
...
PR libstdc++/65142
* src/c++11/random.cc (random_device::_M_getval()): Check read result.
From-SVN: r227687
2015-09-11 14:44:26 +01:00
Jonathan Wakely
433f6725ca
re PR libstdc++/66902 (_S_debug_messages is unneccessary public)
...
PR libstdc++/66902
* src/c++11/debug.cc (_S_debug_messages): Make array const.
From-SVN: r227466
2015-09-03 20:05:15 +01:00
Jonathan Wakely
e41fd1f067
libstdc++/66902 Make _S_debug_messages static.
...
PR libstdc++/66902
* src/c++11/debug.cc (_S_debug_messages): Give internal linkage.
From-SVN: r227228
2015-08-26 21:22:58 +01:00
François Dumont
630a286ab6
re PR libstdc++/60519 (Debug mode should check comparators for irreflexivity)
...
2015-08-24 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/60519
* include/debug/formatter.h (_Debug_msg_id::__msg_irreflexive_ordering):
New enum entry.
* include/debug/functions.h (_Irreflexive_checker): New.
(__is_irreflexive, __is_irreflexive_pred): New.
* include/debug/macros.h
(__glibcxx_check_irreflexive, __glibcxx_check_irreflexive_pred): New
macros.
(__glibcxx_check_irreflexive2, __glibcxx_check_irreflexive_pred2): New
macros limited to post-C++11 mode.
* include/debug/debug.h
(__glibcxx_requires_irreflexive, __glibcxx_requires_irreflexive_pred):
New macros, use latter.
(__glibcxx_requires_irreflexive2, __glibcxx_requires_irreflexive_pred2):
Likewise.
* include/bits/stl_algo.h
(partial_sort_copy): Add irreflexive debug check.
(partial_sort_copy): Likewise.
(lower_bound): Likewise.
(upper_bound): Likewise.
(equal_range): Likewise.
(binary_search): Likewise.
(inplace_merge): Likewise.
(includes): Likewise.
(next_permutation): Likewise.
(prev_permutation): Likewise.
(is_sorted_until): Likewise.
(minmax_element): Likewise.
(partial_sort): Likewise.
(nth_element): Likewise.
(sort): Likewise.
(merge): Likewise.
(stable_sort): Likewise.
(set_union): Likewise.
(set_intersection): Likewise.
(set_difference): Likewise.
(set_symmetric_difference): Likewise.
(min_element): Likewise.
(max_element): Likewise.
* include/bits/stl_algobase.h
(lower_bound): Likewise.
(lexicographical_compare): Likewise.
* include/bits/stl_heap.h
(push_heap): Likewise.
(pop_heap): Likewise.
(make_heap): Likewise.
(sort_heap): Likewise.
(is_heap_until): Likewise.
* testsuite/25_algorithms/lexicographical_compare/debug/
irreflexive_neg.cc: New.
* testsuite/25_algorithms/lower_bound/debug/irreflexive.cc: New.
* testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
New.
From-SVN: r227189
2015-08-25 20:27:03 +00:00
François Dumont
25c65938c8
Revert my change to commit with PR reference again.
...
From-SVN: r227187
2015-08-25 20:22:47 +00:00
François Dumont
41e4e5edce
formatter.h (_Debug_msg_id::__msg_irreflexive_ordering): New enum entry.
...
2015-08-24 François Dumont <fdumont@gcc.gnu.org>
* include/debug/formatter.h (_Debug_msg_id::__msg_irreflexive_ordering):
New enum entry.
* include/debug/functions.h (_Irreflexive_checker): New.
(__is_irreflexive, __is_irreflexive_pred): New.
* include/debug/macros.h
(__glibcxx_check_irreflexive, __glibcxx_check_irreflexive_pred): New
macros.
(__glibcxx_check_irreflexive2, __glibcxx_check_irreflexive_pred2): New
macros limited to post-C++11 mode.
* include/debug/debug.h
(__glibcxx_requires_irreflexive, __glibcxx_requires_irreflexive_pred):
New macros, use latter.
(__glibcxx_requires_irreflexive2, __glibcxx_requires_irreflexive_pred2):
Likewise.
* include/bits/stl_algo.h
(partial_sort_copy): Add irreflexive debug check.
(partial_sort_copy): Likewise.
(lower_bound): Likewise.
(upper_bound): Likewise.
(equal_range): Likewise.
(binary_search): Likewise.
(inplace_merge): Likewise.
(includes): Likewise.
(next_permutation): Likewise.
(prev_permutation): Likewise.
(is_sorted_until): Likewise.
(minmax_element): Likewise.
(partial_sort): Likewise.
(nth_element): Likewise.
(sort): Likewise.
(merge): Likewise.
(stable_sort): Likewise.
(set_union): Likewise.
(set_intersection): Likewise.
(set_difference): Likewise.
(set_symmetric_difference): Likewise.
(min_element): Likewise.
(max_element): Likewise.
* include/bits/stl_algobase.h
(lower_bound): Likewise.
(lexicographical_compare): Likewise.
* include/bits/stl_heap.h
(push_heap): Likewise.
(pop_heap): Likewise.
(make_heap): Likewise.
(sort_heap): Likewise.
(is_heap_until): Likewise.
* testsuite/25_algorithms/lexicographical_compare/debug/
irreflexive_neg.cc: New.
* testsuite/25_algorithms/lower_bound/debug/irreflexive.cc: New.
* testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
New.
From-SVN: r227147
2015-08-24 20:21:57 +00:00
Michael Haubenwallner
74b7ec8c45
libstdc++-v3/fragment.am (AM_CPPFLAGS): Add CPPFLAGS
...
2015-07-24 Michael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
* fragment.am (AM_CPPFLAGS): Add CPPFLAGS.
* Makefile.in: Regenerate.
* doc/Makefile.in: Regenerate.
* include/Makefile.in: Regenerate.
* libsupc++/Makefile.in: Regenerate.
* po/Makefile.in: Regenerate.
* python/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* src/c++11/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* src/filesystem/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
From-SVN: r226138
2015-07-24 07:05:19 +00:00
Jonathan Wakely
795038b722
re PR libstdc++/66855 (codecvt wrong endianness in UTF-16 conversions)
...
PR libstdc++/66855
* src/c++11/codecvt.cc (__codecvt_utf8_utf16_base::do_in): Override
endianness bit in mode.
* testsuite/22_locale/codecvt/codecvt_utf8_utf16/66855.cc: New.
From-SVN: r225748
2015-07-13 21:07:48 +01:00
Jonathan Wakely
0dc3cba1bd
re PR libstdc++/65393 (std::thread shared_ptr inefficiency)
...
PR libstdc++/65393
* src/c++11/thread.cc (thread::_M_make_thread): Replace shared_ptr
copies with moves.
From-SVN: r224530
2015-06-16 18:53:52 +01:00
Jonathan Wakely
6a3d0bb327
re PR libstdc++/66464 (codecvt_utf16 max_length returning incorrect value)
...
PR libstdc++/66464
* src/c++11/codecvt.cc (codecvt_utf16_base<char32_t>::do_max_length):
Return 4 not 3.
From-SVN: r224415
2015-06-12 11:26:05 +01:00