qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shus...@apache.org
Subject svn commit: r768085 - in /qpid/trunk/qpid/cpp: ./ managementgen/ managementgen/qmfgen/ managementgen/qmfgen/templates/ rubygen/ src/ src/posix/ src/qpid/ src/qpid/broker/ src/qpid/client/ src/qpid/cluster/ src/tests/ src/windows/
Date Thu, 23 Apr 2009 22:59:12 GMT
Author: shuston
Date: Thu Apr 23 22:59:12 2009
New Revision: 768085

URL: http://svn.apache.org/viewvc?rev=768085&view=rev
Log:
Merge in initial changes to allow building with CMake; rubygen and managementgen can now generate
either .mk files or .cmake files as needed; CONF_FILE and MODULE_DIR macros now have broker/client
counterparts QPIDD_CONF_FILE, QPIDD_MODULE_DIR, QPIDC_CONF_FILE, QPIDC_MODULE_DIR configurable
by cmake

Added:
    qpid/trunk/qpid/cpp/CMakeLists.txt
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/CMakeLists.txt
    qpid/trunk/qpid/cpp/managementgen/CMakeLists.txt
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/managementgen/CMakeLists.txt
    qpid/trunk/qpid/cpp/managementgen/qmfgen/templates/CMakeLists.cmake
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/managementgen/qmfgen/templates/CMakeLists.cmake
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
      - copied, changed from r768057, qpid/branches/cmake/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/cluster.cmake
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/cluster.cmake
    qpid/trunk/qpid/cpp/src/config.h.cmake
    qpid/trunk/qpid/cpp/src/qpid/cluster/Decoder.cpp
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/qpid/cluster/Decoder.cpp
    qpid/trunk/qpid/cpp/src/qpid/cluster/Decoder.h
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/qpid/cluster/Decoder.h
    qpid/trunk/qpid/cpp/src/rdma.cmake
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/rdma.cmake
    qpid/trunk/qpid/cpp/src/ssl.cmake
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/ssl.cmake
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
      - copied unchanged from r768057, qpid/branches/cmake/qpid/cpp/src/tests/CMakeLists.txt
Modified:
    qpid/trunk/qpid/cpp/managementgen/qmf-gen
    qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py
    qpid/trunk/qpid/cpp/rubygen/generate
    qpid/trunk/qpid/cpp/src/Makefile.am
    qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
    qpid/trunk/qpid/cpp/src/qpid/CommonImportExport.h
    qpid/trunk/qpid/cpp/src/qpid/broker/BrokerImportExport.h
    qpid/trunk/qpid/cpp/src/qpid/client/ClientImportExport.h
    qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp
    qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp
    qpid/trunk/qpid/cpp/src/ssl.mk
    qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp

Modified: qpid/trunk/qpid/cpp/managementgen/qmf-gen
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/managementgen/qmf-gen?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/managementgen/qmf-gen (original)
+++ qpid/trunk/qpid/cpp/managementgen/qmf-gen Thu Apr 23 22:59:12 2009
@@ -33,6 +33,8 @@
 parser = OptionParser(usage=usage)
 parser.add_option("-o", "--outputdir", dest="outputdir", metavar="DIR", default="./",
                   help="Output directory")
