]> git.ipfire.org Git - thirdparty/gcc.git/commit
a68: Add exit function to POSIX prelude
authorPietro Monteiro <pietro@sociotechnical.xyz>
Sat, 10 Jan 2026 01:52:13 +0000 (20:52 -0500)
committerPietro Monteiro <pietro@sociotechnical.xyz>
Sat, 10 Jan 2026 05:26:49 +0000 (00:26 -0500)
commitf2cdddef40c6a094f47ea349a7806be0af55b491
treebfa3c1905d432d45a96f7514ce69c32575451946
parent1f7e64d56bce2c51bbc093a3dfb1778eaddf12ee
a68: Add exit function to POSIX prelude

Add the procedure `posixexit'.

gcc/algol68/ChangeLog:

* a68-low-posix.cc (a68_posix_setexitstatus): Delete function.
(a68_posix_exit): New function.
* a68-low-prelude.cc (a68_lower_setexitstatus): Delete function.
(a68_lower_posixexit): New function.
* a68-low-runtime.def (SET_EXIT_STATUS): Delete definition.
(POSIX_EXIT): Add definition for posixexit.
* a68-parser-prelude.cc (posix_prelude): Remove setexitstatus
identifier from and add posixexit identifier to standenv.
* a68.h (a68_posix_setexitstatus): Delete prototype.
(a68_lower_setexitstatus): Likewise.
(a68_posix_exit): New prototype.
(a68_lower_posixexit): Likewise.
* ga68.texi:

libga68/ChangeLog:

* ga68-posix.c (_libga68_posixexit): New function.
* ga68.h (_libga68_posixexit): New prototype.
(_libga68_set_exit_status): Delete prototype.
* ga68.map: Remove _libga68_set_exit_status from and add
_libga68_posixexit to the global map.
* libga68.c: include <stdlib.h>.
(_libga68_set_exit_status): Delete function.
(main): Return EXIT_SUCCESS.

gcc/testsuite/ChangeLog:

* algol68/execute/posix-exit-1.a68: New test.

Signed-off-by: Pietro Monteiro <pietro@sociotechnical.xyz>
gcc/algol68/a68-low-posix.cc
gcc/algol68/a68-low-prelude.cc
gcc/algol68/a68-low-runtime.def
gcc/algol68/a68-parser-prelude.cc
gcc/algol68/a68.h
gcc/algol68/ga68.texi
gcc/testsuite/algol68/execute/posix-exit-1.a68 [new file with mode: 0644]
libga68/ga68-posix.c
libga68/ga68.h
libga68/ga68.map
libga68/libga68.c