RE: jmp_buf size?

2009-02-04 Thread Jay

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/



Re: jmp_buf size?

2009-02-04 Thread Larry Hall (Cygwin)

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/



RE: jmp_buf size?

2009-02-04 Thread Jay

Thanks, sorry, I didn't see that.
 
 
 - Jay



 Date: Wed, 4 Feb 2009 18:49:50 -0500
 From: reply-to-list-only...@cygwin.com
 To: cygwin@cygwin.com
 CC: jay.kr...@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/



jmp_buf size?

2009-01-29 Thread Jay

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/



Re: jmp_buf size?

2009-01-29 Thread Christopher Faylor
On Thu, Jan 29, 2009 at 05:07:42PM +, 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/