Martin Spott wrote: > I remembered Andy's pointer to > http://predef.sourceforge.net/preos.html and had a look at the > different ways how Solaris-specific defines are currently > implemented within FlightGear and required libraries: > [...] > SimGear/simgear/nasal/nasal.h: > defined(sun386) > [...] > Would anyone object to a patch that unifies this to "(__sun)"?
Sounds good to me. Although with the nasal.h one I think I'd prefer to change that code to one that detects CPU architectures specifically, without dependence on OS-specific header files. It's getting hard to read already, and really isn't much more portable than a big enumeration of architecture defines. On a similar note, we're using __CYGWIN__ a *lot* in the current source code seemingly as a synonym for "windows with gcc and not msvc", which isn't really correct. The right way to test this would be to look for _WIN32 and __gcc__ (or !_MSC_VER), which will continue to work even under, say, mingw32. There was a bug that came up in IRC a month or two ago that was related to exactly this issue, IIRC. A CYGWIN got stuck in as a synonym for WIN32, and that caused a build failure under MSVC (or Borland, maybe, I forget the details). Cygwin is, strictly, a Unix environment and should never need to be tested except where it is incompatible with our "default" unix/linux code. On windows, we should be trying to build to the WIN32 API and using _WIN32 as the appropriate test. Andy _______________________________________________ Flightgear-devel mailing list Flightgear-devel@flightgear.org http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d