diff --git a/repos/libports/include/stdcxx/bits/c++config.h b/repos/libports/include/stdcxx/bits/c++config.h index d02627ef8e..9740ba31c3 100644 --- a/repos/libports/include/stdcxx/bits/c++config.h +++ b/repos/libports/include/stdcxx/bits/c++config.h @@ -1361,7 +1361,7 @@ namespace std /* Define if C99 functions or macros in should be imported in in namespace std for C++11. */ -/* #undef _GLIBCXX11_USE_C99_STDLIB */ +#define _GLIBCXX11_USE_C99_STDLIB 1 /* Define if C99 functions or macros in should be imported in in namespace std for C++11. */ diff --git a/repos/libports/run/stdcxx.run b/repos/libports/run/stdcxx.run index 355be08098..a1e151af62 100644 --- a/repos/libports/run/stdcxx.run +++ b/repos/libports/run/stdcxx.run @@ -34,3 +34,16 @@ build_boot_image { append qemu_args " -nographic " run_genode_until ".*test-stdcxx finished.*\n" 20 + +grep_output {^\[init } + +compare_output_to { +[init -> test-stdcxx] ° °° °°° test-stdcxx started °°° °° ° +[init -> test-stdcxx] 2015.000000 - 5.000000 - 4 +[init -> test-stdcxx] 2015 - 5 - 4 +[init -> test-stdcxx] 123 +[init -> test-stdcxx] 456 +[init -> test-stdcxx] 7.8 +[init -> test-stdcxx] caught std::invalid_argument +[init -> test-stdcxx] ° °° °°° test-stdcxx finished °°° °° ° +} diff --git a/repos/libports/src/test/stdcxx/main.cc b/repos/libports/src/test/stdcxx/main.cc index aa02f35bb4..49b2281c54 100644 --- a/repos/libports/src/test/stdcxx/main.cc +++ b/repos/libports/src/test/stdcxx/main.cc @@ -48,6 +48,8 @@ static void test_cstdlib() { static ::lldiv_t o __attribute__((used)); std::cout << std::strtoul("123", 0, 10) << std::endl; + std::cout << std::stoi("456") << std::endl; + std::cout << std::stod("7.8") << std::endl; }