On Tue, 01 Feb 2011 00:30:27 +0200, Walter Bright
<[email protected]> wrote:
Vladimir Panteleev wrote:
On Mon, 31 Jan 2011 06:13:54 +0200, Walter Bright
<[email protected]> wrote:
Vladimir Panteleev wrote:
Compiling the source from the .zip still yields a broken dmd.exe. My
version and the one from the .zip seem to differ in many small ways.
The first difference is that in main(), the .zip version calls a
function to get the address of errno, while my .exe accesses a
variable directly.
Check your dmc's errno.h. It should call a function.
It's declared as follows:
Actually, it's declared in three files: errno.h, stdlib.h and stddef.h.
mars.c uses only the last two.
_MT and __cplusplus
Why should _MT be enabled? There is no -D_MT in win32.mak. Are we using
different makefiles?
root/async.c sets _MT explicitly, but the example at hand is from mars.c.
If I add -D_MT to CFLAGS in the makefile, I still get a lot of
differences. The first difference is now one in a function's
prologue/epilogue - the binary from the .zip saves/restores the ECX
register, while my binary doesn't. The functions are otherwise identical.
--
Best regards,
Vladimir mailto:[email protected]