[patch] Fix constants in PosixSource.h
marlowsd at gmail.com
Fri May 21 05:52:13 EDT 2010
On 21/05/2010 10:39, Simon Marlow wrote:
> On 20/05/2010 18:10, Gabor PALI wrote:
>> I found some problems with rts/PosixSource.h that make the validate
>> script fail on FreeBSD (they emit GCC warnings when compiling the RTS).
>> The reason is that constants are defined with wrong values and in a
>> wrong way. For more information see a recent thread on the
>> freebsd-hackers mailing list  with a conclusion in an older thread on
>> the freebsd-current mailing list .
>> I attach a patch that fixes this problem on FreeBSD systems (validated
>> on 8.X), and hopefully on other POSIX-compliant systems as well. If you
>> have concerns feel free to #ifdef freebsd_HOST_OS it around.
> Hmm, you fixed the problem by disabling what PosixSource.h actually
> does, which is not a good idea! It's there for a very good reason: it
> forces the RTS to stay POSIX-compatible as far as possible, and hence
> reduces portability problems, at least that's the idea. So if you get an
> error that goes away by disabling PosixSource.h, then either
> - the source file is using non-POSIX features (and Linux's
> POSIX-compliancy is therefore faulty if it allows the file to
> - or PosixSource is #defining the wrong things
> - or FreeBSD has a POSIX-compliancy bug
> it would really help to know which of these was the case and fix it or
> work around it, rather than just turning off PosixSource.h entirely
> which will give us a lot more problems in the future.
Sorry, I misread your patch and didn't read the whole of the threads you
linked to. I see what's going on now - I'll validate and apply, thanks
for the patch.
More information about the Cvs-ghc