[fpc-pascal] Missing GetLastOSError() in DOS and MacOS

Tomas Hajny XHajT03 at hajny.biz
Thu Jun 10 08:00:27 CEST 2010


On Thu, June 10, 2010 06:29, Bihar Anwar wrote:
> I don't see SysUtils.GetLastOSError() in DOS. Looking at a glance, I think
> it will be a trivial effort by just returning Dos.DosError variable
> content.

Thanks for the notification, I'll have a look at it (creating a bug report
to make sure it isn't forgotten would be even better).

I'm not sure if taking DosError is sufficient though. I need to look up
the specification in order to check whether the function is supposed to
provide the last error result for SysUtils (or RTL in general), or whether
it should return the last OS error for what OS function invoked recently
(also directly without using RTL). If it's the latter (I believe that this
is the case in Delphi and also existing FPC implementations for other
platforms), it would be probably more appropriate to use the DOS API
function providing this information.


> Also, I notice that SysUtils.GetLastOSError() in MacOS is defined but it's
> implementation is empty. I've no knowledge on MacOS, so my question is...
> Is this by designed?

Sorry, I cannot answer this one.

Tomas





More information about the fpc-pascal mailing list