[fpc-devel]Bugs in DosCalls.pas
XHajT03 at mbox.vol.cz
XHajT03 at mbox.vol.cz
Tue Oct 24 20:31:38 CEST 2000
Date sent: Tue, 24 Oct 2000 22:11:00 +0900
From: KO Myung-Hun <komh at chollian.net>
To: FPC mail <fpc-devel at lists.freepascal.org>
Subject: [fpc-devel]Bugs in DosCalls.pas
Send reply to: fpc-devel at deadlock.et.tudelft.nl
Hi again,
> I found bugs in doscalls.pas.
>
> First, prototype of DosDevIOCtl function is incorrect. DataLen
> argument need not 'var'. So prototype of DosDevIOCtl must be not
thanks, I'll have a look at this.
> Second is DosSetFilePtr function. Original functions from DOSCALL.DLL
> must be declared 'cdecl' model. But helper(?) function is not. In
> addtion, in case of DosSetFilePtr, If DosSetFilePtr helper function is
> declared 'cdecl', then programs calling DosSetFilePtr encounter
> SYS3171 error.
>
> So, 'cdecl' of helper of DosSetFilePtr is removed.
cdecl is needed for the imported call, whereas it shouldn't matter
for the helper (although the current situation, where one helper uses
C calling convention and the other not, is quite strange).
> By the way, why programs calling DosSetFilePtr encounter SYS3171 ?
I guess there might be some problem in the compiler, since it should
handle both calling conventions for internal functions (and our
helper is nothing but an internal function). Could you send a short
compilable example that shows the problem, please?
Tomas
More information about the fpc-devel
mailing list