System.Info.os

Ross Paterson ross at soi.city.ac.uk
Thu Nov 10 09:27:39 EST 2005


On Thu, Nov 10, 2005 at 01:14:34PM +0000, Neil Mitchell wrote:
> The function System.Info.os on WinHugs returns "mingw32", which is not
> really true. I guess its because the libraries are compiled using
> mingw32, since they can't be compiled natively from windows? Is there
> some way to alter the library build scripts?

As MinGW produces native binaries, "mingw32" isn't an appropriate value
for os in any case -- it should be "mswin32" or the like, whether the
Win32 binary was compiled with MSVC or MinGW.  However "mingw32" is the
name used by autoconf, and it's pervasive in the libraries.  Maybe it
should be special-cased in System.Info.

Then again, Cabal uses the values of System.Info.{arch,os} to construct
the CPP symbols to be defined when preprocessing packages for Hugs,
and package authors have #ifdef mingw32_HOST_OS all over the place.



More information about the Cvs-hugs mailing list