RFA: v3 PATCH to add on_quick_exit/quick_exit to std
Paolo Carlini
paolo.carlini@oracle.com
Thu Feb 14 19:17:00 GMT 2013
... or the below, just in case an interesting system provides the
*quick_exit functions but doesn't define _GLIBCXX_USE_C99.
Paolo.
///////////////////////
-------------- next part --------------
Index: testsuite/18_support/quick_exit/quick_exit.cc
===================================================================
--- testsuite/18_support/quick_exit/quick_exit.cc (revision 196056)
+++ testsuite/18_support/quick_exit/quick_exit.cc (working copy)
@@ -25,7 +25,9 @@
void handler()
{
+#if _GLIBCXX_USE_C99
std::_Exit(0);
+#endif
}
void wrong_handler()
@@ -35,9 +37,11 @@
int main()
{
+#if _GLIBCXX_USE_C99
#if defined(_GLIBCXX_HAVE_AT_QUICK_EXIT) && defined(_GLIBCXX_HAVE_QUICK_EXIT)
std::at_quick_exit (handler);
std::atexit (wrong_handler);
std::quick_exit (1);
#endif
+#endif
}
More information about the Gcc-patches
mailing list