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

Karel Gardas <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
On 11/ 9/12 08:33 PM, Gabriel Dos Reis wrote:
> 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?

This works well, but emits warning:

In file included from includes/ghcconfig.h:4:0:
     0,
                      from includes/Stg.h:60,
                      from includes/Rts.h:30,
                      from includes/mkDerivedConstants.c:27:

includes/ghcautoconf.h:388:0:
      warning: "_FILE_OFFSET_BITS" redefined

/usr/include/sys/feature_tests.h:204:0:
      note: this is the location of the previous definition

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