longjmp() should return 1 if 0 is passed as return value (0 should only be returned by setjmp)

svn path=/trunk/; revision=16004
This commit is contained in:
Gregor Anich 2005-06-17 17:33:47 +00:00
parent 402b13b071
commit 3ab6c437cc

View file

@ -75,6 +75,10 @@ _longjmp:
movl JMPBUF(%esp), %ecx /* User's jmp_buf in %ecx. */
movl VAL(%esp), %eax /* Second argument is return value. */
testl %eax, %eax
jnz 0f
incl %eax
0:
/* Save the return address now. */
movl (JB_PC*4)(%ecx), %edx
/* Restore registers. */