Re: [commit: ghc] master: define own version of PRIdPTR on platform where its not available (71f7ab6)

Gabriel Dos Reis <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <CAAiZkiBjTx+cOTnGpgNE1QdL13EduGttM_Uio0s7-DZ+LCUx2w@mail.gmail.com>
On Fri, Nov 9, 2012 at 12:18 PM, Karel Gardas <[email protected]> wrote:
> On 11/ 9/12 06:53 PM, Gabriel Dos Reis wrote:
>>
>> Include<inttypes.h>  before all other standard headers.
>>
>
> I I understand your "standard headers" well, then this is already done in
> mkDerivedConstants.c, see:
>
> [...]
> #define PROFILING
> #define THREADED_RTS
>
> #include "PosixSource.h"
> #include "Rts.h"
> #include "Stable.h"
> #include "Capability.h"
>
> #include <inttypes.h>
> #include <stdio.h>
> #include <string.h>
> [...]
>
> The problem which I describe is in the position of PosixSource.h which
> defines problematic _XOPEN_SOURCE and <inttypes.h> includes...
>
> Karel

The point I was making (admittedly imperfectly) is
that <inttypes.h> should be included before "PosixSource.h".
Does that work for you?  Is it acceptable to Simon M.?

To be clear, I find it unfortunate that Solaris ties its conformance
to C99 to a completely
separate standard.  It is a platform that has proven frustrating to
even GCC/libstdc++
implementers, so I feel your plain.

-- Gaby
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.