[Gambas-user] Get last errno from external function call

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Oct 5 05:25:12 CEST 2022


You mean an error occurring inside the library? I don't think there is any
other way, than the library itself reporting the error code.
I don't see why using __errno_location inside the library would fail. Are
you calling it from the Gambas code?
If this is about a missing error message, then are you reading it from
stderr?
You need to give more details and/or some code to see.

Jussi




On Wed, Oct 5, 2022 at 5:54 AM Matheus Castello <matheus at castello.eng.br>
wrote:

> Hi guys,
>
> I'm new to Gambas3, I'm trying to use it for embedded devices and I'm
> doing some external function calls. There is some way in Gambas3 to get,
> or Gambas runtime stores, the last errno from a external function call?
>
> I tried to get it directly from libc `__errno_location` but surely the
> runtime must be making other calls that are overwriting the errno.
>
> Thanks in advance,
> Matheus Castello
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221005/2dceaa1e/attachment.htm>


More information about the User mailing list