Jon [EMAIL PROTECTED] writes:
I personally dont like the idea of requiring Winelib apps being forced to use
freg-struct-return just to use a win-compatable crtdll. So when mscrtdll is
done and the headers are created, this function should be defined as
an inline as per Mikes mail.
I agree
On Thursday 23 November 2000 10:56 am, Ove Kaaven wrote:
It seems to me that these routines have ULONGLONG-sized return values, so
that ULONGLONG could be used in the return value in the actual crtdll
implementation. Then Winelib apps that use crtdll (instead of glibc) could
compile with
Jon Griffiths writes:
Hi all,
While updating my crt test harness, I found a call returning strange
values using the native DLL. The call is "ldiv", which returns an
ldiv_t struct _by value_. ldiv_t is defined the same under linux and
windows. The spec entry is:
@ cdecl ldiv(long long)
Jon Griffiths writes:
--- Uwe Bonnes [EMAIL PROTECTED] wrote:
If the results are returned in registers, I think the "register"
definition is the right thing to use instead of "cdecl". However in
that case, we can't reuse the libc function.
Unfortunately, that won't solve the problem.
It seems to me that these routines have ULONGLONG-sized return values, so
that ULONGLONG could be used in the return value in the actual crtdll
implementation. Then Winelib apps that use crtdll (instead of glibc) could
compile with -freg-struct-return (pcc-struct-return is irrelevant, we want
Hi all,
While updating my crt test harness, I found a call returning strange
values using the native DLL. The call is "ldiv", which returns an
ldiv_t struct _by value_. ldiv_t is defined the same under linux and
windows. The spec entry is:
@ cdecl ldiv(long long) ldiv
i.e it uses the libc
OK, I've been investigating (couldn't wait), heres what I've got so
far:
Recap: Using GetProcAddress to get a pointer (p_ldiv)to CRTDLL's
"ldiv" function, and calling through that pointer produces
errors in some cases. This is because ldiv returns a struct.
The problem occurs for any dll
from mingw32(gcc with CRTDLL):
/*
* div_t and ldiv_t are structures used to return the results of div and
* ldiv.
*
* NOTE: div and ldiv appear not to work correctly unless
* -fno-pcc-struct-return is specified. This is included in the
* mingw32 specs file.
*/
So we should