[ 
https://issues.apache.org/jira/browse/QPID-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640619#action_12640619
 ] 

Steve Huston commented on QPID-1368:
------------------------------------

The problem is, once you touch a compiler-supplied header (as in this file) all 
bets are off. I haven't chased the trail, but I'd say that one of <map>, <set>, 
or <string> is touching windows.h. And if they don't, then boost does, 
certainly.

The windows.h inclusions from qpid are trying to manage things by setting the 
"lean and mean" macro which prevents nonessential things from being pulled in, 
but that's about as good as you can do.

> C++ broker AclModule.h uses names that conflict with Windows macros
> -------------------------------------------------------------------
>
>                 Key: QPID-1368
>                 URL: https://issues.apache.org/jira/browse/QPID-1368
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: M3
>         Environment: Windows
>            Reporter: Steve Huston
>
> In qpid/cpp/src/qpid/broker/AclModule.h there are two names that conflict 
> with Windows-defined macros: DELETE and ALTERNATE.
> One way to resolve this is to undefine the Windows macros, like:
> @@ -28,11 +28,19 @@
>  #include <set>
>  #include <string>
>  
> +// Windows has a system macro DELETE that conflicts with the Action enum, and
> +// ALTERNATE that conflicts with the Property.
> +// So undef them.
> +#ifdef DELETE
> +#undef DELETE
> +#endif
> +#ifdef ALTERNATE
> +#undef ALTERNATE
> +#endif
>  
>  namespace qpid {
>  
>  namespace acl {
> -
>  enum ObjectType {QUEUE, EXCHANGE, BROKER, LINK, ROUTE, METHOD, OBJECTSIZE}; 
> // OBJECTSIZE must be last in list
>  enum Action {CONSUME, PUBLISH, CREATE, ACCESS, BIND, UNBIND, DELETE, PURGE,
>               UPDATE, ACTIONSIZE}; // ACTIONSIZE must be last in list
> Another way is to change DELETE and ALTERNATE to some other names. The text 
> strings "delete" and "alternate" need not change - just the enum names.
> Thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to