Well, testing WIN32 is too permissive because it would include also mingw as an 
example.
On the other hand, _MSC_VER would only exclude msvc compilers which is better  
think, but may include borland and watcom compilers.
I don't think borland compilers support the warning pragma as an example.

Probably filtering all win32 that are not gcc and also sgi would do fine, like:
#if (!defined(WIN32) || defined(__GNUC__)) && !defined(sgi)
  ../..
#endif

Fabien

>       Fabien, if your watching, does the below sound right to you?
>
>       If so, we should probably bracket all the #warning's this way
>       to avoid problems compiling 1.3.x across the platform spectrum.
>
>       (I should add, I don't have cygwin, but I do have VS.)
>
> > Albrecht Schlosser wrote:
> >> [..]
> >> (1) WIN32 is also defined when compiling with gcc under Windows. If we
> >> want to exclude the MS VC compilers, as discussed in the STR, then
> >> the correct macro would probably be _MSC_VER instead of WIN32.
> >>
> >> (2) CYGWIN is wrong as well. If used, then it must read __CYGWIN__.
> >>
> >> But if we change (1), then we don't need __CYGWIN__, thus the correct
> >> solution would be:
> >>
> >>      #if !defined(_MSC_VER) && !defined(sgi)
> >>      #warning FIXME This needs to be UTF aware now
> >>      #endif
> >>
> >> This looks much easier and reflects _compilers_ and not platform
> >> dependencies.
> >>
> >> I'm not 100% sure that "_MSC_VER" is the correct name, but I'm sure
> >> that WIN32 would be wrong.
>

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to