summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-05-05 22:13:18 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-05-05 22:13:18 +0000
commit8da2392961daf55549b57a8c576f66df206f2c69 (patch)
treec3c9bfd3743b2e71c9154d71e909df66138c41d3
parent6449200008e62c315abe8e2630ae46eb00597003 (diff)
downloadqpid-python-8da2392961daf55549b57a8c576f66df206f2c69.tar.gz
Hack around the namespace pollution in QPID-1737
Hack around simultaneous import and definition of ManagementAgent::Singleton in qpidbroker Make ACL plugin optional (default off on Windows currently) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@771989 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/src/CMakeLists.txt26
-rw-r--r--cpp/src/qpid/agent/QmfAgentImportExport.h2
-rwxr-xr-xcpp/src/qpid/sys/windows/Condition.h1
-rwxr-xr-xcpp/src/qpid/sys/windows/Mutex.h1
-rw-r--r--cpp/src/qpid/sys/windows/uuid.cpp5
-rw-r--r--cpp/src/qpid/sys/windows/uuid.h6
6 files changed, 26 insertions, 15 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index 90647bd49d..605c5b6e2c 100644
--- a/cpp/src/CMakeLists.txt
+++ b/cpp/src/CMakeLists.txt
@@ -228,20 +228,28 @@ if (BUILD_XML)
endif (BUILD_XML)
# Build the ACL plugin
-set (acl_SOURCES
- qpid/acl/Acl.cpp
- qpid/acl/Acl.h
- qpid/acl/AclData.cpp
- qpid/acl/AclData.h
- qpid/acl/AclPlugin.cpp
- qpid/acl/AclReader.cpp
- qpid/acl/AclReader.h
- )
+set (acl_default ON)
+# Like this until we fix exporting symbols from the generated management code
+if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+ set(acl_default OFF)
+endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+option(BUILD_ACL "Build ACL enforcement broker plugin" ${acl_default})
+if (BUILD_ACL)
+ set (acl_SOURCES
+ qpid/acl/Acl.cpp
+ qpid/acl/Acl.h
+ qpid/acl/AclData.cpp
+ qpid/acl/AclData.h
+ qpid/acl/AclPlugin.cpp
+ qpid/acl/AclReader.cpp
+ qpid/acl/AclReader.h
+ )
add_library (acl MODULE ${acl_SOURCES})
target_link_libraries (acl qpidbroker)
set_target_properties (acl PROPERTIES
PREFIX ""
LINK_FLAGS -Wl,--no-undefined)
+endif (BUILD_ACL)
# Check for optional cluster support requirements
include (cluster.cmake)
diff --git a/cpp/src/qpid/agent/QmfAgentImportExport.h b/cpp/src/qpid/agent/QmfAgentImportExport.h
index 9eee4a18fd..e614e09d6d 100644
--- a/cpp/src/qpid/agent/QmfAgentImportExport.h
+++ b/cpp/src/qpid/agent/QmfAgentImportExport.h
@@ -20,7 +20,7 @@
* under the License.
*/
-#if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
+#if defined(WIN32) && !defined(QPID_DECLARE_STATIC) && !defined(qpidbroker_EXPORTS)
#if defined(QMF_AGENT_EXPORT) || defined (qmfagent_EXPORTS)
#define QMF_AGENT_EXTERN __declspec(dllexport)
#else
diff --git a/cpp/src/qpid/sys/windows/Condition.h b/cpp/src/qpid/sys/windows/Condition.h
index 979fae9b0a..c31f7b4823 100755
--- a/cpp/src/qpid/sys/windows/Condition.h
+++ b/cpp/src/qpid/sys/windows/Condition.h
@@ -30,6 +30,7 @@
#include <boost/thread/condition.hpp>
#include <boost/thread/thread_time.hpp>
#include <windows.h>
+#undef STATUS_INVALID_PARAMETER // Hack for windows.h namespace pollution
namespace qpid {
namespace sys {
diff --git a/cpp/src/qpid/sys/windows/Mutex.h b/cpp/src/qpid/sys/windows/Mutex.h
index 08de0712b9..b8d34de6d1 100755
--- a/cpp/src/qpid/sys/windows/Mutex.h
+++ b/cpp/src/qpid/sys/windows/Mutex.h
@@ -31,6 +31,7 @@
#include <boost/thread/shared_mutex.hpp>
#include <boost/thread/thread_time.hpp>
#include <boost/thread/tss.hpp>
+#undef STATUS_INVALID_PARAMETER // Hack for windows.h namespace pollution
namespace qpid {
namespace sys {
diff --git a/cpp/src/qpid/sys/windows/uuid.cpp b/cpp/src/qpid/sys/windows/uuid.cpp
index 92f60e04b1..4d8184c703 100644
--- a/cpp/src/qpid/sys/windows/uuid.cpp
+++ b/cpp/src/qpid/sys/windows/uuid.cpp
@@ -19,6 +19,11 @@
*
*/
+#include <Rpc.h>
+#ifdef uuid_t /* Done in rpcdce.h */
+# undef uuid_t
+#endif
+
#include "uuid.h"
#include <string.h>
diff --git a/cpp/src/qpid/sys/windows/uuid.h b/cpp/src/qpid/sys/windows/uuid.h
index 7d003c3739..c79abe95c6 100644
--- a/cpp/src/qpid/sys/windows/uuid.h
+++ b/cpp/src/qpid/sys/windows/uuid.h
@@ -22,13 +22,9 @@
*
*/
-#include <Rpc.h>
#include "qpid/CommonImportExport.h"
-
-#ifdef uuid_t /* Done in rpcdce.h */
-# undef uuid_t
-#endif
#include <qpid/sys/IntegerTypes.h>
+
namespace qpid { namespace sys { const size_t UuidSize = 16; }}
typedef uint8_t uuid_t[qpid::sys::UuidSize];