* RE: jmp_buf size?
@ 2009-02-04 23:00 Jay
2009-02-04 23:52 ` Larry Hall (Cygwin)
0 siblings, 1 reply; 5+ messages in thread
From: Jay @ 2009-02-04 23:00 UTC (permalink / raw)
To: cygwin
What is up with the size of jmp_buf?
It appears that setjmp.h confuses bytes and ints, specifically in the Cygwin case.
_JBLEN should be 13, not 13*4.
or #define _JBTYPE to char, but that doesn't work as easily.
?
I applied a local hack workaround, something like:
typedef unsigned char JBTYPE __attribute(align(4));
#define _JBTYPE _JBTYPE
#include
Though my larger goal, of implementing (deprecated-in-favor-of-pthreads) Posix get/make/set/swapcontext I gave up on anyway, at least via layering over setjmp/longjmp. They may be implementable via Win32 fibers, though the overall thing still perhaps dodgy and useless ("user more threads"...).
I realize that jmp_buf is something "deep" and system specific, not to be messed with lightly, but I'm also pretty darn certain that Cygwin declares its own jmp_buf incorrectly.
I also realize that larger than needed is safe, "just" wasteful, and possibly "future proof".
It still seems like a mistake.
- Jay
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: jmp_buf size?
2009-02-04 23:00 jmp_buf size? Jay
@ 2009-02-04 23:52 ` Larry Hall (Cygwin)
2009-02-05 0:33 ` Jay
0 siblings, 1 reply; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2009-02-04 23:52 UTC (permalink / raw)
To: cygwin; +Cc: jay.krell
Jay wrote:
> What is up with the size of jmp_buf?
> It appears that setjmp.h confuses bytes and ints, specifically in the Cygwin case.
> _JBLEN should be 13, not 13*4.
> or #define _JBTYPE to char, but that doesn't work as easily.
<snip>
Did you see this reply to your first inquiry on this subject?
<http://cygwin.com/ml/cygwin/2009-01/msg00863.html>
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
_____________________________________________________________________
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: jmp_buf size?
2009-02-04 23:52 ` Larry Hall (Cygwin)
@ 2009-02-05 0:33 ` Jay
0 siblings, 0 replies; 5+ messages in thread
From: Jay @ 2009-02-05 0:33 UTC (permalink / raw)
To: cygwin
Thanks, sorry, I didn't see that.
- Jay
----------------------------------------
> Date: Wed, 4 Feb 2009 18:49:50 -0500
> From: reply-to-list-only-lh@cygwin.com
> To: cygwin@cygwin.com
> CC: jay.krell@cornell.edu
> Subject: Re: jmp_buf size?
>
> Jay wrote:
>> What is up with the size of jmp_buf?
>> It appears that setjmp.h confuses bytes and ints, specifically in the Cygwin case.
>> _JBLEN should be 13, not 13*4.
>> or #define _JBTYPE to char, but that doesn't work as easily.
>
>
>
> Did you see this reply to your first inquiry on this subject?
>
>
>
> --
> Larry Hall http://www.rfk.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: jmp_buf size?
2009-01-29 18:45 Jay
@ 2009-01-29 20:12 ` Christopher Faylor
0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2009-01-29 20:12 UTC (permalink / raw)
To: cygwin
On Thu, Jan 29, 2009 at 05:07:42PM +0000, Jay wrote:
>
>What is up with the size of jmp_buf?
>It appears that setjmp.h confuses bytes and ints.
>_JBLEN should be 13, not 13*4.
>or #define _JBTYPE to char, but that doesn't work as easily.
Huh. You would think that the fact that Cygwin's definition of _JBLEN
differed from every other definition would have been a clue that
something was amiss here.
It appears to be an ancient (pre-2000 when I pulled newlib onto
sourceware.org) typo but there is no easy way we can change this now.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
* jmp_buf size?
@ 2009-01-29 18:45 Jay
2009-01-29 20:12 ` Christopher Faylor
0 siblings, 1 reply; 5+ messages in thread
From: Jay @ 2009-01-29 18:45 UTC (permalink / raw)
To: cygwin
What is up with the size of jmp_buf?
It appears that setjmp.h confuses bytes and ints.
_JBLEN should be 13, not 13*4.
or #define _JBTYPE to char, but that doesn't work as easily.
?
- Jay
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-05 0:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-04 23:00 jmp_buf size? Jay
2009-02-04 23:52 ` Larry Hall (Cygwin)
2009-02-05 0:33 ` Jay
-- strict thread matches above, loose matches on Subject: below --
2009-01-29 18:45 Jay
2009-01-29 20:12 ` Christopher Faylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).