delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/07/14:03:55

Message-ID: <002801c09131$90b3c760$9c11893e@oemcomputer>
From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
To: "DJGPP Workers" <djgpp-workers AT delorie DOT com>
Subject: setjmp.h - namespace std patch
Date: Wed, 7 Feb 2001 18:12:40 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp-workers AT delorie DOT com

Here's the setjmp.h patch.  One slight complication here is that the
C++ standard requires setjmp to be a macro, but DJGPP defines it as
a function.  I don't think this is really a problem, so rather than
attempting to fix it, I've just made sure that setjmp is visible in
the global namespace.

Stephen


*** include/setjmp.h.old Thu Jun  3 17:22:28 1999
--- include/setjmp.h Mon Feb  5 18:33:00 2001
***************
*** 5,8 ****
--- 5,9 ----

  #ifdef __cplusplus
+ namespace std {
  extern "C" {
  #endif
***************
*** 41,45 ****
--- 42,67 ----
  #ifdef __cplusplus
  }
+ }
  #endif

  #endif /* !__dj_include_setjmp_h_ */
+
+
+ #if defined(__cplusplus) && !defined(__dj_ENFORCE_ANSI_FREESTANDING)
+
+ using std::setjmp;
+
+ #ifndef __dj_via_cplusplus_header_
+
+ using std::longjmp;
+ using std::jmp_buf;
+
+ #ifndef __STRICT_ANSI__
+
+ using std::sigjmp_buf;
+ using std::sigsetjmp;
+ using std::siglongjmp;
+
+ #endif /* !__STRICT_ANSI__ */
+ #endif /* !__dj_via_cplusplus_header_ */
+ #endif /* __cplusplus && !__dj_ENFORCE_ANSI_FREESTANDING */

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019