+parser.add_option("-c", "--cmakelists", dest="cmakelists", metavar="FILE",
+                  help="CMakeLists fragment")
 parser.add_option("-m", "--makefile", dest="makefile", metavar="FILE",
                   help="Makefile fragment")
 parser.add_option("-t", "--typefile", dest="typefile", metavar="FILE", default=defaultTypeFile,
@@ -72,3 +74,9 @@
   args["qpidbroker"] = opts.qpidbroker
   args["genprefix"]  = opts.genprefix
   gen.makeSingleFile("Makefile.mk", opts.makefile, force=True, vars=args)
+
+if opts.cmakelists != None:
+  args = {}
+  args["qpidbroker"] = opts.qpidbroker
+  args["genprefix"]  = opts.genprefix
+  gen.makeSingleFile("CMakeLists.cmake", opts.cmakelists, force=True, vars=args)

Modified: qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py (original)
+++ qpid/trunk/qpid/cpp/managementgen/qmfgen/generate.py Thu Apr 23 22:59:12 2009
@@ -24,6 +24,7 @@
 import os
 import os.path
 import filecmp
+import re
 
 class Template:
   """
@@ -175,6 +176,81 @@
       return variables["qpidbroker"]
     return False
 
+class CMakeLists(Makefile):
+  """ Object representing a makefile fragment """
+
+  # Regardless of what normalize() did, switch all the dir separators back
+  # to '/' - cmake expects that regardless of platform.
+  def unNormCase (self, path):
+    return re.sub("\\\\", "/", path)
+
+  def genGenSources (self, stream, variables):
+    mdir = self.unNormCase(variables["mgenDir"])
+    sdir = self.unNormCase(variables["specDir"])
+    stream.write (mdir + "/qmf-gen \n")
+    stream.write ("    " + mdir + "/qmfgen/generate.py\n")
+    stream.write ("    " + mdir + "/qmfgen/schema.py\n")
+    stream.write ("    " + mdir + "/qmfgen/management-types.xml\n")
+    stream.write ("    " + sdir + "/management-schema.xml\n")
+    first = True
+    for template in self.templateFiles:
+      if first:
+        first = False
+        stream.write ("    ")
+      else:
+        stream.write ("\n    ")
+      stream.write (mdir + "/qmfgen/templates/" + template)
+
+  def genGenCppFiles (self, stream, variables):
+    first = True
+    for file in self.filelists["cpp"]:
+      if first:
+        first = False
+      else:
+        stream.write (" \n    ")
+      stream.write (self.unNormCase(file))
+
+  def genGenHFiles (self, stream, variables):
+    first = True
+    for file in self.filelists["h"]:
+      if first:
+        first = False
+      else:
+        stream.write (" \n    ")
+      stream.write (self.unNormCase(file))
+
+  def genGeneratedFiles(self, stream, variables):
+    first = True
+    extensions = ("h", "cpp")
+    for ext in extensions:
+      for file in self.filelists[ext]:
+        if first:
+          first = False
+        else:
+          stream.write(" \n    ")
+        if "genprefix" in variables:
+          prefix = variables["genprefix"]
+          if prefix != "":
+            stream.write(prefix + "/")
+        stream.write(self.unNormCase(file))
+
+  def genHeaderInstalls (self, stream, variables):
+    for package in self.packagelist:
+      stream.write("#Come back to this later...\n")
+      name = "_".join(package.split("/"))
+      stream.write("#" + name + "dir = $(includedir)/qmf/" + package + "\n")
+      stream.write("#dist_" + name + "_HEADERS = ")
+      first = True
+      for file in self.filelists["h"]:
+        file = self.unNormCase(file)
+        if file.find("gen/qmf/" + package) == 0:
+          if first:
+            first = False
+          else:
+            stream.write ("\n    ")
+          stream.write("#" + file)
+      stream.write("\n\n")
+
 
 class Generator:
   """
@@ -208,9 +284,10 @@
     self.input       = self.normalize (templateDir)
     self.packagePath = self.dest
     self.filelists   = {}
-    self.filelists["h"]   = []
-    self.filelists["cpp"] = []
-    self.filelists["mk"]  = []
+    self.filelists["h"]     = []
+    self.filelists["cpp"]   = []
+    self.filelists["mk"]    = []
+    self.filelists["cmake"] = []
     self.packagelist      = []
     self.templateFiles    = []
     self.variables        = {}
@@ -354,7 +431,17 @@
 
   def makeSingleFile (self, templateFile, target, force=False, vars=None):
     """ Generate a single expanded template """
-    makefile = Makefile (self.filelists, self.templateFiles, self.packagelist)
+    dot = templateFile.find(".")
+    if dot == -1:
+      raise ValueError ("Invalid template file name %s" % templateFile)
+    className = templateFile[0:dot]
+    if className == "Makefile":
+      classType = Makefile
+    elif className == "CMakeLists":
+      classType = CMakeLists
+    else:
+      raise ValueError ("Invalid class name %s" % className)
+    makefile = classType (self.filelists, self.templateFiles, self.packagelist)
     template = Template (self.input + templateFile, self)
     if vars:
       for arg in vars:

Modified: qpid/trunk/qpid/cpp/rubygen/generate
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/rubygen/generate?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/rubygen/generate (original)
+++ qpid/trunk/qpid/cpp/rubygen/generate Thu Apr 23 22:59:12 2009
@@ -26,7 +26,8 @@
 if ARGV.size < 3
   puts <<EOS
 Usage: #{ARGV[0]} OUTDIR  SPEC.xml [ ... ] TEMPLATE.rb [ ... ]
-or:    #{ARGV[0]} OUTDIR  SPEC.xml [ ... ] all [ makefragment.mk ]
+or:    #{ARGV[0]} OUTDIR  SPEC.xml [ ... ] all [ makefragment.mk |
+                                                 makefragment.cmake ]
 
 Parse all SPEC.xml files to create an AMQP model, run each TEMPLATE
 putting the resulting files under OUTDIR. Prints a list of files
