DCC version 1.2.34 (really WIN32 building)

Vernon Schryver vjs@calcite.rhyolite.com
Thu Mar 11 00:07:13 UTC 2004


> From: Carl Stehle 

> 'nmake' does not like the '!include ...' line, and perhaps other things.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcepb40/html/_wcepb_using_a_mak_file_for_preprocessing.asp
seems to say that nmake knows about !include
Does it want double quotes?
Or to not have the .mak suffix explicit?

With -N, the Borland `make` doesn't like my hack for the equivalent of
    clean clobber:
	    for nm in dir1 dir2 dir3; do \
		cd $nm; make $@; cd ..
	    done


> I am trying to use purely MSVC tools.

That's a reasonable goal, but the main design goal must be to work
with the Borland tools.  The Borland tools have the major feature
of being free.


> files were not recompiled after I made the dcc_defs.h mods.
> Should have seen this in the build output.

The Borland `make`, like all UNIX versions of make I've seen in the
last 20 years, can generate and use dependencies automatically.


> > How is gethostbyname() declared in the Microsoft SDK?
>
> gethostbyname() is declared exactly as above.
> Also, from winsock2.h:
> #define WSAAPI                  FAR PASCAL
>
> The documentation states that 'PASCAL' is now obsolete.
> Looks like backward compatibility to me.
>
> But I think the problem is not in the declaration of
> gethostbyname() but rather in the declaration of 'fnc' ...

Without WSAAPI in the declaration of the formal parameter 'fnc', the
Borland compilers complain that the actual parameter gethostbyname()
does not match the prototype.


> apparently masked the fact that this did not work. So, I do not
> see a way around an MSVC-specific preprocessor switch to declare
> __stdcall as the calling convention used with 'fnc'.

I've currently got this in include/dcc_defs:

    #ifndef WSAAPI
    #define WSAAPI __stdcall		/* for MSVC */
    #endif

That leaves the Borland definition unmolested and works around
the bug in the Microsoft SDK.  (I don't see how the Microsoft
compiler's behavior can be justified given the declaration you say
it has for gethostbyname().)


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.