Patchwork RFA: v3 PATCH to add on_quick_exit/quick_exit to std

login
register
mail settings
Submitter Paolo Carlini
Date Feb. 14, 2013, 7:16 p.m.
Message ID <511D381D.50302@oracle.com>
Download mbox | patch
Permalink /patch/220488/
State New
Headers show

Comments

Paolo Carlini - Feb. 14, 2013, 7:16 p.m.
... or the below, just in case an interesting system provides the 
*quick_exit functions but doesn't define _GLIBCXX_USE_C99.

Paolo.

///////////////////////

Patch

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
 }