@@ -76,16 +77,19 @@
   end
 }
 
+def cmake_continue(lines) lines.join(" \n    "); end
 def make_continue(lines) lines.join(" \\\n    "); end
 
 # Generate makefile
 makefile=ARGV.grep(/.mk$/)[0]
-if makefile
+cmakefile=ARGV.grep(/.cmake$/)[0]
+if cmakefile || makefile
   dir=Dir.getwd
   Dir.chdir File.dirname(__FILE__)
   generator_files=Dir["**/*.rb"] << File.basename(__FILE__)
   Dir.chdir dir
   rgen_generator=generator_files.map{ |f| "$(rgen_dir)/#{f}" }
+  cmake_rgen_generator=generator_files.map{ |f| "${rgen_dir}/#{f}" }
   rgen_srcs=GenFiles.get.map{ |f| "#{$outdir}/#{f}" }
   rgen_subdirs={}
   rgen_srcs.each { |src|
@@ -95,31 +99,61 @@
       rgen_subdirs[subdir] << src
     end
   }
-  File.open(makefile, 'w') { |out|
-    out << <<EOS
+  if (makefile)
+    File.open(makefile, 'w') { |out|
+      out << <<EOS
 # Generated makefile fragment.
 # Including makefile defines $(rgen_dir) $(rgen_cmd) and $(specs).
 
 rgen_generator=#{make_continue rgen_generator}
 EOS
-    rgen_subdirs.each_key { |subdir|
-      out << "\nrgen_#{subdir}_srcs = #{make_continue(rgen_subdirs[subdir])}\n"
-    }
-    out << <<EOS
+      rgen_subdirs.each_key { |subdir|
+        out << "\nrgen_#{subdir}_srcs = #{make_continue(rgen_subdirs[subdir])}\n"
+      }
+      out << <<EOS
 rgen_srcs=#{make_continue rgen_srcs}
 
 # Header file install rules.
 EOS
-    ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
-      dir="qpid/#{ns}"
-      dir_ = dir.tr("/", "_")
-      regex=%r|#{dir}/[^/]+\.h$|
-      out << <<EOS
+      ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
+        dir="qpid/#{ns}"
+        dir_ = dir.tr("/", "_")
+        regex=%r|#{dir}/[^/]+\.h$|
+        out << <<EOS
 #{dir_}dir = $(includedir)/#{dir}
 dist_#{dir_}_HEADERS = #{make_continue rgen_srcs.grep(regex)}
 
 EOS
-    }
-  }
-end
+      } # each
+    }   # File makefile
+  end   # if (makefile)
+
+  if (cmakefile)
+    File.open(cmakefile, 'w') { |out|
+      out << <<EOS
+# Generated makefile fragment.
+# Including makefile defines ${rgen_dir} ${rgen_cmd} and ${specs}.
 
+set(rgen_generator #{cmake_continue cmake_rgen_generator})
+EOS
+      rgen_subdirs.each_key { |subdir|
+        out << "\nset(rgen_#{subdir}_srcs #{cmake_continue(rgen_subdirs[subdir])})\n"
+      }
+      out << <<EOS
+set(rgen_srcs #{cmake_continue rgen_srcs})
+
+# Header file install rules.
+EOS
+      ["amqp_0_10", "framing", "client/no_keyword","client", "broker"].each { |ns|
+        dir="qpid/#{ns}"
+        dir_ = dir.tr("/", "_")
+        regex=%r|#{dir}/[^/]+\.h$|
+        out << <<EOS
+set(#{dir_}dir  \${includedir}/#{dir})
+set(dist_#{dir_}_HEADERS #{cmake_continue rgen_srcs.grep(regex)})
+
+EOS
+      } # each
+    }   # File makefile
+  end   # if (makefile)
+end

Copied: qpid/trunk/qpid/cpp/src/CMakeLists.txt (from r768057, qpid/branches/cmake/qpid/cpp/src/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?p2=qpid/trunk/qpid/cpp/src/CMakeLists.txt&p1=qpid/branches/cmake/qpid/cpp/src/CMakeLists.txt&r1=768057&r2=768085&rev=768085&view=diff
==============================================================================
--- qpid/branches/cmake/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Apr 23 22:59:12 2009
@@ -422,6 +422,7 @@
      ${rgen_client_srcs}
      ${libqpidclient_platform_SOURCES}
      qpid/client/Bounds.cpp
+     qpid/client/Completion.cpp
      qpid/client/Connection.cpp
      qpid/client/ConnectionHandler.cpp
      qpid/client/ConnectionImpl.cpp
@@ -439,6 +440,7 @@
      qpid/client/LoadPlugins.cpp
      qpid/client/LocalQueue.cpp
      qpid/client/Message.cpp
+     qpid/client/MessageImpl.cpp
      qpid/client/MessageListener.cpp
      qpid/client/MessageReplayTracker.cpp
      qpid/client/QueueOptions.cpp
@@ -633,8 +635,13 @@
                         LINK_FLAGS -Wl,--no-undefined)
 endif (CMAKE_COMPILER_IS_GNUCXX)
 
-# add_subdirectory(tests)
+# This is only really needed until all the trunk builds (Linux, UNIX, Windows)
+# are all on cmake only. This is because cmake builds always have a config.h
+# file whereas older builds only have config.h on autoconf-generated builds.
+add_definitions(-DHAVE_CONFIG_H)
 
 # Now create the config file from all the info learned above.
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
                ${CMAKE_CURRENT_BINARY_DIR}/config.h)
+
+# add_subdirectory(tests)

Modified: qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/Makefile.am?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ qpid/trunk/qpid/cpp/src/Makefile.am Thu Apr 23 22:59:12 2009
@@ -106,8 +106,8 @@
 INCLUDES = -Igen -I$(srcdir)/gen
 
 ## Automake macros to build libraries and executables.
-qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DMODULE_DIR=\"$(dmoduledir)\" -DCONF_FILE=\"$(sysconfdir)/qpidd.conf\"
-libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DMODULE_DIR=\"$(cmoduledir)\" -DCONF_FILE=\"$(confdir)/qpidc.conf\"
+qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduledir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\"
+libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduledir)\" -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
 
 qpidd_LDADD =					\
   libqpidbroker.la				\

Added: qpid/trunk/qpid/cpp/src/config.h.cmake
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/config.h.cmake?rev=768085&view=auto
==============================================================================
--- qpid/trunk/qpid/cpp/src/config.h.cmake (added)
+++ qpid/trunk/qpid/cpp/src/config.h.cmake Thu Apr 23 22:59:12 2009
@@ -0,0 +1,51 @@
+/*
+ *
+ * Copyright (c) 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+/*
+ * This file is automatically generated and will be overwritten by the
+ * next CMake invocation.
+ */
+
+#ifndef QPID_CONFIG_H
+#define QPID_CONFIG_H
+
+// PACKAGE_NAME and PACKAGE_VERSION are carry-overs from the autoconf world.
+// They tend to cause confusion and problems when mixing headers from multiple
+// autoconf-configured packages, so it's best to remove these in favor of
+// Qpid-specific names as soon as the autoconf stuff is removed.
+#define PACKAGE_NAME "${CMAKE_PROJECT_NAME}"
+#define PACKAGE_VERSION "${qpidc_version}"
+
+#cmakedefine QPIDC_CONF_FILE "${QPIDC_CONF_FILE}"
+#cmakedefine QPIDD_CONF_FILE "${QPIDD_CONF_FILE}"
+
+#cmakedefine QPIDC_MODULE_DIR "${QPIDC_MODULE_DIR}"
+#cmakedefine QPIDD_MODULE_DIR "${QPIDD_MODULE_DIR}"
+
+#cmakedefine QPID_HAS_CLOCK_GETTIME
+
+#cmakedefine QPID_HAS_SASL
+#cmakedefine BROKER_SASL_NAME "${BROKER_SASL_NAME}"
+#ifdef QPID_HAS_SASL
+#  define HAVE_SASL 1
+#endif
+
+#cmakedefine HAVE_LOG_AUTHPRIV
+#cmakedefine HAVE_LOG_FTP
+
+#endif /* QPID_CONFIG_H */

Modified: qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/posix/QpiddBroker.cpp Thu Apr 23 22:59:12 2009
@@ -18,6 +18,7 @@
  *
  */
 
+#include "config.h"
 #include "qpidd.h"
 #include "qpid/Exception.h"
 #include "qpid/broker/Broker.h"
@@ -37,8 +38,8 @@
 
 BootstrapOptions::BootstrapOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", CONF_FILE),
-    module(MODULE_DIR),
+    common("", QPIDD_CONF_FILE),
+    module(QPIDD_MODULE_DIR),
     log(argv0)
 {
     add(common);
@@ -89,8 +90,8 @@
 
 QpiddOptions::QpiddOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", CONF_FILE),
-    module(MODULE_DIR),
+    common("", QPIDD_CONF_FILE),
+    module(QPIDD_MODULE_DIR),
     log(argv0)
 {
     add(common);

Modified: qpid/trunk/qpid/cpp/src/qpid/CommonImportExport.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/CommonImportExport.h?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/CommonImportExport.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/CommonImportExport.h Thu Apr 23 22:59:12 2009
@@ -21,7 +21,7 @@
  */
 
 #if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
-#if defined(COMMON_EXPORT)
+#if defined(COMMON_EXPORT) || defined (qpidcommon_EXPORTS)
 #define QPID_COMMON_EXTERN __declspec(dllexport)
 #else
 #define QPID_COMMON_EXTERN __declspec(dllimport)

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/BrokerImportExport.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/BrokerImportExport.h?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/BrokerImportExport.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/BrokerImportExport.h Thu Apr 23 22:59:12 2009
@@ -21,7 +21,7 @@
  */
 
 #if defined(WIN32) && !defined(QPID_BROKER_STATIC)
-#if defined(BROKER_EXPORT)
+#if defined(BROKER_EXPORT) || defined (qpidbroker_EXPORTS)
 #define QPID_BROKER_EXTERN __declspec(dllexport)
 #else
 #define QPID_BROKER_EXTERN __declspec(dllimport)

Modified: qpid/trunk/qpid/cpp/src/qpid/client/ClientImportExport.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/ClientImportExport.h?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/ClientImportExport.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/ClientImportExport.h Thu Apr 23 22:59:12 2009
@@ -21,7 +21,7 @@
  */
 
 #if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
-#if defined(CLIENT_EXPORT)
+#if defined(CLIENT_EXPORT) || defined (qpidclient_EXPORTS)
 #define QPID_CLIENT_EXTERN __declspec(dllexport)
 #else
 #define QPID_CLIENT_EXTERN __declspec(dllimport)

Modified: qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp Thu Apr 23 22:59:12 2009
@@ -19,6 +19,7 @@
  *
  */
 
+#include "config.h"
 #include "qpid/Modules.h"
 #include "qpid/sys/Shlib.h"
 #include <string>
@@ -30,9 +31,9 @@
 
 struct LoadtimeInitialise {
     LoadtimeInitialise() {
-        qpid::ModuleOptions moduleOptions(MODULE_DIR);
+        qpid::ModuleOptions moduleOptions(QPIDC_MODULE_DIR);
         string              defaultPath (moduleOptions.loadDir);
-        moduleOptions.parse (0, 0, CONF_FILE, true);
+        moduleOptions.parse (0, 0, QPIDC_CONF_FILE, true);
     
         for (vector<string>::iterator iter = moduleOptions.load.begin();
              iter != moduleOptions.load.end();

Modified: qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/client/SslConnector.cpp Thu Apr 23 22:59:12 2009
@@ -20,6 +20,7 @@
  */
 #include "Connector.h"
 
+#include "config.h"
 #include "Bounds.h"
 #include "ConnectionImpl.h"
 #include "ConnectionSettings.h"
@@ -146,7 +147,7 @@
         StaticInit() {
             try {
                 SslOptions options;
-                options.parse (0, 0, CONF_FILE, true);
+                options.parse (0, 0, QPIDC_CONF_FILE, true);
                 if (options.certDbPath.empty()) {
                     QPID_LOG(info, "SSL connector not enabled, you must set QPID_SSL_CERT_DB
to enable it.");                    
                 } else {

Modified: qpid/trunk/qpid/cpp/src/ssl.mk
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/ssl.mk?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/ssl.mk (original)
+++ qpid/trunk/qpid/cpp/src/ssl.mk Thu Apr 23 22:59:12 2009
@@ -56,7 +56,7 @@
   libqpidclient.la \
   libsslcommon.la
 
-sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DCONF_FILE=\"$(confdir)/qpidc.conf\"
+sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\"
 
 sslconnector_la_LDFLAGS = $(PLUGINLDFLAGS)
 

Modified: qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp?rev=768085&r1=768084&r2=768085&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/windows/QpiddBroker.cpp Thu Apr 23 22:59:12 2009
@@ -19,6 +19,16 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#else
+// These need to be made something sensible, like reading a value from
+// the registry. But for now, get things going with a local definition.
+namespace {
+const char *QPIDD_CONF_FILE = "qpid_broker.conf";
+const char *QPIDD_MODULE_DIR = ".";
+}
+#endif
 #include "qpidd.h"
 #include "qpid/Exception.h"
 #include "qpid/Options.h"
@@ -29,19 +39,12 @@
 
 #include <iostream>
 
-// These need to be made something sensible, like reading a value from
-// the registry. But for now, get things going with a local definition.
-namespace {
-const char *CONF_FILE = "qpid_broker.conf";
-const char *MODULE_DIR = ".";
-}
-
 using namespace qpid::broker;
 
 BootstrapOptions::BootstrapOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", CONF_FILE),
-    module(MODULE_DIR),
+    common("", QPIDD_CONF_FILE),
+    module(QPIDD_MODULE_DIR),
     log(argv0)
 {
     add(common);
@@ -56,8 +59,8 @@
 
 QpiddOptions::QpiddOptions(const char* argv0)
   : qpid::Options("Options"),
-    common("", CONF_FILE),
-    module(MODULE_DIR),
+    common("", QPIDD_CONF_FILE),
+    module(QPIDD_MODULE_DIR),
     log(argv0)
 {
     add(common);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message