X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com X-Authenticated: #27081556 X-Provags-ID: V01U2FsdGVkX1+XIPBRgWyXBF0ZGDKQwgRM7MDxi+BWZIKhWM/lvj zaUJNCPVkziSOK From: Juan Manuel Guerrero To: djgpp-workers AT delorie DOT com Subject: Re: [PATCH] make siglongjmp void Date: Sat, 30 Jul 2011 21:14:51 +0200 User-Agent: KMail/1.9.10 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201107302114.52114.juan.guerrero@gmx.de> X-Y-GMX-Trusted: 0 Reply-To: djgpp-workers AT delorie DOT com Am Samstag, 30. Juli 2011 schrieb Ozkan Sezer: > In current setjmp.h, we have: > int siglongjmp(sigjmp_buf env, int val) __attribute__((__noreturn__)); > > However, being a noreturn function, it should be a void one > (cf. the glibc man page.) And the assembly code directly forwards > it to longjmp() which is void, too. I suggest changing it: [snip] I commited the following patch. Regards, Juan M. Guerrero 2011-07-30 Juan Manuel Guerrero * include/setjmp.h: Return type of siglongjmp changed from int to void. Fix provided by Ozkan Sezer. * src/libc/posix/setjmp/siglongj.txh: Return type of siglongjmp changed from int to void. Fix provided by Ozkan Sezer. Index: djgpp/include/setjmp.h =================================================================== RCS file: /cvs/djgpp/djgpp/include/setjmp.h,v retrieving revision 1.8 diff -U 5 -r1.8 setjmp.h --- djgpp/include/setjmp.h 12 Jul 2011 17:53:47 -0000 1.8 +++ djgpp/include/setjmp.h 30 Jul 2011 18:15:22 -0000 @@ -1,5 +1,6 @@ +/* Copyright (C) 2011 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #ifndef __dj_include_setjmp_h_ @@ -34,11 +35,11 @@ #ifndef __STRICT_ANSI__ typedef jmp_buf sigjmp_buf; int sigsetjmp(sigjmp_buf env, int savemask); -int siglongjmp(sigjmp_buf env, int val) __attribute__((__noreturn__)); +void siglongjmp(sigjmp_buf env, int val) __attribute__((__noreturn__)); #ifndef _POSIX_SOURCE #endif /* !_POSIX_SOURCE */ #endif /* !__STRICT_ANSI__ */ Index: djgpp/src/libc/posix/setjmp/siglongj.txh =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/posix/setjmp/siglongj.txh,v retrieving revision 1.3 diff -U 5 -r1.3 siglongj.txh --- djgpp/src/libc/posix/setjmp/siglongj.txh 29 Jan 2003 12:51:41 -0000 1.3 +++ djgpp/src/libc/posix/setjmp/siglongj.txh 30 Jul 2011 18:15:24 -0000 @@ -3,16 +3,20 @@ @subheading Syntax @example #include -int siglongjmp(sigjmp_buf env, int val); +void siglongjmp(sigjmp_buf env, int val); @end example @subheading Description @xref{longjmp}. +@subheading Return Value + +This function does not return. + @subheading Portability @portability !ansi, posix