debian/0000775000000000000000000000000012321301175007163 5ustar debian/rules0000775000000000000000000001004112321301100010223 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/quilt/quilt.make # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) else CROSS= --build $(DEB_BUILD_GNU_TYPE) endif CC=/usr/bin/gcc CXX=/usr/bin/g++ CFLAGS = -O3 -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/libxml2 -fPIC -DPIC CXXFLAGS = -O3 -I/usr/include/mysql -I/usr/include/postgresql -I/usr/include/libxml2 -fPIC -DPIC ifeq (amd64,$(DEB_HOST_ARCH)) CFLAGS += -O3 -msse3 CXXFLAGS += -O3 -msse3 endif # Fix FTBFS on kfreebsd-* builds, which require explicit pthread linkage # Using CFLAGS/CXXFLAGS feels like an ugly hack, but no amount of coaxing with # DEB_LDFLAGS_MAINT_{PRE,AP}PEND seems to get the flag in the right position ifneq (,$(findstring kfreebsd,$(DEB_HOST_ARCH))) CFLAGS += -pthread CXXFLAGS += -pthread endif #CFLAGS = -Wall -g #ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) # CFLAGS += -O0 #else # CFLAGS += -O2 #endif dpkg_buildflags = DEB_CFLAGS_MAINT_APPEND="$(CFLAGS)" DEB_CXXFLAGS_MAINT_APPEND="$(CXXFLAGS)" DEB_LDFLAGS_MAINT_APPEND="-Wl,-z,defs" dpkg-buildflags config.status: configure configure: configure-stamp configure-stamp: $(QUILT_STAMPFN) dh_testdir dh_autotools-dev_updateconfig # Add here commands to configure the package. libtoolize ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CC="$(CC)" CXX="$(CXX)" --with-mysql=/usr --enable-new-allocator --with-postgresql=/usr --with-boost=/usr/include/boost $(shell $(dpkg_buildflags) --export=configure) touch configure-stamp build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: config.status dh_testdir [ -d $(CURDIR)/lib ] || mkdir $(CURDIR)/lib $(MAKE) $(shell $(dpkg_buildflags) --export=configure) touch $@ clean: unpatch dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean -rmdir $(CURDIR)/lib dh_autotools-dev_restoreconfig dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install $(MAKE) -C examples clean rm -f debian/tmp/usr/lib/*.la # Build architecture-independent files here. binary-indep: build install dh_testdir -i dh_testroot -i dh_installchangelogs -i dh_installdocs -i -XChangeLog dh_installexamples -i dh_install -i --list-missing dh_installman -i dh_link -i dh_compress -i dh_fixperms -i # dh_fixperms doesn't quite handle everything find $(CURDIR)/debian/libquickfix-doc/usr/share/doc/libquickfix-doc/examples -type f |xargs -r chmod 644 dh_makeshlibs -i dh_installdeb -i dh_shlibdeps -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. binary-arch: build install dh_testdir -a dh_testroot -a dh_installchangelogs -a dh_installdocs -a -XChangeLog dh_installexamples -a dh_install -a --list-missing dh_installman -a dh_link -a dh_strip -a -Xexamples --dbg-package=libquickfix14-dbg dh_compress -a dh_fixperms -a # dh_fixperms doesn't quite handle everything find $(CURDIR)/debian/libquickfix-doc/usr/share/doc/libquickfix-doc/examples -type f |xargs -r chmod 644 dh_makeshlibs -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/libquickfix14.docs0000664000000000000000000000001712321300774012516 0ustar NEWS ChangeLog debian/watch0000664000000000000000000000034412321300774010221 0ustar version=3 opts="dversionmangle=s/\+dfsg[.\d]*//" \ http://sf.net/quickfix/quickfix-([.0-9]+)\.tar\.gz debian debian/repack.sh # http://sf.net/quickfix/quickfix-([.0-9]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) debian debian/repack.sh debian/changelog0000664000000000000000000000522012321301131011024 0ustar quickfix (1.13.3+dfsg-8ubuntu1) trusty; urgency=medium * Merge from Debian unstable. Remaining changes: - Use autotools-dev dh helper instead of manually copying config.{sub,guess} to fix FTBFS on arm64. -- Logan Rosen Wed, 09 Apr 2014 13:24:18 -0400 quickfix (1.13.3+dfsg-8) unstable; urgency=low * Standardize patch names and number patches * Fix FTBFS: explicitly use -pthread when building on kfreebsd-* -- Roberto C. Sanchez Mon, 31 Mar 2014 10:02:48 -0400 quickfix (1.13.3+dfsg-7ubuntu1) trusty; urgency=medium * Use autotools-dev dh helper instead of manually copying config.{sub,guess} to fix FTBFS on arm64. -- Logan Rosen Wed, 05 Mar 2014 14:19:00 -0500 quickfix (1.13.3+dfsg-7) unstable; urgency=low * Drop Ruby and Python bindings (Closes: #735438, #717412, #739779) * Update to Standards-Version 3.9.5 (no changes) -- Roberto C. Sanchez Tue, 04 Mar 2014 08:44:50 -0500 quickfix (1.13.3+dfsg-6) unstable; urgency=low * Ensure `xargs` doesn't call `chmod` if nothing is found (Closes: #717199) * Document how to regenerate SWIG-generated files -- Roberto C. Sanchez Sat, 20 Jul 2013 10:04:06 -0400 quickfix (1.13.3+dfsg-5) unstable; urgency=low * Add Vcs-* fields to debian/control * Update to Standards-Version 3.9.4 (no changes) * Build with hardening options, adjust flags, and fix binary-indep target * Patches to correct format string insecurity, as well replace deprecated calls (Closes: 676083) * Rename binary package libquickfix-ruby1.8 to ruby-quickfix, also remove binary support for Ruby 1.8 and add binary support for Ruby 1.9 -- Roberto C. Sanchez Wed, 10 Jul 2013 22:49:22 -0400 quickfix (1.13.3+dfsg-4) unstable; urgency=low * Change Build-Depends to use default Python version (Closes: #653798) -- Roberto C. Sanchez Tue, 03 Jan 2012 20:39:48 -0500 quickfix (1.13.3+dfsg-3) unstable; urgency=low * Apply test_runner_bad_virtual_method_arg.patch from unittest++ source, since quickfix embeds its own copy of UnitTest++ (Closes: #648257) -- Roberto C. Sanchez Sat, 26 Nov 2011 18:59:25 -0500 quickfix (1.13.3+dfsg-2) unstable; urgency=low * Only apply -msse3 optimization when it will work, thanks to Nobuhiro Iwamatsu for the patch (Closes: #644450) -- Roberto C. Sanchez Mon, 10 Oct 2011 11:52:59 -0400 quickfix (1.13.3+dfsg-1) unstable; urgency=low * Initial release (Closes: #642268) -- Roberto C. Sanchez Tue, 20 Sep 2011 18:09:58 -0400 debian/compat0000664000000000000000000000000212321300774010365 0ustar 5 debian/README.Debian-source0000664000000000000000000000210312321300774012522 0ustar * This package ships from upstream with SWIG-generated files. As of the writing this, upstream had used swig 1.3.31 to generate the files. In the interest of no perturbing things too much, the build process for the Debian package doesn't remove and regenerate the generated files. Specifically, these files have been generated: src/python/QuickfixPython.h src/python/QuickfixPython.cpp src/python/quickfix.py src/ruby/QuickfixRuby.h src/ruby/QuickfixRuby.cpp In order to regenerate these files, you can do the following: $ cd /src/python $ swig -python -c++ ../quickfix.i This will result in the following files: src/quickfix.py src/quickfix_wrap.cxx src/quickfix_wrap.h $ cd /src/ruby $ swig -ruby -c++ ../quickfix.i This will result in the following files: src/quickfix_wrap.cxx src/quickfix_wrap.h In each case, the *_wrap.cxx file corresponds to the .cpp file and the *_wrap.h file to the .h file. -- Roberto C. Sanchez Sat, 20 Jul 2013 09:51:56 -0400 debian/README.source0000664000000000000000000000070012321300774011343 0ustar This package uses quilt to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. See /usr/share/doc/quilt/README.source for a detailed explanation. The upstream source tarball is repackaged to exclude binary files (DLL and JAR files that are not used in the course of pacakging/building for Debian). Please see the debian/repack.sh script for details. debian/libquickfix14.install0000664000000000000000000000004412321300774013234 0ustar debian/tmp/usr/lib/libquickfix.so.* debian/copyright0000664000000000000000000002175012321300774011127 0ustar Upstream-Source: http://www.quickfixengine.org/download.html Files: * Copyright: (c) 2001-2010 quickfixengine.org License: other The QuickFIX Software License, Version 1.0 Copyright (c) 2001-2010 quickfixengine.org All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by quickfixengine.org (http://www.quickfixengine.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "QuickFIX" and "quickfixengine.org" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact ask@quickfixengine.org 5. Products derived from this software may not be called "QuickFIX", nor may "QuickFIX" appear in their name, without prior written permission of quickfixengine.org THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL QUICKFIXENGINE.ORG OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: debian/* Copyright: (C) 2009, 2011, Athena Capital Research License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: src/getopt.c Copyright: (c) 1987, 1993, 1994 The Regents of the University of California. License: BSD-4 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: src/C++/FlexLexer.h Copyright: (c) 1993 The Regents of the University of California. License: BSD-4 All rights reserved. This code is derived from software contributed to Berkeley by Kent Williams and Tom Epperly. Redistribution and use in source and binary forms with or without modification are permitted provided that: (1) source distributions retain this entire copyright notice and comment, and (2) distributions including binaries display the following acknowledgement: ``This product includes software developed by the University of California, Berkeley and its contributors'' in the documentation or other materials provided with the distribution and in all advertising materials mentioning features or use of this software. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Files: src/C++/strptime.c Copyright: (c) 1994 Powerdog Industries License: BSD-4 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Powerdog Industries. 4. The name of Powerdog Industries may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE POWERDOG INDUSTRIES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: UnitTest++/* Copyright: (c) 2006 Noel Llopis and Charles Nicholson License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/source/0000775000000000000000000000000012321301170010456 5ustar debian/source/format0000664000000000000000000000001412321300774011675 0ustar 3.0 (quilt) debian/source/options0000664000000000000000000000003312321301045012071 0ustar --diff-ignore --tar-ignore debian/libquickfix-dev.dirs0000664000000000000000000000002412321300774013134 0ustar usr/lib usr/include debian/repack.sh0000775000000000000000000000135612321300774011000 0ustar #!/bin/sh # Repackage upstream source to exclude non-distributable files # should be called as "repack sh --upstream-source # (for example, via uscan) set -e set -u FILE=$3 PKG=`dpkg-parsechangelog|grep ^Source:|sed 's/^Source: //'` VER="$2+dfsg" printf "\nRepackaging $FILE\n" DIR=`mktemp -d ./tmpRepackXXXXXX` trap "rm -rf $DIR" QUIT INT EXIT tar xzf $FILE -C $DIR TARGET=`echo $FILE |sed 's/_\(.*\)\.orig/_\1+dfsg.orig/'` REPACK=`basename $TARGET` UP_DIR=`ls -1 $DIR` ( set -e set -u cd $DIR rm -rv $UP_DIR/lib/* REPACK_DIR="$PKG-$VER.orig" mv $UP_DIR $REPACK_DIR tar -c $REPACK_DIR | gzip -9 > $REPACK ) rm -v $FILE mv $DIR/$REPACK $TARGET echo "*** $FILE repackaged as $TARGET" debian/libquickfix-dev.docs0000664000000000000000000000001712321300774013125 0ustar NEWS ChangeLog debian/libquickfix-doc.docs0000664000000000000000000000003012321300774013107 0ustar doc/html NEWS ChangeLog debian/libquickfix-doc.doc-base0000664000000000000000000000045012321300774013642 0ustar Document: libquickfix-doc Title: QuickFIX Documentation Author: Oren Miller Abstract: Documentation for developing with QuickFIX Section: Programming Format: HTML Index: /usr/share/doc/libquickfix-doc/html/index.html Files: /usr/share/doc/libquickfix-doc/html/*.html debian/libquickfix-doc.dirs0000664000000000000000000000005012321300774013122 0ustar /usr/share/doc/libquickfix-doc/examples debian/libquickfix14.dirs0000664000000000000000000000001012321300774012520 0ustar usr/lib debian/libquickfix-dev.install0000664000000000000000000000012312321300774013641 0ustar debian/tmp/usr/include/* debian/tmp/usr/lib/lib*.so debian/tmp/usr/lib/pkgconfig/* debian/libquickfix-doc.install0000664000000000000000000000017712321300774013641 0ustar examples/* /usr/share/doc/libquickfix-doc/examples debian/tmp/usr/share/quickfix/*.xml /usr/share/doc/libquickfix-doc/examples debian/control0000664000000000000000000000476512321300774010606 0ustar Source: quickfix Priority: extra Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Athena Capital Research Uploaders: Roberto C. Sanchez Build-Depends: debhelper (>= 5), autotools-dev, automake1.11, quilt, libxml2-dev, libmysqlclient-dev, libpqxx3-dev, libboost-all-dev, autoconf, automake, libtool Standards-Version: 3.9.5 Section: libs Homepage: http://www.quickfixengine.org/index.html Vcs-Browser: https://quickfix.svn.sourceforge.net/svnroot/quickfix/trunk/quickfix Vcs-Svn: svn://svn.code.sf.net/p/quickfix/code/ Package: libquickfix-dev Section: libdevel Architecture: any Depends: libquickfix14 (= ${binary:Version}), ${misc:Depends} Suggests: libquickfix-doc Description: FIX protocol library - development files The Financial Information eXchange (FIX) Protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. It is intended for use between trading partners wishing to automate communications. . This package includes the quickfix development files. Package: libquickfix14 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: FIX protocol library - runtime files The Financial Information eXchange (FIX) Protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. It is intended for use between trading partners wishing to automate communications. . This package includes the quickfix runtime files. Package: libquickfix14-dbg Section: debug Architecture: any Depends: libquickfix14 (= ${binary:Version}), ${misc:Depends} Description: FIX protocol library - debugging symbols The Financial Information eXchange (FIX) Protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. It is intended for use between trading partners wishing to automate communications. . This package includes the quickfix debugging symbols. Package: libquickfix-doc Section: doc Architecture: all Depends: ${misc:Depends} Suggests: libquickfix-dev Description: FIX protocol library - documentation The Financial Information Exchange (FIX) Protocol is a message standard developed to facilitate the electronic exchange of information related to securities transactions. It is intended for use between trading partners wishing to automate communications. . This package includes the quickfix documentation. debian/libquickfix14-dbg.docs0000664000000000000000000000001712321300774013250 0ustar NEWS ChangeLog debian/patches/0000775000000000000000000000000012321301170010605 5ustar debian/patches/03_src_heartbeat.patch0000664000000000000000000000072012321301045014736 0ustar Description: Add heartbeat object access. Author: Athena Capital Research --- trunk.orig/src/C++/Session.h +++ trunk/src/C++/Session.h @@ -207,6 +207,8 @@ Log* getLog() { return &m_state; } const MessageStore* getStore() { return &m_state; } + const HeartBtInt& getHeartBtInt() const { return m_state.heartBtInt(); } + private: typedef std::map < SessionID, Session* > Sessions; typedef std::set < SessionID > SessionIDs; debian/patches/01_uninitialized_v2.patch0000664000000000000000000000075712321301045015417 0ustar Description: Initialize uninitialized things. Author: Athena Capital Research --- trunk.orig/src/C++/Initiator.cpp +++ trunk/src/C++/Initiator.cpp @@ -43,6 +43,7 @@ m_settings( settings ), m_pLogFactory( 0 ), m_pLog( 0 ), + m_firstPoll( true ), m_stop( true ) { initialize(); } @@ -56,6 +57,7 @@ m_settings( settings ), m_pLogFactory( &logFactory ), m_pLog( logFactory.create() ), + m_firstPoll( true ), m_stop( true ) { initialize(); } debian/patches/05_ruby_hardcode_lower_optimization.patch0000664000000000000000000000072112321301045020763 0ustar Decription: Force a lower level of optimization on the build of the Ruby module. Author: Roberto C. Sanchez --- quickfix.hg.orig/src/ruby/make_ruby.sh +++ quickfix.hg/src/ruby/make_ruby.sh @@ -1,5 +1,5 @@ export CXX=$1 -export CXXFLAGS=$2 +export CXXFLAGS="-O2" export LIBS=$3 rm -rf ../temp @@ -13,4 +13,4 @@ cp ../temp/Makefile Makefile.ruby rm -rf ../temp -make -f Makefile.ruby \ No newline at end of file +make -f Makefile.ruby debian/patches/06_build_system_cleanup.patch0000664000000000000000000001213412321301045016347 0ustar Description: Clean up brain damage in the build system. Author: Roberto C. Sanchez --- trunk.orig/examples/ordermatch/test/Makefile.am +++ trunk/examples/ordermatch/test/Makefile.am @@ -1,5 +1,5 @@ CFLAGS += -O0 -g -CXXFLAGS += -O0 -g +AM_CXXFLAGS = -O0 -g noinst_PROGRAMS = ordermatch_ut @@ -11,4 +11,4 @@ ordermatch_ut_LDADD = -L$(top_builddir)/src/C++ -lquickfix INCLUDES = -I$(top_builddir)/include -I.. -I../../../UnitTest++/src -LDFLAGS = -L../../../UnitTest++ -lUnitTest++ \ No newline at end of file +AM_LDFLAGS = -L../../../UnitTest++ -lUnitTest++ --- trunk.orig/src/C++/test/Makefile.am +++ trunk/src/C++/test/Makefile.am @@ -1,5 +1,5 @@ CFLAGS += -O0 -g -CXXFLAGS += -O0 -g +AM_CXXFLAGS = -O0 -g noinst_LTLIBRARIES = libquickfixcpptest.la --- trunk.orig/src/Makefile.am +++ trunk/src/Makefile.am @@ -21,7 +21,7 @@ pt_LDADD = C++/libquickfix.la INCLUDES =-IC++ -IC++/test -I../UnitTest++/src -LDFLAGS =-L../UnitTest++ -lUnitTest++ +AM_LDFLAGS =-L../UnitTest++ -lUnitTest++ all-local: rm -f ../test/ut ../test/pt ../test/at ../test/ut_debug --- trunk.orig/src/python/Makefile.am +++ trunk/src/python/Makefile.am @@ -25,35 +25,10 @@ rm -rf $(top_builddir)/lib/python install-exec-local: - rm -rf $(PYTHON_SITE_PACKAGES)/python/_quickfix.so - rm -rf $(PYTHON_SITE_PACKAGES)/python/_quickfix.dylib - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix40.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix41.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix42.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix43.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix44.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50sp1.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50sp2.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfixt11.py - ln -sf $(prefix)/lib/python/_quickfix.so $(PYTHON_SITE_PACKAGES)/_quickfix.so - ln -sf $(prefix)/lib/python/_quickfix.dylib $(PYTHON_SITE_PACKAGES)/_quickfix.dylib - cp $(top_builddir)/lib/python/*.py $(PYTHON_SITE_PACKAGES) - -uninstall-local: - rm -rf $(PYTHON_SITE_PACKAGES)/_quickfix.so - rm -rf $(PYTHON_SITE_PACKAGES)/_quickfix.dylib - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix40.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix41.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix42.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix43.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix44.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50sp1.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50sp2.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfixt11.py + mkdir -p $(DESTDIR)$(PYTHON_SITE_PACKAGES) + ln -sf $(prefix)/lib/python/_quickfix.so $(DESTDIR)$(PYTHON_SITE_PACKAGES)/_quickfix.so + ln -sf $(prefix)/lib/python/_quickfix.dylib $(DESTDIR)$(PYTHON_SITE_PACKAGES)/_quickfix.dylib + cp $(top_builddir)/lib/python/*.py $(DESTDIR)$(PYTHON_SITE_PACKAGES) libquickfix_python_la_LDFLAGS = -version-info 10:0:0 libquickfix_python_la_LIBADD = $(top_builddir)/src/C++/libquickfix.la --- trunk.orig/src/python/Makefile.in +++ trunk/src/python/Makefile.in @@ -594,35 +594,10 @@ rm -rf $(top_builddir)/lib/python install-exec-local: - rm -rf $(PYTHON_SITE_PACKAGES)/python/_quickfix.so - rm -rf $(PYTHON_SITE_PACKAGES)/python/_quickfix.dylib - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix40.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix41.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix42.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix43.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix44.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50sp1.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfix50sp2.py - rm -rf $(PYTHON_SITE_PACKAGES)/python/quickfixt11.py - ln -sf $(prefix)/lib/python/_quickfix.so $(PYTHON_SITE_PACKAGES)/_quickfix.so - ln -sf $(prefix)/lib/python/_quickfix.dylib $(PYTHON_SITE_PACKAGES)/_quickfix.dylib - cp $(top_builddir)/lib/python/*.py $(PYTHON_SITE_PACKAGES) - -uninstall-local: - rm -rf $(PYTHON_SITE_PACKAGES)/_quickfix.so - rm -rf $(PYTHON_SITE_PACKAGES)/_quickfix.dylib - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix40.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix41.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix42.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix43.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix44.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50sp1.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfix50sp2.py - rm -rf $(PYTHON_SITE_PACKAGES)/quickfixt11.py + mkdir -p $(DESTDIR)$(PYTHON_SITE_PACKAGES) + ln -sf $(prefix)/lib/python/_quickfix.so $(DESTDIR)$(PYTHON_SITE_PACKAGES)/_quickfix.so + ln -sf $(prefix)/lib/python/_quickfix.dylib $(DESTDIR)$(PYTHON_SITE_PACKAGES)/_quickfix.dylib + cp $(top_builddir)/lib/python/*.py $(DESTDIR)$(PYTHON_SITE_PACKAGES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. debian/patches/07_stdlib.patch0000664000000000000000000000042312321301045013415 0ustar Description: Add missing standard header include. Author: Roberto C. Sanchez --- trunk.orig/src/C++/Utility.h +++ trunk/src/C++/Utility.h @@ -91,6 +91,7 @@ #include #include #include +#include namespace FIX { debian/patches/08_test_runner_bad_virtual_method_arg.patch0000664000000000000000000000130712321301045021254 0ustar Description: Fix bad method virtual argument (Closes: #648257) Author: Johan Euphrosine (proppy) --- quickfix.hg.orig/UnitTest++/src/tests/TestTestRunner.cpp +++ quickfix.hg/UnitTest++/src/tests/TestTestRunner.cpp @@ -20,14 +20,14 @@ { } - virtual void RunImpl(TestResults& testResults_) const + virtual void RunImpl() const { for (int i=0; i < count; ++i) { if (asserted) ReportAssert("desc", "file", 0); else if (!success) - testResults_.OnTestFailure(m_details, "message"); + CurrentTest::Results()->OnTestFailure(m_details, "message"); } } debian/patches/series0000664000000000000000000000050112321301045012017 0ustar 01_uninitialized_v2.patch 02_src_fieldbase_calculate.patch 03_src_heartbeat.patch 04_ruby_site_packages.patch 05_ruby_hardcode_lower_optimization.patch 06_build_system_cleanup.patch 07_stdlib.patch 08_test_runner_bad_virtual_method_arg.patch 09_error_string_format.patch 10_STR2CSTR_replace.patch 11_RSTRING_update.patch debian/patches/10_STR2CSTR_replace.patch0000664000000000000000000000621412321301045015053 0ustar Decription: Replace calls to the deprecated STR2CSTR Author: Roberto C. Sanchez --- quickfix.hg.orig/src/quickfix.i +++ quickfix.hg/src/quickfix.i @@ -126,7 +126,7 @@ #ifdef SWIGRUBY %typemap(in) std::string& (std::string temp) { - temp = std::string((char*)STR2CSTR($input)); + temp = std::string((char*)StringValuePtr($input)); $1 = &temp; } --- quickfix.hg.orig/src/ruby/QuickfixRuby.cpp +++ quickfix.hg/src/ruby/QuickfixRuby.cpp @@ -3975,7 +3975,7 @@ - char *cstr = STR2CSTR(obj); + char *cstr = StringValuePtr(obj); size_t size = RSTRING_LEN(obj) + 1; if (cptr) { @@ -14843,7 +14843,7 @@ } arg1 = reinterpret_cast< FIX::FieldMap * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } ecode3 = SWIG_AsVal_bool(argv[1], &val3); @@ -14888,7 +14888,7 @@ } arg1 = reinterpret_cast< FIX::FieldMap * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } { @@ -16521,7 +16521,7 @@ } arg1 = reinterpret_cast< FIX::Message * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } ecode3 = SWIG_AsVal_int(argv[1], &val3); @@ -16582,7 +16582,7 @@ } arg1 = reinterpret_cast< FIX::Message * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } ecode3 = SWIG_AsVal_int(argv[1], &val3); @@ -16635,7 +16635,7 @@ } arg1 = reinterpret_cast< FIX::Message * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } ecode3 = SWIG_AsVal_int(argv[1], &val3); @@ -16680,7 +16680,7 @@ } arg1 = reinterpret_cast< FIX::Message * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } { @@ -16926,7 +16926,7 @@ } arg1 = reinterpret_cast< FIX::Message * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } { @@ -221534,7 +221534,7 @@ } arg1 = reinterpret_cast< FIX::SessionID * >(argp1); { - temp2 = std::string((char*)STR2CSTR(argv[0])); + temp2 = std::string((char*)StringValuePtr(argv[0])); arg2 = &temp2; } { @@ -234994,7 +234994,7 @@ } arg2 = static_cast< int >(val2); { - temp3 = std::string((char*)STR2CSTR(argv[1])); + temp3 = std::string((char*)StringValuePtr(argv[1])); arg3 = &temp3; } result = (bool)((FIX::DataDictionary const *)arg1)->getFieldName(arg2,*arg3); @@ -235172,7 +235172,7 @@ arg3 = ptr; } { - temp4 = std::string((char*)STR2CSTR(argv[2])); + temp4 = std::string((char*)StringValuePtr(argv[2])); arg4 = &temp4; } result = (bool)((FIX::DataDictionary const *)arg1)->getValueName(arg2,(std::string const &)*arg3,*arg4); debian/patches/04_ruby_site_packages.patch0000664000000000000000000001104512321301045015776 0ustar Description: Change installation location of Ruby site packages. Author: Roberto C. Sanchez --- trunk.orig/configure +++ trunk/configure @@ -15015,7 +15015,7 @@ then RUBY_CFLAGS="-I${RUBY_PREFIX}" - RUBY_SITE_PACKAGES=`ruby -e 'require "rbconfig"; print Config::CONFIG["sitedir"], "\n"'` + RUBY_SITE_PACKAGES=`ruby -e 'require "rbconfig"; print Config::CONFIG["libdir"], "\n"'` $as_echo "#define HAVE_RUBY 1" >>confdefs.h --- trunk.orig/configure.in +++ trunk/configure.in @@ -176,7 +176,7 @@ then RUBY_CFLAGS="-I${RUBY_PREFIX}" AC_SUBST(RUBY_CFLAGS) - RUBY_SITE_PACKAGES=[`ruby -e 'require "rbconfig"; print Config::CONFIG["sitedir"], "\n"'`] + RUBY_SITE_PACKAGES=[`ruby -e 'require "rbconfig"; print Config::CONFIG["libdir"], "\n"'`] AC_SUBST(RUBY_SITE_PACKAGES) AC_DEFINE(HAVE_RUBY, 1, Define if you have ruby) fi --- trunk.orig/src/ruby/Makefile.am +++ trunk/src/ruby/Makefile.am @@ -2,34 +2,13 @@ all-local: bash ./make_ruby.sh $(CXX) $(CXXFLAGS) $(LIBS) - mkdir -p $(top_builddir)/lib/ruby - ln -sf ../../src/ruby/quickfix_ruby.rb $(top_builddir)/lib/ruby/quickfix_ruby.rb - ln -sf ../../src/ruby/quickfix_fields.rb $(top_builddir)/lib/ruby/quickfix_fields.rb - ln -sf ../../src/ruby/quickfix40.rb $(top_builddir)/lib/ruby/quickfix40.rb - ln -sf ../../src/ruby/quickfix41.rb $(top_builddir)/lib/ruby/quickfix41.rb - ln -sf ../../src/ruby/quickfix42.rb $(top_builddir)/lib/ruby/quickfix42.rb - ln -sf ../../src/ruby/quickfix43.rb $(top_builddir)/lib/ruby/quickfix43.rb - ln -sf ../../src/ruby/quickfix44.rb $(top_builddir)/lib/ruby/quickfix44.rb - ln -sf ../../src/ruby/quickfix50.rb $(top_builddir)/lib/ruby/quickfix50.rb - ln -sf ../../src/ruby/quickfix50sp1.rb $(top_builddir)/lib/ruby/quickfix50sp1.rb - ln -sf ../../src/ruby/quickfix50sp2.rb $(top_builddir)/lib/ruby/quickfix50sp2.rb - ln -sf ../../src/ruby/quickfixt11.rb $(top_builddir)/lib/ruby/quickfixt11.rb - ln -sf ../../src/ruby/quickfix.so $(top_builddir)/lib/ruby/quickfix.so - ln -sf ../../src/ruby/quickfix.bundle $(top_builddir)/lib/ruby/quickfix.bundle - - bash ./link.sh $(top_builddir)/lib/ruby quickfix.so quickfix.bundle clean-local: make -f Makefile.ruby clean - rm -rf $(top_builddir)/lib/ruby install-exec-local: - cp -f $(top_builddir)/lib/ruby/*.rb $(RUBY_SITE_PACKAGES) - cp -f $(top_builddir)/lib/ruby/quickfix.so $(RUBY_SITE_PACKAGES) - cp -f $(top_builddir)/lib/ruby/quickfix.bundle $(RUBY_SITE_PACKAGES) + make -f Makefile.ruby install uninstall-local: - rm -rf $(RUBY_SITE_PACKAGES)/quickfix*.rb - rm -rf $(RUBY_SITE_PACKAGES)/quickfix*.so - rm -rf $(RUBY_SITE_PACKAGES)/quickfix.bundle + make -f Makefile.ruby install --- trunk.orig/src/ruby/Makefile.in +++ trunk/src/ruby/Makefile.in @@ -426,36 +426,15 @@ all-local: bash ./make_ruby.sh $(CXX) $(CXXFLAGS) $(LIBS) - mkdir -p $(top_builddir)/lib/ruby - ln -sf ../../src/ruby/quickfix_ruby.rb $(top_builddir)/lib/ruby/quickfix_ruby.rb - ln -sf ../../src/ruby/quickfix_fields.rb $(top_builddir)/lib/ruby/quickfix_fields.rb - ln -sf ../../src/ruby/quickfix40.rb $(top_builddir)/lib/ruby/quickfix40.rb - ln -sf ../../src/ruby/quickfix41.rb $(top_builddir)/lib/ruby/quickfix41.rb - ln -sf ../../src/ruby/quickfix42.rb $(top_builddir)/lib/ruby/quickfix42.rb - ln -sf ../../src/ruby/quickfix43.rb $(top_builddir)/lib/ruby/quickfix43.rb - ln -sf ../../src/ruby/quickfix44.rb $(top_builddir)/lib/ruby/quickfix44.rb - ln -sf ../../src/ruby/quickfix50.rb $(top_builddir)/lib/ruby/quickfix50.rb - ln -sf ../../src/ruby/quickfix50sp1.rb $(top_builddir)/lib/ruby/quickfix50sp1.rb - ln -sf ../../src/ruby/quickfix50sp2.rb $(top_builddir)/lib/ruby/quickfix50sp2.rb - ln -sf ../../src/ruby/quickfixt11.rb $(top_builddir)/lib/ruby/quickfixt11.rb - ln -sf ../../src/ruby/quickfix.so $(top_builddir)/lib/ruby/quickfix.so - ln -sf ../../src/ruby/quickfix.bundle $(top_builddir)/lib/ruby/quickfix.bundle - - bash ./link.sh $(top_builddir)/lib/ruby quickfix.so quickfix.bundle clean-local: make -f Makefile.ruby clean - rm -rf $(top_builddir)/lib/ruby install-exec-local: - cp -f $(top_builddir)/lib/ruby/*.rb $(RUBY_SITE_PACKAGES) - cp -f $(top_builddir)/lib/ruby/quickfix.so $(RUBY_SITE_PACKAGES) - cp -f $(top_builddir)/lib/ruby/quickfix.bundle $(RUBY_SITE_PACKAGES) + make -f Makefile.ruby install uninstall-local: - rm -rf $(RUBY_SITE_PACKAGES)/quickfix*.rb - rm -rf $(RUBY_SITE_PACKAGES)/quickfix*.so - rm -rf $(RUBY_SITE_PACKAGES)/quickfix.bundle + make -f Makefile.ruby install # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. debian/patches/09_error_string_format.patch0000664000000000000000000000063212321301045016227 0ustar Decription: Correct an error resulting from an insecure call to PyErr_Format Author: Roberto C. Sanchez --- quickfix.hg.orig/src/python/QuickfixPython.cpp +++ quickfix.hg/src/python/QuickfixPython.cpp @@ -869,7 +869,7 @@ Py_DECREF(old_str); Py_DECREF(value); } else { - PyErr_Format(PyExc_RuntimeError, mesg); + PyErr_Format(PyExc_RuntimeError, "%s", mesg); } } debian/patches/11_RSTRING_update.patch0000664000000000000000000000404012321301045014620 0ustar Decription: Replace calls to the deprecated RSTRING(foo)->ptr Author: Roberto C. Sanchez --- quickfix.hg.orig/src/ruby/QuickfixRuby.cpp +++ quickfix.hg/src/ruby/QuickfixRuby.cpp @@ -4267,7 +4267,7 @@ if (Application_onCreate_call_depth == 1) { if( error != 0 ) { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } @@ -4300,7 +4300,7 @@ if (Application_onLogon_call_depth == 1) { if( error != 0 ) { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } @@ -4333,7 +4333,7 @@ if (Application_onLogout_call_depth == 1) { if( error != 0 ) { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } @@ -4366,7 +4366,7 @@ if (Application_toAdmin_call_depth == 1) { if( error != 0 ) { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } @@ -4406,7 +4406,7 @@ throw *((FIX::DoNotSend*)result); } else { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } } @@ -4473,7 +4473,7 @@ throw *((FIX::RejectLogon*)result); } else { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } } @@ -4546,7 +4546,7 @@ throw *((FIX::UnsupportedMessageType*)result); } else { VALUE message = rb_obj_as_string( error ); - printf( "%s\n", RSTRING(message)->ptr ); + printf( "%s\n", RSTRING_PTR(message) ); exit(1); } } debian/patches/02_src_fieldbase_calculate.patch0000664000000000000000000000542112321301045016734 0ustar Description: Fix fieldbase calculation. Author: Athena Capital Research --- trunk.orig/src/C++/Field.h +++ trunk/src/C++/Field.h @@ -27,6 +27,7 @@ #endif #include +#include #include #include "FieldNumbers.h" #include "FieldConvertors.h" @@ -47,7 +48,7 @@ friend class Message; public: FieldBase( int field, const std::string& string ) - : m_field( field ), m_string(string), m_length( 0 ), m_total( 0 ), + : m_field( field ), m_string(string), m_calculated( false ) {} @@ -57,6 +58,7 @@ { m_field = field; m_calculated = false; + m_data.clear(); // dirty } void setString( const std::string& string ) @@ -84,13 +86,13 @@ int getLength() const { calculate(); - return m_length; + return m_data.length(); } /// Get the total value the fields characters added together int getTotal() const { - calculate(); + sum(); return m_total; } @@ -103,33 +105,46 @@ { if( m_calculated ) return; - char buf[64]; + m_total = -1; // dirty - if( 13 + m_string.length() < sizeof(buf) ) + if( m_data.empty() ) { - int tagLength = STRING_SPRINTF( buf, "%d=", m_field ); - m_length = tagLength + m_string.length() + 1; - memcpy( buf + tagLength, m_string.data(), m_string.length() ); - buf[m_length - 1] = '\001'; - m_data.assign( buf, m_length ); + // buffer is big enough for significant digits and extra digit, + // minus and equals (but no null) + char buf[std::numeric_limits::digits10 + 3]; + char* p = integer_to_string( buf, sizeof (buf), m_field ); + buf[sizeof (buf) - 1] = '='; + + m_tagLength = buf + sizeof (buf) - p; + m_data.resize( m_tagLength + m_string.length() + 1 ); + std::copy( p, p + m_tagLength, m_data.begin() ); } else { - m_data = IntConvertor::convert(m_field) + "=" + m_string + "\001"; - m_length = m_data.length(); + m_data.resize( m_tagLength + m_string.length() + 1 ); } - const unsigned char* iter = - reinterpret_cast( m_data.c_str() ); - m_total = std::accumulate( iter, iter + m_length, 0 ); + std::copy( m_string.begin(), m_string.end(), m_data.begin() + m_tagLength ); + m_data[m_data.length() - 1] = '\001'; m_calculated = true; } + void sum() const + { + calculate(); + + if( m_total != -1 ) return; + + const unsigned char* iter = + reinterpret_cast( m_data.c_str() ); + m_total = std::accumulate( iter, iter + m_data.length(), 0 ); + } + int m_field; std::string m_string; mutable std::string m_data; - mutable int m_length; + mutable int m_tagLength; mutable int m_total; mutable bool m_calculated; };