mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-21 19:35:36 -05:00
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>
44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
/* GNU Algol Compiler run-time.
|
|
Copyright (C) 2025 Jose E. Marchesi.
|
|
|
|
GCC is free software; you can redistribute it and/or modify it under the
|
|
terms of the GNU General Public License as published by the Free Software
|
|
Foundation; either version 3, or (at your option) any later version.
|
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
details.
|
|
|
|
Under Section 7 of GPL version 3, you are granted additional permissions
|
|
described in the GCC Runtime Library Exception, version 3.1, as published by
|
|
the Free Software Foundation.
|
|
|
|
You should have received a copy of the GNU General Public License and a copy
|
|
of the GCC Runtime Library Exception along with this program; see the files
|
|
COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
<http://www.gnu.org/licenses/>. */
|
|
|
|
#include "ga68.h"
|
|
#include <stdlib.h> /* for EXIT_SUCCESS */
|
|
|
|
/* argc and argv are preserved in the following objects. */
|
|
|
|
int _libga68_argc;
|
|
char **_libga68_argv;
|
|
|
|
/* Entry point for Algol 68 programs. */
|
|
|
|
void __algol68_main (void);
|
|
|
|
int
|
|
main (int argc, char **argv)
|
|
{
|
|
_libga68_argc = argc;
|
|
_libga68_argv = argv;
|
|
|
|
_libga68_init_heap ();
|
|
__algol68_main ();
|
|
return EXIT_SUCCESS;
|
|
}
|