Sun 26 Jun 2005 10:55:01 PM UTC, comment #4:
OK
To get the code through a Win32 build with MSC and intel, we need to get the prototypes out. It's not a big deal really. You just need to decide what conditional to use.
My suggestion is: HAVE_ANSI_COMPILER for ANSI C issues and the
_WIN32 define for issues with the Win32 library. The good thing with _WIN32 is that it is always defined for any compiler targetting any Windows version. (note: _WIN32 not WIN32). There is no need to prepare anything, it's OK just to use it like this:
#if _WIN32
...Win32 library things
#endif
Why I say this is because the WINDOWS32 define used in make is not always consistent. So, in present code, whenever the _STDC_ is used, you will need to define WINDOWS32 as well. This is confusing because it has nothing to do with the Win32 library. To be portable it's better to use HAVE_ANSI_COMPILER and skip the _STDC_ and WINDOWS32 conditionals.
This will not work:
#if defined (_cplusplus) || (defined (__STDC_) && _STDC_)
but this will:
#if defined (_cplusplus) || (defined (__STDC_) && _STDC_) || defined (WINDOWS32)
as well as this:
#if defined (__cplusplus) || defined (HAVE_ANSI_COMPILER)
on the other hand this should never be allowed to work:
#if defined HAVE_UNISTD_H
could be used to indicate a UNIX-system
That's my thoughts
regards JB
PS: Details by bug reports on each issue
|