[libcxx] r249743 - Split <setjmp.h> out of <csetjmp>.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 8 13:41:26 PDT 2015


Author: rsmith
Date: Thu Oct  8 15:41:26 2015
New Revision: 249743

URL: http://llvm.org/viewvc/llvm-project?rev=249743&view=rev
Log:
Split <setjmp.h> out of <csetjmp>.

Added:
    libcxx/trunk/include/setjmp.h
      - copied, changed from r249736, libcxx/trunk/include/csetjmp
Modified:
    libcxx/trunk/include/csetjmp
    libcxx/trunk/test/std/depr/depr.c.headers/setjmp_h.pass.cpp

Modified: libcxx/trunk/include/csetjmp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/csetjmp?rev=249743&r1=249742&r2=249743&view=diff
==============================================================================
--- libcxx/trunk/include/csetjmp (original)
+++ libcxx/trunk/include/csetjmp Thu Oct  8 15:41:26 2015
@@ -38,10 +38,6 @@ void longjmp(jmp_buf env, int val);
 #pragma GCC system_header
 #endif
 
-#ifndef setjmp
-#define setjmp(env) setjmp(env)
-#endif
-
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 using ::jmp_buf;

Copied: libcxx/trunk/include/setjmp.h (from r249736, libcxx/trunk/include/csetjmp)
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/setjmp.h?p2=libcxx/trunk/include/setjmp.h&p1=libcxx/trunk/include/csetjmp&r1=249736&r2=249743&rev=249743&view=diff
==============================================================================
--- libcxx/trunk/include/csetjmp (original)
+++ libcxx/trunk/include/setjmp.h Thu Oct  8 15:41:26 2015
@@ -1,5 +1,5 @@
 // -*- C++ -*-
-//===--------------------------- csetjmp ----------------------------------===//
+//===--------------------------- setjmp.h ---------------------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -8,31 +8,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSETJMP
-#define _LIBCPP_CSETJMP
+#ifndef _LIBCPP_SETJMP_H
+#define _LIBCPP_SETJMP_H
 
 /*
-    csetjmp synopsis
+    setjmp.h synopsis
 
 Macros:
 
     setjmp
 
-namespace std
-{
-
 Types:
 
     jmp_buf
 
 void longjmp(jmp_buf env, int val);
 
-}  // std
-
 */
 
 #include <__config>
-#include <setjmp.h>
+#include_next <setjmp.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
@@ -42,11 +37,4 @@ void longjmp(jmp_buf env, int val);
 #define setjmp(env) setjmp(env)
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::jmp_buf;
-using ::longjmp;
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif  // _LIBCPP_CSETJMP
+#endif  // _LIBCPP_SETJMP_H

Modified: libcxx/trunk/test/std/depr/depr.c.headers/setjmp_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/depr/depr.c.headers/setjmp_h.pass.cpp?rev=249743&r1=249742&r2=249743&view=diff
==============================================================================
--- libcxx/trunk/test/std/depr/depr.c.headers/setjmp_h.pass.cpp (original)
+++ libcxx/trunk/test/std/depr/depr.c.headers/setjmp_h.pass.cpp Thu Oct  8 15:41:26 2015
@@ -12,6 +12,10 @@
 #include <setjmp.h>
 #include <type_traits>
 
+#ifndef setjmp
+#error setjmp not defined
+#endif
+
 int main()
 {
     jmp_buf jb;




More information about the cfe-commits mailing list