[
https://issues.apache.org/jira/browse/QPID-1368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12640530#action_12640530
]
astitcher edited comment on QPID-1368 at 10/17/08 6:56 AM:
-----------------------------------------------------------------
It seems to me that the real problem here is that the windows header are
getting included at all for this code - it's platform independent and so
shouldn't really be pulling in any platform dependent headers. The only code
that should be pulling in windows header files is code in .cpp files in
src/qpid/sys/win32.
I know this is hard to manage, but we should be strongly striving towards it.
My windows development experience leads me to think that unless we are very
careful, compile times on windows will balloon because everything will end up
pulling in the (huge) windows.h set of files.
was (Author: astitcher):
It seems to me that the real problem here is that the windows header are
getting included at all for this code - it's platform independent and so
shouldn't really be pulling in any platform dependent headers. The only code
that should be pulling in windows header is code in src/qpid/sys/win32.
I know this is hard to manage, but we should be strongly striving towards it.
My windows development experience leads me to think that unless we are very
careful, compile times on windows will balloon because everything will end up
pulling in the (huge) windows.h set of files.
> 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.