You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2013/09/10 03:48:59 UTC

svn commit: r1521335 - in /qpid/trunk/qpid/cpp/src: finddb.cmake legacystore.cmake qpid/legacystore/MessageStoreImpl.cpp

Author: kpvdr
Date: Tue Sep 10 01:48:58 2013
New Revision: 1521335

URL: http://svn.apache.org/r1521335
Log:
QPID-5123: Changes to Fedora 19 packaging of libdb4 prevents legacystore from building

Modified:
    qpid/trunk/qpid/cpp/src/finddb.cmake
    qpid/trunk/qpid/cpp/src/legacystore.cmake
    qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp

Modified: qpid/trunk/qpid/cpp/src/finddb.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/finddb.cmake?rev=1521335&r1=1521334&r2=1521335&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/finddb.cmake (original)
+++ qpid/trunk/qpid/cpp/src/finddb.cmake Tue Sep 10 01:48:58 2013
@@ -22,31 +22,33 @@ if(UNIX)
 # - Find BerkeleyDB
 # Find the BerkeleyDB includes and library
 # This module defines
-# DB_INCLUDE_DIR, where to find db.h, etc.
+# DB_CXX_INCLUDE_DIR, where to find db_cxx.h, etc.
 # DB_LIBRARIES, the libraries needed to use BerkeleyDB.
 # DB_FOUND, If false, do not try to use BerkeleyDB.
 # also defined, but not for general use are
 # DB_LIBRARY, where to find the BerkeleyDB library.
 
-FIND_PATH(DB_INCLUDE_DIR db.h
+FIND_PATH(DB_CXX_INCLUDE_DIR db_cxx.h
     /usr/local/include/db4
+    /usr/local/include/libdb4
     /usr/local/include
     /usr/include/db4
+    /usr/include/libdb4
     /usr/include
 )
 
-SET(DB_NAMES ${DB_NAMES} db_cxx)
+SET(DB_NAMES ${DB_NAMES} db_cxx db_cxx-4)
 FIND_LIBRARY(DB_LIBRARY
     NAMES ${DB_NAMES}
     PATHS /usr/lib /usr/local/lib
 )
 
-IF (DB_LIBRARY AND DB_INCLUDE_DIR)
+IF (DB_LIBRARY AND DB_CXX_INCLUDE_DIR)
     SET(DB_LIBRARIES ${DB_LIBRARY})
     SET(DB_FOUND "YES")
-ELSE (DB_LIBRARY AND DB_INCLUDE_DIR)
+ELSE (DB_LIBRARY AND DB_CXX_INCLUDE_DIR)
     UNSET( DB_FOUND )
-ENDIF (DB_LIBRARY AND DB_INCLUDE_DIR)
+ENDIF (DB_LIBRARY AND DB_CXX_INCLUDE_DIR)
 
 
 IF (DB_FOUND)
@@ -60,15 +62,15 @@ ELSE (DB_FOUND)
 ENDIF (DB_FOUND)
 
 # Deprecated declarations.
-SET (NATIVE_DB_INCLUDE_PATH ${DB_INCLUDE_DIR} )
+SET (NATIVE_DB_INCLUDE_PATH ${DB_CXX_INCLUDE_DIR} )
 GET_FILENAME_COMPONENT (NATIVE_DB_LIB_PATH ${DB_LIBRARY} PATH)
 
 MARK_AS_ADVANCED(
     DB_LIBRARY
-    DB_INCLUDE_DIR
+    DB_CXX_INCLUDE_DIR
 )
 
 else(UNIX)
     MESSAGE(STATUS "BerkeleyDB is ignored on non-Unix platforms")
     UNSET( DB_FOUND )
-endif(UNIX)
\ No newline at end of file
+endif(UNIX)

Modified: qpid/trunk/qpid/cpp/src/legacystore.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/legacystore.cmake?rev=1521335&r1=1521334&r2=1521335&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/legacystore.cmake (original)
+++ qpid/trunk/qpid/cpp/src/legacystore.cmake Tue Sep 10 01:48:58 2013
@@ -126,10 +126,10 @@ if (BUILD_LEGACYSTORE)
     )
 
     if(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h)
-      message(STATUS "Including BDB from ${DB_INCLUDE_DIR}/db_cxx.h")
+      message(STATUS "Including BDB from ${DB_CXX_INCLUDE_DIR}/db_cxx.h")
         file(WRITE 
              ${CMAKE_CURRENT_BINARY_DIR}/db-inc.h
-             "#include <${DB_INCLUDE_DIR}/db_cxx.h>\n")
+             "#include <${DB_CXX_INCLUDE_DIR}/db_cxx.h>\n")
     endif()
 
     add_library (legacystore MODULE

Modified: qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp?rev=1521335&r1=1521334&r2=1521335&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/legacystore/MessageStoreImpl.cpp Tue Sep 10 01:48:58 2013
@@ -21,6 +21,7 @@
 
 #include "qpid/legacystore/MessageStoreImpl.h"
 
+#include "db-inc.h"
 #include "qpid/broker/QueueSettings.h"
 #include "qpid/legacystore/BindingDbt.h"
 #include "qpid/legacystore/BufferValue.h"
@@ -31,7 +32,6 @@
 #include "qmf/org/apache/qpid/legacystore/Package.h"
 #include "qpid/legacystore/StoreException.h"
 #include <dirent.h>
-#include <db.h>
 
 #define MAX_AIO_SLEEPS 100000 // tot: ~1 sec
 #define AIO_SLEEP_TIME_US  10 // 0.01 ms



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org