Mail Archives: djgpp-workers/2011/07/30/15:20:28
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 <juan DOT guerrero AT gmx DOT de>
* 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 <setjmp.h>
-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
- Raw text -