Skip to content

Commit

Permalink
Merge pull request #233 from marshallward/siglongjmp_name_fix
Browse files Browse the repository at this point in the history
POSIX: siglongjmp and sigsetjmp_missing fixes
  • Loading branch information
alperaltuntas authored Dec 23, 2022
2 parents 7f02468 + de8023d commit 9d5d9bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/framework/posix.F90
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ end subroutine longjmp_posix

!> C interface to POSIX siglongjmp()
!! Users should use the Fortran-defined siglongjmp() function.
subroutine siglongjmp_posix(env, val) bind(c, name="longjmp")
subroutine siglongjmp_posix(env, val) bind(c, name="siglongjmp")
! #include <setjmp.h>
! int siglongjmp(jmp_buf env, int val);
import :: sigjmp_buf, c_int
Expand Down Expand Up @@ -360,6 +360,9 @@ function sigsetjmp_missing(env, savesigs) result(rc) bind(c)
print '(a)', 'ERROR: sigsetjmp() is not implemented in this build.'
print '(a)', 'Recompile with autoconf or -DSIGSETJMP_NAME=\"<symbol name>\".'
error stop

! NOTE: Compilers may expect a return value, even if it is unreachable
rc = -1
end function sigsetjmp_missing

end module posix

0 comments on commit 9d5d9bb

Please sign in to comment.