[ 
https://issues.apache.org/jira/browse/THRIFT-1326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159288#comment-13159288
 ] 

Jake Farrell commented on THRIFT-1326:
--------------------------------------

C99 inttypes.h includes stdint.h, so there's no need to include stdint.h 
separately. Though on some systems with inttypes.h there is no stdint.h, making 
it impossible to have a #include stdint.h in Thrift.h. There is no guarantee 
that where you generate the code you also compile the code so you have to take 
into account the necessary headers you will need and include them accordingly. 
This means that we can not have the main configure check help setup the 
#defines. I guess we could stub out a simple autoconf shell for the cpp lib but 
this really should be handled by the user and whatever build env they are 
using. I dont see this as a bug but possibly more a missing documentation for 
help building clients issue
                
> on some platforms, #include <stdint.h> is necessary to be included in Thrift.h
> ------------------------------------------------------------------------------
>
>                 Key: THRIFT-1326
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1326
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.7
>         Environment: Mac OSX 10.6.8 / x86_64 / GCC 4.6.1 for building thrift 
> and server code generated by thrift
>            Reporter: Philippe STRAUSS
>            Assignee: Jake Farrell
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> building server code generated by thrift, I needed to add #include <stdint.h> 
> in main Thrift.h to prevent an "error: uint32_t does not define a type" 
> error. Maybe it does not show on linux, or with earlier GCC.
> Maybe there is a better place than the main Thrift.h for thins #include 
> <stdint.h>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to