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.