This recent cygwin change will clarify recent discussion.
---------- Forwarded message ----------
From: Corinna Vinschen <
vinschen@...>
Date: 2008/6/21
Subject: Re: [patch/rfa]: Add _setjmp/_longjmp macros
To:
newlib@...
On Jan 13 17:32, Corinna Vinschen wrote:
I applied the below additional patch as obvious. It defines both
interfaces as functions when building for Cygwin.
Corinna
* libc/include/machine/setjmp.h (_longjmp): Define as function on
Cygwin.
(_setjmp): Ditto.
Index: libc/include/machine/setjmp.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/machine/setjmp.h,v
retrieving revision 1.35
diff -u -p -r1.35 setjmp.h
--- libc/include/machine/setjmp.h 15 Jan 2008 09:41:06 -0000 1.35
+++ libc/include/machine/setjmp.h 21 Jun 2008 18:45:53 -0000
@@ -307,11 +307,16 @@ typedef int sigjmp_buf[_JBLEN+2];
#endif
-/* POSIX _setjmp/_longjmp macros, maintained for XSI compatibility. These
+/* POSIX _setjmp/_longjmp, maintained for XSI compatibility. These
are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
New applications should use sigsetjmp/siglongjmp instead. */
+#ifdef __CYGWIN__
+extern void _longjmp(jmp_buf, int);
+extern int _setjmp(jmp_buf);
+#else
#define _setjmp(env) sigsetjmp ((env), 0)
#define _longjmp(env, val) siglongjmp ((env), (val))
+#endif
#ifdef __cplusplus
}
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/_______________________________________________
Lightning mailing list
Lightning@...
http://lists.gnu.org/mailman/listinfo/lightning