[antlr-interest] ANTLR on mingw

Gavin Lambert antlr at mirality.co.nz
Mon Aug 4 14:37:52 PDT 2008


At 04:12 5/08/2008, Jim Idle wrote:
>>The fix is
>>easy; typedef the missing types. However, I have a suggestion to 
>>#include
>><stdint.h> and use the standard types defined there: int8_t, 
>>uint8_t, ...,
>>uint64_t, instead of using the windows ones. If you want, I will 
>>even do
>>this for you.
>
>stdint.h may be supplied with mingw, but it is not a part of the 
>windows headers. However, I think that Mingw defines: __MINGW32__ 
>if it is the compiler, so if stdint.h is always present when 
>mingw is the compiler, which I believe is the case, then I can 
>modify the headers for mingw.

http://en.wikipedia.org/wiki/Stdint.h

It's part of C99, so it should be present in all recent versions 
of compilers.  (MSVC being the exception, because it's pretty slow 
to adopt standards.  The Wikipedia page lists some alternative 
implementations, but care needs to be taken in their use since you 
can't mix them in the same compilation unit.)



More information about the antlr-interest mailing list