You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Andrii Shyshkalov (JIRA)" <ji...@apache.org> on 2013/10/29 09:16:31 UTC

[jira] [Updated] (THRIFT-2245) Allow Custom Prefix in Include Guards

     [ https://issues.apache.org/jira/browse/THRIFT-2245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrii Shyshkalov updated THRIFT-2245:
--------------------------------------

    Attachment: thrift-2245-cpp-include-guards-prefix.patch

Adds include_guard_prefix option for cpp compiler

> Allow Custom Prefix in Include Guards
> -------------------------------------
>
>                 Key: THRIFT-2245
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2245
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>            Reporter: Andrii Shyshkalov
>            Priority: Minor
>         Attachments: thrift-2245-cpp-include-guards-prefix.patch
>
>
> C++ header files currently have include guards like this:
> {code:title=Service.h|borderStyle=solid}
> #ifndef Service_H
> #define Service_H
> {code}
> This may cause collisions as the Service_H is not really unique. I've added include_guard_prefix option to c++ compiler. Compiling with
> {{thrift --gen cpp:include_guard_prefix=CUSTOM_GUARD_ ...}}
> will produce 
> {code:title=Service.h|borderStyle=solid}
> #ifndef CUSTOM_GUARD_Service_H
> #define CUSTOM_GUARD_Service_H
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)