Algol 68 POSIX and errno procedure request for advice
Jose E. Marchesi
jemarch@gnu.org
Fri Jun 5 18:21:21 GMT 2026
>> 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 ^^
More information about the Algol68
mailing list