diff mbox

RFA: v3 PATCH to add on_quick_exit/quick_exit to std

Message ID 511D381D.50302@oracle.com
State New
Headers show

Commit Message

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

Paolo.

///////////////////////
diff mbox

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
 }