summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-11 17:50:13 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-11 17:50:13 +0000
commit6985c6f9253a2e5abc4dc1612ad6ff6c90800752 (patch)
treefe180eb10b98589f5ed9fd419ccd34e3c604d803
parentffc1977a9d0e485ad63906c4ad8998166e7250b9 (diff)
downloadppe42-gcc-6985c6f9253a2e5abc4dc1612ad6ff6c90800752.tar.gz
ppe42-gcc-6985c6f9253a2e5abc4dc1612ad6ff6c90800752.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195948 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/config.h.in6
-rwxr-xr-xlibstdc++-v3/configure928
-rw-r--r--libstdc++-v3/include/c_global/cstdlib10
-rw-r--r--libstdc++-v3/include/c_std/cstdlib10
-rw-r--r--libstdc++-v3/linkage.m431
-rw-r--r--libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc39
7 files changed, 1033 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1768b9b45be..537f7a3dc64 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2013-02-11 Jason Merrill <jason@redhat.com>
+
+ * linkage.m4 (GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE): New.
+ (GLIBCXX_CHECK_STDLIB_SUPPORT): Check for atexit and at_quick_exit.
+ * config.h.in, configure: Regenerate.
+ * 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.
+
2013-02-11 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/56282
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index dd14b91ebfd..59a7fae0fbd 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -27,6 +27,9 @@
/* Define to 1 if you have the `atanl' function. */
#undef HAVE_ATANL
+/* Define to 1 if you have the `at_quick_exit' function. */
+#undef HAVE_AT_QUICK_EXIT
+
/* Define to 1 if the target assembler supports thread-local storage. */
#undef HAVE_CC_TLS
@@ -303,6 +306,9 @@
/* Define to 1 if you have the `qfpclass' function. */
#undef HAVE_QFPCLASS
+/* Define to 1 if you have the `quick_exit' function. */
+#undef HAVE_QUICK_EXIT
+
/* Define to 1 if you have the `setenv' function. */
#undef HAVE_SETENV
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index a4cf5c9f8cf..008ccbfc9a3 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -26223,6 +26223,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -33125,6 +33241,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -38940,6 +39172,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -44770,6 +45118,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -51274,6 +51738,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -57443,6 +58023,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -63638,6 +64334,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
@@ -69506,6 +70318,122 @@ done
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for at_quick_exit declaration" >&5
+$as_echo_n "checking for at_quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_at_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_at_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ at_quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_at_quick_exit_use=yes
+else
+ glibcxx_cv_func_at_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_at_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_at_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_at_quick_exit_use = x"yes"; then
+ for ac_func in at_quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "at_quick_exit" "ac_cv_func_at_quick_exit"
+if test "x$ac_cv_func_at_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_AT_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for quick_exit declaration" >&5
+$as_echo_n "checking for quick_exit declaration... " >&6; }
+ if test x${glibcxx_cv_func_quick_exit_use+set} != xset; then
+ if test "${glibcxx_cv_func_quick_exit_use+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+ quick_exit(0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ glibcxx_cv_func_quick_exit_use=yes
+else
+ glibcxx_cv_func_quick_exit_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+fi
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_quick_exit_use" >&5
+$as_echo "$glibcxx_cv_func_quick_exit_use" >&6; }
+ if test x$glibcxx_cv_func_quick_exit_use = x"yes"; then
+ for ac_func in quick_exit
+do :
+ ac_fn_c_check_func "$LINENO" "quick_exit" "ac_cv_func_quick_exit"
+if test "x$ac_cv_func_quick_exit" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_QUICK_EXIT 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5
$as_echo_n "checking for strtold declaration... " >&6; }
if test x${glibcxx_cv_func_strtold_use+set} != xset; then
diff --git a/libstdc++-v3/include/c_global/cstdlib b/libstdc++-v3/include/c_global/cstdlib
index c249c78477e..0eb0129967f 100644
--- a/libstdc++-v3/include/c_global/cstdlib
+++ b/libstdc++-v3/include/c_global/cstdlib
@@ -57,6 +57,8 @@ namespace std
extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
extern "C" int atexit(void (*)()) throw ();
extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
+ extern "C" int at_quick_exit(void (*)()) throw ();
+ extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
} // namespace std
#else
@@ -67,6 +69,7 @@ namespace std
#undef abort
#undef abs
#undef atexit
+#undef at_quick_exit
#undef atof
#undef atoi
#undef atol
@@ -83,6 +86,7 @@ namespace std
#undef mbstowcs
#undef mbtowc
#undef qsort
+#undef quick_exit
#undef rand
#undef realloc
#undef srand
@@ -103,6 +107,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::abort;
using ::abs;
using ::atexit;
+#ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
+ using ::at_quick_exit;
+#endif
using ::atof;
using ::atoi;
using ::atol;
@@ -121,6 +128,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::mbtowc;
#endif // _GLIBCXX_HAVE_MBSTATE_T
using ::qsort;
+#ifdef _GLIBCXX_HAVE_QUICK_EXIT
+ using ::quick_exit;
+#endif
using ::rand;
using ::realloc;
using ::srand;
diff --git a/libstdc++-v3/include/c_std/cstdlib b/libstdc++-v3/include/c_std/cstdlib
index 224fccfd9c5..9d2f51ede28 100644
--- a/libstdc++-v3/include/c_std/cstdlib
+++ b/libstdc++-v3/include/c_std/cstdlib
@@ -57,6 +57,8 @@ namespace std
extern "C" void abort(void) throw () _GLIBCXX_NORETURN;
extern "C" int atexit(void (*)()) throw ();
extern "C" void exit(int) throw () _GLIBCXX_NORETURN;
+ extern "C" int at_quick_exit(void (*)()) throw ();
+ extern "C" void quick_exit(int) throw() _GLIBCXX_NORETURN;
} // namespace
#else
@@ -67,6 +69,7 @@ namespace std
#undef abort
#undef abs
#undef atexit
+#undef at_quick_exit
#undef atof
#undef atoi
#undef atol
@@ -83,6 +86,7 @@ namespace std
#undef mbstowcs
#undef mbtowc
#undef qsort
+#undef quick_exit
#undef rand
#undef realloc
#undef srand
@@ -103,6 +107,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::abort;
using ::abs;
using ::atexit;
+#ifdef _GLIBCXX_HAVE_AT_QUICK_EXIT
+ using ::at_quick_exit;
+#endif
using ::atof;
using ::atoi;
using ::atol;
@@ -121,6 +128,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using ::mbtowc;
#endif // _GLIBCXX_HAVE_MBSTATE_T
using ::qsort;
+#ifdef _GLIBCXX_HAVE_QUICK_EXIT
+ using ::quick_exit;
+#endif
using ::rand;
using ::realloc;
using ::srand;
diff --git a/libstdc++-v3/linkage.m4 b/libstdc++-v3/linkage.m4
index b24f4556000..45a09cdf445 100644
--- a/libstdc++-v3/linkage.m4
+++ b/libstdc++-v3/linkage.m4
@@ -239,6 +239,35 @@ dnl 2) has "C" linkage
dnl
dnl argument 1 is name of function to check
dnl
+dnl ASSUMES argument is a stdlib function with ONE parameter
+dnl
+dnl GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1
+AC_DEFUN([GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1], [
+ AC_MSG_CHECKING([for $1 declaration])
+ if test x${glibcxx_cv_func_$1_use+set} != xset; then
+ AC_CACHE_VAL(glibcxx_cv_func_$1_use, [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [ $1(0);],
+ [glibcxx_cv_func_$1_use=yes], [glibcxx_cv_func_$1_use=no])
+ AC_LANG_RESTORE
+ ])
+ fi
+ AC_MSG_RESULT($glibcxx_cv_func_$1_use)
+ if test x$glibcxx_cv_func_$1_use = x"yes"; then
+ AC_CHECK_FUNCS($1)
+ fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
dnl ASSUMES argument is a stdlib function with TWO parameters
dnl
dnl GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2
@@ -306,6 +335,8 @@ AC_DEFUN([GLIBCXX_CHECK_STDLIB_SUPPORT], [
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-fno-builtin -D_GNU_SOURCE'
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1(at_quick_exit)
+ GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_1(quick_exit)
GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
GLIBCXX_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
diff --git a/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc
new file mode 100644
index 00000000000..54ee41e0643
--- /dev/null
+++ b/libstdc++-v3/testsuite/18_support/quick_exit/quick_exit.cc
@@ -0,0 +1,39 @@
+// 2013-02-11 Jason Merrill
+
+// Copyright (C) 2013 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// 18.5 - Start and termination
+
+#include <cstdlib>
+
+void handler()
+{
+ std::_Exit(0);
+}
+
+void wrong_handler()
+{
+ std::abort();
+}
+
+int main()
+{
+ std::at_quick_exit (handler);
+ std::atexit (wrong_handler);
+ std::quick_exit (1);
+}
OpenPOWER on IntegriCloud