Hi Alex,

Szakáts Viktor wrote:

; There is quite a big mess regarding these envvars depending on the type of make system, platform, compiler, etc, that it's almost impossible to document or understand, so maybe it'd be worth a review after the release, and sync all these external flag and dir envvars.

They are not environment variables, but how did we end up with lines like this? :

CFLAGS = -Ot2b1 -EHs-c- -FD -Gs -W3 -nologo -D__WINDOWS__ -DWIN32 - D__WIN32__ -D_CRT_SECURE_NO_DEPRECATE

In most cases - given properly crafted C code - only one,
or none of these should suffice, at least in Harbour. I've
removed tons of such (pretty much all of them) from contribs
a while ago.

Generally in Harbour, if a C source uses Windows API, it
should #define HB_OS_WIN_32_USED before any #includes.
(this could be further enhanced by just #including
"windows.h" locally, in case Windows platform is detected
by the Harbour headers.).

Ideally a central header should do the Windows platform
detection, and define _one_ macro to signal that, so
source code can rely solely on this macro, and don't have
to deal with all the variations as above. IMO.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to