This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: i386-rtems setjmp.h patch
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- Cc: newlib at sources dot redhat dot com, Eric Norum <eric dot norum at usask dot ca>
- Date: Fri, 06 Dec 2002 14:55:46 -0500
- Subject: Re: i386-rtems setjmp.h patch
- Organization: Red Hat Inc.
- References: <3DF0FB81.7727A761@OARcorp.com>
Joel Sherrill wrote:
I don't claim to fully understand why the i386 has such a complicated
path to figuring out _JBLEN but it didn't work for rtems. Honestly I
am not sure if using setjmp-dj.h gets everything defined for targets
that
use that either.
It does. You'll see that the jmp_buf is defined already and so we
don't redefine it. The problem is when we fall into the last part
which is enabled for CYGWIN and __rtems__ that needs the _JBLEN macro
to be set.
It looks like _JBLEN of 9 is what that structure is
accomplishing. Anyway i386-rtems targets need this one. Please
commit it.
Do you mean 9 ints or do you mean 36 ints? Because _JBTYPE is undefined,
it will declare _JBLEN ints.
-- Jeff J.
2002-12-06 Joel Sherrill <joel@OARcorp.com>
* libc/include/machine/setjmp.h: Make sure _JBLEN is defined
for i386-rtems targets.
diff -uNr
/usr1/rtems/work-tools/original/newlib-1.10.0/newlib/libc/include/machine/setjmp.h
newlib-1.10.0/newlib/libc/include/machine/setjmp.h
---
/usr1/rtems/work-tools/original/newlib-1.10.0/newlib/libc/include/machine/setjmp.h
Fri Feb 1 17:27:10 2002
+++ newlib-1.10.0/newlib/libc/include/machine/setjmp.h Wed Nov 27
07:55:10 2002
@@ -41,8 +41,8 @@
#if defined(__CYGWIN__) && !defined (_JBLEN)
#define _JBLEN (13 * 4)
#elif defined (__i386__)
-#ifdef __unix__
-# define _JBLEN 36
+#if defined(__unix__) || defined(__rtems__)
+# define _JBLEN (9 * 4)
#else
#include "setjmp-dj.h"
#endif