Algol 68 POSIX and errno procedure request for advice

chris hermansen clhermansen@gmail.com
Fri Jun 5 18:30:03 GMT 2026


Thank you!

On Fri, Jun 5, 2026, 11:21 Jose E. Marchesi <jemarch@gnu.org> wrote:

>
> >> Good day everyone,
> >>
> >> I am coding up more of the transput now that I seem to have found a way
> to
> >> ease myself into it and as I mentioned previously I intend to base it on
> >> the POSIX interface to the extent possible.
> >>
> >> To this end, I see we have procedures errno, which yields the numeric
> POSIX
> >> error number, and strerror, which "yields a string containing an
> >> explanatory short description of the error".
> >>
> >>>From my long-ago days of writing a bit of C, I recall preferring the
> >> symbolic error code such as EACCES.
> >>
> >> What approach should I use in GNU Algol 68 since constants such as
> EACCES
> >> are not defined?
> >
> > You need to:
> >
> > 1. Add variables providing these values to libga68/ga68-posix.c
> >
> >    For example:
> >
> >    int _libga68_eaccess = EACCESS
> >
> > 2. Add the corresponding a68 variable to libga68/g68-posix.c
> >
> >    For example:
> >
> >    int posix_eaccess = nest C "_liba68_eaccess"
>
> By passing, I strongly recommend to add the strictly minimum necessary
> error codes, just the ones you need.  The more you add the less portable
> libga68 will be ^^
>

Understood.

Van Vliet's code incorporates a list of errors (slightly different than his
Vol II) and suggests adding more as "appropriate".

Following your advice I will attempt to add fewer.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://gcc.gnu.org/pipermail/algol68/attachments/20260605/607f83e4/attachment-0001.htm>


More information about the Algol68 mailing list