Re: System.Info.os

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.hugs
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.