pax_global_header00006660000000000000000000000064122447446560014530gustar00rootroot0000000000000052 comment=eb7aa1425f019b9699ba394ead5a2a107dd82814 libpqxx-4.0.1+dfsg/000077500000000000000000000000001224474465600141405ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/AUTHORS000066400000000000000000000002661224474465600152140ustar00rootroot00000000000000Jeroen T. Vermeulen . Wrote the code. Ray Dassen . Did most of the autoconf etc. stuff Lots of others helped with various other contributions. libpqxx-4.0.1+dfsg/COPYING000077500000000000000000000027451224474465600152060ustar00rootroot00000000000000Copyright (c) 2001-2011 Jeroen T. Vermeulen All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of the author, nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. libpqxx-4.0.1+dfsg/ChangeLog000066400000000000000000007352251224474465600157300ustar00rootroot000000000000002013-01-17 Jeroen T. Vermeulen tools/splitconfig: - Rewrote in python. - Much shorter: most of the code was detecting & handling grep flavours! - Should fix BSD build problem. Thanks Martin van den Nieuwelaar. 2013-01-17 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, src/binarystring.cxx: - C++11 fix: instantiate on non-const unsigned char. Thanks Linus Kallberg. 2013-01-12 Jeroen T. Vermeulen include/pqxx/isolation.hxx: - Updated documentation for isolation levels. 2013-01-12 Jeroen T. Vermeulen include/pqxx/isolation.hxx: - Support for REPEATABLE READ isolation level. Thanks pawsa. - Fixes #259. 2013-01-12 Jeroen T. Vermeulen win32/mingw.mak.template: - Build fix for MinGW: LIBPQPATH, not LIBPATH. Thanks Maxwell (?) - Fixes #261. 2013-01-12 Jeroen T. Vermeulen src/strconv.cxx, test/unit/test_string_conversion.cxx: - Backport fix for #263. 2013-01-10 Jeroen T. Vermeulen configure.ac.in: - Fix w clang++ 3.0: basic C-library test broke. 2012-08-03 Jeroen T. Vermeulen include/pqxx/largeobject.hxx: - Backported fix for #252: clang++ 3.2 compile error. Thanks Amy Troschinetz. src/strconv.cxx: - Backported fix for #253: clang++ 3.2 compile error. Thanks Amy Troschinetz. 2012-03-25 Jeroen T. Vermeulen test/test002.cxx, test/test007.cxx, test/test011.cxx, test/test012.cxx, test/test016.cxx, test/test030.cxx, test/test031.cxx, test/test049.cxx, test/test067.cxx, test/test082.cxx, test/test093.cxx: - C++11 fixes. 2012-03-10 Jeroen T. Vermeulen include/pqxx/result.hxx: - Compatibility typedefs: pqxx::result::tuple and pqxx::result::field. - Not going into trunk, only in the 4.0 series. - Thanks Maxime van Noppen. 2012-03-10 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx: - Updated docs for prepared-statement parameters: no longer need declarations. - Thanks Maxime van Noppen. 2012-03-10 Jeroen T. Vermeulen include/pqxx/util.hxx: - Fixed compile error and warnings in example code. - Thanks Martin van den Nieuwelaar and Chris Angelico. 2012-02-28 Jeroen T. Vermeulen tools/extract_version: - Compatibility fix for OS X. Thanks Torsten Hilgenberg. 2012-01-18 Jeroen T. Vermeulen test/unit/test_prepared_statement.cxx: - Test was brittle w.r.t. result ordering. Rewrote it. - Thanks Jean Marie de Montarby (did I spell that right?) for the report. 2012-01-18 Jeroen T. Vermeulen test/test004.cxx, test/test023.cxx, test/test078.cxx, test/test079.cxx, test/test087.cxx: - Stop using deprecated notify_listener. - Stop using deprecated connection-unaware escaping functions. 2011-12-03 Jeroen T. Vermeulen include/pqxx/tuple.hxx: - Forward-declare pqxx::range_error. - pqxx::range_error, not just range_error (problem with g++ -std=c++0x). src/Makefile.am: - Cosmetic. test/unit/test_result_slicing.cxx: - Disambiguate tuple as pqxx::tuple, not std::tuple, for C++0x. tools/Makefile.am: - Prevent include/pqxx from going into the include path. - Include path was breaking #include in C++0x standard headers! 2011-11-27 Jeroen T. Vermeulen tools/preprelease: - Removed. 2011-11-27 Jeroen T. Vermeulen tools/sign-tarball: - New tool. - Creates GPG signature & hash sums for tarball. 2011-11-27 Jeroen T. Vermeulen debian/changelog: - Real start of 4.0 series. 2011-11-27 Jeroen T. Vermeulen include/pqxx/subtransaction.hxx, src/subtransaction.cxx: - Explicit subtransaction(subtransaction &) constructor. - Makes it easier to nest subtransactions inside subtransactions. - Thanks Chris Angelico for reporting the problem. 2011-11-25 Jeroen T. Vermeulen configure.ac.in, doc/Makefile.am: - Fixed fail-if-no-doxygen logic. Really fails now. - Also fail if xmlto is missing (and documentation build not disabled). - Really fixes #245 (I hope). 2011-11-25 Jeroen T. Vermeulen doc/Makefile.am: - Fail if doxygen not available (and documentation build not disabled). - Fixes #245. Thanks Chris Angelico. 2011-11-25 Jeroen T. Vermeulen include/pqxx/performance.hxx: - Don't mention tablestreams any more. - Fixes #246. Thanks Chris Angelico. 2011-11-24 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/internal/gates/connection-pipeline.hxx, src/connection_base.cxx: - encoding_code() can't be "throw ()"; it calls activate(). - Crashed program when connection was lost before transaction started. - Thanks Vasya Pupkin for reporting this with a great little test program. 2011-11-24 Jeroen T. Vermeulen include/pqxx/subtransaction.hxx: - Fixed broken example. Thanks Chris Angelico. 2011-11-23 Jeroen T. Vermeulen win32/INSTALL.txt, win32/mingw.mak.template: - Remove quotes that confused MinGW make. - MinGW's make tool has a different name. - As per patch in #244, thanks Sam Kapilivksy. 2011-11-22 Jeroen T. Vermeulen debian/libpqxx.docs, debian/libpqxx-dev.docs: - Removed reference to old TODO file. 2011-11-22 Jeroen T. Vermeulen win32/INSTALL.txt: - Cosmetic. 2011-11-22 Jeroen T. Vermeulen win32/INSTALL.txt: - Documentation patch from #243. Thanks Sam Kapilivsky. 2011-11-20 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx, test/unit/test_errorhandler.cxx: - Provide access to a connection's errorhandlers list. - Fixes #242. Thanks Sam Kapilivsky for pointing out the need. 2011-11-18 Jeroen T. Vermeulen include/pqxx/errorhandler.hxx, src/notify-listen.cxx: - Added missing #include - Fixes #241. Thanks Sam Kapilivsky. 2011-11-16 Jeroen T. Vermeulen win32/vc-libpqxx.mak.template: - Use debug library where appropriate, as per #238 (thanks Sam Kapilivksy). win32/vc-test-unit.mak.template: - Build test/unit, not test, also as per #238 2011-11-16 Jeroen T. Vermeulen win32/INSTALL.txt: - Overhaul by Sam Kapilivsky. Thanks once again! 2011-11-14 Jeroen T. Vermeulen test/test_main.hxx: - Workaround in create_pqxxevents for older backends without multi-insert. 2011-11-13 Jeroen T. Vermeulen autogen.sh, win32/vc-test-unit.mak.template: - Support building of new-style unit tests on Visual C++. - As per patch in #238; thanks Sam Kapilivsky. win32/common-sample, win32/vc-libpqxx.mak.template, win32/vc-test.mak.template: - Easier Visual C++ setup. - As per patch in #238; thanks Sam Kapilivsky. 2011-11-13 Jeroen T. Vermeulen doc/libpqxx.xml: - Removed reference to tablestreams. 2011-11-13 Jeroen T. Vermeulen include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx: - Deprecated tablestream classes (tablereader, tablewriter). - Fixes #199, #223. - Thanks to cuboci and Andreas Freund for pointing out the problems. include/pqxx/transaction_base.hxx, include/pqxx/transactor.hxx, include/pqxx/util.hxx, test/test000.cxx, test/test007.cxx, test/test010.cxx, test/test013.cxx, test/test018.cxx, test/test020.cxx, test/test026.cxx, test/test029.cxx, test/test032.cxx, test/test037.cxx, test/test039.cxx, test/test066.cxx, test/test075.cxx, test/test082.cxx, test/test083.cxx, test/test088.cxx, test/test_helpers.hxx, test/test_main.hxx: - Create pqxxevents only on demand, locally per test (and as temporary). - Move test coverage from deleted tests to remaining ones. src/transaction_base.cxx: - Removed unneeded tablestream include. test/test005.cxx, test/test006.cxx, test/test008.cxx, test/test009.cxx, test/test024.cxx, test/test025.cxx, test/test027.cxx, test/test028.cxx, test/test068.cxx, test/test080.cxx, test/unit/test_tablestream.cxx: - Deleted tablestream tests. - No longer create permanent pqxxevents table. test/test083.cxx: - No longer create permanent pqxxnumbers table. 2011-11-05 Jeroen T. Vermeulen src/connection.cxx: - Fix #232: long-standing asyncconnection bug (especially with SSL). - Thanks again Sam Kapilivksy for tracking this down. 2011-11-05 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, include/pqxx/util.hxx, src/binarystring.cxx, src/util.cxx: - Always free binarystring buffer using std::free(). - Fixes #227: on Windoes, must free() from same library that malloc()ed. - Thanks Sam Kapilivsky for diagnosing the error and working out the fix. 2011-11-03 Jeroen T. Vermeulen src/connection.cxx: - Work around compiler warning for removed PGRES_POLLING_ACTIVE in switch. src/cursor.cxx: - Hopefully the right fix for that Visual Studio warning this time. - Fixes #239. Thanks Sam Kapilivsky. 2011-11-03 Jeroen T. Vermeulen config/sample-headers/compiler/VisualStudio2005/pqxx/config-public-compiler.h, config/sample-headers/compiler/VisualStudio2008/pqxx/config-public-compiler.h, config/sample-headers/compiler/VisualStudio2010/pqxx/config-public-compiler.h: - Removed PQXX_HAVE_STRERROR_R; Visual Studio has strerror_s. - Fixes #240. Thanks Sam Kapilivsky. 2011-11-03 Jeroen T. Vermeulen src/connection.cxx: - Removed support for obsolete PGRES_POLLING_ACTIVE. 2011-10-31 Jeroen T. Vermeulen config/sample-headers/compiler/VisualStudio2005, config/sample-headers/compiler/VisualStudio2008, config/sample-headers/compiler/VisualStudio2010: - New sample headers by Sam Kapilivksy. include/pqxx/util.hxx, test/unit/test_thread_safety_model.cxx: - Renamed have_strerror_r to have_safe_strerror; it's not just strerror_r. src/util.cxx: - Support Windows strerror_s as other safe alternative to strerror. - Fixes #235. 2011-10-31 Jeroen T. Vermeulen include/pqxx/util.hxx: - Made PQAlloc contain a std::shared_ptr, not derive from it. - As per patch in #236; fixes Visual Studio build problems. - Thanks Sam Kapilivsky. 2011-10-31 Jeroen T. Vermeulen test/test_helpers.hxx: - New trick for accepting (and requiring) semicolon after PQXX_CHECK_THROWS. - Less idiomatic, but avoids Visual Studio warning. - Completes the fix for #231. 2011-10-31 Jeroen T. Vermeulen include/pqxx/compiler-internal.hxx, test/test087.cxx: - Suppress pointless Visual Studio warnings. - Fixes most of #231; more discussion about test_helpers.hxx patch. - Thanks Sam Kapilivsky. 2011-10-31 Jeroen T. Vermeulen src/cursor.cxx: - Cast around std::streamsize/icursorstream::difference_type mismatch. - Fixes icursorstream::ignore, as per #230. - Thanks once more Sam Kapilivsky. 2011-10-31 Jeroen T. Vermeulen include/pqxx/compiler-internal.hxx, include/pqxx/cursor.hxx, include/pqxx/util.hxx, test/unit/test_prepared_statement.cxx: - Moved distance() wrapper from compiler-internal into util. - Added some missing PQXX_LIBEXPORT directives. - Fixes #237. - Thanks Sam Kapilivsky for knocking the Visual Studio build into shape. 2011-10-31 Jeroen T. Vermeulen include/pqxx/strconv.hxx: - Add redundant string_traits to keep Visual Studio happy. - Fixes #233; thanks Sam Kapilivsky. test/unit/test_string_conversion.cxx: - New. - Unit-tests string conversions (for now, only of various string types). 2011-10-31 Jeroen T. Vermeulen test/unit/test_prepared_statement.cxx: - Fixed two Visual Studio warnings. - Fixes #234. Thanks (you guessed it) Sam Kapilivsky. 2011-10-31 Jeroen T. Vermeulen win32/vc-libpqxx.mak.template: - Fixed typos introduced in my application of the patch in #228. - Should get Visual Studio build working again. - Fixes #229. Thanks Sam Kapilivsky. 2011-10-28 Jeroen T. Vermeulen include/pqxx/connection.hxx: - Very slight wording change; hope it's a bit clearer. - Thanks Sam Kapilivsky for pointing this out in #222. 2011-10-28 Jeroen T. Vermeulen win32/vc-libpqxx.mak.template, win32/vc-test.mak.template: - The rest of the patch in #228. Thanks Sam Kapilivsky. 2011-10-28 Jeroen T. Vermeulen test/test000.cxx, test/test002.cxx, test/test060.cxx, test/test061.cxx, test/test062.cxx, test/test064.cxx, test/test071.cxx, test/test075.cxx: - Removed unneeded headers as per #228 (though it has more changes). - Thanks Sam Kapilivsky for the patch. 2011-10-17 Jeroen T. Vermeulen test/test051.cxx: - Work around problem with Visual C++ 2010. Should fix #225. - Thanks Sam Kapilivsky. 2011-10-16 Jeroen T. Vermeulen src/connection_base.cxx: - Fix gcc warning. 2011-10-16 Jeroen T. Vermeulen win32/vc-test.mak.template: - Fix build on Visual C++ 2010. Fixes #226. Thanks Sam Kapilivsky. 2011-10-11 Jeroen T. Vermeulen src/connection_base.cxx: - Fixed compile errors on gcc 3.3. 2011-10-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/connection.hxx, src/connection_base.cxx, test/test013.cxx, test/test018.cxx, test/test032.cxx, test/test037.cxx, test/test056.cxx, test/test060.cxx, test/test061.cxx, test/test064.cxx, test/test070.cxx, test/test072.cxx, test/test073.cxx, test/test083.cxx, test/test086.cxx, test/unit/test_errorhandler.cxx: - Removed remaining references to noticer. - Made all remaining noticer support conditional on auto_ptr. 2011-10-07 Jeroen T. Vermeulen include/pqxx/errorhandler.hxx: - Forgot PQXX_LIBEXPORT. Thanks Kirit Saelensminde. 2011-10-06 Jeroen T. Vermeulen include/pqxx/basic_connection.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/transaction.hxx, src/connection_base.cxx, src/largeobject.cxx, src/notification.cxx, src/pipeline.cxx, src/tablereader.cxx, src/tablewriter.cxx, src/transaction_base.cxx: - Updated "quiet destructors" to use quiet_errorhandler. - Fixes #224. Thanks Kirit Saelensminde for testing this when asked. 2011-10-06 Jeroen T. Vermeulen src/connection_base.cxx: - Refuse to escape "tricky" identifier without PQescapeIdentifier. - Fixes remaining issue with #221. Thanks Andreas Freund. 2011-10-06 Jeroen T. Vermeulen include/Makefile.am, include/pqxx/binarystring.hxx, include/pqxx/internal/gates/connection-parameterized-invocation.hxx, include/pqxx/internal/gates/connection-prepare-declaration.hxx, include/pqxx/internal/gates/connection-prepare-invocation.hxx, include/pqxx/internal/gates/connection-transaction.hxx, include/pqxx/internal/statement_parameters.hxx, include/pqxx/prepared_statement.hxx, include/pqxx/transaction_base.hxx, src/binarystring.cxx, src/connection_base.cxx, src/prepared_statement.cxx, src/statement_parameters.cxx, src/transaction_base.cxx, test/test092.cxx, test/unit/test_prepared_statement.cxx: - Require server version 8.0 or better. - Require backend protocol 3 or better. - No longer need to declare parameter lists for prepared statements. - Same for parameterized statements. - binarystring can now also come from a std::string, or {void *, size_t}. - To produce a binary parameter, simply pass a binarystring. - No longer need connection-prepare-declaration call gate. 2011-10-05 Jeroen T. Vermeulen configure/sample-headers/libpq/7.3, configure/sample-headers/libpq/7.4: - Removed. configitems, configure.ac.in, include/pqxx/field.hxx, include/pqxx/result.hxx, include/pqxx/tuple.hxx, include/pqxx/util.hxx, src/binarystring.cxx, src/connection_base.cxx, src/result.cxx, src/subtransaction.cxx, src/transaction_base.cxx, src;util.cxx: - Require PQescapeStringConn, PQescapeByteaConn, PQunescapeBytea. - Require PQprotocolVersion and PQserverVersion. - Require PQftable and PQftablecol. - Require PQPutCopyData and friends. - Require PQprepare, PQexecPrepared, and PQexecParams. - Require PQresultErrorField and PQsetErrorVerbosity. - Forget about PQfreeNotify; require PQfreeMem. - Basically, require libpq 8.0 or better. 2011-10-05 Jeroen T. Vermeulen configure.ac.in, include/Makefile.am, include/pqxx/binarystring.hxx, include/pqxx/connectionpolicy.hxx, include/pqxx/cursor.hxx, include/pqxx/field, include/pqxx/field.hxx, include/pqxx/internal/gates/connection-largeobject.hxx, include/pqxx/internal/gates/connection-pipeline.hxx, include/pqxx/internal/libpq-forward.hxx, include/pqxx/internal/result_data.hxx, include/pqxx/libpq-forward.hxx, include/pqxx/pqxx, include/pqxx/result.hxx, include/pqxx/tuple, include/pqxx/tuple.hxx, include/pqxx/util.hxx, src/binarystring.cxx, src/cursor.cxx, src/field.cxx, src/Makefile.am, src/result.cxx, src/tuple.cxx, test/test002.cxx, test/test007.cxx, test/test011.cxx, test/test012.cxx, test/test016.cxx, test/test030.cxx, test/test031.cxx, test/test049.cxx, test/test067.cxx, test/test082.cxx, test/test093.cxx, test/test_helpers.hxx, test/test_main.hxx, test/unit/test_result_slicing.cxx: - const_fielditerator is now const_tuple_iterator (similar for reverse). - result::const_iterator is now const_result_iterator (similar for reverse). - field and tuple classes are no longer nested in result. - field has its own source file and headers. - tuple and iterators have their own source file and headers. - tuple and result iterator classes are no longer nested in result. - libpq-forward has moved into . - internal::result_data has moved into . - field no longer contains a tuple. - Iterator classes are no longer mentioned by independent name. 2011-10-02 Jeroen T. Vermeulen doc/html/Reference/.cvsignore: - Ignore JavaScript files now generated as part of documentation. include/pqxx/pqxx, include/pqxx/internal/gates/errorhandler-connection.hxx, include/pqxx/internal/gates/connection-errorhandler.hxx, include/pqxx/errorhandler, include/Makefile.am, src/errorhandler.cxx, src/connection_base.cxx, src/Makefile.am, test/test014.cxx, test/unit/test_errorhandler.cxx: - New class "errorhandler" to replace noticers. - No more auto_ptr or unique_ptr. - Test 014 no longer mixes purposes. - Thanks Kirit Saelensminde for help with design. 2011-09-27 Jeroen T. Vermeulen COPYING: - Included copyright notice; makes more sense now. - Thanks Arkadiusz at GoAhead Software for pointing this out. 2011-09-25 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx, test/unit/test_tablestream.cxx: - Fixed glaring templating error in null-escaping. Thanks sth.dev at tejp! - Fixes #200. 2011-09-24 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, test/unit/test_escape.cxx: - Support PQescapeIdentifier as quote_name. Thanks Andreas Freund. - Fixes #66. 2011-09-24 Jeroen T. Vermeulen configitems, configure.ac.in: - Test for PQescapeIdentifier. 2011-09-24 Jeroen T. Vermeulen src/connection_base.cxx: - Make timeval initializers compatible with more platforms. 2011-09-24 Jeroen T. Vermeulen test/unit/Makefile.am: - Renamed test_except.cxx to test_exceptions.cxx. test/unit/test_notification.cxx: - Clearer comment. 2011-08-17 Jeroen T. Vermeulen test/unit/test_exceptions.cxx: - New - Tests pqxx_exception downcast example given in except.hxx. 2011-07-25 Jeroen T. Vermeulen src/connection_base.cxx: - Use reinterpret_cast for void* downcast, thanks Kirit Saelensminde. 2011-07-24 Jeroen T. Vermeulen include/pqxx/strconv.hxx: - Removed string conversion template to char[]. Fixes #215. Thanks oobermick. src/utils.cxx: - Fixed #ifdefs around strerror_r workarounds, thanks Kirit Saelensminde. tools/Makefile.am: - Distribute tools/lint. 2011-07-23 Jeroen T. Vermeulen Makefile.am: - Refer to lint as tools/lint, not ./tools/lint. Server tests breaking. 2011-07-17 Jeroen T. Vermeulen tools/lint: - New. Routine sanity checks on the source tree. test/test_main.hxx: - Failure summary. tools/pre-release-check: - New. Part of release process re-tooling. 2011-07-15 Jeroen T. Vermeulen src/notification.cxx: - Fixed workaround for VC++, which can't handle console output in destructors. - Thanks Kirit Saelensminde. 2011-07-14 Jeroen T. Vermeulen src/strconv.cxx: - Support "inf" as representation of infinity (C++0x standard?). test/test000.cxx: - Broke because 0.0 isn't always represented as "0"; loosened test. test/test_helpers.cxx: - Added "less than" assertion. test/unit/test_float.cxx: - Don't ==-compare FP values; may elicit warnings even for infinity. 2011-07-14 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/compiler-public.hxx: - Check for std::auto_ptr. - Check for std::move(). - Check for std::unique_ptr. - Workaround for missing std::move(). include/pqxx/basic_connection.hxx, include/pqxx/connection_base.hxx, src/connection_base.cxx, test/test014.cxx: - Replace auto_ptr with unique_ptr for managing noticers, if available. - New typedef: noticer_ptr to hide the difference (a little). - Provide compatibility with auto_ptr on systems with both. - set_noticer now needs reference to smart pointer. - Fixes #214. 2011-05-16 Jeroen T. Vermeulen include/pqxx/compiler-internal.hxx: - Include ; may fix #213 on Fedora 15. Thanks zelda. 2011-05-10 Jeroen T. Vermeulen tools/pqxx-fulltest: - Always exit when "make check" fails. Missed a spot earlier. - Work harder to get a user name. 2011-04-24 Jeroen T. Vermeulen configure.ac.in: - Support --enable-documentation (defaults to yes). tools/pqxx-fulltest: - Use --disable-documentation for test runs. - Add sbin to path; that's where start-stop-daemon lives. 2011-04-23 Jeroen T. Vermeulen tools/pqxx-fulltest: - Quiesce for a bit after stopping backends. - Don't wait after create_database; latency covered by build. 2011-04-16 Jeroen T. Vermeulen tools/pqxx-fulltest: - Don't break if start-stop-daemon has no work to do. - Remove pidfile after stopping a backend. 2011-04-15 Jeroen T. Vermeulen tools/pqxx-fulltest: - Complete rewrite. Faster, cleaner. 2011-04-13 Jeroen T. Vermeulen src/binarystring.cxx: - Fixed some warnings in clang++ (fatal with -Werror). 2011-04-08 Jeroen T. Vermeulen configure.ac.in: - Workaround for "noreturn" attribute in clang++ 2.8. src/pipeline.cxx: - Cosmetic: std-qualify throw spec. 2011-03-29 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/binarystring.hxx, include/pqxx/compiler-public.hxx, include/pqxx/connection_base.hxx, include/pqxx/except.hxx, include/pqxx/largeobject.hxx, include/pqxx/pipeline.hxx, include/pqxx/result.hxx, include/pqxx/strconv.hxx, src/connection_base.cxx, src/except.cxx, test/test_main.hxx: - Support for gcc "pure" and "const" attributes. - Marked some functions with the "pure" and "const" attributes. - A bit more of the "noreturn" attribute. 2011-03-28 Jeroen T. Vermeulen configure.ac.in, include/pqxx/compiler-internal.hxx, test/unit/test_escape.cxx: - Minor changes for gcc 4.6.0. 2011-03-06 Jeroen T. Vermeulen include/pqxx/cursor.hxx, include/pqxx/largeobject.hxx, include/pqxx/result.hcxx, test/test000.cxx, test/test049.cxx, test/test050.cxx, test/test051.cxx, test/test053.cxx, test/test055.cxx, test/test061.cxx, test/test062.cxx, test/test082.cxx, test/test084.cxx, test/test093.cxx, test/unit/test_prepared_statement.cxx: - More clang fixes. 2011-03-05 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for GNU-style strerror_r. src/util.cxx: - Dump Bart's wonderful strerror_r trick; clang didn't like it. 2011-03-05 Jeroen T. Vermeulen configure.ac.in, include/pqxx/result.hxx, src/binarystring.cxx, src/connection_base.cxx, src/cursor.cxx, src/largeobject.cxx, src/pipeline.cxx, src/result.cxx, src/statement_parameters.cxx, src/tablewriter.cxx, src/util.cxx: - Fixed clang errors; mostly signedness issues. 2011-02-13 Jeroen T. Vermeulen test/unit/test_notification.cxx: - Eliminated some more use of already-committed nontransaction. - Payload should be single-quoted, not double-quoted. test/test_helpers.hxx, test/test_main.hxx, test/test025.cxx: - New helper drop_table. - Fixed test for older backends, which don't have "DROP TABLE IF EXISTS." 2011-02-09 Jeroen T. Vermeulen include/pqxx/largeobject.hxx, include/pqxx/result.hxx, include/pqxx/util.hxx: - Fixes for problems spotted by clang++. tools/preprelease - Test against clang as well as gcc. 2011-02-07 Jeroen T. Vermeulen include/pqxx/basic_connection.hxx, include/pqxx/cursor.hxx: - Fixed "don't include this" directions; fixes #211. Thanks ehoeks. include/pqxx/basic_connection: - Cosmetic. 2011-02-07 Jeroen T. Vermeulen doc/libpqxx.xml, include/Makefile.am, include/pqxx/connection_base.hxx, include/pqxx/internal/gates/connection-notify-listener.hxx, include/pqxx/notification, include/pqxx/notification.hxx, include/pqxx/notify-listen, include/pqxx/notify-listen.hxx, include/pqxx/pqxx, include/pqxx/trigger.hxx, src/connection_base.cxx, src/Makefile.am, src/notification.cxx, src/notify-listen.cxx, test/unit/test_notification.cxx: - Deprecated in favour of new notification_receiver. - Takes payload argument (in addition to existing backend_pid). include/pqxx/internal/gates/connection-notify-listener.hxx: - Renamed to connection-notification_receiver.hxx. 2011-02-07 Jeroen T. Vermeulen test/test025.cxx: - Use DROP TABLE IF EXISTS, not transactor, to drop/create test table. 2011-01-25 Jeroen T. Vermeulen include/pqxx/subtransaction.hxx: - Corrected documentation. Thanks Maxime van Noppen. 2010-10-30 Jeroen T. Vermeulen src/connection_base.cxx: - Quote bytea as '', not E''. Thanks RhodiumToad. 2010-10-26 Jeroen T. Vermeulen win32/INSTALL.txt, win32/mingw.mak.template, win32/vc-libpqxx.mak.template, win32/vc-test.mak.template: - Use ws2_32, not wsock32. Thanks Christian Freund. - Don't use /GX and /YX for test build, thanks Christian Freund. - Link in shell32.lib, secur32.lib, wldap32.lib, thanks Christian Freund. 2010-10-19 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for PQescapeLiteral (not used yet). 2010-10-18 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - std-qualified use of FILE; fixes #208. include/pqxx/transaction_base.hxx, test/test090.cxx, test/unit/test_escape.cxx: - Removed duplicate test coverage from test090. - Don't test exactly what esc() does; meant for use with quote(). - Full roundtrip tests for quote(): less brittle for quoting changes. 2010-09-09 Jeroen T. Vermeulen include/pqxx/notify-listen.hxx: - Fixed mistaken implication in documentation, thanks Michael Krelin. src/connection_base.cxx: - Cosmetic. 2010-08-17 Jeroen T. Vermeulen include/pqxx/except.hxx, src/result.cxx: - Include approximate location of error in syntax_error. 2010-08-13 Jeroen T. Vermeulen configure.ac.in: - Fixed some breakage with 9.0 hex-escaping support detection. test/test007.cxx: - "Affected rows" also works for SELECT in 9.0. test/test090.cxx: - Retired binary-escaping tests that don't apply to the hex format. test/unit/test_binarystring.cxx: - Check that binary-escaped string contains no "high bytes." 2010-08-12 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for PostgreSQL 9.0 hex binary-escaping format. src/binarystring.cxx: - Refactor unescaping. - Work around hex-format support in PQunescapeBytea. 2010-06-29 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/transaction_base.cxx, test/unit/test_binarystring.cxx: - Added quote() for binarystring. - More testing of escaping/unescaping. 2010-06-26 Jeroen T. Vermeulen src/binarystring.cxx: - Added missing 10 to hex digits. 2010-06-24 Jeroen T. Vermeulen src/binarystring.cxx: - Support 9.0-style hex-escaping on ancient libpq. test/unit/test_binarystring.cxx: - New 2010-06-21 Jeroen T. Vermeulen config/sample-headers/libpq/*: - Lots more automatically-stored libpq config headers. 2010-06-20 Jeroen T. Vermeulen config/sample-headers/libpq/7.3/config-internal-libpq.h: - Sample header for libpq 7.3. test/unit/test_error_verbosity.cxx: - Skip test of enum correspondence if libpq doesn't define the enum. 2010-06-18 Jeroen T. Vermeulen tools/pqxx-fulltest, tools/preprelease: - Save copies of generated config headers. 2010-02-15 Jeroen T. Vermeulen configure, configure.ac, configure.ac.in: - Fixed #104: -Werror option always used. Thanks Ray Dassen. - Works around RedHat gcc 4.1 problem. include/pqxx/util.hxx: - Removed failed attempt at working around RedHat gcc 4.1 problem. 2010-02-06 Jeroen T. Vermeulen include/pqxx/util.hxx: - Hopefully fix problem with CentOS gcc 4.1, thanks Devrim Gunduz. 2010-01-31 Jeroen T. Vermeulen include/pqxx/result.hxx, src/result.cxx: - Added empty() - Documented risk of empty slices triggering bugs. - Deprecation warning for tuple constructor; it's to become private. 2010-01-24 Jeroen T. Vermeulen aclocal.m4: - Still struggling to get everything needed for ./configure into the repo. autogen.sh: - Try automake-1.11. include/Makefile.am: - Do need to distribute performance.hxx. tools/preprelease: - Don't run autogen.sh; just take the setup that comes out of svn. 2010-01-23 Jeroen T. Vermeulen include/pqxx/result.hxx, src/result.cxx, test/unit/test_result_slicing.cxx: - Applied Daniel Frey's slicing implementation for result tuples. 2009-12-08 Jeroen T. Vermeulen include/Makefile.am, include/pqxx/performance.hxx: - Added documentation-only header for performance features. include/pqxx/connection_base.hxx, include/pqxx/prepared_statement.hxx, include/pqxx/util.hxx: - Improvements to reference documentation. 2009-12-08 Jeroen T. Vermeulen include/pqxx/util.hxx: - Docs wording. 2009-11-19 Jeroen T. Vermeulen configure: - Put configure script under revision control. include/pqxx/util.hxx: - Bit of documentation work. 2009-10-26 Jeroen T. Vermeulen include/pqxx/internal/statement_parameters.hxx: - Qualified some function calls, thanks Daniel Frey. 2009-10-15 Jeroen T. Vermeulen test/test_helpers.hxx, test/test0*.cxx, test/unit/test_*.cxx: - Don't pass connection to test functions. Closes #198. 2009-10-15 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for PQexecParams. include/Makefile.am, include/pqxx/connection_base.hxx, include/pqxx/internal/gates/connection-parameterized_invocation.hxx, include/pqxx/internal/statement_parameters.hxx, include/pqxx/prepared_statement.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/Makefile.am, src/prepared_statement.cxx, src/transaction_base.cxx, test/unit/test_parameterized.cxx: - Support parameterized statements. Thanks Trigve Siver. - Splice parameter marshalling out of prepared::invocation. 2009-10-13 Jeroen T. Vermeulen TODO: - Finally replaced with bug tickets. Closes #29. 2009-09-13 Jeroen T. Vermeulen src/notify-listen.cxx: - Added missing include: compiler-internal.hxx - Should fix link errors on Visual C++ from when callgates were introduced. 2009-08-29 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Use bitset for capabilities array, thanks Kirit Saelensminde. - Rearranged member variables by size. 2009-08-26 Jeroen T. Vermeulen src/connection_base.cxx: - Unnamed statements don't work with libpq 8 on 7.3 backend. - Guessing they require protocol 3. 2009-08-24 Jeroen T. Vermeulen test/test_helpers.hxx: - Create connection/transaction in run(), so only when needed. - Should fix test bailouts with 7.3 backends. - Makes it easier to catch & report connection failures better in the future. test/unit/test_cancel_query.cxx: - Pretty much nothing we can test about cancel_query, apart from no segfault. 2009-08-23 Jeroen T. Vermeulen src/connection_base.cxx: - libpq versions without PQcancel don't have PGcancel either. - Never consider unnamed statement prepared, thanks Trigve Siver. test/unit/test_cancel_query.cxx: - Added test for cancel_query, thanks Don Madden. test/unit/test_prepared_statement.cxx: - Test less volatile unnamed prepared statement, thanks RhodiumToad. 2009-08-20 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Made cancel_query public, thanks Don Madden. - Hid support for pre-PQcancel libpq versions a bit deeper. - Try harder to be graceful about canceling deactivated connections. 2009-08-16 Jeroen T. Vermeulen src/connection_base.cxx: - Mark statement definition as complete when varargs are added. 2009-08-15 Jeroen T. Vermeulen src/connection_base.cxx: - Tiny warning fix for 7.3 libpq versions. 2009-08-14 Jeroen T. Vermeulen include/pqxx/robusttransaction.hxx, src/robusttransaction.cxx: - Redid robusttransaction logic; may actually work now. src/connection_base.cxx: - Use string::empty. test/test018.cxx, test/test037.cxx: - Better transactor names. tools/preprelease: - Keep absolute tarball path out of md5sum file. 2009-08-13 Jeroen T. Vermeulen include/pqxx/internal/callgate.hxx: - Cleaned up constness, thanks Kirit Saelensminde. 2009-07-19 Jeroen T. Vermeulen include/pqxx/robusttransaction.hxx, src/connection_base.cxx, src/robusttransaction.cxx: - Redid robusttransaction. Was completely broken. 2009-07-12 Jeroen T. Vermeulen src/transaction_base.cxx: - Throw in_doubt again when trying to commit again while doubt. 2009-07-07 Jeroen T. Vermeulen include/pqxx/cursor.hxx, include/pqxx/internal/gates/icursorstream_icursor_iterator.hxx, include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx, src/cursor.cxx: - More call gates. 2009-07-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx, src/connection_base.cxx: - Set up another call gate. 2009-07-07 Jeroen T. Vermeulen include/Makefile.am, include/pqxx/internal/callgate.hxx, include/pqxx/internal/*, src/*.cxx: - Moved "gate" headers into include/pqxx/internal/gates. - Replaced gate-class name suffix with namespace. - Extracted common base class for call gates. 2009-07-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx, test/unit/test_prepared_statement: - Unnamed prepared statements require PQprepare(). - Bugfix: unnamed prepared statement kept using its first definition. include/pqxx/result.hxx: - Fix up PQAlloc deletion handling if shared_ptr not available. src/connection_base.cxx: - Conditionally-compiled code wasn't using the proper gate. 2009-07-07 Jeroen T. Vermeulen configure.ac.in: - Substitute full version information. doc/Doxyfile.in, src/util.cxx: - Make Doxygen see through some cpp macros and such that get in the way. - Removed obsolete Doxygen directive DETAILS_AT_TOP. src/transaction_base.cxx: - gcc 3.3 stumbles over foo_gate(bar).splat() 2009-07-07 Jeroen T. Vermeulen autogen.sh: - Get ABI version as well as library version. - Single "substitute" function for configure.ac and version header. doc/Doxyfile.in: - Don't generate huge HTML versions of source, thanks Eugene V. Lyubimkin. include/pqxx/result.hxx, include/pqxx/util.hxx src/connection_base.cxx, src/util.cxx: - Clean up deleter handling in PQAlloc, thanks Kirit Saelensminde. - Should fix a case of mismatched allocation/deallocation. include/pqxx/version.hxx.template: - Include ABI version. src/Makefile.am: - Version according to ABI version, not full library version. tools/extract_version: - New --abi option to extract library ABI version. - New --help option. 2009-07-04 Jeroen T. Vermeulen include/pqxx/largeobject.hxx: - Fixed compile warnings on some 32-bit configurations. 2009-06-23 Jeroen T. Vermeulen doc/libpqxx.xml: - Fixed mistake in tutorial example. Thanks Patrick Daryll Glandien. - Closes #187. 2009-06-22 Jeroen T. Vermeulen tools/preprelease: - Don't build tarball again. - Deal with changed "make check" output. - Clean up and rebuild reference documentation. 2009-06-22 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/internal/connection-dbtransaction-gate.hxx, include/pqxx/internal/connection-largeobject-gate.hxx, include/pqxx/internal/connection-notify-listener-gate.hxx, include/pqxx/internal/connection-pipeline-gate.hxx, include/pqxx/internal/connection-prepare-declaration-gate.hxx, include/pqxx/internal/connection-prepare-invocation-gate.hxx, include/pqxx/internal/connection-sql_cursor-gate.hxx, include/pqxx/internal/connection-transaction-gate.hxx, include/pqxx/internal/result-connection-gate.hxx, include/pqxx/internal/result-creation-gate.hxx, include/pqxx/internal/result-sql_cursor-gate.hxx, include/pqxx/internal/transaction-subtransaction-gate.hxx, include/pqxx/internal/transaction-tablereader-gate.hxx, include/pqxx/internal/transaction-tablewriter-gate.hxx, include/pqxx/internal/transaction-transactionfocus-gate.hxx, include/pqxx/largeobject.hxx, include/Makefile.am, include/pqxx/notify-listen.hxx, include/pqxx/result.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/cursor.cxx, src/dbtransaction.cxx, src/Makefile.am, src/notify-listen.cxx, src/pipeline.cxx, src/prepared_statement.cxx, src/subtransaction.cxx, src/tablereader.cxx, src/tablewriter.cxx, src/transaction_base.cxx: - New "gates" system to control friendships between library classes. - New header directory. - Moved tiny bit of notify-listener code into new source file. test/test023.cxx: - Deprecated Conn() in favour of conn(). 2009-06-21 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - New capability for prepared-statement varargs. test/unit/test_prepared_statement.cxx: - Skip varargs test in environments that don't support the feature. 2009-06-19 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/compiler-public.hxx: - Check for BOOST smart_ptr header, include it if available. - Fixed configuration of TR1 namespace choice. - Build with BOOST shared_ptr by configuring --with-tr1=boost - Thanks Kirit Saelensminde. 2009-06-17 Jeroen T. Vermeulen include/pqxx/result.hxx, src/result.cxx: - result used wrong deallocation function after result_data became const. - Thanks Kirit Saelensminde for figuring this out and fixing it! 2009-05-30 Jeroen T. Vermeulen test/unit/test_tablestream.cxx: - Also demonstrate column lists. Thanks Robert Backhaus. 2009-05-23 Jeroen T. Vermeulen include/pqxx/result.hxx: - Provide iterator as well as const_iterator - Fixes bug #184 2009-05-06 Jeroen T. Vermeulen autogen.sh, include/Makefile.am, include/pqxx/Makefile.am, include/pqxx/pqxx, include/pqxx/version, include/pqxx/version.hxx.template: - Provide version info preprocessor macros, thanks jdennis at redhat. 2009-04-28 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, test/unit/test_prepared_statement.cxx: - Support unnamed prepared statement. include/pqxx/strconv.hxx: - Specialized string_traits for const string. - Made from_string on const break at compile time, thanks Robert Barnett. - Empty definition for default string_traits, thanks Daniel Frey. 2009-04-26 Jeroen T. Vermeulen include/pqxx/dbtransaction.hxx: - Made constructor public again, thanks Maurice Gittens. 2009-04-25 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx, test/unit/test_prepared_statement.cxx: - Documented & tested binary parameters, thanks Michael Akinde. 2009-04-21 Jeroen T. Vermeulen src/connection_base.cxx: - When preparing varargs statement in SQL, don't skip parameter list. 2009-04-15 Eugene V. Lyubimkin NEWS: - Typo fix. 2009-04-14 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/prepared_statement.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/prepared_statement.cxx, src/transasction_base.cxx, test/unit/test_prepared_statement.cxx: - Got varargs for prepared statements working. - Let you do conn.prepared("foo").exists(), thanks Maurice Gittens. 2009-01-31 Jeroen T. Vermeulen include/pqxx/util.hxx: - Use PQXXTR1, not PGSTD::tr1, thanks Eugene V. Lyubimkin 2009-01-21 Jeroen T. Vermeulen libpqxx.spec.in: - Depend on postgresql-libs and postgresql-devel, thanks Bob Knock - Install x86_64 libs in /usr/lib64, thanks Bob Knock - Use %configure, not ./configure, thanks Bob Knock - Removed some hard-coding of directories, thanks Bob Knock win32/vc-test.mak.template: - Removed superfluous dot in library name. - Got rid of unnecessary quotes, thanks Andrew Maclean. 2009-01-17 Jeroen T. Vermeulen win32/vc-test.mak.template: - Found better place to have $(INTDIR) created, thanks Andrew Maclean. - Factored 4-way "if" structure out into two 2-way ones. 2009-01-06 Jeroen T. Vermeulen include/pqxx/strconv.hxx: - Export throw_null_conversion, thanks Andrew Maclean win32/INSTALL.txt: - Tiny wording fix 2009-01-05 Jeroen T. Vermeulen win32/vc-test.mak.template: - Link individual tests' object files into test runner - Consistently place all object files and executables in $(INTDIR) - Fixed typo in filename "runner.success" 2009-01-03 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/util.hxx, src/util.cxx, test/unit/test_thread_safety_model.cxx: - Provide thread-safety information to the program tools/Makefile.am, tools/pqxxthreadsafety.cxx: - New tool to print thread-safety information tools/rmlo.cxx: - Use PGSTD, not std 2009-01-03 Jeroen T. Vermeulen include/pqxx/util.hxx: - Separate doc page about accessing results 2009-01-03 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, include/pqxx/result.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/binarystring.cxx, src/result.cxx: - Made PQAlloc API conform more (almost entirely) to shared_ptr - Renamed scoped_array::clear() to reset() to match shared_ptr - Hid PQAlloc's derivation from shared_ptr a bit more to narrow interface 2009-01-03 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/util.hxx: - Check for separate TR1 header directory - Configure check & option for TR1 namespace - Include if available, or otherwise 2009-01-03 Jeroen T. Vermeulen include/pqxx/util.hxx: - Yet more introductory documentation README-UPGRADE: - Added 3.1 section 2009-01-02 Jeroen T. Vermeulen include/pqxx/basic_connection.hxx, src/binarystring.cxx, src/util.cxx: - Added includes that may be needed in some situations test/test000.cxx: - More consistent spacing 2009-01-02 Jeroen T. Vermeulen include/Makefile.am: - Forgot to add new strconv headers include/pqxx/pqxx: - Ordered alphabetically - Updated for completeness (probably no practical difference) include/pqxx/strconv.hxx: - Provide string_traits<> for non-const "char *" include/pqxx/util.hxx: - Added extra example to "getting started" page - Compile fixes for examples src/connection_base.cxx, src/cursor.cxx: - Include strconv where (sometimes) needed 2008-12-31 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/prepared_statement.hxx, include/pqxx/result.hxx, include/pqxx/strconv, include/pqxx/strconv.hxx, include/pqxx/util.hxx, src/Makefile.am, src/strconv.cxx, src/util.cxx: - Broke string conversion out into its own module 2008-12-31 Jeroen T. Vermeulen doc/libpqxx.xml: - Restructured chapters for more balance - Made text less tedious in places include/pqxx/connection_base.hxx, src/connection_base.cxx, src/cursor.cxx, src/dbtransaction.cxx: - Added capability for read-only transactions - Added capability for cursor "fetch 0" include/pqxx/cursor.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx: - Documented some more parameters to keep doxygen happy. include/pqxx/util.hxx: - Updated threading documentation - Created "getting started" page - Linked to threading & getting-started pages from front page 2008-12-27 Eugene V. Lyubimkin debian/rules, debian/control: - Deal better with config.{sub,guess} files, thanks Roger Leigh. - Prepare for future 3.1 release, now Debian package builds correctly. 2008-12-27 Jeroen T. Vermeulen include/pqxx/dbstransaction.hxx, src/dbtransaction.cxx: - Use regular transaction if backend doesn't support read transactions src/binarystring.cxx: - Workaround for 7.3 libpq without PQunescape() still used m_str - Missing include for workaround - Use memcpy(), not strcpy() in workaround; there may be nul bytes - Fixed int-to-unsigned-char warnings in workaround src/util.cxx: - Missing include for workaround to missing PQfreemem() - Fixed const error in workaround tools/pqxx-fulltest: - Rearranged "find" options to silence warning. 2008-12-26 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, include/pqxx/util.hxx, src/binarystring.cxx, src/connection_base.cxx: - Disallow pointer-to-smart-pointer assignment, thanks Kirit Saelensminde - Removed caching of str(); binarystring is now immutable 2008-12-25 Jeroen T. Vermeulen include/pqxx/binarystring.hxx: - Made binarystring contents const 2008-12-20 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/result.hxx, include/pqxx/util.hxx, src/util.cxx: - Check for shared_ptr (still needs work; won't always be in std::tr1) - Implement PQAlloc as a shared_ptr if available - Turn PQ memory freeing functions into shared_ptr-style deleters - Make result's result_data const. 2008-12-14 Jeroen T. Vermeulen include/pqxx/dbtransaction.hxx, include/pqxx/transaction.hxx, src/dbtransaction.cxx, src/transaction.cxx, test/unit/test_read_transaction.cxx: - Added support for read-only transactions. tools/pqxx-fulltest: - Tried to augment postgresql.conf in wrong place - Build postgres without readline 2008-12-08 Jeroen T. Vermeulen include/pqxx/Makefile.am: - Fixed glitch that broke with Solaris "make," thanks Doug. test/test_helpers.hxx: - Bounds check failure message now includes value of violated boundary 2008-11-04 Jeroen T. Vermeulen tools/pqxx-fulltest: - Write postgres config data after initdb, not after building. 2008-11-02 Jeroen T. Vermeulen tools/extract_version, tools/preprelease, tools/release: - Automating part of release process VERSION - Use 2-level versions for x.0; more stability among 3-level versions 2008-10-31 Eugene V. Lyubimkin test/unit/Makefile.am.template: - Added includes to fill 'make check' missing includes when building in non-stardard build directory. debian/rules: - Updated, deleted some cruft. - Corrected to pass '--enable-maintainer-mode' to configure. Now 'make check' in 'debian/build' directory creats properly linked 'runner'. 2008-10-31 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx, src/tablewriter.cxx, test/unit/test_tablestream.cxx: - Turned private WriteRawLine() into public write_raw_line() - Now supports tablereader-to-tablewriter copying tools/pqxx-fulltest: - Starting postmaster again, but was still killing postgres 2008-10-29 Jeroen T. Vermeulen tools/pqxx-fulltest: - Went back to invoking postmaster for compatibility with older versions 2008-10-27 Jeroen T. Vermeulen include/pqxx/pipeline.hxx: - Removed warning; pipeline is stable now tools/pqxx-fulltest: - Sod testing against the 7.3 backend; too complicated for now 2008-10-22 Jeroen T. Vermeulen tools/pqxx-fulltest: - More tweaks to backend startup 2008-10-21 Jeroen T. Vermeulen tools/pqxx-fulltest: - Allow some time for database to be created - Run postgres instead of postmaster 2008-10-16 Eugene V. Lyubimkin include/pqxx/largeobject.hxx, test/unit/test_prepared_statement.cxx: - Fixed last g++ 4.3 warnings on 64-bit platforms. 2008-10-16 Jeroen T. Vermeulen include/pqxx/largeobject.hxx: - Fixed more g++ 4.3 warnings, thanks Eugene V. Lyubimkin 2008-10-15 Jeroen T. Vermeulen include/pqxx/largeobject.hxx, include/pqxx/result.hxx, test/test009.cxx, test/test028.cxx: - Fixed g++ 4.3 warnings, thanks Eugene V. Lyubimkin 2008-10-12 Jeroen T. Vermeulen README-UPGRADE: - Updated for 3.0. src/util.cxx: - Preserve slightly more precision in floats, thanks Kirit Saelensminde test/test005.cxx: - Removed use of "IF EXISTS" in DROP TABLE (older backends don't have it) test/test_main.hxx: - Test runner no longer considers "unsupported feature" a test failure test/unit/test_sql_cursor.cxx: - Fixed test failure on old backends that need test workaround 2008-10-11 Eugene V. Lyubimkin debian/libpqxx*, debian/rules, debian/compat, debian/control, debian/watch: - Significantly reworked to make ready for upcoming 3.0.0 release. debian/Makefile.am: - Corrected to let 'make deb' working. 2008-10-11 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx: - Made treat_direct the default, thanks maho at pagema net test/test062.cxx: - Made it easier to diagnose a test failure, maybe even solved it 2008-10-09 Jeroen T. Vermeulen configitems, config/sample-headers/libpq/8.*/pqxx/config-internal-libpq.h, configure.ac.in: - Check for PQcancel() (and friends, PQgetCancel() and PQfreeCancel()) include/pqxx/connection_base.hxx, include/pqxx/pipeline.hxx, src/connection_base.cxx, src/pipeline.cxx, test/unit/test_pipeline.cxx: - Implemented pipeline::cancel_query() 2008-10-02 Jeroen T. Vermeulen src/largeobject.cxx, src/pipeline.cxx, src/prepared_statement.cxx, src/result.cxx, src/util.cxx: - Fixed gcc 4.3 warnings (I hope), thanks Eugene V. Lyubimkin 2008-09-27 Jeroen T. Vermeulen test/Makefile.am.template, test/runner.cxx, test/test/helpers.hxx, test/test_main.hxx, test/unit/runner.cxx: - Moved test runners' main() into a header of its own; not a macro anymore - Test runners check for failure 2008-09-09 Jeroen T. Vermeulen src/connection_base.cxx: - Fixed compile warning on poll(), thanks Eugene V. Lyubimkin 2008-09-08 Jeroen T. Vermeulen config/sampledata/*: - Moved all sample headers into "pqxx" subdirectories - No longer need to copy headers, thanks Kirit Saelensminde include/pqxx/util.hxx: - Simplified default_null, eliminated warning; thanks Kirit Saelensminde src/connection_base.cxx: - Suppressed stupid Visual C++ warnings, thanks Kirit Saelensminde 2008-09-07 Jeroen T. Vermeulen include/pqxx/except.hxx, src/result.cxx: - PL/pgSQL exceptions, thanks Michal Jankowsk 2008-08-28 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, test/test085.cxx, test/unit/test_prepared_statement.cxx: - Re-branded test085 as a unit test include/pqxx/transaction_base.hxx, sr/transaction_base.cxx: - New function activate() for explicit bracketing - Activate before executing prepared statement, thanks qelo 2008-08-27 Jeroen T. Vermeulen include/pqxx/compiler-public.hxx: - Apply PQXX_AUTOLINK to static link as well, thanks Kirit 2008-08-25 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Export encrypt_password, thanks boto 2008-08-23 Jeroen T. Vermeulen test/test_helpers.hxx: - Fixed nested template syntax, thanks Bjorn Munch 2008-08-19 Jeroen T. Vermeulen test/test000.cxx, test/test001.cxx, test/test002.cxx, test/test004.cxx, test/test006.cxx, test/test007.cxx, test/test020.cxx, test/test023.cxx, test/test075.cxx, test/test079.cxx, test/test084.cxx, test/test087.cxx, test/test089.cxx, test/test092.cxx, test/test094.cxx: - Replaced throws with test helpers. test/unit/test_sql_cursor.cxx: - Fixed test failure that only showed up on older gcc versions win32/vc-test.mak.template: - First stab at adjusting to new test configuration 2008-08-15 Jeroen T. Vermeulen test/Makefile.am.template, test/runner.cxx, test/test027.cxx, test/test028.cxx, test/test029.cxx, test/test039.cxx, test/test_helpers.hxx, test/unit/Makefile.am.template, test/unit/runner.cxx: - Missed some spots in converting to test framework - Run all tests in directory as single program! - Test build & run now 20% faster on my laptop - Should be easier to build tests with Visual C++'s stupid project files 2008-08-14 Jeroen T. Vermeulen test/test072.cxx, test/test073.cxx, test/test074.cxx, test/test075.cxx, test/test076.cxx, test/test077.cxx, test/test078.cxx, test/test079.cxx, test/test080.cxx, test/test082.cxx, test/test083.cxx, test/test084.cxx, test/test085.cxx, test/test086.cxx, test/test087.cxx, test/test088.cxx, test/test090.cxx, test/test092.cxx, test/test093.cxx, test/test094.cxx: - Converted to test framework - All tests done now! 2008-08-13 Jeroen T. Vermeulen test/test001.cxx, test/test013.cxx, test/test016.cxx, test/test017.cxx, test/test018.cxx, test/test020.cxx, test/test021.cxx, test/test023.cxx, test/test024.cxx, test/test025.cxx, test/test026.cxx, test/test030.cxx, test/test031.cxx, test/test032.cxx, test/test033.cxx, test/test034.cxx, test/test035.cxx, test/test036.cxx, test/test037.cxx, test/test038.cxx, test/test035.cxx, test/test046.cxx, test/test048.cxx, test/test049.cxx, test/test050.cxx, test/test051.cxx, test/test052.cxx, test/test053.cxx, test/test054.cxx, test/test055.cxx, test/test056.cxx, test/test057.cxx, test/test058.cxx, test/test059.cxx, test/test060.cxx, test/test061.cxx, test/test062.cxx, test/test063.cxx, test/test064.cxx, test/test065.cxx, test/test066.cxx, test/test067.cxx, test/test068.cxx, test/test069.cxx, test/test070.cxx, test/test071.cxx, test/test085.cxx, test/test088.cxx, test/test089.cxx, test/test090.cxx, test/test092.cxx, test/test_helpers.hxx, test/unit/test_test_helpers.cxx: - Converted lots more tests to test framework - Removed all asserts from tests - New test helper: boundary check - Removed non-encoded "text" output from test062. 2008-08-12 Jeroen T. Vermeulen test/test011.cxx, test/test012.cxx, test/test013.cxx, test/test014.cxx, test/test015.cxx, test/test016.cxx, test/test_helpers.hxx: - Converted to test framework - Replaced assertions with test helpers - Testing string conversions for result tuples & iterators - Simplified testing string conversion for result 2008-08-10 Jeroen T. Vermeulen include/pqxx/connection.hxx, src/connection.cxx: - Doc/comment update include/pqxx/util.hxx: - Fixed broken is_null for C-style strings test/test000.cxx, test/test001.cxx, test/test002.cxx, test/test004.cxx, test/test005.cxx, test/test006.cxx, test/test007.cxx, test/test008.cxx, test/test009.cxx, test/test010.cxx, test/test085.cxx, test/test090.cxx, test/test092.cxx, test/test_helpers.hxx, test/unit/test_escape.cxx, test/unit/test_pipeline.cxx, test/unit/test_simultaneous_transactions.cxx, test/unit/test_sql_cursor.cxx, test/unit/test_test_helpers.cxx: - New TestCase::run() so normal tests don't need pqxx::test::pqxxtest() - Rigged up test setup so it runs with nullconnection - Standard main() macro for tests, so later we can do all tests in 1 program - Improved PQXX_CHECK_THROWS - More thorough testing of test helpers 2008-08-09 Jeroen T. Vermeulen test/test000.cxx, test/test002.cxx, test/test004.cxx, test/test007.cxx, test/test085.cxx, test/test090.cxx, test/test092.cxx, test/test_helpers.hxx, test/unit/test_float.cxx, test/unit/test_pipeline.cxx, test/unit/test_sql_cursor.cxx, test/unit/test_stateless_cursor.cxx, test/unit/test_test_helpers.cxx: - Fixed PQXX_CHECK_THROWS ignoring std::exception-derived exceptions - Made PQXX_CHECK_* macros rely more on functions--less preprocessor magic - PQXX_CHECK_* macros consistently require semicolon at end of invocation - Fixed some signedness warnings in PQXX_CHECK_[NOT_]EQUAL invocations - Reused PQXX_CHECK_NOTREACHED to simplify PQXX_CHECK_THROWS 2008-08-09 Jeroen T. Vermeulen configure.ac.in: - Fixed ordering of library search, thanks Jorgen Austvik src/connection.cxx: - Fixed memory leak when connection fails, thanks Matthew Fanto test/test_helpers.hxx, test085.cxx: - Moved string_traits into test helpers for reuse. test/test008.cxx, test/test009.cxx: - Converted to test framework. 2008-08-04 Jeroen T. Vermeulen test/test004.cxx, test/test005.cxx, test/test006.cxx, test/test007.cxx: - Converted to test framework. 2008-08-02 Jeroen T. Vermeulen test/test002.cxx: - Converted to test framework. 2008-07-31 Jeroen T. Vermeulen test/test085.cxx, test/test092.cxx: - Converted to test framework. test/test_helpers.hxx, test/unit/test_test_helpers.cxx: - PQXX_CHECK_THROWS() swallowed all std::exception throws! 2008-07-25 Jeroen T. Vermeulen src/connection_base.cxx: - Don't escape whitespace (which isn't always isprint()) - Closer match to what libpq's escaping functions seem to do test/test_helpers.hxx: - New "fail if you got here" macro - Check for bad_alloc as a special case test/test000.cxx, test/test001.cxx, test/test090.cxx, test/test092.cxx: - Use test helpers. Really helps! 2008-07-23 Jeroen T. Vermeulen include/pqxx/util.hxx, src/connection_base.cxx, src/util.cxx: - Retired old, unsafe escaping functions. - Moved last-ditch escaping workaround into only place it's used. - Made escape_param() safe where possible. - Moved explanation of SQL injection from util to connection. 2008-07-20 Jeroen T. Vermeulen config/sample-headers/compiler/gcc-4.2/config-internal-compiler.h, config/sample-headers/compiler/gcc-4.2/config-public-compiler.h, config/sample-headers/compiler/VisualC++.NET-2003/config-public-compiler.h: - Enable "long long" support. config/sample-headers/libpq/8.3/config-internal/libpq.h: - Added sample headers for more recent gcc and libpq. include/pqxx/compiler-public.h, win32/vc-libpqxx.mak.template: - New PQXX_AUTOLINK for Visual C++, thanks Kirit Saelensminde 2008-07-18 Jeroen T. Vermeulen configure.ac.in: - Removed -Wno-long-double; current gcc doesn't know it--thanks Roger Leigh include/pqxx/compiler-internal.hxx: - Sun Studio fix: use ptrdiff_t, not iterator_traits, thanks Jorgen Austvik - distance() workaround for Sun Studio was completely broken src/util.cxx: - Hopefully fixed gcc 4.3 warning, thanks Roger Leigh 2008-07-17 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, test/unit/test_escape.cxx: - New quote() function templates, using string_traits - New test include/pqxx/except.hxx, include/pqxx/util.hxx, src/util.cxx: - New exception type conversion_error - Added name() and has_null() to string_traits<> - Better error messages for null conversions test/unit/test_sql_cursor.cxx: - Simpler way of running multiple tests from one main() 2008-06-28 Jeroen T. Vermeulen include/pqxx/except.hxx, include/pqxx/result.hxx, src/connection_base.cxx, src/cursor.cxx, src/except.cxx, src/largeobject.cxx, src/result.cxx, src/robusttransaction.cxx, src/tablereader.cxx, src/transaction_base.cxx, src/util.cxx: - Throw pqxx_exception-derived exceptions instead of std ones, thanks yrs90. 2008-06-26 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx: - Peephole optimization, thanks Daniel Frey. 2008-06-22 Jeroen T. Vermeulen test/unit/test_simultaneous_transactions.cxx: - Added test against being allowed to have two nontransactions open. 2008-06-21 Jeroen T. Vermeulen include/pqxx/compiler-internal.hxx, src/pipeline.cxx, test/test085.cxx: - Re-did workaround for missing std::distance() in safer way. 2008-06-20 Jeroen T. Vermeulen autogen.sh: - Don't force LC_ALL=C; breaks on Solaris, thanks Bjorn Munch & Geir Green. 2008-06-18 Jeroen T. Vermeulen include/pqxx/result.hxx: - Make streaming operator act on basic_ostream, thanks Richard B. Kreckel - Should resolve ambiguity error, sorry Carlos Moreno! 2008-06-15 Jeroen T. Vermeulen include/pqxx.pipeline.hxx, src/pipeline.cxx: - Auto-detach after complete() or flush(). test/unit/Makefile.am.template: - Added new pipeline unit test. test/unit/test_pipeline.cxx: - Added - Test detaching of pipeline after complete() or flush(). 2008-06-14 Jeroen T. Vermeulen include/pqxx/basic_connection, include/pqxx/basic_connection.hxx, include/pqxx/binarystring, include/pqxx/binarystring.hxx, include/pqxx/connection, include/pqxx/connection.hxx, include/pqxx/connection_base, include/pqxx/connection_base.hxx, include/pqxx/connectionpolicy, include/pqxx/connectionpolicy.hxx, include/pqxx/cursor, include/pqxx/cursor.hxx, include/pqq/dbtransaction, include/pqq/dbtransaction.hxx, include/pqxx/except, include/pqxx/except.hxx, include/pqxx/isolation, include/pqxx/isolation.hxx, include/pqxx/largeobject, include/pqxx/largeobject.hxx, include/pqxx/nontransaction, include/pqxx/nontransaction.hxx, include/pqxx/notify-listen, include/pqxx/notify-listen.hxx, include/pqxx/pipeline, include/pqxx/pipeline.hxx, include/pqxx/prepared_statement, include/pqxx/prepared_statement.hxx, include/pqxx/result, include/pqxx/result.hxx, include/pqxx/robusttransaction, include/pqxx/robusttransaction.hxx, include/pqxx/subtransaction, include/pqxx/subtransaction.hxx, include/pqxx/tablereader, include/pqxx/tablereader.hxx, include/pqxx/tablestream, include/pqxx/tablestream.hxx, include/pqxx/tablewriter, include/pqxx/tablewriter.hxx, include/pqxx/transaction, include/pqxx/transaction.hxx, include/pqxx/transaction_base, include/pqxx/transaction_base.hxx, include/pqxx/transaction, include/pqxx/transaction.hxx, include/pqxx/transactor, include/pqxx/transactor.hxx, include/pqxx/trigger, include/pqxx/trigger.hxx, include/pqxx/util, include/pqxx/util.hxx: - Moved double-inclusion check from to . - Made header-guard #defines more recognizable. include/pqxx/result.h: - Removed (was still from 1.0 API). 2008-06-11 Jeroen T. Vermeulen include/pqxx/basic_connection.hxx: - Typo in documentation. 2008-06-07 Jeroen T. Vermeulen include/pqxx/util.hxx, src/util.cxx: - Clean up from_string null checking (Daniel Frey) - Other minor cleanups (Daniel Frey) - Broke some overlong lines 2008-06-06 Jeroen T. Vermeulen configitems, configure.ac.in, src/pipeline.cxx, test/test085.cxx: - Workaround for missing distance() in Sun compiler. 2008-05-29 Jeroen T. Vermeulen src/connection_base.cxx, src/pipeline.cxx: - Fixes for Sun Studio, thanks jgilje. 2008-05-28 Jeroen T. Vermeulen autogen.sh: - Fixed bug in replacing GNU-ism in sed. 2008-05-27 Jeroen T. Vermeulen autogen.sh: - Removed some GNU-isms. configure.ac.in, src/util.cxx, test/test_helpers.hxx, test/unit/test_float.cxx: - Support floating-point infinity. - Added PQXX_CHEC_NOT_EQUAL to test helpers. - Fixed mis-spelled macro in is_NaN() include/pqxx/compiler-public.hxx: - Defined PQXX_PRIVATE for SunPro compiler. include/pqxx/util.hxx, src/util.cxx: - Moved builtin to_string and from_string specializations into traits class. 2008-05-26 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx, include/pqxx/result.hxx, include/pqxx/util.hxx: - Handle nulls in string conversions using traits, thanks Daniel Frey src/util.cxx: - Use numeric_limits to get infinity, if possible. Thanks Andrew. 2008-05-25 Jeroen T. Vermeulen include/pqxx/compiler-public.hxx, include/pqxx/connection_base.hxx, include/pqxx/dbtransaction.hxx, include/pqxx/except.hxx, include/pqxx/notify-listen.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/tablestream.hxx, include/pqxx/transaction_base.hxx: - Suppress vtables for abstract classes on Visual C++, thanks Kirit. 2008-05-13 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/pipeline.cxx: - Check for errors during PQconsumeInput() - Fixed "endless network timeout." Thanks Dragomir Ivanov! - transaction_base::consume_input() now returns success value. 2008-05-12 Jeroen T. Vermeulen include/pqxx/util.hxx: - Changed fix for Visual C++ warning (was bad overload). 2008-05-10 Jeroen T. Vermeulen include/pqxx/util.hxx, src/connection_base.cxx, src/pipeline.cxx, src/prepared_statement.cxx, src/util.cxx: - Fixes for Visual C++ 8 warnings (correct ones)--thanks Kirit Saelensminde 2008-04-28 Jeroen T. Vermeulen tools/pqxx-fulltest: - Also look for compilers in /usr/local/bin 2008-04-27 Jeroen T. Vermeulen include/pqxx/util.hxx, src/binarystring.cxx, src/connection_base.cxx, src/cursor.cxx, src/pipeline.cxx, src/tablereader.cxx, src/util.cxx: - Fixed warnings in g++ 4.3 2008-04-17 Jeroen T. Vermeulen test/unit/test_stateless_cursor.cxx: - Test most likely usage pattern: batched sequential retrieval 2008-04-16 Jeroen T. Vermeulen doc/Doxyfile.in: - Removed some unused options to improve Doxygen version compatibility src/robusttransaction.cxx: - Log failures while creating log table 2008-04-15 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx: - Removed fetch_current_row() (it was odd, and hard to guarantee) test/unit/test_sql_cursor.cxx: - Test cursor existence using FETCH, not MOVE (to make failure more likely) - On older backends, test for cursor existence differently - Re-create series table when opening new transaction - WITH HOLD cursors require backend 7.4 or better 2008-04-15 Jeroen T. Vermeulen src/cursor.cxx: - Made init_empty_result() conditional on backend version test/test_helpers.hxx, test/unit/test_stateless_cursor.cxx, test/unit/test_sql_cursor.cxx: - Workaround for pre-8.0 backends, which lack generate_series() include/pqxx/transaction.hxx: - Cosmetic 2008-04-14 Jeroen T. Vermeulen doc/Doxyfile.in: - Upgraded from Doxygen 1.4.6 to 1.5.5. 2008-04-14 Jeroen T. Vermeulen include/pqxx/cachedresult.h, include/pqxx/cursor.h, src/oldcursor.cxx, test/src/cachedresult.cxx, test/test040.cxx, test/test041.cxx, test/test044.cxx, test/test047.cxx: - Deleted - Removed cachedresult and old Cursor classes include/Makefile.am, src/Makefile.am: - Retiring old *.h files and old cursor/cachedresult classes include/pqxx/cursor.hxx: - Made cursor_base::m_name const include/pqxx/nontransaction.h, include/pqxx/robusttransaction.h: - Deleted - Retired 1.x-style "*.h" headers 2008-04-14 Jeroen T. Vermeulen tools/pqxx-fulltest: - Create some directories on demand - Run under bash, not /bin/sh (pushd/popd are bash-specific) - Default to default postgres FTP server, not mirror.in.th - Make SVNURL overridable 2008-04-14 Jeroen T. Vermeulen autogen.sh, configure.ac.in, test/Makefile.am.template, test/test_helpers.hxx, test/unit/, test/unit/Makefile.am.template, test/unit/test_sql_cursor.cxx, test/unit/test_stateless_cursor.cxx, test/test_test_helpers.css: - New test framework for less verbose tests - Proper unit tests include/pqxx/cursor.hxx, include/pqxx/result.hxx, include/pqxx/transaction_base.hxx, src/cursor.cxx, test/Makefile.am.template, test/test050.cxx, test/test084.cxx: - Made sql_cursor "internal" - New stateless_cursor: better API, fewer bugs, smaller code - Made cursor_base entirely stateless include/pqxx/connection_base.hxx: - Documentation fix src/connection_base.cxx: - Cosmetic src/util.cxx: - Infinity support test/test003.cxx, test/test019.cxx, test/test022.cxx, test/test038.cxx, test/test042.cxx, test/test043.cxx, test/test045.cxx, test081.cxx, test/test091.cxx: - Removed tests for old cursor classes 2008-02-05 Jeroen T. Vermeulen include/pqxx/cursor.hxx: - fix for gcc 3.4, thanks Richard B. Kreckel 2008-01-23 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx: - Let cursor_base access m_reactivation_avoidance, thanks Richard B. Kreckel 2007-11-12 Jeroen T. Vermeulen include/pqxx/except.hxx, src/result.cxx: - More detailed constraint error classes, thanks Peter Geoghegan 2007-10-27 Jeroen T. Vermeulen doc/libpqxx.xml: - Made the way result objects work clearer, thanks Carlos Moreno 2007-09-11 Jeroen T. Vermeulen src/cursor.cxx, src/transaction_base.cxx, test/test003.cxx, test/test011.cxx, test/test022.cxx, test/test030.cxx, test/test092.cxx: - Added and includes where missing, thanks Roger Leigh 2007-09-10 Jeroen T. Vermeulen src/binarystring.cxx, src/connection_base.cxx, src/result.cxx: - Added include 2007-09-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Made esc() and esc_raw() public 2007-08-30 Jeroen T. Vermeulen configure.ac.in: - Check for PQdescribePortal() 2007-08-29 Jeroen T. Vermeulen test/test088.cxx: - Test error handling in subtransactions, thanks Bert Hubert 2007-08-15 Jeroen T. Vermeulen win32/INSTALL.txt: - Solution to application link problems, thanks Peter Geoghegan 2007-08-12 Jeroen T. Vermeulen src/util.cxx: - Guess float precision if no numeric_limits, thanks Denis Dzyubenko win32/INSTALL.txt: - Yet more clarificatin, thanks Peter Geoghegan 2007-08-10 Jeroen T. Vermeulen src/util.cxx: - Convert float types with full precision, thanks Denis Dzyubenko win32/INSTALL.txt: - Don't use same libpq for debug and release, thanks Peter Geoghegan 2007-08-08 Jeroen T. Vermeulen win32/INSTALL.txt: - Made the bit about copying config headers a bit clearer. 2007-07-14 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx, test/test043.cxx: - Use difference_type instead of size_type to indicate positions 2007-07-13 Jeroen T. Vermeulen README: - Documented PGPASSWORD, thanks Andrew Maclean - Documented how to set environment variables, thanks Andrew Maclean src/tablewriter.cxx: - Double-escape binary data, thanks Peter Schuller win32/INSTALL.txt: - Documented how to create Windows makefiles, thanks Andrew Maclean 2007-07-12 Jeroen T. Vermeulen src/tablewriter.cxx: - Fix for escaping binary data in COPY mode, thanks Peter Schuller 2007-07-10 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx: - Exported prepared_def, thanks Daniel Frey 2007-06-07 Jeroen T. Vermeulen include/pqxx/trigger.hxx: - Fixed wrong doxygen tag 2007-06-06 Jeroen T. Vermeulen include/Makefile.am: - Added notify-listen headers tools/preprelease: - Print errors to stderr 2007-06-03 Jeroen T. Vermeulen include/pqxx/util.hxx, libpqxx.spec.in, NEWS, README: - The thaiopensource.org hostname no longer works; it's now pqxx.org 2007-05-30 Jeroen T. Vermeulen include/pqxx/cursor.hxx: - Fixed some raw HTML that was showing up wrong in docs, thanks Trigve Siver 2007-05-20 Jeroen T. Vermeulen configure.ac.in: - Added some warning options for g++ 4.2.0 doc/libpqxx.xml, include/pqxx/connection_base.hxx, include/pqxx/pqx, src/connection_base.cxx, test/test004.cxx, test/test023.cxx, test/test078.cxx, test/test079.cxx, test/test087.cxx: - Renamed trigger to notify_listener include/pqxx/notify-listen, include/pqxx/notify-listen.hxx: - New include/pqxx/trigger, include/pqxx/trigger.hxx: - Marked as obsolete VERSION: - Proceeding to 3.0.0 2007-05-17 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx: - More explanation, particularly on exceptions. Thanks Gary Jefferson. 2007-05-11 Jeroen T. Vermeulen src/connection.cxx: - Pass on more error messages in broken_connection exceptions, thanks JuJu 2007-05-10 Jeroen T. Vermeulen src/connection_base.cxx: - Removed unnecessary retrieval of error message, thanks JuJu - Moved code around a bit 2007-05-07 Jeroen T. Vermeulen include/pqxx/compiler-public.hxx, win32/INSTALL.txt: - Define PQXX_PQ_STATIC to link to static libpq in Windows. Thanks JuJu. 2007-05-03 Jeroen T. Vermeulen src/robusttransaction.cxx: - Fixed constraint name clash in multi-user use, thanks anonymous test/test092.cxx: - Test "one parameter per line" style of invoking prepared statements 2007-04-04 Jeroen T. Vermeulen include/pqxx/prepared_statement.hxx: - m_statement shouldn't be a reference, thanks John Mudd 2007-04-02 Jeroen T. Vermeulen src/result.cxx: - Missing include: cstdlib, thanks Martin Michlmayr 2007-03-06 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx: - A bit more explanation about column lists 2007-02-13 Jeroen T. Vermeulen src/connection_base.cxx: - Compile fix for libpq without PQserverVersion() 2007-02-11 Jeroen T. Vermeulen win32/common-sample, win32/vc-libpqxx.mak.template: - Removed quotes to fix problems with spaces, thanks Curran Schiefelbein - Thanks Bart Samwel for confirming 2007-02-08 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for PQclientEncoding() - Check for PQmblen() include/pqxx/connection_base.hxx, include/pqxx/result.hxx, src/connection_base.cxx, src/cursor.cxx, src/pipeline.cxx, src/result.cxx, src/tablereader.cxx: - Keep track of client encoding in connections and results src/util.cxx: - Oops: strlcpy() is supposed to return something include/pqxx/transaction.hxx, include/pqxx/trigger.hxx, src/tablewriter.cxx: - Updated copyright notices 2007-02-07 Jeroen T. Vermeulen configitems, configure.ac.in, src/util.cxx: - Use strlcpy() instead of strncpy() where available 2007-02-04 Jeroen T. Vermeulen include/pqxx/result.hxx: - freemem_result_data() needs PQXX_LIBEXPORT, thanks drankevich@cosmostv.by tools/pqxx-fulltest: - Use pqxx.org instead of full thaiopensource.org URL - Ensure that local postgres instance is private win32/vc-libpqxx.mak.template: - Replaced obsolete /GZ option with /RTC1, thanks Trigve Siver 2007-02-03 Jeroen T. Vermeulen include/pqxx/robusttransaction.hxx, include/pqxx/transaction.hxx, include/pqxx/trigger.hxx, src/tablereader.cxx, src/tablewriter.cxx: - disable_noticer incorrectly qualified as internal::, thanks Trigve Siver include/pqxx/compiler-internal-pre.hxx: - Suppress warning that strncpy() "may be" unsafe, thanks Trigve Siver win32/vc-libpqxx.mak.template: - Always create lib directory, thanks Trigve Siver - Replace obsolete /GX compiler option with /EHsc, thanks Trigve Siver 2007-01-30 Jeroen T. Vermeulen include/pqxx/except.hxx, src/except.cxx, test/test000.cxx: - New mixin base class pqxx_exception, thanks Marcel Loose VERSION: - Bumped to 2.6.10 2007-01-11 Jeroen T. Vermeulen test/test010.cxx: - Work around gcc bug with -fprofile-arcs in string initializer tools/pqxx-fulltest: - Allow FTPSERVER and FTPDIR to be overridden - Keep log of postgres builds--may require packages to be installed 2007-01-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, test/test000.cxx: - Test password encryption include/pqxx/cursor.hxx, test/test003.cxx: - Test cursor_base::close() - Made cursor fetch()/move() functions pure-virtual - Full test coverage 2007-01-05 Jeroen T. Vermeulen test/test085.cxx: - Skip if backend version does not support prepared statements - Work around syntax error with prepared-statement parameters on 7.3 backend test/test091.cxx: - "Inert cursor" problem is fixed in backend 7.4, not 7.3. tools/maketemporary, tools/pqxx-fulltest, tools/preprelease: - Made "export" usage compatible with more shells - export TMPDIR - Skip documentation builds after the very first build 2007-01-04 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Added simulate_failure() for testing, thanks Joshua Moore-Oliva test/test094.cxx: - New - Tests transactor in-doubt handling, thanks Joshua Moore-Oliva tools/pqxx-fulltest: - Set TMPDIR to test directory to keep /tmp clean tools/preprelease: - Can leave its files in other places than /tmp (set by TMPDIR variable) 2007-01-03 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Eliminated unnecessary check_result() - Exec() cached protocol version across connection resets - PQprepare()/PQexecPrepared() only work with protocol 3.0 - Estimate server version if libpq doesn't have PQserverVersion() - Keep (estimated) server version in connection object src/result.cxx: - If result contains an error but has no PG_DIAG_SQLSTATE, throw sql_error test/test056.cxx: - Don't always get syntax_error even if we do have PQresultErrorField() 2006-12-29 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx, src/transaction_base.cxx: - Just one version of exec(), taking const string references - May fix lifetime-of-temporaries bug (query string was dying early) 2006-12-28 Jeroen T. Vermeulen tools/pqxx-fulltest: - Print libpq/backend configurations to test logs 2006-12-20 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/connection_base.hxx, src/connection_base.cxx: - Support password encryption, thanks tometzky 2006-12-18 Jeroen T. Vermeulen tools/pqxx-fulltest: - Check for existence of /proc/cpuinfo before reading it - Set CONCURRENCY_LEVEL to 1 if no other value available 2006-12-16 Jeroen T. Vermeulen tools/splitconfig: - Blank lines before grep warnings (looks better in configure) - replaced "grepcode" variable with "GREPCODE" - Use "test -n" instead of "! test -z" 2006-12-16 Jeroen T. Vermeulen include/pqxx/cursor.hxx: - absolute_cursor is about ready for use include/pqxx/connection_base.hxx, src/connection_base.cxx: - Added capability cap_table_column - Warning about deactivated connections and supports() - Re-use server_version() and protocol_version() - Activate connection before checking prepared-statements capability - Don't use PQexecPrepared() with old backends src/cursor.cxx: - Activate connection before checking scroll capability test/test085.cxx, test/test091.cxx, test/test092.cxx, test/test093.cxx: - Skip test if essential backend features missing tools/pqxx-fulltest: - New - Tests across all available combinations of frontends and backends 2006-12-15 Jeroen T. Vermeulen include/pqxx/except.hxx, src/result.cxx: - New exception class: undefined_column - New exception class: undefined_function 2006-12-13 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/result.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/pipeline.cxx, src/result.cxx, src/util.cxx: - result::swap() didn't swap protocol fields - Keep shared result data (apart from PGresult) in new "shared_data" object - Early provision for thread synchronization in result - Results remember the queries that yielded them - result::CheckStatus() no longer takes argument (no longer need 2 versions) - Radically changed result class definition test/test070.cxx: - Test new result::query() 2006-12-02 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/except.hxx: - Documented SIGPIPE when connection breaks, thanks Leandro Lucarella - More grouping in connection documentation include/pqxx/connection.hxx: - Fleshed out "connections" documentation module test/test056.cxx: - Expected exception type is sql_error if PQresultErrorField() not available test/test091.cxx: - Don't test full cursor mobility on backend <= 7.3 (just wouldn't work) 2006-11-30 Jeroen T. Vermeulen autogen.sh: - Try for automake 1.9 - Minor cleanup test/test056.cxx, test/test091.cxx: - Fail with postgres/libpq 7.3 tools/preprelease: - Suppress a bit of unwanted output 2006-10-31 Jeroen T. Vermeulen src/connection_base.cxx: - Add trigger even if connection not open, thanks Markus Schmidleitner 2006-10-23 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Published some more utility classes from pqxx::internal src/util.cxx: - Don't allocate 5n+1 bytes for escaping; 2n+1 really is enough test/test005.cxx, test/test013.cxx, test/test018.cxx, test/test032.cxx, test/test056.cxx, test/test060.cxx, test/test061.cxx, test/test064.cxx, test/test070.cxx, test/test072.cxx, test/test073.cxx, test/test083.cxx, test/test085.cxx, test/test086.cxx: - Suppress expected error output from notice processor - Correct typo: "existant" should be "existent" test/test089.cxx: - Account for different ways of detecting nested-transactions capability 2006-10-18 Jeroen T. Vermeulen include/pqxx/result.hxx: - Removed meaningless const in return type, thanks Jo Ellen Brandmeyer 2006-10-15 Jeroen T. Vermeulen test/test090.cxx: - Test esc_raw() as well as plain esc() - Test nul bytes only with esc_raw(), not with esc() 2006-10-09 Jeroen T. Vermeulen src/connection_base.cxx: - Fixed typo. How did this ever come through the regression test? - Fixed constness problem in esc_raw() for old libpq versions src/subtransaction.cxx: - If nested transactions not supported, throw feature_not_supported test/test093.cxx: - Work around missing PQftableCol() in older libpq versions 2006-09-30 Jeroen T. Vermeulen configure.ac.in, configitems, src/util.cxx, include/pqxx/util.hxx, test/test000.cxx: - Support "long long" and "unsigned long long" types - Redid from_string implementations as template 2006-09-26 Jeroen T. Vermeulen include/pqxx/cachedresult.h: - Include pqxx/result, not old pqxx/result.h test/test083.cxx - Fixed problem found by Visual Studio 8, thanks Xiaofeng Zhao 2006-09-25 Jeroen T. Vermeulen test/test085.cxx: - Fixed problem found by Visual Studio 8, thanks Xiaofeng Zhao 2006-09-24 Jeroen T. Vermeulen src/connection_base.cxx: - Fixed bug in removing trigger, thanks Xiaofeng Zhao and Bart Samwel 2006-09-14 Jeroen T. Vermeulen include/pqxx/cursor.hxx: - Convenience typedef abscursor for most common type of absolute_cursor test/test043.cxx: - Migrated from old Cursor to new absolute_cursor win32/INSTALL.txt - Need to run VCVARS32.BAT before building postgres as well as libpqxx - Thanks Bart Samwel and Jonathan Blitz 2006-09-13 Jeroen T. Vermeulen include/Makefile.am, include/pqxx/all.h, include/pqxx/connection.h, include/pqxx/connection_base.h, include/pqxx/connectionitf.h, include/pqxx/dbtransaction.h, include/pqxx/except.h, include/pqxx/isolation.h, include/pqxx/largeobject.h, include/pqxx/tablereader.h, include/pqxx/tablestream.h, include/pqxx/tablewriter.h, include/pqxx/transaction.h, include/pqxx/transaction_base.h, include/pqxx/transactionitf.h, include/pqxx/transactor.h, include/pqxx/trigger.h: - Retired old 1.x-style ".h" headers include/pqxx/result.hxx, include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx: - Retired deprecated 1.x API functions include/pqxx/transaction_base.hxx, src/oldcursor.cxx, test/test041.cxx, src/cursor.cxx: - Forgot to quote cursor name in cursor_base::close() test/test043.cxx: - Retired deprecated 1.x API functions include/pqxx/transactor.hxx, test/test052.cxx, test/test054.cxx, test/test057.cxx: - Retired deprecated OnCommit() etc. callbacks include/pqxx/trigger.hxx: - Removed deprecated Name() function include/pqxx/util.hxx, src/utils.cxx, tools/rmlo.cxx: - Removed 1.x ToString(), FromString(), and Quote() functions 2006-09-12 Jeroen T. Vermeulen configitems, configure.ac.in, config/sample-headers/libpq/*/libpq-internal.h: - Check for PQftablecol() include/pqxx/result.cxx, src/result.cxx, src/connection_base.cxx: - Removed private assignment-to-PGresult * operator - Results can keep track of backend protocol test/test093.cxx: - New - Test querying of table columns' origins TODO: - Cleaned up old items - Being phased out in favour of online Trac environment win32/vc-libpqxx.mak.template: - Create $(OUTDIR) if needed, thanks xf10036@hotmail.com 2006-09-08 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx, test/test085.cxx: - New function prepare_now(), thanks theo@crazygreek.co.uk 2006-09-07 Jeroen T. Vermeulen README: - Removed old pqxx.tk URL src/connection_base.cxx: - Forgot to check result of PQprepare(), thanks theo@crazygreek.co.uk 2006-08-31 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx, test/test091.cxx: - Got absolute_cursor working, I think - Fixed infinite recursions on fetch() and move() - Extra two-argument move_to() - Test didn't account for "end()" element include/pqxx/util.hxx, src/util.cxx: - Factored reference-counting out of PQAlloc *: - Whitespace cleanup: spaces before tab - Whitespace cleanup: whitespace before end-of-line 2006-08-29 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/prepared_statement.cxx, src/transaction_base.cxx, src/util.cxx: - Binary args to prepared statements got truncated at 0! Thanks Lumir Vanek - New from_string<>() with length argument include/pqxx/pqxx: - Also include binarystring include/pqxx/result.hxx: - Use new from_string() for strings - No longer include field names in conversion errors test/test000.cxx: - Test new from_string<>() versions test/test091.cxx: - Still doesn't work - Now throw exception rather than go into infinite recursion test/test092.cxx: - New - Tests nul byte in binary parameter to prepared statement 2006-08-21 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, test/test001.cxx, test/test090.cxx: - Test new functions protocol_version() and server_version() - Test adorn_name() - Back to full test coverage for connection classes include/pqxx/cursor.hxx: - Now testing most of absolute_cursor (but not ready for use yet) test/test091.cxx: - New - Tests absolute_cursor 2006-08-20 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx, test/test062.cxx: - Test esc_raw(const unsigned char[], size_t) - Back to full test coverage for transaction classes 2006-08-15 Jeroen T. Vermeulen doc/Makefile.am: - More now-unnecessary output filtering removed 2006-08-14 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Finally resolved Doxygen problems! - Corrected prepared-statement execution example include/pqxx/except.hxx: - too_many_connections is a broken_connection, not an insufficient_resources - New undefined_table class (too useful not to have) include/pqxx/subtransaction.hxx: - Documented class src/result.cxx: - Recognize undefined_table error 2006-08-13 Jeroen T. Vermeulen doc/Doxyfile.in: - Include libpqxx version number - Suppress unneeded output - Ignore PQXX_LIBEXPORT and PQXX_PRIVATE doc/Makefile.am: - No longer need to suppress unnecessary Doxygen output using grep include/pqxx/pipeline.hxx, src/connection.cxx, src/connection_base.cxx, src/cursor.cxx, src/dbtransaction.cxx, src/except.cxx, src/largeobject.cxx, src/pipeline.cxx, src/prepared_statement.cxx, src/result.cxx, src/robusttransaction.cxx, src/subtransaction.cxx, src/tablereader.cxx, src/tablestream.cxx, src/tablewriter.cxx, src/transaction.cxx, src/transaction_base.cxx: - Qualified parameter types identically between declarations and definitions - Works around Doxygen problem include/pqxx/transactor.hxx: - connection_base::perform() was documented in two places 2006-08-11 Jeroen T. Vermeulen include/pqxx/trigger.hxx: - Forbid copy construction and copy assignment (thanks Bart Samwel) 2006-08-09 Jeroen T. Vermeulen configitems, configure.ac.in, config/sample-headers/libpq/7.4, config/sample-headers/libpq/8.0, config/sample-headers/libpq/8.1, include/pqxx/connection_base.hxx, src/connection_base.cxx: - Allow server version to be queried - Allow protocol version to be queried - Compatibility fix: check for "std" namespace and gcc 3.4 include/pqxx/util.hxx: - Removed PQXX_LIBEXPORT directive from PQAlloc class template 2006-08-04 Jeroen T. Vermeulen configure.ac.in: - Allow test for gcc visibility attribute to fail if not GNU C++ 2006-08-04 Jeroen T. Vermeulen configure.ac.in, configitems, src/connection_base.hxx: - Use GNU/Linux poll() instead of select(), if available 2006-07-29 Jeroen T. Vermeulen pqxx-config.in: - Is deprecated, and now says so (thanks Roger Leigh) 2006-07-28 Jeroen T. Vermeulen configure.ac.in: - Test for pkg-config (Roger Leigh) 2006-07-27 Jeroen T. Vermeulen doc/libpqxx.xml: - Missing parenthesis. Thanks Koen Stegen. 2006-07-21 Jeroen T. Vermeulen include/pqxx/except.hxx, include/pqxx/result.hxx, src/result.cxx: - Lots of new, more specific sql_error-derived exception types - Thanks Tomek Rydzynski for getting me going with this 2006-07-01 Jeroen T. Vermeulen tools/preprelease, tools/splitconfig: - Use new "maketemporary" script to work around mktemp differences tools/maketemporary: - New - Slightly more portable wrapper for mktemp 2006-06-22 Jeroen T. Vermeulen test/Makefile.am: - Needed fixing after template2mak stopped changing directories 2006-06-21 Jeroen T. Vermeulen configure.ac.in: - Check for socket library before checking for libpq. Thanks Jason Sheets! win32/INSTALL.txt: - Warned MSYS users to update grep & install mktemp, thanks Jason Sheets - Rewrote some text to be a little clearer - Reduced duplication in description of "common" file - Updated description of "common" file to current way of working 2006-06-18 Jeroen T. Vermeulen win32/INSTALL.txt, win32/mingw.mak.template, tools/template2mak.py, win32/vc-test.mak.template, win32/vc-libpqxx.mak.template: - Make "make" work from main directory, thanks Trigve Siver 2006-06-10 Jeroen T. Vermeulen configure.ac.in: - MinGW socket library detection patch by tometzky@batory.org.pl tools/preprelease: - Fixed md5sum generation (wrote empty file before) - Use "--" option on mv, rm, etc. 2006-06-08 Jeroen T. Vermeulen configure.ac.in: - Moved detection of and workaround for broken grep to tools/splitconfig tools/Makefile.am: - Added tools/splitconfig tools/preprelease: - Don't erase reference documentation every time (takes too much time) tools/splitconfig: - New - Encapsulates workaround for broken greps - Should now also detect latest bug with "grep -w -F" in some GNU greps - Major cleanup of grep failure detection 2006-06-02 Jeroen T. Vermeulen configitems: - One item said "private" instead of "internal" configure.ac.in: - Fixed warning in PQprepare() (can't have those in maintainer mode) include/pqxx/binarystring.hxx: - Documented escape_binary() as deprecated include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/transaction_base.cxx: - Implemented bytea equivalents of esc() test/test062.cxx: - Use new transaction_base::esc_raw() function 2006-06-01 Jeroen T. Vermeulen win32/vc-libpqxx.mak.template: - Replaced backslashes in paths with slashes - Fixes "incomplete makefile" problem 2006-05-29 Jeroen T. Vermeulen src/connection_base.cxx: - Compile fix for old libpq versions, thanks Pawel Sikora 2006-05-28 Jeroen T. Vermeulen configure.ac.in: - Removed -R option (thanks Pawel Sikora and Roger Leigh for explaining) doc/libpqxx.xml: - Replaced sqlesc() with esc() test/test000.cxx: - Include if appropriate tools/svnignore: - New - Updates svn:ignore properties of files/dirs based on .cvsignore files tools/preprelease: - Clean up old files from reference documentation--saved tons of space! 2006-05-27 Jeroen T. Vermeulen configure.ac.in: - Check for new PQescapeStringConn() - Check for new PQescapeByteaConn() include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/transaction_base.cxx, src/util.cxx: - Use PQescapeStringConn() where available - New escaping functions test/test000.cxx: - Removed now obsolete sqlesc() tests test/test090.cxx: - New - Tests new string-escaping functions tools/preprelease: - Also test against g++ 4.1 2006-05-26 Jeroen T. Vermeulen tools/template2mak.py: - Fixed case where input file argument has no path component (Bart Samwel) win32/vc-test.mak.template: - Fixed usage of LIBPATH variables (Bart Samwel) 2006-05-15 Jeroen T. Vermeulen configure.ac.in: - Test for gcc's "deprecated" attribute - Don't try to enable gcc's mudflap - Remove redundant -lpq arguments include/pqxx/compiler-public.hxx, include/pqxx/connection_base.hxx, include/pqxx/result.hxx, include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx, include/pqxx/trigger.hxx, include/pqxx/util.hxx: - Apply gcc's "deprecated" attribute to deprecated functions src/connection_base.cxx: - Quote prepared statement names so they can contain upper-case letters test/Makefile.am.template - Fixed empty line after escaped newline that automake stumbled over test/test0085.cxx: - Test upper-case letters in prepared-statement names 2006-05-14 Jeroen T. Vermeulen autogen.sh - Use templating script to generate test/Makefile.am as well tools/template2mak.py: - Don't change directories until after output file has been opened tools/*.pl: - Got rid of all Perl scripts! 2006-05-13 Jeroen T. Vermeulen autogen.sh: - Use Bart Samwel's templating script to generate all Windows Makefiles - Skip Windows Makefile generation scripts if Python not installed config/sample-headers/compiler/VisualC++.NET-2003/config-internal-compiler.h: - This compiler has vsnprintf(), thanks Bart Samwel doc/Doxyfile.in: - Disabled collaboration graphs (not of much use to end-users) include/pqxx/compiler-public.hxx: - Select appropriate libpq/libpqxx binaries in Visual C++ (Bart Samwel) include/pqxx/connection_base.hxx, include/pqxx/libpq-forward.hxx, src/connection_base.cxx: - Fix for nasty bug in notice processor handling (Bart Samwel) include/pqxx/cursor.hxx, src/cursor.cxx: - Made check_displacement() const (Bart Samwel) - Removed unnecessary PQXX_LIBEXPORT directives (Bart Samwel) - Workaround for disagreement between Visual C++ and g++, thanks Bart Samwel src/largeobject.cxx: - Fixed "long" return types; should be pos_type test/test000.cxx: - Visual C++ workaround: no stringstream << operator (Bart Samwel) test/test061.cxx: - Fixed "unreferenced local variable" warning (Bart Samwel) tools/template2mak.py: - New (written by Bart Samwel) - Generates Visual C++ makefiles from templates - Replaces the maketestvcmak.pl and makevcmake.pl scripts - Now also replaces makemingwmak.pl - Now sorts files in loops - Now checks for superfluous arguments - Fixed bug in two-argument format (opend output for reading only) - Moved "don't edit this file" from templates to script win32/common-sample: - Generalized for use by MinGW and Visual C++ makefiles - Warning about slashes and backslashes, thanks Bart Samwel win32/mingw.mak.template: - New - Major cleanup of MinGW makefile (does it even work?) - Now also includes "common" win32/vc-libpqxx.mak.template, win32/vc-test.mak.template - New (written by Bart Samwel) - Slightly improved naming scheme (easier with Subversion than with CVS) win32/INSTALL.txt: - Updated for new, truly shared "common" file 2006-05-07 Jeroen T. Vermeulen doc/libpqxx.xml: - Fixed bugs that caused validation to fail 2006-05-06 Jeroen T. Vermeulen doc/libpqxx.xml: - Updated copyright string - Added middle initial to my name - Only one transaction (per connection) at a time 2006-04-29 Jeroen T. Vermeulen doc/libpqxx.xml: - No big performance gain with nontransaction (thanks Markus Schaber) - Use nontransaction for metadata modifications include/pqxx/connection_base.hxx: - Documented fact that PQhost() returns NULL if no host *specified* 2006-04-27 Jeroen T. Vermeulen doc/libpqxx.xml: - nontransaction is only faster when read-only, thanks Markus Schaber 2006-04-01 Jeroen T. Vermeulen configure.ac.in: - Remove unsafe loop optimizations with g++ 4.1; breaks standard library src/util.cxx: - Fixed conversion of non-negatable signed numbers (breaks with g++ 4.1) test/test000.cxx: - List tests as they proceed, to facilitate debugging - Use stringstreams as example for LONG_MIN/LONG_MAX strings test/test004.cxx, test/test006.cxx, test/test007.cxx, test/test013.cxx, test/test015.cxx, test/test017.cxx, test/test018.cxx, test/test023.cxx, test/test025.cxx, test/test026.cxx, test/test032.cxx, test/test034.cxx, test/test036.cxx, test/test037.cxx, test/test048.cxx, test/test050.cxx, test/test051.cxx, test/test052.cxx, test/test054.cxx, test/test057.cxx, test/test059.cxx, test/test065.cxx, test/test078.cxx, test/test079.cxx, test/test087.cxx: - Converted OnCommit()/OnAbort()/OnDoubt() to 2.x-style equivalents 2006-03-20 Jeroen T. Vermeulen src/connection_base.cxx: - Fixed workaround code for missing PQexecPrepared() 2006-03-09 Jeroen T. Vermeulen include/pqxx/largeobject.hxx: - Fixed conversion warning, thanks Bart "what, AGAIN?" Samwel 2006-03-07 Jeroen T. Vermeulen configure.ac.in: - Replaced AC_TRY_LINK loop for socket library with AC_SEARCH_LIBS - Should fix MinGW socket problems, thanks Bart "doesn't ring a bell" Samwel 2006-03-06 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Compile fix for change in subtransaction (Bart Samwel) include/pqxx/pipeline.hxx: - Previous Visual C++ fix broke compilers without "limits" header include/pqxx/prepared_statement.hxx: - Help older compilers disambiguate invocation operator() templates tools/maketestvcmak.pl, win32/common: - More little fixes by Bart "who was that again?" Samwel tools/preprelease: - Fix md5sum generation win32/common, win32/common-sample, win32/INSTALL.txt: - Updated with help from Alexandre Hanft - No longer edit win32/common; copy from common-sample first (Bart Samwel) 2006-03-05 Jeroen T. Vermeulen include/pqxx/*: - Disable pointless Visual C++ warnings in headers (Bart Samwel) include/pqxx/compiler-internal-post.hxx, include/pqxx/compiler-internal-pre.hxx: - New - Wrap libpqxx headers in temporary warning suppression on Visual C++ - Designed by Bart Samwel include/pqxx/prepared_statement.hxx, src/prepared_statement.cxx: - Fixed bug that was hidden with some string implementations (Bart Samwel) include/pqxx/util.hxx: - Work around yet another pointless Visual C++ warning (Bart Samwel) tools/maketestvcmak.pl: - Removed obsolete linker function /pdbtype (Bart Samwel) - Make ALL the default target (Bart Samwel) tools/makevcmak.pl: - Copy libpq libraries into our own directories (Bart Samwel) tools/preprelease: - Check for matching compiler-internal-pre/post.hxx headers win32/common: - Single definition for use in all relevant paths (Bart Samwel) 2006-03-04 Jeroen T. Vermeulen config/sample-headers/libpq/8.1/config-internal-libpq.h - New - Adds PQserverVersion()--thanks Bart Samwel - Adds PQprepare() include/pqxx/compiler-public.hxx: - Use debug build of libpq when building debug libpqxx, (Bart Samwel) include/pqxx/basic_connection.hxx, include/pqxx/connection_base.hxx, include/pqxx/connectionpolicy.hxx, src/connection_base.cxx, src/connection.cxx: - Moved workaround for MSVC++ "output in destructor" bug to leaf destructor - Fixed late activation in "direct" connections (thanks Bart Samwel) - Explicitly zero-initialize capabilities (thanks Bart Samwel) - Allow friends to set capabilities explicity (handy if proven present) include/pqxx/compiler-internal.hxx, include/pqxx/compiler-public.hxx: - Moved Visual C++ "silence stupid warning" pragmas to "internal" header - Silence Visual C++ warning 4800 from here - No longer require config-internal-autotools header include/pqxx/subtransaction.hxx, src/subtransaction.cxx: - More intelligent check for nested-transactions support on the backend src/except.cxx: - Forgot to include compiler-internal.hxx test/test074.cxx: - More work on silencing pointless Visual C++ warning, thanks Bart Samwel tools/maketestvcmak.pl, tools/makevcmake.pl: - Made compatible with Windows, thanks Bart Samwel - Missing compiler options from Bart's previous patch - Deal with release/debug mode incompatibility, (Bart Samwel) - Run tests after building them (Bart Samwel) - Don't silence libpqxx warnings from makefile tools/preprelease: - Compute MD5 checksum of release tarball win32/common, win32/INSTALL.txt: - Add debug-library path, not just release-library path (Bart Samwel) 2006-03-02 Jeroen T. Vermeulen include/pqxx/pipeline.hxx: - Missing include: limits. Thanks Bart Samwel. include/pqxx/tablereader.hxx, include/pqxx/tablewriter.hxx: - Work around Visual C++.NET 2003 bugs, thanks Bart "Handyman" Samwel! include/pqxx/util.hxx: - Forgot to export pqxx::internal::freepqmem (Bart "you-know-who" Samwel) test/test040.cxx, test/test041.cxx, test/test044.cxx: - Emit warnings about warnings about obsolete headers (still Bart Samwel) test/test060.cxx, test/test064.cxx, test/test089.cxx: - Unused but named exception references (Bart "him again" Samwel) test/test074.cxx: - Silenced silly Visual C++ 2003 warning (Bart "yes yes we know" Samwel) test/test083.cxx: - Worked around Visual C++'s silly warnings about "for scope" test/test087.cxx: - Prevent Visual C++ sabotage of min()/max() (Bart "you done yet?" Samwel) tools/maketestvcmak.pl, tools/makevcmake.pl: - Enable RTTI - Generate correct range of available test programs in comments - Use "del" instead of "erase" - Typo in comments - Suppress less Make output - Use REM for comments, not # - A big thanks to Bart ("apparently not") Samwel! win32/INSTALL.txt: - Cleared up procedure for config headers a bit (yes, Bart Samwel again) 2006-02-23 Jeroen T. Vermeulen configure.ac.in: - Use -lws2_32 on Windows (not -lws32_2), thanks Allysson Costa 2006-02-20 Jeroen T. Vermeulen configure.ac.in: - LDFLAGS broke in move to AC_LINK_IFELSE, thanks ltramuset@club-internet.fr 2006-02-11 Jeroen T. Vermeulen configure.ac.in: - Fixed broken std namespace check - Fixed broken --with-std option - Make std namespace check check most-preferred namespaces first - Made output for std namespace check a little clearer - Finally fixed some messy output lines in configure script - Check for extra socket libraries that may need to be linked in - Finally fixed "NULL fdsets in select()" check test/test087.cxx: - Fixed includes for Cygwin, thanks Bert Hinrichs 2006-02-10 Jeroen T. Vermeulen src/connection_base.cxx: - Always include winsock2.h/unistd.h if available, thanks Bert Hinrichs 2006-02-05 Jeroen T. Vermeulen src/binarystring.cxx: - Retired some old TODO items 2006-01-19 Jeroen T. Vermeulen doc/Doxyfile.in: - Enable treeview sidebar 2006-01-16 Jeroen T. Vermeulen configure.ac.in: - Check for stlport _STL namespace - Option for enabling/disabling "long long" support 2006-01-09 Jeroen T. Vermeulen tools/preprelease: - No longer test against g++ 2.95 include/pqxx/util.hxx: - Minor change to PQAlloc, in preparation for threading/locking support 2006-01-08 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for PQprepare() doc/libpqxx.xml: - Added encoding specification include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/transaction_base.cxx, test/test085.cxx: - Redid prepared statements API and implementation - Incompatible change! include/pqxx/prepared_statement, include/pqxx/prepared_statement.hxx, src/prepared_statement.cxx: - New - Part of new prepared-statements system test/test002.cxx: - Verify that default connection class reports errors immediately 2006-01-07 Jeroen T. Vermeulen doc/Doxyfile.in: - Updated to Doxygen 1.4.6 - Show directory structure - Predefined PGSTD to std for Doxygen's purposes; enabled STL support include/pqxx/binarystring.hxx: - Explicitly relate binarystring class to escape_binary() functions tools/preprelease: - Check for missing reference documentation or tutorial 2005-12-30 Jeroen T. Vermeulen include/pqxx/basic_connection, include/pqxx/basic_connection.hxx, include/pqxx/connectionpolicy, include/pqxx/connectionpolicy.hxx: - New include/pqxx/compiler.h, include/pqxx/libcompiler.h: - Renamed to compiler-internal.hxx and compiler-public.hxx, repsectively include/pqxx/connection.hxx, include/pqxx/connection_base.hxx, src/connection.cxx, src/connection_base.cxx: - Refactored connection hierarchy 2005-12-28 Jeroen T. Vermeulen *: - Migrated from CVS to Subversion config/Makefile.am, debian/rules, doc/Makefile.am: - Remove .svn directories (as well as CVS ones) from distribution tarball src/util.cxx: - Fixed typo: called strnlen() instead of pqxx_strnlen() tools/preprelease: - Use rm's -f option when removing .svn directories 2005-12-16 Jeroen T. Vermeulen include/pqxx/util.hxx, src/util.cxx, test/test000.cxx: - Nul characters are not allowed inside PostgreSQL strings 2005-12-15 Jeroen T. Vermeulen configitems, configure.ac.in: - Check for strnlen() src/util.cxx: - Fixed serious sqlesc() encoding bug, thanks tometzky@batory.org.pl! test/test000.cxx: - Fixed nul character escape tests 2005-12-08 Jeroen T. Vermeulen configure.ac.in: - New --with-std= option include/Makefile.am, include/pqxx/Makefile.am: - Fixed incorrect header installation directory, thanks cbou@mail.ru 2005-11-28 Jeroen T. Vermeulen configure.ac.in: - Added some gcc 4.x options to maintainer mode src/binarystring.cxx: - Fixed Effective C++ warning src/pipeline.cxx, src/robusttransaction.cxx: - Removed unused-variable warnings in catch clauses 2005-11-19 Jeroen T. Vermeulen include/pqxx/*.hxx, src/*.cxx: - Made namedclass a virtual base of transactionfocus & transaction_base - Child classes no longer pass their names to base classes - Switched arguments to namedclass constructor around - Made object name optional include/pqxx/connection_base.hxx, src/connection_base.cxx: - Fixed bug: SetupState() was not always called! - More connection capabilities detected - Option not to register with transaction (used for subtransaction) - New class for connection reactivation avoidance "exemptions" - Function to adorn names with unique numbers include/pqxx/cursor.hxx, include/pqxx/transaction_base.hxx, src/cursor.cxx, src/oldcursor.cxx: - Spliced out unique cursor numbering, moved to connection_base include/pqxx/dbtransaction.hxx, src/dbtransaction.cxx: - Sensible defaults for overridable virtual functions include/pqxx/pqxx: - Added subtransaction.hxx include/pqxx/subtransaction, include/pqxx/subtransaction.hxx, src/subtransaction.cxx, test/test088.cxx, test/test089.cxx: - New - Nested transactions for PostgreSQL 8.x test/test001.cxx: - Catch sql_error 2005-11-07 Jeroen T. Vermeulen include/pqxx/connection.hxx, src/connection.cxx: - Fixed gcc 4.0 shared library link problem, thanks Axel Waggershauser 2005-11-05 Jeroen T. Vermeulen src/cursor.cxx: - Strip trailing semicolons off query, thanks Rupert Kittinger 2005-10-28 Jeroen T. Vermeulen configitems, configure.ac.in, src/util.cxx: - Greatly simplified strerror_r recognition. Thanks Bart Samwel! - No longer need configuration items for different strerror_r versions - Missing include: cstring 2005-10-27 Jeroen T. Vermeulen configure.ac.in: - More work on strerror_r guessing logic src/util.cxx: - Zero-terminate error strings that overflow buffer 2005-10-25 Jeroen T. Vermeulen win32/INSTALL.txt: - Removed thread-safety configure option - Removed --disable-shared from sample configuration options - Documented PQXX_SHARED 2005-10-03 Jeroen T. Vermeulen src/util.cxx: - Include . Thanks rdieter. 2005-09-29 Jeroen T. Vermeulen configure.ac.in, src/largeobject.cxx: - Stop using libpq/libpq-fs.h, thanks DGCh-Geschaeftsstelle@t-online.de test/test062.cxx: - More extensive logging of discrepancies - strncmp() was wrong (locale-sensitive), thanks jmc@astro.caltech.edu win32/common: - Clearer explanations - Only need two libpq headers 2005-09-27 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - One more tweak on the auto_ptr problem include/pqxx/cursor.hxx: - Fixed Doxygen warning include/pqxx/largeobject.hxx, test/test050.cxx: - Test tell() and ctell() include/pqxx/util.hxx: - Arg 2 in ambiguous from_string()s was const, thanks Matthias Fischaleck 2005-09-22 Jeroen T. Vermeulen configure.ac.in: - Removed thread-safety option. 2005-09-20 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/largeobject.hxx, src/largeobject.cxx: - Added ctell() and tell() functions 2005-09-15 Jeroen T. Vermeulen win32/INSTALL.txt: - Added missing -c to sample compiler command line, thanks Johnson Zhao 2005-09-13 Jeroen T. Vermeulen include/pqxx/binarystring.hxx: - Documented thread safety constraints include/pqxx/cursor.hxx, include/pqxx/transaction_base.hxx, src/cursor.cxx, src/transaction_base.cxx: - Removed unnecessary "mutable" in icursor_iterator - Made variable cache non-mutable - transaction_base::get_variable() is no longer const 2005-09-08 Jeroen T. Vermeulen include/connection_base.hxx: - Hopefull fixed auto_ptr issue, thanks Maximiliano Pin. 2005-09-07 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Removed spurious "return," thanks Maximiliano Pin - RogueWave's auto_ptr doesn't copy-construct from const (Max again) 2005-09-06 Jeroen T. Vermeulen src/connection_base.cxx: - Added , thanks a.maclean@cas.edu.au 2005-09-01 Jeroen T. Vermeulen src/connection_base.cxx: - Replaced some assertions with exceptions 2005-08-30 Jeroen T. Vermeulen doc/libpqxx.xml: - Wrong variable name in example. Thanks Marc Herbert. - Mentioned outdated OnCommit() etc. names--thanks Lolke Dijkstra include/pqxx/connection_base.hxx, src/connection_base.cxx: - Made capabilities check immediate (was deferred) for thread safety include/pqxx/cursor.hxx, src/cursor.cxx: - New move/fetch functions correct for weird row accounting include/pqxx/result.hxx, src/result.cxx: - reverse_iterators now "point at" same element as embedded iterator - reverse_iterators' base() now use temporaries, which is safe - reverse_iterators' mutable m_tmp member no longer needed - reverse_iterators' dereference operators now inherited unchanged - Improved thread safety on reverse_iterators - Simplified difference computation on reverse_iterators test/test042.cxx: - Use displacements returned by new cursor fetch/move functions 2005-08-25 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, include/pqxx/cursor.hxx, include/pqxx/util.hxx: - Documentation on thread safety include/pqxx/connection_base.hxx, src/connection_base.cxx: - Moved all fd_set-related things from class to implementation - Improved thread safety Makefile.am - Removed include/pqxx from include path src/Makefile.am, tools/maketestam.pl: - Removed unnecessary and incorrect include paths test/test087.cxx - Fixed compile problem with older gcc 2005-08-22 Jeroen T. Vermeulen include/pqxx/connection.hxx, include/pqxx/cursor.hxx: - Full test coverage src/except.cxx: - New - Here to reduce inline code and library relocations - New exception class internal_error for libpqxx bugs src/connection_base.cxx, src/cursor.cxx, src/oldcursor.cxx, src/pipeline.cxx, src/result.cxx, src/robusttransaction.cxx, src/tablereader.cxx, src/transaction_base.cxx, src/util.cxx: - Replaced logic_error throws with internal_errors test/test038.cxx, test/test042.cxx, test/test045.cxx: - Converted to new cursor interface test/test087.cxx: - New - Tests waiting on bare connection socket 2005-08-21 Jeroen T. Vermeulen configure.ac.in, include/pqxx/compiler.h, include/pqxx/libcompiler.h, tools/makemingwak.pl, tools/makevcmake.pl: - New preprocessor macro PQXX_SHARED replaces old DLL guessing logic - Updated fd_set using extern "C" workaround include/pqxx/connection_base.hxx, src/connection_base.cxx: - New capability: cap_cursor_scroll - New capability: cap_cursor_with_hold - New capability: cap_cursor_update - Documentation: WITH HOLD cursors are not self-restoring, like temp tables - Avoid connection {d,r}eactivation while unscoped cursors are active - Clear reactivation inhibition while closing connection include/pqxx/cursor.hxx, src/cursor.cxx: - Templatized cursor_base on access/update policies - Moved basic cursor operations up even further, to cursor_base - Support FOR {UPDATE|READ ONLY} (but no update function yet) - Support [NO] SCROLL - User-definable cursor destruction policy - Implemented cursors in nontransactions using WITH HOLD - Convenience typedef "cursor" - Avoid connection {d,r}eactivation while unscoped cursors are active - Use PQcmdTuples() for MOVE count if possible include/pqxx/Makefile.am: - Removed include/pqxx from include path include/pqxx/result.hxx: - result now has cursor_base, not its child basic_cursor, as its friend include/pqxx/transaction_base.hxx, src/robusttransaction.cxx, src/transaction.cxx: - Keep track of allocated reactivation-inhibiting resources test/test003.cxx, test/test019.cxx: - Converted to new cursor interface tools/maketestvcmak.pl - Removed Clinton James' email address--he probably doesn't want email 2005-08-19 Jeroen T. Vermeulen configure.ac.in: - If no strerror_r(), assume strerror() is safe (as in HP-UX, Solaris) - Use strerror_r() if available, even without --enable-threadsafety - Warn for missing strerror_r(), don't fail - Work around problem with HP-UX "grep -F" - Work around problem with "\<" & "\>" in HP-UX grep - Thanks Maximiliano Pin for HP-UX fixes - Thanks lundgren@byu.net for noting strerror() on Solaris is threadsafe 2005-08-13 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx: - Introduced basic_cursor (the cursor class you really want in most cases) - Get accurate row counts when moving cursors - Removed workarounds for Visual C++ attempts to sabotage min()/max() include/pqxx/pipeline.hxx: - Removed workarounds for Visual C++ attempts to sabotage min()/max() include/pqxx/result.hxx: - Made basic_cursor a friend of result src/connection_base.cxx: - Worked around gcc/GNU libc warning for FD_SET - Removed my own comment that was, I recently found, unfair to Tom Lane test/test081.cxx: - Print number of lines in result set being tested 2005-07-31 Jeroen T. Vermeulen doc/Makefile.am: - Filter out more uninteresting Doxygen output include/pqxx/binarystring.hxx, include/pqxx/connection_base.hxx, include/pqxx/connection.hxx, include/pqxx/dbtransaction.hxx, include/pqxx/except.hxx, include/pqxx/nontransaction.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/transaction_base.hxx, include/pqxx/transaction.hxx, include/pqxx/transactor.hxx, include/pqxx/trigger.hxx, include/pqxx/util.hxx: - More grouping in Doxygen documentation - Used @code/@endcode tags in documentation - Documented PGSTD src/dbtransaction.cxx: - Use PGSTD instead of std 2005-07-27 Jeroen T. Vermeulen src/connection_base.cxx: - Rewrote libpq CONNECTION_OK workaround 2005-07-26 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Documentation: await_notification() also processes, thanks Szucs Gabor 2005-07-25 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Documented get_notifs() better, thanks Szucs Gabor src/connection_base.cxx: - Better workaround for problem with libpq's connection failure detection 2005-07-18 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Marked inhibit_reactivation() as tested - Restored full test coverage test/test086.cxx: - New - Tests inhibition of connection reactivation 2005-07-18 Jeroen T. Vermeulen config/sample-headers/compiler/VisualC++.NET-2003/config-public-compiler.h: - Removed PQXX_HAVE_CPP_WARNING, thanks Christian Nettesheim include/pqxx/cursor.hxx, src/cursor.cxx: - Removed s_dummy to fix Visual C++ incompatibility (Christian Nettesheim) src/connection_base.cxx: - Workaround for a Visual C++ warning (Christian Nettesheim) tools/makevcmake.pl, tools/maketestvcmak.pl: - More patches by Christian: - Disable incremental builds on tests - Don't delete debug info - Remove unneeded Windows libraries - Added wsock32.lib for test programs 2005-07-17 Jeroen T. Vermeulen src/util.cxx: - Missing parenthesis, thanks hys545@dreamwiz.com 2005-07-13 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, include/pqxx/cursor.hxx, include/pqxx/largeobject.hxx, include/pqxx/result.hxx, include/pqxx/transaction_base.hxx, include/pqxx/transactor.hxx: - Grouped documentation into semantic sections include/pqxx/connection_base.hxx, src/connection_base.cxx: - Factored result::CheckStatus()-related code into new check_result() - Try to deal with libpq "CONNECTION_OK after connection error" problem - Grouped member documentation into semantic sections - Implemented inhibition of connection reactivation include/pqxx/libcompiler.h: - Don't define NOMINMAX if it exists, thanks christian@cnetconsulting.de include/pqxx/util.hxx, src/largeobject.cxx, src/util.cxx: - Moved strerror_wrapper() from largeobject into util - Removed PQXX_LIBEXPORT from some inline function templates - Grouped string conversion documentation test/test000.cxx: - Add warning to compiler.h include, thanks Ron Peterson test/test056.cxx: - Fixed typo in output 2005-07-12 Jeroen T. Vermeulen configitems: - New item PQXX_HAVE_PQSERVERVERSION configure.ac.in: - Check for PQserverVersion() include/pqxx/connection_base.hxx: - Introduced infrastructure for session capabilities - Defined capability for use of "WITH OIDS" on CREATE TABLE src/robusttransaction.cxx: - Use WITH OIDS for transaction log table, if backend supports it - Add UNIQUE constraint on transaction log oid - Detect special case of "legacy" oid-less transaction log table test/test073.cxx: - Fixed typo in output 2005-07-06 Jeroen T. Vermeulen configure.ac.in: - Support strerror_r() even in standard namespace - Clarified that strerror_r() return char * is GNU-specific 2005-07-05 Jeroen T. Vermeulen configure.ac.in: - Replaced AM_CONFIG_HEADER with AC_CONFIG_HEADER, thanks Patrick Welche - Apparently "function" is nonstandard shell syntax (Patrick Welche) tools/preprelease: - Removed more nonstandard "function" syntax 2005-07-01 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx, src/test085.cxx: - Support null parameters in exec_prepared, thanks Morgan Kita - Accept NULL pointers as null args, thanks Joshua Moore-Oliva 2005-07-01 Jeroen T. Vermeulen pqxx-config.in: - Trust pg_config --libdir for libpq options, thanks crweb@vwords.com 2005-06-28 Jeroen T. Vermeulen include/transaction_base.hxx: - Use new utility template scoped_array include/util.hxx: - New utility class template scoped_array src/connection_base.cxx: - Check connection state after retrieving result, thanks Szucs Gabor src/util.cxx: - Use new utility template scoped_array 2005-06-21 Jeroen T. Vermeulen configure.ac.in: - Set LC_ALL=C - Finally worked around Fedora Core 4 grep bug, thanks Graham Hudspith! include/pqxx/compiler.h, include/pqxx/connection.hxx, include/pqxx/connection_base.hxx, include/pqxx/cursor.hxx, include/pqxx/largeobject.hxx, include/pqxx/libcompiler.h, include/pqxx/pipeline.hxx, include/pqxx/result.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/tablereader.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx: - Give private symbols "hidden" ELF visibility where possible 2005-06-20 Jeroen T. Vermeulen configitems: - Added PQXX_HAVE_GCC_VISIBILITY for g++ 4.0's ELF visibility attribute configure.ac.in: - Hide private symbols in shared library with g++ 4.0 - Reordered grep command line in hopes of fixing FC4 problem include/pqxx/compiler.h: - Define PQXX_LIBEXPORT to g++-4.0 "default" visibility attribute 2005-06-17 Jeroen T. Vermeulen include/pqxx/util.hxx: - Missing from_string() error overloads, thanks l.cobai@applicam.com 2005-06-16 Jeroen T. Vermeulen configure.ac.in: - Factored testing for compiler option support into a function - Use g++ 4.0's -fvisibility-inlines-hidden and -fvisibility=hidden - Many more warning options include/pqxx/util.hxx: - Described how to get around overflow checking in string conversion - New functions digit_to_number(), number_to_digit() src/binarystring.cxx, src/tablereader.cxx: - Introduced use of digit_to_number() src/connection_base.cxx, src/cursor.cxx, src/tablewriter.cxx, src/util.cxx: - Moved a few more end()s out of loops (according to gprof it may matter) - Rewrote some frequently executed code - Factored out some decimal-number handling fragments src/tablewriter.cxx: - Introduced use of number_to_digit() 2005-06-14 Jeroen T. Vermeulen README: - Updated PGHOST documentation to reflect FHS tools/preprelease: - Add g++-4.0 to list of default test compilers - Skip unavailable compilers - If no PGHOST set, look for postgres socket in standard places before test 2005-06-10 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Use __declspec(dllimport) under any Windows compiler, thanks Ducky Yazy 2005-06-09 Jeroen T. Vermeulen doc/Makefile.am: - "clean" target didn't erase reference-stamp/tutorial-stamp - Scratch code to remove any pre-existing "html" file (why was that there?) - Create Reference and Tutorial subdirectories if they don't exist 2005-06-08 Jeroen T. Vermeulen configure.ac.in, include/pqxx/connection_base.hxx, include/pqxx/pipeline.hxx, test/test000.cxx, test/test014.cxx: - Work around -Wctor-dtor-privacy bug in Debian's gcc 4.0 2005-06-03 Jeroen T. Vermeulen configure.ac.in: - More, much more work on that stupid grep command line; works again - Fixed progress message for NAN C macro include/pqxx/libcompiler.h: - Replaced "!defined(_LIB)" with "defined(_DLL)", thanks gzh include/pqxx/util.hxx: - Added warning about thread-safety of PQAlloc usage tools/makevcmake.pl: - Removed _USRDLL definition, thanks gzh 2005-05-31 Jeroen T. Vermeulen configure.ac.in: - Skip "outer grep" in generating config files if result is empty - Should fix endless-loop problem in grep with Fedora Core 4 2005-05-20 Jeroen T. Vermeulen src/binarystring.cxx: - Bugfix in workaround for missing PQunescapeBytea() 2005-05-19 Jeroen T. Vermeulen configitems, src/largeobject.cxx: - Prepared for optimization in case seek parameters match C-style values include/pqxx/largeobject.hxx, include/pqxx/result.hxx: - Stream c'tors relied on GNU implementation--thanks German Zhivotnikov! - Removed broken checks in lostreams, thanks again German Zhivotnikov 2005-05-17 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx, src/tablewriter.cxx: - Replaced generate() loop with use of separated_list() - Restructured escaping functions 2005-05-16 Jeroen T. Vermeulen configure.ac.in: - Check for stlp_std (stlport) namespace, let it override std win32/INSTALL.txt: - Greatly simplified MSYS build--thanks Michael J. Pedersen! 2005-05-09 Jeroen T. Vermeulen configitems: - New item PQXX_HAVE_C_NAN for C-language NAN macro configure.ac.in: - Added some escaping to configuration header generation code - Add check for NAN macro config/sample-headers/compiler/MinGW-3.4/config-internal-compiler.h, config/sample-headers/compiler/gcc-3.4/config-internal-compiler.h, config/sample-headers/compiler/gcc-3.3-apple/config-internal-compiler.h: - Added PQXX_HAVE_QUIET_NAN include/pqxx/isolation.hxx: - Removed export directive from enum; confused Doxygen, probably not needed include/pqxx/util.hxx: - Fixed PQAlloc::freemem() specializations, thanks Rupert Kittinger! - Should fix memory leak - Documented fact that libpq headers no longer needed to compile clients src/connection_base.cxx: - Made pqxxNoticeCaller static so maybe it won't get external linkage src/util.cxx, test/test000.cxx: - Use NAN macro if available - No longer use tolower() in NaN string recognition--locale-dependent! - Special-case NaN output 2005-05-05 J.H.M. Dassen (Ray) configure.ac.in: - Check for availability of "dot". doc/Doxyfile.in: - Use HAVE_DOT value determined at configure time. 2005-05-04 Jeroen T. Vermeulen configure.ac.in: - Result for libpq check was inverted; was masked by code typo! - Oid check was also inverted, masked by gcc bug--thanks Kathy 2005-05-02 Jeroen T. Vermeulen win32/INSTALL.txt: - Cleaned up Windows documentation somewhat 2005-04-29 Jeroen T. Vermeulen configure.ac.in: - Made inclusion of sys/select.h in tests conditional on config macro - Made inclusion of unistd.h in tests conditional on config macro - Included rather than in tests - Added include to select()-related tests config/sample-headers/MinGW-3.4: - New, thanks Alankar Karol - Like gcc-3.3, but without sleep() and win32/INSTALL.txt: - No longer mentions config-public-libpq.h, thanks Alankar Karol 2005-04-28 Jeroen T. Vermeulen doc/Makefile.am: - Factored out duplicated conditional re-creation of html directory - Tutorial included in distribution archive again 2005-04-27 Jeroen T. Vermeulen tools/preprelease: - New variable: CONFIGDIST_ARGS (for "./configure" prior to "make dist") - Use maintainer mode for make dist so docs are built, thanks Steve Butler 2005-04-18 Jeroen T. Vermeulen configure.ac.in: - Fixed help string for --disable-thread-safety, thanks Patrick Welche 2005-04-17 Jeroen T. Vermeulen test/test085: - Fixed typo in output. 2005-03-31 Jeroen T. Vermeulen config/sample-headers/VisualC++.NET-2003/config-internal-compiler.h: - Added PQXX_HAVE_QUIET_NAN, thanks Marvin Bellamy! 2005-03-31 Jeroen T. Vermeulen configure.ac.in: - Perform strerror_r() tests in C++, thanks Christopher Barkley include/pqxx/result.hxx: - Added warning about thread safety of results - Added note about lightweight copying of results include/pqxx/tablewriter.hxx, src/dbtransaction.cxx, src/util.cxx: - Made it a little easier for Doxygen to resolve certain functions include/pqxx/transactor.hxx: - Always call the new abort/doubt/commit handlers! 2005-03-30 Jeroen T. Vermeulen src/cursor.cxx: - Work around displacement overflow in backend, thanks Christopher Barkley - Added stridestring() to generate proper SQL string for given offset 2005-03-22 Jeroen T. Vermeulen configure.ac.in: - Fixed Oid type check, thanks Manuel Fernandez Montecelo. 2005-03-19 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx: - Moved prepared statements execution from connection to transaction include/pqxx/result.hxx: - Documented some const_reverse_iterator assignments as tested - Full test coverage on result.hxx include/pqxx/util.hxx, test/test000.cxx: - Test most flexible version of separated_list<>() - Full test coverage on util.hxx test/test085.cxx: - New - Tests prepared statements - Full test coverage on prepared statements 2005-03-17 Jeroen T. Vermeulen src/binarystring.cxx: - Fixed wrong bitshift for octal digit: 6, not 9--thanks thomasae@online.no - Use octal notation for all chars < 0x20 test/test062.cxx: - Don't just compare unsigned char to char--signedness may differ tools/preprelease: - Create lib directory if it doesn't exist yet 2005-03-16 Jeroen T. Vermeulen test/test062.cxx: - Added non-ASCII bytes to test case, thanks thomasae@online.no 2005-03-11 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Moved NOMINMAX even further towards the top 2005-03-10 Jeroen T. Vermeulen configitems: - Added PQXX_HAVE_STRERROR_R - Added PQXX_STRERROR_R_INT configure.ac.in: - New option: --enable-thread-safety (enabled by default) - Check for strerror_r and its signature include/pqxx/largeobject.hxx: - Reason() functions take errno (as it was at time of failure) as argument src/largeobject.cxx: - Replaced calls to strerror() with strerror_r() where possible - Fixed possible polluted errno in error strings - Throw bad_alloc instead of runtime_error where appropriate src/util.cxx: - sleep_seconds() no longer uses non-threadsafe strerror() - sleep_seconds() for sleep()-less systems no longer fails on EINTR 2005-03-06 Jeroen T. Vermeulen configure.ac.in: - Try multiple alternatives for "std" - Cope with C library in std namespace - Added -Wno-div-by-zero to avoid warnings about compile-time NaNs include/pqxx/pipeline.hxx, src/pipeline.cxx: - At last! Use spruced-up separated_list to concatenate queries include/pqxx/util.hxx: - Generalize dereference operator in pqxx::internal::separated_list<>() tools/preprelease: - Set only CXX to current compiler; leave CC as it is - Don't run configure from autogen.sh 2005-03-05 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/compiler.h, src/connection_base.cxx, src/util.cxx: - Workarounds for g++ 2.95 - New config items PQXX_HAVE_NAN and PQXX_HAVE_QUIET_NAN test/test000.cxx: - Workaround for missing std::numeric_limits<>::quiet_NaN in g++ 2.95 tools/preprelease - Disable maintainer mode again. Can't do NaNs in g++ 2.95 without warnings. 2005-03-05 Jeroen T. Vermeulen configure.ac.in: - Expanded explanations of the most critical, error-prone checks - Added some intermediate steps to libpq checks to help pinpoint any problems - Removed redundant help string for --enable-maintainer-mode - Check for expected Oid type - Check for g++/glibc problem with FD_SET, -Werror, and -Wold-style-cast include/pqxx/connection_base.hxx, include/pqxx/connection.hxx, include/pqxx/result.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/connection.cxx, src/largeobject.cxx, src/pipeline.cxx, src/result.cxx, src/util.cxx: - No longer include libpq headers in libpqxx headers - Include libpq headers only from a few source files, as needed - No longer need pqxx::internal::pq in most source files include/pqxx/libpq-forward.hxx: - New - Forward declarations of all libpq types needed in libpqxx headers include/pqxx/result.hxx, src/result.cxx: - Made result::empty() nothrow - result::affected_rows() checks for null pointer README: - Removed wordy brag section from introduction - Made things a bit more lively - Updated error message for missing pg_config - More help on things that may go wrong - Expanded example - Removed shell-specific syntax from "make check" explanation src/connection_base.cxx: - Erase trigger before doing UNLISTENing it. Thanks Dragan Milenkovic! - Getter functions only activate connection if there's no PGconn yet tools/preprelease: - Test with multiple compilers (by default: g++-2.95, g++, g++-3.4) - Test in maintainer mode by default - Test building of shared library by default 2005-02-28 Jeroen T. Vermeulen tools/preprelease: - Respect CONCURRENCY_LEVEL in compiling regression test 2005-02-27 Jeroen T. Vermeulen src/util.cxx: - Convert NaN string to float type, thanks edmund@greenius.ltd.uk test/test000.cxx: - Test NaN conversion 2005-02-23 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Use pipeline for setting up or restoring triggers and variables - Renamed Connect() to activate(); they were really the same thing src/pipeline.cxx: - Added description to dummy string for error reporting, just in case 2005-02-20 Jeroen T. Vermeulen *: - Removed trailing whitespace include/pqxx/connection_base.hxx: - Made Sun compiler workaround for perform() the general case 2005-02-16 Jeroen T. Vermeulen configure.ac.in: - Added some braces to variable expansions, just to be sure 2005-02-16 Jeroen T. Vermeulen configitems, config/sample-headers/libpq/7.4/config-internal-libpq.h, config/sample-headers/libpq/8.0/config-public-libpq.h, include/pqxx/Makefile.am, include/pqxx/util.hxx, test/test002.cxx: - Made PQXX_HAVE_PQFTABLE an internal config item - Removed config-public-libpq.h - Trying to use unavailable PQftable() now gives link error 2005-02-15 Jeroen T. Vermeulen test/test058.cxx: - Work around another Visual C++ bug, thanks Christian Nettesheim 2005-02-12 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Replaced problematic halfconnect() by full activate() - Included missing pqxx/libcompiler.h - Introduced nonnoticer, disable_noticer include/pqxx/connection.hxx, include/pqxx/dbtransaction.hxx, include/pqxx/except.hxx, include/pqxx/isolation.hxx, include/pqxx/nontransaction.hxx, include/pqxx/result.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/tablereader.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx, include/pqxx/transaction.hxx, include/pqxx/transactor.hxx, include/pqxx/trigger.hxx: - Included missing pqxx/libcompiler.h (just in case) include/pqxx/libcompiler.h: - New Visual C++ workaround macro PQXX_QUIET_DESTRUCTORS include/pqxx/robusttransaction.hxx, include/pqxx/transaction.hxx, include/pqxx/trigger.hxx, src/connection_base.cxx, src/largeobject.cxx, src/pipeline.cxx, src/tablereader.cxx, src/tablewriter.cxx, src/transaction_base.cxx: - Silence message noticer during destructors in Visual C++ 2005-02-11 Jeroen T. Vermeulen configure.ac.in: - Fixed Debian autobuild, thanks Roger Leigh include/pqxx/compiler.h: - Moved PQXX_LIBEXPORT definition up a little, just to be sure include/pqxx/util.hxx: - Added PQXX_LIBEXPORT to non-inline symbols, thanks Christian Nettesheim! src/dbtransaction.cxx: - Included missing pqxx/compiler.h 2005-02-07 Jeroen T. Vermeulen config/sample-headers/compiler/SunStudio-8/config-internal-compiler.h, config/sample-headers/compiler/SunStudio-8/config-public-compiler.h: - Added, thanks Mark Round include/pqxx/transactor.hxx: - Fixed incorrect comment, thanks Joshua Moore-Oliva src/pipeline.cxx: - Worked around last SunC++ problem, thanks Mark Round - Removed unneeded header 2005-02-04 Jeroen T. Vermeulen autogen.sh: - Fixed typo in automake check - Used "which" so $PATH is respected (thanks Pawel Niewiadomski) include/pqxx/cachedresult.h, include/pqxx/cursor.h: - error_permitted_isolation_level() is no longer a template - no longer needs incorrect workarounds for Visual C++ and old Sun compilers include/pqxx/compiler.h, include/pqxx/libcompiler.h: - Moved Visual C++ NOMINMAX fix to libcompiler.h - Retired workarounds for problematic error_permitted_isolation_level() 2005-02-03 Jeroen T. Vermeulen pqxx-config.in: - Fixed painful typo in help output, thanks Tommi Maekitalo 2005-02-02 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Fixed broken workaround for SunC++ problem, thanks again Mark Round src/pipeline.cxx: - Added missing include - Should fix that last remaining SunC++ error 2005-02-01 Jeroen T. Vermeulen include/pqxx/compiler.h: - Check if evil min() and max() aren't defined already, thanks Bart Samwel! src/pipeline.cxx: - More fixes for SunC++ - One error with SunC++ remains (std::distance() won't work) 2005-01-31 Jeroen T. Vermeulen src/cachedresult.cxx, src/cursor.cxx: - Fixes for SunC++, thanks Mark Round 2005-01-28 Jeroen T. Vermeulen include/pqxx/compiler.h: - Finally defined NOMINMAX, thanks Trevor Morgan! - Should solve large object test failures on Windows 2005-01-25 Jeroen T. Vermeulen configure.ac.in: - Workaround for BSD grep which doesn't support "-f -" 2005-01-20 Jeroen T. Vermeulen include/pqxx/cursor.h: - Fixed typo in Sun compiler workaround, thanks Mark Round 2004-12-23 Jeroen T. Vermeulen include/pqxx/util.hxx: - Apply PQXX_LIBEXPORT to sleep_seconds(), thanks Chris Piker 2004-12-22 Jeroen T. Vermeulen test/test000.cxx: - Added min()/max() workaround, thanks Chris Piker 2004-11-23 Jeroen T. Vermeulen include/pqxx/dbtransaction.hxx, src/dbtransaction.cxx: - Added out-of-line destructor so Visual C++ knows where to put vtable 2004-11-17 Jeroen T. Vermeulen tools/maketestvcmak.pl: - Removed some unneeded (presumably) libraries 2004-11-15 Jeroen T. Vermeulen include/pqxx/cursor.hxx, include/pqxx.pipeline.hxx: - Made inclusion of conditional on PQXX_HAVE_LIMITS - Fall back on INT_MAX/INT_MIN workaround if no available include/pqxx/result.hxx: - Remove assignment, comparison between reverse and regular iterators - Fixes problems with g++ 2.95 src/util.cxx: - Include if available - Make uses of locale conditional on PQXX_HAVE_LOCALE test/test058.cxx: - Removed unused largeobject variable 2004-11-13 Jeroen T. Vermeulen config/sample-headers/compiler/VisualC++.NET-2003/config-internal.compiler.h, config/sample-headers/libpq/7.4/config-internal-libpq.h, config/sample-headers/libpq/7.4/config-public-libpq.h: - Fixed PQXX_SELECT_ACCEPTS_NULL - Disabled PQXX_HAVE_SLEEP - Enabled PQXX_HAVE_PQEXECPREPARED - Thanks Patrick Kimber include/pqx/connection.hxx: - Call PQconnectdb() inside PQXXPQ namespace, thanks Patrick Kimber include/pqxx/result.hxx: - Workarounds for Visual C++.NET 2003, thanks Patrick Kimber win32/common: - Enabled STD definition, thanks Patrick Kimber 2004-11-11 Jeroen T. Vermeulen include/pqxx/transactor.hxx: - Renamed OnCommit/OnAbort/OnDoubt to on_commit/on_abort/on_doubt - Anonymized unused (but significant) OnAbort() parameter to silence warning src/transaction_base.cxx: - Check for broken connection before going into commit attempt 2004-11-09 Jeroen T. Vermeulen - doc/Makefile.am: - Filter progress messages out of doxygen output - include/pqxx/*.hxx: - Retouched Doxygen documentation - Removed unneeded includes - include/pqxx/dbtransaction.hxx: - Removed startcommand() and StartCmd() - Un-inlined code - include/pqxx/util.hxx, src/pipeline.cxx, src/cursor.cxx: - Removed assert code - src/dbtransaction.cxx: - New - src/Makefile.am: - Added dbtransaction.cxx 2004-11-08 Jeroen T. Vermeulen config/sample-headers/compiler/*/*, configitems: - Add PQXX_HAVE_LONG_DOUBLE configure.ac.in: - Check for "long double" support (it's a standard type, but...) - Add -Wno-long-double in maintainer mode, if available include/pqxx/util.hxx, src/util.cxx, test/test046.cxx, test/test074.cxx: - Made references to "long double" conditional on compiler support 2004-11-07 Jeroen T. Vermeulen config/sample-headers/VisualC++.NET-2003/config-internal-compiler.h, config/sample-headers/VisualC++.NET-2003/config-internal-compiler.h: - New. Thanks Patrick Kimber! include/pqxx/connection.hxx: - Added missing "inline" for Windows case. Thanks Michael J. Pedersen README, win32/INSTALL.txt: - Documented sample-headers - Documented object-file-style linking (as opposed to -lpqxx argument) 2004-11-04 Jeroen T. Vermeulen configure.ac.in: - Check for PG_DIAG_STATEMENT_POSITION as well as PQresultErrorField() - Add include for select() check; needed for OS X w/gcc-3.3 2004-11-03 Jeroen T. Vermeulen config/sample-headers: - New - For distributing sample configuration headers configure.ac.in: - Replace autoconf's function checks with -Werror-proof code include/pqxx/cursor.hxx, src/cursor.cxx: - Took out a lot of inlining - Added />= operators to icursor_iterator - Full test coverage include/pqxx/Makefile.am: - Reinstated compiler.h as a distributed (but not installed) file - Reinstated config-internal-autotools.h as distributed (but not installed) include/pqxx/result.hxx, src/result.hxx: - Took out a lot of inlining test/test081.cxx: - Test stride() test/test084.cxx: - Licked icursor_iterator problems (most bugs were in test program :) - Test />= operators tools/preprelease: - Fixed symbols listing; used to cut off function before second argument 2004-11-01 Jeroen T. Vermeulen include/pqxx/util.hxx, src/util.cxx: - Lots more work on icursor_iterator but still not quite right test/test084.cxx: - Removed some illegal tricks 2004-10-31 Jeroen T. Vermeulen src/util.cxx: - Set stringstream in to_string fallback code to C locale 2004-10-31 Roger Leigh debian/control.in: - postgresql-dev depends on pkg-config debian/rules: - Remove all examples that include internal headers 2004-10-30 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx: - Warning: icursor_iterator constructors may now throw execptions - Made icursorstream keep track of its iterators - icursor_iterators no longer read data unless really needed - Made icursorstream/icursor_iterator "lazy," skipping over unread data - Fixed icursor_iterator equality comparison - Allow for generic icursor_iterator comparison, not just for end-of-stream - icursor_iterators should no longer get confused when mixing operations 2004-10-28 Jeroen T. Vermeulen include/pqxx/connection.hxx: - Nothrow specs on destructors (Windows only). Thanks reina_ga@hotmail include/pqxx/result.hxx, test/test075.cxx, test/test082.cxx: - Full test coverage include/pqxx/cursor.hxx: - icursor_iterator::operator+= now thinks in strides, like operator++ etc. - Fixed icursor_iterator comparison operators - Fixed icursor_iterator freshness bookkeeping - Removed m_pos from icursor_iterator - Made icursor_iterator constructor taking istream_type explicit - Added adopted-cursor feature - Documented use with nontransactions and WITH HOLD - No longer marked experimental - Full test coverage src/util.cxx: - Missing include, thanks Stephan Schuetz test/test000.cxx: - Test signedness of cursor_base's prior() and backward_all() test/test084.cxx: - New - Test adopted cursor - Test icursor_iterator tools/makevcmak.pl: - Fixed typo, thanks Stephan Schuetz 2004-10-26 Jeroen T. Vermeulen src/binarystring.cxx: - Fixed swap(): forgot to call superclass swap() 2004-10-25 Jeroen T. Vermeulen include/pqxx/result.hxx: - Use home-grown reverse_iterators - Fixes "returning reference-to-temporary" problem in operator*() src/result.cxx: - Working on field comparison. Nulls are not trivial! test/test082.cxx - No longer requires PQXX_HAVE_REVERSE_ITERATOR - Verifies reverse_iterator traversal with regular traversal 2004-10-21 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, src/binarystring.cxx, test/test062.cxx: - Full test coverage - Comparison operators ==, != include/pqxx/result.hxx, src/result.cxx, test/test002.cxx, test/test007.cxx: - Removed tentative <, <=, >, >= operators - Full test coverage - Use new reference counting from internal::PQAlloc include/pqxx/util.hxx: - PQAlloc now reference-counted (doubly-linked smart pointers, actually) - Specialized free function for PGresult 2004-10-16 Jeroen T. Vermeulen configure.ac.in: - Fixed "cut" problem. Again include/pqxx/binarystring.hxx, include/pqxx/result.hxx: - Gave begin(), end(), size() and capacity() empty throw specifications - Defined const_reference - Implemented front(), back(), and swap() 2004-10-15 Jeroen T. Vermeulen include/pqxx/Makefile.am: - Don't install compiler.h--thanks Roger Leigh 2004-10-14 Jeroen T. Vermeulen configitems, configure.ac.in, include/pqxx/binarystring.hxx, include/pqxx/libcompiler.h: - Removed ptrdiff_t check and workaround - Replaced use of ptrdiff_t with long - Fixes problem with autoconf ptrdiff_t check - Compile with -Werror in maintainer mode doc/libpqxx.xml: - Replaced "transaction<>" introduction with "work" - Hinted at field iteration - unique is internal now - Test programs are numbered from zero now - Fixed split infinitives - Re-justified some text to 80 columns include/pqxx/cachedresult.h, include/pqxx/cursor.h, include/pqxx/cursor.hxx, include/pqxx/result.hxx, src/cachedresult.cxx, src/cursor.cxx, include/pqxx/tablewriter.hxx: - Empty throw specifications for iterator constructors and assignments include/pqxx/pqxx: - Added "pqxx/cursor" - Fixed filename description (still called itself "pqxx/all") include/pqxx/result.hxx, include/cachedresult.hxx, include/cursor.h, include/cursor.hxx, src/oldcursor.cxx, src/result.cxx: - Turned size_type into unsigned types - Introduced difference_type where necessary - Added int versions of at() and operator[] etc. to avoid ambiguity for 0 - Empty throw specifications for iterator constructors and assignments include/pqxx/util.h: - Only warn once about deprecated headers src/cachedresult.cxx, src/oldcursor.cxx, test/test003.cxx: - Silence warning about deprecated headers src/result.cxx: - Fixed broken check for PQresultErrorField() src/util.cxx: - Included test/test019.cxx, test022.cxx, test/test038.cxx, test/test040.cxx, test/test041.cxx, test/test042.cxx, test/test043.cxx, test/test045.cxx, test/test049.cxx: - Fixed signed/unsigned comparisons etc. caused by new unsigned size_type - Changed size_type to difference_type where needed - Some casts around formerly mismatched comparisons now unnecessary 2004-10-13 Jeroen T. Vermeulen include/pqxx/result.hxx, test/test082.cxx: - Full test coverage for field iterators - Lifted iterator classes' num() functions into tuple / field include/pqxx/tablewriter.hxx: - Full test coverage for tablewriter back_insert_iterator include/pqxx/util.hxx, test/test000.cxx: - Full test coverage for items<> test/test083.cxx: - New - Tests tablewriter back_insert_iterator 2004-10-12 Jeroen T. Vermeulen include/pqxxx/result.hxx: - Replaced private inheritance of field from tuple by membership - Yet Another Field Conversion Function: result::field::operator>> test/test007.cxx: - Test result::field::operator>> test/test082.cxx: - New - Test field iterators 2004-09-28 Roger Leigh include/pqxx/Makefile.am: - Don't install generated private config-*.h headers. 2004-09-18 Jeroen T. Vermeulen configitems, configure.ac.in: - Added PQXX_HAVE_SLEEP for POSIX sleep() (internal/compiler) include/pqxx/util.hxx, src/util.cxx, test/test004.cxx, test/test023.cxx: - New sleep_seconds() to hide POSIX sleep() / Windows Sleep() / select() include/pqxx/robusttransaction.hxx, src/robusttransaction.cxx: - Add m_backendpid field - Wait until old backend dies, or query is finished (thanks Tom Lane) 2004-09-02 Roger Leigh configure.ac.in: - Put the configitems in an AC_CONFIG_COMMANDS macro, so that they are generated by config.status - Source configitems from ${srcdir}, so that VPATH builds with separate source and build trees work tools/Makefile.am: - Distribute makemingwmak.pl and makevcmake.pl debian: - Add chrpath to build dependencies to strip rpath from binaries - Depend on at least version 7.4.2-1 of postgresql for binary compatibility reasons. - Don't package tests which make use of internal headers as examples. 2004-08-22 Jeroen T. Vermeulen configure.ac.in: - Moved "cut" field option before filename, thanks Ralf Engelschall 2004-08-21 Jeroen T. Vermeulen include/pqxx/connection.hxx, include/pqxx/connection_base.hxx, src/connection.cxx, src/connection_base.cxx: - Delegated overridables to nonvirtuals to avoid calls from ctors/dtors - Inlined lots of trivial or near-trivial functions - Made connection_base::Connection() private - completeconnect() doesn't need to check for success - connection_base::halfconnect() didn't always SetupState() - Moved dropconnect() out of close() because it's called from destructor include/pqxx/cursor.hxx, test/test081.cxx: - Increased test coverage include/pqxx/transaction_base.hxx, test/test009.cxx: - Test coverage for stringstream version of exec() include/pqxx/util.hxx, test/test080.cxx: - Warning for items<> interface not being stable yet - Increased test coverage for items<> src/cursor.cxx: - Removed "NO SCROLL," which older backends don't support 2004-08-17 Jeroen T. Vermeulen README: - Minor updates to appendices win32/INSTALL.txt: - MinGW documentation. Thanks Michael J. Pedersen! 2004-08-16 Jeroen T. Vermeulen autogen.sh: - Generates MinGW Makefile src/connection_base.cxx: - activate() also when don't have PQexecPrepared() tools/Makefile.am: - Removed pqxxbench tools/makemingwmak.pl: - New - Generates win32/MinGW.mak tools/pqxxbench.cxx, tools/pqxxbench.in: - Deleted 2004-08-13 Jeroen T. Vermeulen src/result.cxx: - Workaround for missing PQresultErrorField(), thanks webmaster@tsukaeru.net 2004-08-12 Jeroen T. Vermeulen configitems: - Added PQXX_PQ_IN_NAMESPACE (under "compiler" for now) configure.ac.in: - Added several warning options include/pqxx/connection.hxx, src/connection.cxx: - New nullconnection class for testing include/pqxx/connection_base.hxx, src/connection_base.cxx: - Updated activate()/deactivate() documentation to lower-case API - Made Status() throw () - Made ErrMsg() throw () - Qualified libpq functions with PQXXPQ:: include/pqxx/result.hxx, src/result.cxx: - Removed initialize()'s empty throw specification - Qualified libpq functions with PQXXPQ:: include/pqxx/robusttransaction.hxx, include/pqxx/transaction.hxx: - Separate single-arg and "named" constructors instead of default arg include/pqxx/util.hxx, src/util.cxx: - Removed namedclass::description()'s empty throw specification - Separate namespace for libpq is optional src/connection_base.cxx: - Forgot to read result after removing trigger - No longer list open triggers when closing connection - Extra checks for connection being open src/pipeline.cxx: - Qualified libpq functions with PQXXPQ:: test/test000.cxx: - Add nullconnection checks test/test005.cxx, test/test013.cxx, test/test018.cxx, test/test032.cxx, test/test037.cxx, test/test040.cxx, test/test041.cxx, test/test056.cxx, test/test070.cxx, test/test072.cxx, test/test073.cxx: - Send "expected" messages to cout instead of cerr 2004-08-10 Jeroen T. Vermeulen autogen.sh: - Check for PQexecPrepared() configitems: - Added PQXX_HAVE_PQEXECPREPARED src/connection_base.cxx: - Workaround for missing PQexecPrepared() 2004-08-09 Jeroen T. Vermeulen autogen.sh: - Made automake version checks a loop - Check for automake-1.9 2004-08-08 Jeroen T. Vermeulen README: - Documented Debian package and Arjen Baart's RPM packages - Rewrote config stuff, referring to win32/INSTALL.txt win32/INSTALL.txt: - Took configuration header details out of the step-by-step list for brevity - Removed documentation about Visual C++ makefile being out of date - Documented new configuration system 2004-08-06 Jeroen T. Vermeulen autogen.sh: - Reinstated autoheader configitems: - New - Lists configuration items and where they should go configure.ac.in: - Generate only include/pqxx/config.h with automake - Generate partitioned config headers based on configitems include/pqxx/config-internal-autotools.h, include/pqxx/config-internal-compiler.h, include/pqxx/config-internal-libpq.h, include/pqxx/config-public-compiler.h, include/pqxx/config-public-libpq.h, include/pqxx/config.h, include/pqxx/config.h.in: - New - Automatically generated by configure script - Partition configuration items by public/private, and determining factor include/pqxx/Makefile.am: - Added config.h - Added new partitioned config headers include/pqxx/compiler.h, include/pqxx/libcompiler.h, include/pqxx/util.hxx, test/test049.cxx: - Use partitioned config headers include/pqxx/internalconfig.h, include/pqxx/libconfig.h: - Removed Makefile.am: - Added configitems to distribution 2004-08-05 Jeroen T. Vermeulen configure.ac.in: - Removed InvalidOid check - Removed check include/pqxx/connection_base.hxx, src/connection_base.cxx: - Moved libpq into pqxx::internal::pq namespace - Removed unused status code argument to MakeEmpty() include/pqxx/largeobject.hxx, include/pqxx/transaction_base.hxx, include/pqxx/util.hxx, src/binarystring.cxx, src/largeobject.cxx, src/pipeline.cxx, src/result.cxx, src/util.cxx: - Moved libpq into pqxx::internal::pq namespace include/pqxx/result.hxx: - Replaced InvalidOid with oid_none - Moved libpq into pqxx::internal::pq namespace tools/rmlo.cxx: - Replaced Oid with oid 2004-08-01 Jeroen T. Vermeulen tools/makevcmake.pl: - New - Generates win32/libpqxx.mak tools/autogen.sh: - Call makevcmake.pl win32/libpqxx.cxx: - Removed unused crud (basically everything) generated by VC++ win32/libpqxx.mak: - Automatically generated 2004-07-31 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Disabled (inaccurately worded) Visual C++ warning "this" use in result.hxx win32/INSTALL.txt: - Lots new documentation - Changed config.h to internalconfig.h win32/libpqxx.mak: - Added oldcursor.obj. Thanks Alexandre Hanft. 2004-07-23 Jeroen T. Vermeulen include/pqxx/cursor.hxx: - Corrected icursor_iterator copy comparison (required for input_iterator) - Updated documentation include/pqxx/tablewriter.hxx: - Added copy assignment operator to disambiguate templated version - Marked iterator functions not explicitly tested 2004-07-06 Jeroen T. Vermeulen src/binarystring.cxx, src/connection_base.cxx: - Better error reporting for some hard-to-tell cases 2004-07-05 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/connection.hxx: - References to README for connection string documentation README: - Minor changes to connection string documentation 2004-07-01 Jeroen T. Vermeulen include/pqxx/pipeline.hxx, src/pipeline.cxx: - Removed debug code inserted while debugging new version src/util.cxx: - from_string() didn't accept LONG_MIN, thanks Yannick Boivin! - Removed assertions test/test000.cxx: - Added test cases for largest and smallest long values 2004-06-27 Jeroen T. Vermeulen src/nontransaction.cxx, src/robusttransaction.cxx: - Removed unsafe query retries 2004-06-21 Jeroen T. Vermeulen include/pqxx/pipeline.hxx, src/pipeline.cxx: - Made m_issuedrange a pair of iterators - Many related changes 2004-06-20 Jeroen T. Vermeulen src/pipeline.cxx: - Removed disaster-handling code for exceptions in result constructor 2004-06-20 Jeroen T. Vermeulen include/pqxx/result.hxx, src/result.cxx: - Changed garbage collection mechanism to double circular linked lists - Wrapping a PGresult * in a result object is now exception-free! - No more heap allocations when constructing 2004-06-19 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx: - Wrap PQconsumeInput() and PQisBusy() include/pqxx/cursor.hxx: - Replaced _WIN32 conditionals with more appropriate _MSC_VER include/pqxx/pipeline.hxx, src/pipeline.cxx: - Excruciating 26-hour complete rewrite! - Much better exception safety - New pipeline stays registered throughout its lifetime, for now - No longer supports is_running() - retain() sets maximum number of queries to retain before trying to issue test/test071.cxx: - New retain() calls - No longer looks at is_running() 2004-06-17 Jeroen T. Vermeulen include/pqxx/util.hxx: - Declared from_string() for char an ambiguous conversion (thanks Lee Sam) 2004-06-17 Jeroen T. Vermeulen configure.ac.in: - Added -funit-at-a-time for g++ 3.4 doc/libpqxx.html: - Replaced Exec() with exec() - Replaced Perform() with perform() - Replaced Commit() with commit() - Replaced Quote() with sqlesc() - Replaced Cursor with icursorstream - Replaced ToString()/FromString() with resp. to_string()/from_string() - Removed FmtString() - Introduced sql_error - Expanded namespace explanation a little include/pqxx/connection_base.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx, src/connection_base.cxx, src/tablewriter.cxx, src/transaction_base.cxx: - Removed async buffering code from tablewriter, thanks Rico Schiekel include/pqxx/cursor.hxx: - Documentation - Added test tags to function declarations - Added += operator to iterator 2004-06-15 Jeroen T. Vermeulen include/pqxx/cursor.hxx, src/cursor.cxx: - Rewrote forward-only cursor as a stream - Iterator interface for forward-only cursor through an "istream_iterator" README: - LD_LIBRARY_PATH should be valid on all Unix-like systems test/test081.cxx: - New 2004-06-07 Jeroen T. Vermeulen include/pxx/cursor, include/pqxx/cursor.hxx: - New - Early work on new iterator/container-style cursor interface include/pqxx/cursor.h: - Renamed guard macro to PQXX_OLD_CURSOR_H include/pqxx/Makefile.am: - Added new cursor, cursor.hxx src/cursor.cxx: - Now contains new-style cursor code src/oldcursor.cxx: - New - Holds obsolete Cursor code 2004-06-06 Jeroen T. Vermeulen include/pqxx/util.hxx, test/test000.cxx: - string conversions for std::stringstream test/test005.cxx, test/test006.cxx: - Added rows ending in empty-string fields, thanks slava@perlx.com 2004-06-03 Jeroen T. Vermeulen include/pqxx/transaction_base.hxx: - Removed erroneous "throw ()" for EndCopyWrite(), thanks Simon Elbaz - Experimental version of exec() taking a stringstream src/connection_base.cxx: - Trimmed some fat, possible bug out of EndCopyWrite() src/result.cxx: - Accepts null query string src/tablestream.cxx: - Made base_close() idempotent, or at least more obviously so 2004-05-23 Jeroen T. Vermeulen configure.ac.in, include/pqxx/result.hxx, src/util.cxx: - Workarounds for the infamous non-release "gcc 2.96", thanks Arjen Baart libpqxx.spec.in: - Added --enable-shared (Arjen Baart) 2004-05-20 Jeroen T. Vermeulen src/connection_base.cxx: - Strip newlines off COPY TO STDOUT lines in old-libpq code src/tablereader.cxx: - Fix parse error when line ends in empty field. Thanks slava@perlx.com! 2004-05-19 Jeroen T. Vermeulen include/pqxx/pipeline.hxx, src/pipeline.cxx: - Made prepended "SELECT 0" query explicit to pave way for partial retrieval - Syntax error reporting tries to narrow down problematic query include/pqxx/tablestream.hxx: - Made columnlist() use new separated_list() include/pqxx/util.hxx: - New class template items<> to make container initialization easy - separated_list() generates comma/semicolon/...-separated lists src/transaction_base.cxx: - No longer go async in BeginCopyWrite() test/test008.cxx, test/test010.cxx: - Use separated_list() instead of output loop test/test010.cxx, test/test080.cxx: - Use items<> instead of hand-filling containers 2004-05-17 Jeroen T. Vermeulen include/pqxx/result.hxx, src/result.cxx: - Added errorposition() README: - Added KPoGre to list of libpqxx-based projects 2004-05-13 Jeroen T. Vermeulen include/pqxx/all.h: - Added transactionitf.h, thanks Bart Samwel - Which doesn't mean that these files aren't still deprecated, of course... 2004-05-11 Jeroen T. Vermeulen include/pqxx/tablewriter.hxx: - Complete test coverage include/pqxx/util.hxx, src/robusttransaction.cxx, src/util.cxx, test/test018.cxx, test/test045.cxx: - Added sqlesc() functions - Deprecated Quote() functions src/connection_base.cxx: - Removed unnecessary PGSTD:: scope qualifiers - Added some missing quotes in LISTEN/UNLISTEN statements src/connection.cxx, src/largeobject.cxx: - Removed unnecessary PGSTD:: scope qualifiers src/util.cxx: - When escaping, check for isprint rather than isgraph - Escape single quote to double single quote, as per SQL test/test000.cxx: - New - Should succeed even if there is no database to connect to test/test009.cxx: - Renamed test table to have standard "pqxx" prefix - Test tablewriter's column specifiers test/test004.cxx, test/test078.cxx: - Properly quoted trigger names 2004-05-10 Jeroen T. Vermeulen configure.ac.in: - Should generate libpqxx.spec now, thanks Arjen Baart 2004-05-08 Jeroen T. Vermeulen tools/preprelease: - Fixed nm line (tried to list dynamic symbols in static library!) 2004-05-06 Jeroen T. Vermeulen configure.ac.in: - Added gcc 3.4's -Wextra, which replaces -W 2004-05-04 Jeroen T. Vermeulen src/transaction_base.cxx: - Fixed syntax error in COPY column specifications test/test080: - Can't compare a const_reverse_iterator to rend() if container non-const :( - Works now! 2004-05-01 Jeroen T. Vermeulen include/pqxx/largeobject.hxx: - g++-3.4.0 fixes (for any compiler, really). Thanks Michael Krelin! include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx, src/transaction_base.cxx: - Column list specification support for tablestreams test/test068.cxx: - Corrected typo in comment test/test080.cxx: - New - Tests column list specifications for tablereader 2004-04-27 Jeroen T. Vermeulen src/connection_base.cxx: - Accept double-quoted trigger names, thanks slava@perlx.com test/test078.cxx: - Test with unusual trigger name, as intended 2004-04-27 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Notification-related functions return number of notifications received - New await_notification() functions sleep until notification arrives test/test004.cxx, test/test023.cxx: - Check get_notifs() return value test/test078.cxx: - New - Tests await_notification() test/test079.cxx: - New - Tests await_notification(long,long) 2004-04-16 Jeroen T. Vermeulen test/test004.cxx: - Added #include , just in case 2004-04-15 Jeroen T. Vermeulen include/pqxx/trigger.hxx: - Added missing include, thanks slava@perlx.com 2004-04-14 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Enable standard I/O streams library on Compaq C++ compiler include/pqxx/result.hxx: - Include ios. Thanks Fahad Gilani. 2004-04-13 Jeroen T. Vermeulen configure.ac.in, include/pqxx/Makefile.am: - Renamed config.h.in to internalconfig.h.in include/pqxx/compiler.h: - Renamed config.h to internalconfig.h to avoid confusion include/pqxx/config.h.in: - Deleted include/pqxx/internalconfig.h.in: - New include/pqxx/libconfig.h.in: - Removed some macros not used in library headers test/test045.cxx: - Quelled compiler warning test/test049.cxx: - Include internalconfig.h instead of libconfig.h 2004-04-05 Roger Leigh tools/Makefile.am: - Add $(top_builddir)/include to INCLUDES. 2004-04-03 Jeroen T. Vermeulen include/pqxx/connection.hxx, include/pqxx/connection_base.hxx: - Made dropconnect() throw () 2004-03-22 Jeroen T. Vermeulen src/util.cxx: - Added missing include , thanks darx@darxi.purk.ee 2004-03-20 Jeroen T. Vermeulen include/pqxx/result.hxx: - Replaced field_streambuf::underflow() - May fix problems with various compilers when reading strings from fields 2004-03-21 Roger Leigh test/Makefile.am, tools/maketestam.pl - Correct includes and libs search paths. - VPATH builds now work. tools/Makefile.am - Don't try to install pqxxbench and rmlo. 2004-03-18 Jeroen T. Vermeulen include/pqxx/libconfig.h.in, include/pqxx/util.hxx, src/util.cxx: - Moved PQfreemem() and PQfreeNotify() calls out of header - Moved PQXX_HAVE_PQFREEMEM and PQXX_HAVE_PQFREENOTIFY out of header - Moved PQXX_HAVE_PQFREE* out of libconfig.h include/pqxx/result.hxx: - to_string() and from_string() templates for result::field include/pqxx/util.hxx, test/test*.cxx: - Test coverage for from_string() functions - Test coverage for to_string() functions test/test076.cxx: - New - Completes test coverage for from_string() and to_string() test/test077.cxx: - New - Tests result::swap() 2004-03-14 Jeroen T. Vermeulen include/pqxx/pipeline.hxx: - Included compiler.h instead of libcompiler.h, thanks Markus Bertheau 2004-03-12 Jeroen T. Vermeulen include/pqxx/pqxx: - Included pqxx/result (though not really needed) include/pqxx/result.hxx, src/result.cxx: - Added swap() README: - Documented link command line for Unix-style compilers - Documented difference between "foo" and "foo.hxx" headers 2004-03-07 Jeroen T. Vermeulen include/pqxx/largeobject.hxx, include/pqxx/result.hxx, include/pqxx/tablewriter.hxx, src/binarystring.cxx, src/connection_base.cxx, src/cursor.cxx, src/largeobject.cxx, src/pipeline.cxx, src/result.cxx, src/robusttransaction.cxx, test/test*.cxx: - Replaced ToString() calls with to_string() (and same for FromString etc) 2004-03-06 Jeroen T. Vermeulen include/pqxx/util.hxx, src/util.cxx: - Implemented to_string() functions to replace ToString() tools/Makefile.am - rmlo and pqxxbench still built, but not installed; thanks Markus Bertheau 2004-03-04 Jeroen T. Vermeulen include/pqxx/cachedresult.h, include/pqxx/cursor.h: - Added "@deprecated" doxygen tag to classes include/pqxx/result.hxx, include/pqxx/util.hxx, src/util.cxx: - New template from_string<>() (stricter, faster, no locale problem) - Deprecated FromString<>() 2004-02-28 Jeroen T. Vermeulen README, win32/INSTALL.txt: - Documented the need to edit win32/common tools/rmlo.cxx: - Ported to 2.x API (thanks GB Clark) 2004-02-26 Jeroen T. Vermeulen autogen.sh, configure.ac.in: - Fixes for using config/m4 directory (Patrick Welche) 2004-02-25 Jeroen T. Vermeulen .cvsignore: - Added configure.lineno (Patrick Welche) autogen.sh: - Made aclocal work with config/m4 instead of . (Patrick Welche) doc/libpqxx.xml: - Typos fixed (Patrick Welche) 2004-02-23 Jeroen T. Vermeulen src/largeobject.cxx: - Fixed risk of incorrect errno 2004-02-19 Jeroen T. Vermeulen test/test075.cxx: - g++ 2.95 compile fix tools/maketestam.pl: - Removed redundant -I option tools/Makefile.am: - Added pqxxbench - Added rmlo tools/pqxxbench.cxx, tools/pqxxbench.in: - New 2004-02-18 Jeroen T. Vermeulen test/test049.cxx: - Make count_if() compile on Sun CC (thanks Jon Meinecke) 2004-02-16 Jeroen T. Vermeulen autogen.sh, configure.ac.in: - Patrick Welche patch: make libtoolize "copy over the necessary .m4 files into ., then aclocal looks in . and adds them to aclocal.m4, and everything is happy." - Patrick Welche cont'd: "Didn't need to remove RANLIB, but as you require a reasonably new autoconf, int won't hurt..)" - Moved m4 stuff into config/m4, thanks Patrick Welche include/pqxx/cachedresult.h, include/pqxx/cursor.h: - Workaround for Sun CC compile problem (thanks Jon Meinecke) 2004-02-13 Jeroen T. Vermeulen include/pqxx/result.hxx: - Back to full test coverage test/test071.cxx: - Made reverse_iterator part conditional on PQXX_HAVE_REVERSE_ITERATOR test/test075.cxx: - New - Tests reverse result iteration (including rbegin() and rend()) win32/libpqxx.mak: - Added winsock32 library to link options (thanks Fred Moyer) 2004-02-12 Jeroen T. Vermeulen include/pqxx/config.h.in: - Removed redundant definitions src/connection_base.cxx: - Made unistd.h include conditional (thanks Fred Moyer) 2004-02-11 Jeroen T. Vermeulen include/pqxx/isolation.hxx: - Removed unused implemented() functions include/pqxx/libcompiler.h: - Trying PQXX_TYPENAME workaround for SUN compiler... test/test046.cxx, test/test049.cxx, test/test074.cxx: - Compile fixes, thanks Greg Webber! 2004-02-10 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Fixed SUN compiler version check (thanks Jon Meinecke, Greg Webber) 2004-02-09 Jeroen T. Vermeulen configure.ac.in: - Check for functional count_if() (Jon Meinecke) - Several AC_TRY_COMPILE checks fixed - Stay in C++ mode, less Fortran stuff etc. in configure include/pqxx/connection_base.hxx, include/pqxx/libcompiler.h: - Workaround for Sun CC default argument problem (thanks Jon Meinecke) include/pqxx/largeobject.hxx - Workaround for Sun CC namespace lookup problem (Jon Meinecke) include/pqxx/largeobject.hxx, include/pqxx/result.hxx, src/largeobject.cxx, src/result.cxx: - Added some throw () where appropriate include/pqxx/result.hxx: - Fixed long-standing bug in LoseRef() - thanks Jon Meinecke! pqxx-config.in: - Added missing -L in --libs option (Arjen Baart) test/test049.cxx: - count_if() workaround (thanks Jon Meinecke) win32/libpqxx.mak: - Added pipeline 2004-02-06 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Set up for SUN Workshop workaround 2004-02-05 Jeroen T. Vermeulen include/pqxx/cursor.h: - Workaround for SUN Workshop 6 (thanks Jon Meinecke) include/pqxx/pipeline.hxx, src/pipeline.cxx: - Typedef-wrapped container types to reduce std::pair<> trouble - Should fix SUN Workshop problems (thanks Jon Meinecke) 2004-02-03 Jeroen T. Vermeulen configure.ac.in, include/pqxx/binarystring.hxx, include/pqxx/libcompiler.h, include/pqxx/libconfig.h.in, include/pqxx/result.hxx, test/test062.cxx: - Added check for functional reverse_iterator template - Skip reverse_iterator typedefs & functions if template not available - VC7 workaround implies no functional reverse_iterator template 2004-02-02 Jeroen T. Vermeulen include/pqxx/libcompiler.h: - Documented PGSTD include/pqxx/result.hxx: - Added reverse_iterator include/util.hxx: - Documented pqxx::internal so that Doxygen picks it up README-UPGRADE: - Documented 2.2.0 changes src/cachedresult.cxx: - SUN Workshop compiler fix, thanks Jon Meinecke 2004-01-30 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Documented exception guarantees - Added throw () here or there - Made process_notice() throw () - More work on process_notice() robustness 2004-01-29 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - process_notice() can handle messages without the trailing newline 2004-01-28 Jeroen T. Vermeulen configure.ac.in: - Added lost patch from Arjen to generate pqxx-config include/pqxx/result.hxx: - Added reverse_iterator support 2004-01-26 Jeroen T. Vermeulen configure.ac.in: - Changed default installation prefix to /usr/local, thanks Arjen Baart! Makefile.am: - Added bin_SCRIPTS (patch by Arjen Baart) pqxx-config.in: - New (Arjen Baart) - Similar to PostgreSQL pg_config script for configuration parameters 2004-01-25 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, include/pqxx/util.hxx, src/connection_base.cxx, src/transaction_base.cxx, src/util.cxx: - Split namedclass base class out of transactionfocus - Added description() to easily construct a full name for a namedclass - Moved unique<> to internal namespace - Made unique<> assume its guest is a namedclass - Simplified error message generation using namedclass - Rewrote unique<> error checking include/pqxx/pipeline.hxx, include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx, include/pqxx/transaction_base.hxx, src/pipeline.cxx, src/tablereader.cxx, src/tablestream.cxx, src/tablewriter.cxx, src/transaction_base.cxx: - Finally introduced transactionfocus class - Reworked Classname() system 2004-01-24 Jeroen T. Vermeulen include/pqxx/result.hxx: - Created fieldstream include/pqxx/util.hxx: - Added PQXX_LIBEXPORT where needed, thanks david@firepro.co.za. test/test074.cxx: - New - Tests fieldstream 2004-01-22 Jeroen T. Vermeulen include/pqxx/*.hxx: - Introduced "internal" namespace - Changed "test1" in comment to "test001" - Made all destructors throw () (and inspected them to verify this) 2004-01-19 Jeroen T. Vermeulen include/pqxx/pipeline.hxx, src/pipeline.cxx, test/test072.cxx: - Pipeline refuses to (re-)issue queries behind a failure src/pipeline.cxx: - Implemented Bart's trick - In nontransactions, manages to pinpoint queries causing syntax errors test/test073.txt: - New 2004-01-14 Jeroen T. Vermeulen configure.ac.in: - Added warning about auto-generation of configure.ac - Peter Eistentraut's patch for finding postgres headers & libraries README: - No longer need --with-postgres etc. (thanks Peter!) TODO: - Bart Samwel found great solution for pipeline's one major weakness win32/Makefile.am: - Added MinGW.mak to distribution win32/MinGW.mak: - New. Thanks Pasquale Fersini! 2004-01-13 Jeroen T. Vermeulen include/pqxx/pipeline.hxx: - Warning about syntax errors src/pipeline.cxx: - Better handling of awkward error situations src/util.cxx: - Fixed bool conversion (missing break), thanks Roger Leigh! test/test072.cxx: - Tests runtime error rather than SQL syntax error - Succeeds now 2004-01-12 Jeroen T. Vermeulen include/pqxx/pipeline.hxx: - Full test coverage - Added retain() and resume() - Better error message when retrieving result for unknown query src/connection_base.cxx: - Fix: combination of asyncconnection/nontransaction/pipeline didn't connect test/test069.cxx, test/test070.cxx, test/test071.cxx, test/test072.cxx: - New - Test pipeline class 2004-01-11 Jeroen T. Vermeulen autogen.sh: - Check for automake 1.8 README, win32/README: - Minor updates wrt Windows-specific material 2004-01-02 Jeroen T. Vermeulen configure.ac.in, include/pqxx/util.h: - Re-included std::string.clear() check which had been lost - Replaced #pragma warning with #pragma message, thanks key88sf@hotmail.com README: - Documented manual editing of configuration headers include/connection_base.hxx, src/connection_base.cxx: - Changed Windows workarounds for select(), thanks key88sf@hotmail.com src/cursor.cxx: - Workaround for min()/max() problem in Windows, thanks key88sf@hotmail.com test/test004.cxx, test/test023.cxx: - Updated Windows vs. select() workarounds 2003-12-29 Jeroen T. Vermeulen src/pipeline.cxx: - Compiles 2003-12-28 Jeroen T. Vermeulen include/pqxx/except.hxx: - Empty throw specification for sql_error::query() include/pqxx/largeobject.hxx, src/largeobject.cxx: - Empty throw specification for largeobjectaccess::close() include/pqxx/pipeline, include/pqxx/pipeline.hxx, src/pipeline.cxx: - New include/pqxx/result.hxx, include/pqxx/transaction_base.hxx: - Prototyped facilities for pipeline 2003-12-25 Jeroen T. Vermeulen autogen.sh: - No longer runs autoheader, which would overwrite config.h.in configure.ac, include/pqxx/config.h.in, include/pqxx/libconfig.h.in: - Renamed some more HAVE_... macros to PQXX_HAVE - Removed some unnecessary macros - Workaround for missing clear() in standard string src/connection_base.cxx: - Fixed broken tablewriter for pre-7.4 postgres--thanks Roger Leigh! 2003-12-24 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Made async argument to WriteCopyLine() default to false src/transaction_base.cxx: - Fixed some double spaces in error strings 2003-12-23 Jeroen T. Vermeulen debian/*: - Applied Debian patches by Roger Leigh include/pqxx/result.hxx: - More general implementation of operator<<(), thanks Hubert-Jan Schaminee! 2003-11-28 Jeroen T. Vermeulen autogen.sh: - Removed obsolete ABI versioning configure.ac.in: - Now sets PQXXVERSION src/Makefile.am: - Implemented "-release" ABI versioning. Thanks Roger Leigh! tools/preprelease: - Fixed nm invocation used to generate library symbols win32/libpqxx.mak: - Fixed some wrapped lines. Thanks Paresh Patel! - Fixed some carriage return/line feed problems (Paresh Patel) 2003-11-26 Jeroen T. Vermeulen include/pqxx/connection_base.hxx, src/connection_base.cxx: - Removed "OnReconnect" parameter from Exec() - Moved EndCopy() into old versions of line-read & end-write functions - Support for async (nonblocking) mode - Factored out & optimized select() code include/pqxx/result.hxx, src/result.cxx: - Split StatusError() out of CheckStatus() - Added CheckStatus() version taking const char[] include/pqxx/tablereader.hxx, src/tablereader.cxx: - Moved field parsing out of the header, into new function extract_field() - Rewrote field parsing include/pqxx/tablewriter.hxx, src/tablewriter.cxx: - Do writes in async mode - Buffer up to 1 pending line (could support more in the future) include/pqxx/transaction_base.hxx: - COPY queries no longer delegated to connection_base - COPY now treated as regular query; follows transaction's retry policy - EndCopy() no longer needed win32/INSTALL.txt - Replaced part about copying config.h by part about editing it win32/libpqxx.mak - Fixed some apparently wrapped lines! 2003-11-25 Jeroen T. Vermeulen include/pqxx/dbtransaction.hxx: - Use old-style isolation level syntax, thanks koun@sina.com! - "Start command" no longer starts transaction; only sets isolation level - Isolation level only set if not the default - New function start_backend_transaction() include/pqxx/dbtransaction.hxx, include/pqxx/robusttransaction.hxx, include/pqxx/transaction.hxx, src/robusttransaction.cxx, src/transaction.cxx: - Factored out identical implementations of do_exec() include/pqxx/transaction_base.hxx, src/transaction_base.cxx: - Removed OnRetry parameter from DirectExec() - Made Retries parameter for DirectExec() default to the safe choice of 0 src/robusttransaction.cxx: - Forgot to set isolation level! - Use start_backend_transaction() src/transaction.cxx: - Use start_backend_transaction() 2003-11-23 Jeroen T. Vermeulen configure.ac.in, include/pqxx/tablereader.hxx, include/pqxx/tablewriter.hxx, src/tablereader.cxx, src/tablewriter.cxx: - Got tablestreams to work with the new functions include/pqxx/except.h: - Made single-argument constructor of sql_error explicit 2003-11-22 Jeroen T. Vermeulen include/pqxx/tablereader.hxx, include/pqxx/tablewriter.hxx, src/tablereader.cxx, src/tablewriter.cxx: - Now allow user-settable null string, as intended - Major cleanups and optimizations - Some probable off-by-one errors in escaping fixed test/test005.cxx: - Added double-tab combination to test set to test subsequent escapes 2003-11-21 Jeroen T. Vermeulen autogen.sh: - Reads version numbers from VERSION - Generates configure.ac configure.ac: - Bumped abi revision for first time - Disabled check for new COPY interface for now (doesn't work yet) - Now generated by autogen.sh configure.ac.in: - New - Used to generate configure.ac with appropriate version numbers doc/html/CVS, doc/html/Reference/CVS, doc/html/Tutorial/CVS: - Removed include/pqxx/libconfig.h.in: - Check for PQputCopyData() and friends include/pqxx/connection_base.hxx, include/pqxx/result.hxx, include/pqxx/tablereader.hxx, include/pqxx/transaction_base.hxx, include/pqxx/trigger.hxx: - Moved all deprecated functions to bottom of public class sections include/pqxx/connection_base.hxx, src/connection_base.cxx: - Use new COPY interface, if available include/pqxx/tablereader.hxx: - Support escaping of carriage returns include/pqxx/tablereader.hxx, include/pqxx/tablestream.hxx, include/pqxx/tablewriter.hxx, src/tablereader.cxx, src/tablestream.cxx, src/tablewriter.cxx: - New complete() function to check for errors before constructor include/pqxx/tablestream.hxx, include/pqxx/transaction_base.hxx, src/tablestream.cxx, src/transaction_base.cxx: - Added "pending" errors facility for tablereaders Makefile.am: - Remove doc/CVS from distribution archive if present src/connection_base.cxx, src/result.cxx, src/robusttransaction.cxx, src/transaction_base.cxx: - Rewrote "Internal libpqxx" error messages to "libpqxx internal error" src/connection_base.cxx: - For old COPY interface, increase line buffer to 10000 chars - Added lots of error checking src/tablewriter.cxx: - Delegated EndCopyWrite() to transaction tools/preprelease: - Create HTML documentation directories, and make sure they're empty - Check for up-to-date debian/changelog and NEWS VERSION: - New - Feeds version numbers into auto-generation process 2003-11-15 Jeroen T. Vermeulen include/pqxx/largeobject.hxx, src/binarystring.cxx, src/util.cxx: - Included . Thanks Jaroslaw Staniek! 2003-11-15 Jeroen T. Vermeulen include/pqxx/binarystring.hxx: - Use PQAlloc's content_type include/pqxx/libcompiler.h: - "Broken iterator" workaround includes cstdlib for size_t - "Broken iterator" workaround includes cstddef for ptrdiff_t - char_traits workaround also typedefs char_type - Added char_traits workaround for unsigned char - Added workaround for missing ptrdiff_t - Thanks Adam Pigg for making me persist in resolving this! include/pqxx/util.hxx: - PQAlloc typedefs content_type 2003-11-14 Jeroen T. Vermeulen autogen.sh: - Invokes maketestam.pl before running automake - Invokes maketestvcmak.pl README: - Kexi project confirmed by Adam Pigg tools/maketestam.pl - New - Generates test/Makefile.am - Generates win32/ test/Makefile.am - Now automatically generated by tools/maketestam.pl win32/test.mak: - Now automatically generated by tools/maketestvcmak.pl 2003-11-13 J.H.M. Dassen (Ray) include/pqxx/Makefile.am: follow --includedir value. 2003-11-03 Jeroen T. Vermeulen configure.ac, include/pqxx/compiler.h, include/pqxx/config.h.in: - Removed abs(long) workaround include/pqxx/cachedresult.h: - Removed const from CacheMap for SUN Workshop, thanks jluu@cdcixis-cm.com include/pqxx/connection.h: - Complete test coverage for asyncconnection src/cursor.cxx: - Replaced abs(long) by labs(long) (jluu@cdcixis-cm.com) test/test065.cxx: - Test asyncconnection's std::string constructor 2003-11-02 Jeroen T. Vermeulen include/pqxx/libconfig.h.in: - PQXX_HAVE_PQESCAPESTRING no longer visible during client compilation include/pqxx/util.hxx: - Moved some code to new util.cxx source file src/util.cxx: - New - Stricter input check on conversion to bool test/test064.cxx, test/test065.cxx, test/test066.cxx, test/test067.cxx, test/068.cxx: - New - Test asyncconnection win32/libpqxx.mak: - Added util.cxx/util.obj win32/test.mak: - Added new tests starting with number 60 2003-11-01 Jeroen T. Vermeulen configure.ac: - Added check for #pragma warning("...") - See if select() accepts NULL fd_set arguments include/pqxx/config.h.in, include/pqxx/libconfig.h.in: - Moved check to public configuration file include/pqxx/connection.hxx, include/pqxx/connection_base.hxx: - New overridables startconnect(), completeconnect(), dropconnect() - New class asyncconnection - Getters/setters only require a PQconn, not a working connection - Made is_open() more strict - New function halfconnect(): ensure just that there is a valid PQconn include/pqxx/util.h: - Issue #pragma warning if #warning not available src/connection.cxx, src/connection_base.cxx: - Connect() while already connected is no longer an error - New class asyncconnection test/test001.cxx: - Check for nonempty result test/test004.cxx, test/test023.cxx: - No longer include test/test058.cxx: - Quenched some comparison sign warnings test/test063.cxx - New - Tests asyncconnection 2003-10-30 Jeroen T. Vermeulen configure.ac, include/pqxx/config.h.in: - Check for PQescapeBytea() and PQunescapeBytea() (thanks Costin Musteata) Doxyfile: - Removed obsolete doxygen parameters src/binarystring.cxx: - Workarounds for missing PQescapeBytea() / PQunescapeBytea() - Removed reference to namespace std (should be PGSTD) test/test004.cxx, test/test023.cxx: - Made Sleep() revert to WIN32 version on Windows (thanks Costin) README: - Added related links - Added more libpqxx-using projects 2003-10-29 Jeroen T. Vermeulen configure.ac: - Checks for preprocessor #warning support include/pqxx/binarystring.hxx: - Exclude reverse iterator definitions on Visual C++, thanks Costin! include/pqxx/compiler.h: - Defines PQXX_LIBEXPORT if compiling library as Windows DLL include/pqxx/cursor.hxx: - Exclude some required typename keywords on Visual C++ (Costin) - error_permitted_isolation_level() workaround for Visual C++ (Costin) include/pqxx/libcompiler.h: - Included Windows workaround definitions here include/pqxx/libconfig.h.in: - Added PQXX_HAVE_CPP_WARNING, set better default for PGSTD include/pqxx/util.h: - Fixed flaw in inclusion of new-style util header include/pqxx/util.hxx: - Includes libcompiler.h README: - Revamped Windows section - PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION no longer needed! - Updated programming introduction src/*.cxx: - All now include pqxx/compiler.h at the top (Costin) src/robusttransaction.cxx: - Made unused catch argument anonymous to silence warning (Costin) win32/config.h: - Removed 2003-10-13 Jeroen T. Vermeulen include/pqxx/result.hxx: - to() now throws domain_error if conversion fails (thanks Rune Jortveit) - New as() without argument; throws if null - Throw specifications for at() and operator[] where appropriate include/pqxx/transaction.hxx - Introduced "work" typedef for default transaction type test/test045.cxx: - Test new zero-argument result::field::as() test/test0??.cxx: - Replaced "transaction<>" by new typedef "work" 2003-10-11 Jeroen T. Vermeulen src/binarystring.cxx: - Workaround for missing const in Bytea escape functions in postgres 7.3 2003-10-05 Jeroen T. Vermeulen include/pqxx/binarystring.hxx, src/binarystring.cxx: - New - Reworked binarystring, now more std::string-like include/pqxx/result.hxx: - Moved binarystring into its own set of files 2003-10-04 Jeroen T. Vermeulen include/pqxx/connection_base.hxx: - Test coverage for set_variable() include/pqxx/result.hxx, src/result.cxx: - binarystring::size() doesn't include terminating zero! - Test coverage for binarystring - Added escape_binary() functions include/pqxx/transaction_base.hxx: - Test coverage for set_variable() include/pqxx/util.hxx: - String conversions with unsigned char * now supported test/test060.cxx, test/test061.cxx, test/test062.cxx: - New 2003-10-03 Jeroen T. Vermeulen include/pqxx/util.hxx: - More helpful link error for unsupported string conversions 2003-09-23 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx: - Moved ALL() and BACKWARD_ALL() to cursor.cxx so they can use config.h. 2003-09-22 Jeroen T. Vermeulen configure.ac, include/pqxx/*, test/test*.cxx: - Renamed configure macros used in header files - New libcompiler.h/libconfig.h for inclusion in headers - compiler.h/config.h only needed when compiling library include/pqxx/libcompiler.h, include/pqxx/libconfig.h: - New README: - Renamed NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION 2003-09-22 Jeroen T. Vermeulen include/pqxx/result.hxx: - Some PGSTD::string & parameters should have been const test/test002.cxx - Fixed some mistakes in testing PQftable support 2003-09-20 Jeroen T. Vermeulen include/pqxx/*: - Moved header contents to .hxx files for filetype recognition 2003-09-18 Jeroen T. Vermeulen include/pqxx/result: - Replaced two obsolete calls to Column() by column() - Test coverage for column type / column name functions 2003-09-01 Jeroen T. Vermeulen configure.ac: - Added check for PQfreeNotify() - Check for using-declaration overloading problem in gcc 2.95.3 include/pqxx/largeobject: - Workaround for using-declaration overloading problem include/pqxx/util: - Use PQfreeNotify() if available and appropriate - Added include 2003-07-18 Jeroen T. Vermeulen include/pqxx/result: - Added support for PQftable(). Thanks Adam Pigg! - Deprecated tuple::Row() in favour of row_number() 2003-07-13 Jeroen T. Vermeulen include/pqxx/all: - Replaced with include/pqxx/pqxx to fix automake problem include/pqxx/*, src/*.cxx, test/test*.cxx: - Deprecated lots of functions with upper-case letters in names - Made old functions available if old-style headers are included 2003-06-23 Jeroen T. Vermeulen doc/libpqxx.sgml: - Replaced by libpqxx.xml doc/libpqxx.xml: - New. Thanks Wichert Akkerman! DoxyFile: - Added new header files include/pqxx/connection_base, include/pqxx/transaction_base, src/tablestream.cxx: - Fix crash closing tablestream on nonexistant table (thx Sean [Rogers?]) include/pqxx/except: - Moved exception classes back into pqxx namespace where they belong 2003-06-14 Jeroen T. Vermeulen include/pqxx/*.h: - Deprecated; new headers have names not ending in ".h" - All backwards compatibility support restricted to old headers 2003-06-14 Jeroen T. Vermeulen include/pqxx/largeobject.h: - Fixed compile error in a basic_ilostream() constructor - Complete test coverage include/pqxx/result.h: - Updated test coverage; only binarystring remains to be done test/test057.cxx, test/test058.cxx, test/test059.cxx: - New win32/libpqxx.mak: - Added dbtransaction win32/test.mak: - Added tests 21 through 59 - Added leading zeroes to all test names 2003-06-08 Jeroen T. Vermeulen include/pqxx/result.h: - Deprecated ColumnNumber() and ColumnName() - New column_number() and column_name() throw on error - Replaced some std:: with PGSTD:: 2003-06-07 Jeroen T. Vermeulen test/test*.cxx: - Prefixed test table names (events and orgevents) with "pqxx" 2003-06-07 Jeroen T. Vermeulen README: - Started list of projects using libpqxx include/pqxx/cursor.h: - Workaround for MetroWerks 8.3 2003-06-05 Jeroen T. Vermeulen COPYING: - Finally written out README-UPGRADE: - New include/pqxx/largeobject.h, include/pqxx/result.h, include/pqxx/tablewriter.h: - Added some forgotten PQXX_LIBEXPORTs include/pqxx/tablereader.h: - Renamed TableReader to tablereader include/pqxx/tablestream.h: - Renamed TableStream to tablestream include/pqxx/tablewriter.h: - Renamed TableWriter to tablewriter include/*.h, src/*.cxx: - Added reference to COPYING 2003-06-05 Jeroen T. Vermeulen include/pqxx/cachedresult.h: - Renamed CachedResult to cachedresult - Renamed Tuple to tuple include/pqxx/result.h: - Renamed Result to result - Renamed Tuple to tuple - Renamed Field to field include/pqxx/trigger.h: - Renamed Trigger to trigger 2003-06-03 Jeroen T. Vermeulen include/pqxx/cachedresult.h: - Independently checks for correct isolation level - Made constructor private - Improved documentation include/pqxx/connection_base.h: - Renamed Noticer to noticer - Derived noticer from std::unary_function include/pqxx/connection.h: - Renamed Connection to connection - Renamed LazyConnection to connection - Improved documentation include/pqxx/dbtransaction.h: - Made constructor private include/pqxx/largeobject.h: - Renamed LargeObject to largeobject - Renamed LargeObjectAccess to largeobjectaccess - Gave largeobjectaccess an off_type and pos_type - Improved documentation include/pqxx/result.h: - Renamed BinaryString to binarystring include/pqxx/transaction_base.h: - Made constructor private include/pqxx/util.h: - Added oid and oid_none include/pqxx/*.h: - Fixed some includes 2003-05-26 Jeroen T. Vermeulen include/pqxx/cachedresult.h, src/cachedresult.cxx: - Templatized, inlined constructor to provide Cursor's with isolation level include/pqxx/cursor.h, src/cursor.cxx: - Requires serializable isolation level at link time - Shuffled constructor around to implement isolation level requirement include/pqxx/dbtransaction.h: - New include/pqxx/isolation.h: - New include/pqxx/largeobject.h, src/largeobject.cxx: - Requires dbtransaction, not merely a transaction_base include/pqxx/robusttransaction.h: - Removed unnecessary and wrong "BEGIN WORK" retry string (harmless though) - Just reports serializable as its isolation level for now - Is now derived from dbtransaction include/pqxx/transaction_base.h: - Reports committed_read as its isolation level include/pqxx/transaction.h: - Reports serializable as its isolation level - Is now derived from dbtransaction include/pqxx/transactor.h: - Templatized on transaction class - Now derived from std::unary_function include/*, src/*: - Renamed Connection_base to connection_base - Renamed Transaction_base to transaction_base tools/preprelease: - Rewrote output generation 2003-05-23 Jeroen T. Vermeulen include/pqxx/result.h - Added Field::as() by popular request - Documented annoying locale sensitivity of Field::to() include/pqxx/util.h - Documented annoying locale sensitivity of ToString()/FromString() 2003-05-13 Jeroen T. Vermeulen include/pqxx/util.h: - Fixed wrong argument type for PQfreemem() on systems that have it - Fixed missing export directive on Unique 2003-05-11 Jeroen T. Vermeulen test/test056.cxx: - New win32/libpqxx.mak: - Fixed apparent whitespace problem, thanks key88sf 2003-05-10 Jeroen T. Vermeulen configure.ac, include/pqxx/largeobject.h, test/test051.cxx, test/test052.cxx, test/test053.cxx, test/test055.cxx: - Got large object support to compile with gcc 2.95 include/pqxx/*.h, src/*.cxx, test/test*.cxx: - Renamed ConnectionItf to Connection_base, similar for TransactionItf 2003-05-05 Jeroen T. Vermeulen configure.ac, include/pqxx/compiler.h: - Workaround for gcc 2.95: missing std::char_traits configure.ac, include/pqxx/largeobject.h: - Workaround for gcc 2.95: missing include/pqxx/largeobject.h: - Workaround for gcc 2.95: missing std::ios_base include/pqxx/util.h: - Workaround for gcc 2.95: default args in template function specializations 2003-05-04 Jeroen T. Vermeulen src/cursor.cxx: - Declare all cursors SCROLL for now 2003-05-04 Jeroen T. Vermeulen include/pqxx/connectionitf.h, include/pqxx/transactionitf.h, include/pqxx/util.h, src/connectionitf.cxx, src/transactionitf.cxx: - Made lots of things non-const in Unique<>, ConnectionItf, TransactionItf - Session variables interface in ConnectionItf, TransactionItf - SetClientEncoding() now just sets CLIENT_ENCODING variable 2003-05-03 Jeroen T. Vermeulen include/pqxx/connectionitf.h, src/connectionitf.cxx: - Restore client encoding upon recovering connection - Added some documentation include/pqxx/result.h: - Moved template operator<<(..., Field) into pqxx namespace include/pqxx/util.h: - More documentation for PQAlloc 2003-05-03 Jeroen T. Vermeulen include/pqxx/util.h, src/connectionitf.cxx: - Moved PQAlloc<> from connectionitf.cxx to util.h include/pqxx/result.h: - Added BinaryString 2003-04-28 Jeroen T. Vermeulen debian/*: - Replaced Ray Dassen's Debian packaging with Greg Hookey's. Thanks to both! 2003-04-21 Jeroen T. Vermeulen include/pqxx/result.h: - Changed Field::size() from int to size_type 2003-04-02 Jeroen T. Vermeulen test/test007.cxx: - Use PSQL_ASCII instead of utf8 as the test encoding 2003-03-31 Jeroen T. Vermeulen configure.ac: - Also looks for postgres in /usr/local/pgsql 2003-03-31 Jeroen T. Vermeulen configure.ac: - Added libpq's location to dynamic link path. Thanks Bjorn Wingman! 2003-03-31 Jeroen T. Vermeulen include/pqxx/result.h: - Added ColumnNumber() to Tuple, at key88sf's request 2003-03-30 Jeroen T. Vermeulen include/pqxx/largeobject.h: - Removed superfluous to_file functions for const char[] - Extended test coverage include/pqxx/tablereader.h: - Removed nonexistant operator>> versions for Result, string test/test007.cxx: - Test ConnectionItf::SetClientEncoding() test/test052.cxx, test/test053.cxx, test/test054.cxx, test/test055.cxx: - New 2003-03-29 Jeroen T. Vermeulen test/test014.cxx: - Increased test coverage 2003-03-29 Jeroen T. Vermeulen include/pqxx/except.h: - New - New exception class: sql_error include/pqxx/result.h, src/connectionitf.cxx, src/result.cxx: - Failed queries now throw sql_error, including query text 2003-03-29 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx, test/test001.cxx, test/test023.cxx: - Default constructors for Connection and LazyConnection include/pqxx/largeobject.h: - Better test coverage - Added LargeObjectAccess::seek() - Documented LargeObjectAccess::cseek() return value - Added Reason() functions to LargeObject, LargeObjectAccess src/largeobject.cxx: - Added Reason() functions to LargeObject, LargeObjectAccess - Use Reason() to describe some errors more accurately test/test050.cxx: - More devious mixed-mode access test/test051.cxx: - New 2003-03-27 Jeroen T. Vermeulen configure.ac: - Check for PQfreemem() include/pqxx/connectionitf.h: - Better documentation for SetNoticer - Made destructor inline to reduce pain for Windows users - Added SetClientEncoding() include/pqxx/largeobject.h: - Fixed missing BufSize arguments in basic_[o]lostream constructors include/pqxx/result.h: - Default constructor for const_iterator src/connectionitf.cxx: - Use PQfreemem() for notifications, if available test/test050.cxx: - New 2003-03-25 Jeroen T. Vermeulen include/pqxx/util.h: - Support string conversion of signed/unsigned shorts 2003-03-24 Jeroen T. Vermeulen configure.ac: - Also checks for header include/pqxx/util.h: - New Quote<>() template for string constants test/test018.cxx: - Tests new version of Quote<>() 2003-03-21 Jeroen T. Vermeulen configure.ac: - Include Doxyfile in distribution archive 2003-03-21 Jeroen T. Vermeulen include/pqxx/transactionitf.h, src/transactionitf.cxx: - Preliminary support for "named" statements 2003-03-19 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx: - Explicit destructors to work around another problem with Sun CC 5.1 2003-03-18 Jeroen T. Vermeulen configure.ac: - Changed check for abs(long) to be more likely to fail 2003-03-17 Jeroen T. Vermeulen win32/libpqxx.mak: - Replaced by more up-to-date version (thanks Key88sf) 2003-03-17 Jeroen T. Vermeulen include/pqxx/largeobject.h: - Documentation improvements - ilostream, olostream, lostream now have user-definable buffer size include/pqxx/result.h, include/pqxx/tablewriter.h: - More work on reducing Visual C++ workarounds, thanks Key88sf! test/test049.cxx: - Uses a few standard algorithms on Result 2003-03-16 Jeroen T. Vermeulen include/pqxx/largeobject.h, src/largobject.cxx: - Added C++-style read/write to LargeObjectAccess - Documented return values of cread(), cwrite() - largeobject_streambuf now has user-definable buffer size 2003-03-15 Jeroen T. Vermeulen include/pqxx/connectionitf.h: - New include/pqxx/connection.h: - Removed deprecated C-style NoticeProcessors - Removed deprecated IsOpen() - Split Connection into class hierarchy include/pqxx/largeobject.h, src/largeobject.cxx: - Silence warning about C-style cast in InvalidOid macro test/test001.cxx, test/test002.cxx, test/test014.cxx, README: - Moved optional complexity out of test001 for clarity test/test049.cxx: - New 2003-03-15 Jeroen T. Vermeulen README: - Documented connection strings 2003-03-14 Jeroen T. Vermeulen README, include/pqxx/result.h, include/pqxx/tablewriter.h: - Killed NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION. Thanks key88sf@hotmail.com! 2003-03-13 Jeroen T. Vermeulen configure.ac: - Tests now respect different definitions of PGSTD 2003-03-13 Jeroen T. Vermeulen configure.ac, include/pqxx/compiler.h: - Check & workaround for "ambiguous abs(long)" error on Sun compiler src/connection.cxx, src/cursor.cxx: - Changes to make Sun compiler happy (thanks Jeroen van Erp) 2003-03-12 Jeroen T. Vermeulen doc/html/Reference/*lostream*.html: - New include/pqxx/largeobject.h: - in & out are not from std::ios originally, but from std::ios_base - Fix: olostream now syncs itself before closing - lostream and olostream sync themselves twice before closing include/pqxx/util.h: - Added ToString<>() specialization for char *const & src/cachedresult.cxx: - Compile fixes for Sun compiler (thanks Jeroen van Erp) 2003-03-10 J.H.M. Dassen (Ray) Generate pkgconfig metadata file; updated debianisation. 2003-03-11 Jeroen T. Vermeulen Makefile.am: - Added debian packaging directory to distribution include/pqxx/largeobject.h: - Added ilostream, olostream, lostream test/test048.cxx: - Uses ilostream, olostream 2003-03-07 Jeroen T. Vermeulen include/pqxx/largeobject.h, src/largeobject.h, test/test048.cxx: - Replaced low-level LargeObject::cunlink() with LargeObject::remove() - Added default constructor for LargeObject test/test048.cxx: - Now also removes the large object it creates 2003-03-06 Jeroen T. Vermeulen include/pqxx/all.h: - Includes largeobject.h - Was missing in archive in 1.5.0 include/pqxx/connection.h: - Made LargeObject a friend, with access to raw connection include/pqxx/largeobject.h, src/pqxx/largeobject.cxx: - New include/pqxx/transactionitf.h: - Made Conn() public test/test001.cxx: - Fixed outdated comment about notice processors & C linkage test/test048.cxx: - New 2003-02-28 Jeroen T. Vermeulen include/pqxx/cachedresult.h, src/cachedresult.cxx: - Removed confusing "clear()" method include/pqxx/result.h: - Can now write Field to any type of stream test/test046.cxx, test/test047.cxx: - New 2003-02-28 Jeroen T. Vermeulen README: - Added Documentation section doc/libpqxx.sgml, include/pqxx/cursor.h: - Various minor updates include/pqxx/all.h: - New test/test001.cxx: - Uses new 2003-02-26 Jeroen T. Vermeulen include/pqxx/connection.h, include/pqxx/result.h, include/pqxx/tablereader.h: - Added/fixed some test coverage tags include/pqxx/cursor.h: - Test coverage for new "adopt existing SQL cursor" constructor src/cursor.cxx: - m_Name now includes quotes (to fix trouble with adopted SQL cursors) test/test045.cxx: - New 2003-02-25 Jeroen T. Vermeulen include/pqxx/cachedresult.h, src/cachedresult.cxx: - Fixed silly lifetime bug (now returns reference) - Removed CacheEntry class for now (uses less memory this way) src/cursor.cxx: - Oops, forgot to save changes earlier. 2003-02-25 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx: - Cursor may adopt existing SQL cursor returned from function 2003-02-24 Jeroen T. Vermeulen test/*: - Great Renaming of all test programs to 0-padded 3-digit test numbers 2003-02-20 Jeroen T. Vermeulen include/pqxx/cachedresult.h, src/cachedresult.cxx: - Store a single empty result to return when needed (fixes lifetime bug) 2003-02-17 Jeroen T. Vermeulen include/pqxx/cachedresult.h, include/pqxx/connection.h, include/pqxx/result.h, include/pqxx/robusttransaction.h, include/pqxx/tablereader.h: - Documented more parameters 2003-02-15 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx: - Removed default constructor completely 2003-02-13 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx, test/test43.cxx: - #include - Disabled controversial default constructor for now include/pqxx/transactionitf.h, test/test*.cxx: - Added Exec() version taking query argument in std::string form 2003-02-12 Jeroen T. Vermeulen include/pqxx/transaction.h: - Fixed little mistake in inline docs. Thanks Dave Gomboc. 2003-02-11 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx, test/test*.cxx: - Connection constructor now accepts null connection string - Default constructor for Connection creates lazy connection 2003-02-11 Jeroen T. Vermeulen configure.ac: - Bumped revision to 1.4.0 include/pqxx/connection.h, src/connection.cxx, test/test1.cxx: - Rename Connection::IsOpen() to is_open() to conform to Standard Library include/pqxx/connection.h, src/connection.cxx, test/test1.cxx, test/test10.cxx, test/test14.cxx: - Introduced Noticer to replace NoticeProcessor (which had C linkage) - Deprecated NoticeProcessor test/test13.cxx, test/test15.cxx, test/test16.cxx, test/test17.cxx, test/test18.cxx, test/test21.cxx, test/test29.cxx, test/test32.cxx, test/test33.cxx, test/test34.cxx, test/test35.cxx, test/test36.cxx, test/test37.cxx: - Removed unnecessary custom NoticeProcessors 2003-02-10 Jeroen T. Vermeulen configure.ac: - Fix spurious "yes" (or "no") in configure output - No longer go back from C++ to C for just a few checks 2003-02-10 Jeroen T. Vermeulen src/cursor.cxx: - Detect problematic consequence of unknown cursor position 2003-01-31 Jeroen T. Vermeulen configure.ac: - Fixed detection of PQescapeString() presence, thanks David Wright 2003-01-28 Jeroen T. Vermeulen src/cursor.cxx: - Add double-quotes around cursor name in SQL to circumvent case conversion 2003-01-24 Jeroen T. Vermeulen README: - Documented Windows build essentials 2003-01-24 Jeroen T. Vermeulen src/cursor.cxx: - Clarified internal error message test/test5.cxx: - Clarified non-harmful error message 2003-01-19 Jeroen T. Vermeulen include/pqxx/util.h: - Support long double type 2003-01-10 Jeroen T. Vermeulen src/cursor.cxx: - Fixed border case in size detection win32/libpqxx.mak: - Enabled template workaround for Microsoft's compiler 2003-01-09 Jeroen T. Vermeulen include/pqxx/util.h: - Made "no PQescapeString()" workaround in Quote() slightly more portable 2003-01-08 Jeroen T. Vermeulen test/test13.cxx: - Added missing - thanks postgres@vsservices.com 2003-01-06 J.H.M. Dassen (Ray) configure.ac: - More extensive searching for PostgreSQL headers and libraries. 2003-01-02 Jeroen T. Vermeulen src/cursor.cxx: - Fixed positioning bug when walking off right edge of result set test/test44.cxx: - New 2003-01-02 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx: - Rewrote positioning code. SEEMS TO WORK NOW! - Added size() test/test27.cxx, test/test8.cxx: - Aligned test output test/test40.cxx: - Added test case where Cursor discovers its size spontaneously 2003-01-01 Jeroen T. Vermeulen include/pqxx/cachedresult.h, src/cachedresult.cxx: - Make use of Cursor's absolute positioning. NOT FUNCTIONAL YET. *: - Updated copyright notices 2002-12-31 Jeroen T. Vermeulen test/test18.cxx, test/test32.cxx, test/test37.cxx, test/test41.cxx: - Reduced (expected, but still confusing) error output 2002-12-29 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx: - Added absolute cursor positioning src/cursor.cxx: - Rewrote Move()/Fetch() row count logic test/test24.cxx: - Fixed year for Space Oddyssey test/test41.cxx: - Reduced overrun width being tested test/test43.cxx: - New 2002-12-23 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx, test/test42.cxx: - Cursor::Move() now always returns number of rows moved include/pqxx/*.h, src/*.cxx: - replaced some string arguments with const string & 2002-12-22 Jeroen T. Vermeulen include/pqxx/cursor.h: - new version of Move() reports number of rows skipped include/pqxx/tablewriter.h: - inline TableWriter::FieldConverter::Escape() - fix Visual C++ version of operator() src/cursor.cxx: - report negative move distances for backward moves test/test42.cxx: - New 2002-12-21 Jeroen T. Vermeulen include/pqxx/cursor.h: - replaced Result_size_type with Result::size_type (now visible in this file) include/pqxx/util.h: - eliminated Result_size_type_min and Result_size_type_max 2002-12-14 Jeroen T. Vermeulen include/pqxx/cursor.h, src/cursor.cxx: - Introduced size_type typedef test/test13, test/test18, test/test32, test/test37: - Prepend "(Expected)" to error messages that are supposed to be there 2002-12-09 Jeroen T. Vermeulen include/pqxx/cursor.h: - Add warning about not all queries allowing cursors to go backwards test/test19.cxx, test/test22.cxx, test/test38.cxx, test/test40.cxx, test/test41.cxx: - Use events table for cursor test to circumvent trouble with pg_tables in postgres 7.3 (has become a view, so cursors don't go backwards) test/test5.cxx, test/test24.cxx: - Insert some extra rows in events so cursor tests will work 2002-12-09 Jeroen T. Vermeulen include/pqxx/cachedresult.h: - Added cautionary comment about limitations in PostgreSQL 2002-12-08 Jeroen T. Vermeulen configure.ac, src/cursor.cxx, src/robusttransaction.cxx, src/transaction.cxx: - Removed DIALECT_POSTGRESQL setting 2002-12-08 Jeroen T. Vermeulen include/pqxx/util.h: - Fixed missing PGSTD:: qualification for std::exception 2002-12-04 Jeroen T. Vermeulen configure.ac: - Test for presence of PQescapeString() include/pqxx/util.h: - Fixed Quote() for outlandish characters. Thanks Bada. 2002-12-03 Jeroen T. Vermeulen configure.ac, test/test23.cxx, test/test4.cxx: - Not only test for , but also see if it works--thanks Rod Taylor for feedback, testing, and facilities. 2002-12-03 Jeroen T. Vermeulen src/cachedresult.cxx: - Fixed cursor position bug when size was even multiple of granularity test/test41.cxx: - New 2002-12-02 Jeroen T. Vermeulen include/pqxx/cachedresult.h: - Implemented empty() - Added m_Lower - clear() no longer forgets size information, just flushes cache src/cachedresult.h: - Simplified binary search logic using m_Lower - Removed special case (-1 for unknown) from m_Upper - No longer rely on m_Cache to provide highest known-to-exist block 2002-12-02 Jeroen T. Vermeulen src/cursor.cxx: - Use ALL and BACKWARD ALL instead of highest/lowest representable numbers test/test19.cxx, test/test38.cxx: - Replaced hardcoded table name by command-line argument as intended 2002-12-01 Jeroen T. Vermeulen configure.ac: - Bumped revision to 1.2.0. include/pqxx/CachedResult.h, src/CachedResult.cxx: - New include/pqxx/compiler.h, include/pqxx/robusttransaction.h: - Removed constructs that looked like HTML tags but weren't. test/test40.cxx: - New 2002-11-07 Jeroen T. Vermeulen configure.ac: - Workaround for missing InvalidOid definition 2002-10-23 Jeroen T. Vermeulen include/pqxx/result.h, src/result.cxx: - Added AffectedRows() function requested by Peter Novodvorsky test/test13.cxx: - Tests Result::InsertedOid() and Result::AffectedRows() test/test7.cxx: - Tests Result::AffectedRows() 2002-10-21 Jeroen T. Vermeulen include/pqxx/result.h: - Changed Tuple constructor arg from Tuple::size_type to Result::size_type include/pqxx/cursor.h, include/tablereader.h, include/tablestream.h, include/tablewriter.h, src/cursor.cxx, src/tablereader.cxx, src/tablestream.cxx, src/tablewriter.cxx: - Constructors now take TransactionItf & instead of Transaction & 2002-10-21 Jeroen T. Vermeulen autogen.sh: - Fixed apparent typo (confflags defined, $conf_flags used) 2002-10-20 J.H.M. Dassen (Ray) autogen.sh: - Don't silently continue after errors. configure.ac: - Provide a description for HAVE_SYS_SELECT_H so autoheader doesn't exit with an error. - Added a few more warnings: -Wmultichar, -Wabi, -Wctor-dtor-privacy. debian/rules: - [clean] Clean out generated HTML files. - [configure] Actually use confflags variable; simplified testing with a different C++ compiler. src/Makefile.am: - Support building outside the source directory. 2002-10-15 J.H.M. Dassen (Ray) debian/libpqxx-dev.files: - Include .la file debian/rules: - Update config.{guess,sub} from autotools-dev if possible. - Ensure all files installed by "make install" end up in a package. - Relax shlib dependency to >= the upstream version. autogen.sh: - libtoolize --force - Make it possible to skip configure step through an environment variable. config/config.guess, config/config.sub, config/ltmain.sh: - Regenerated with current libtool debian/changelog, debian/control, debian/rules: - Updated for new Debian policy revision. 2002-10-13 16:00 Jeroen T. Vermeulen autogen.sh: - Check for automake-1.7 configure, */Makefile.in: - Regenerated with automake 1.7 configure.ac: - Check for - Bumped revision to 1.1.2 test/test23.cxx, test/test4.cxx: - Replaced Sleep()/sleep() and Windows workaround by select() 2002-09-29 14:00 Jeroen T. Vermeulen include/connection.h: - Documented log table creation and contents src/connection.cxx: - GetNotifs() frees notification structs a little earlier 2002-09-27 02:45 Jeroen T. Vermeulen src/connection.cxx: - Made GetNotifs() a little more aggressive in freeing PGnotify structs 2002-09-25 03:00 Jeroen T. Vermeulen configure.ac: - Removed several unwanted gcc options, making compile output readable again - Bumped revision to 1.1.1 include/pqxx/connection.h: - Made m_Conn, m_NoticeProcessor mutable - Made Connect(), Disconnect(), SetupState() const - Un-inlined BackendPID() - Added Activate(), Deactivate() include/pqxx/nontransaction.h: - comment added src/connection.cxx: - Connect() now assumes connection is not already active - Fixed bug: Connect() didn't tell libpq about pending notice processor src/robusttransaction.cxx: - Created local alias for InvalidOid to reduce compiler warnings test/test22.cxx: - a little less output 2002-09-23 01:00 Jeroen T. Vermeulen include/pqxx/connection.h, src/connection.cxx: - Now caches NoticePreprocessor & trace file set by user - Implemented lazy connections (requested by Greg Copeland) include/pqxx/result.h: - Added InsertedOid() include/pqxx/trigger.h: - Added admonishing comment about backend process ID src/robusttransaction.cxx: - Use log record's oid instead of explicit id field - Only attempt to create log table if creation of log field fails - Thanks to Greg Copeland for ideas, criticism & validation test/test17.cxx: - Fixed comment (used to call itself test15) test/test21.cxx, test/test22.cxx, test/test23.cxx, test/test24.cxx, test/test25.cxx, test/test26.cxx, test/test27.cxx, test/test28.cxx, test/test29.cxx, test/test30.cxx, test/test31.cxx, test/test32.cxx, test/test33.cxx, test/test34.cxx, test/test35.cxx, test/test36.cxx, test/test37.cxx, test/test38.cxx, test/test39.cxx - New 2002-09-20 15:15 Jeroen T. Vermeulen include/pqxx/connection.h: - Added admonishing comment for BackendPID() src/connection.cxx: - Noted some exceptions that may change to broken_connection 2002-08-13 15:00 J.H.M. Dassen (Ray) autogen.sh: - Use automake 1.6 if available include/pqxx/Makefile.am: - New debian/rules: - Enable maintainer-mode for warnings debian/libpqxx-dev.dirs: - Dir for docs debian/libpqxx-dev.doc-base: - New debian/control: - Added section for source package - Added Build-depends on doxygen debian/.cvsignore: - New config/.cvsignore, include/pqxx/.cvsignore: - Updated 2002-08-11 22:00 Jeroen T. Vermeulen Makefile.am: - added win32 directory to distribution include/pqxx/result.h, include/pqxx/tablewriter.h, test/test9.cxx, test/test20.cxx: - tests cover all methods again, including remaining 3 (near-)trivial ones 2002-08-10 23:00 Jeroen T. Vermeulen win32/*: - Build procedure for Visual C++ 7 by Clinton James include/pqxx/compiler.h: - Visual C++ workarounds moved to win32 directory (Clinton James) include/pqxx/result.h, include/pqxx/tablewriter.h: - Patches by Clinton James to help Visual C++ 7 port, with modifications for gcc's sake 2002-08-11 22:00 Jeroen T. Vermeulen debian/*: - Debianized by Ray Dassen */.cvsignore: - Added by Ray Dassen */Makefile.am, configure.ac: - Various cleanups by Ray Dassen - Added HTML reference documentation to distribution 2002-06-12 17:30 Jeroen T. Vermeulen src/transactionitf.cxx, test/test20.cxx: - Transaction is now detached from Connection on Commit or Abort 2002-06-12 16:30 Jeroen T. Vermeulen doc/libpqxx.sgml: - Lots of documentation for Transactor include/pqxx/connection.h, include/pqxx/transactionitf.h: - More brief descriptions 2002-06-12 00:15 Jeroen T. Vermeulen include/pqxx/nontransaction.h, include/pqxx/result.h, include/pqxx/robusttransaction.h, include/pqxx/tablereader.h, include/pqxx/tablestream.h, include/pqxx/tablewriter.h, include/pqxx/transaction.h, include/pqxx/transactionitf.h, include/pqxx/transactor.h, include/pqxx/trigger.h: - Added brief descriptions for classes 2002-06-08 23:00 Jeroen T. Vermeulen doc/libpqxx.sgml: - Various minor updates 2002-06-07 17:15 Jeroen T. Vermeulen configure.ac: - Removed unneeded check for - Bumped version to 0.5.0 Makefile.am: - Now also installs headers! 2002-06-04 20:00 Jeroen T. Vermeulen doc/Makefile.am: - Included libpqxx.sgml into list of files to go into distribution 2002-06-04 15:00 Jeroen T. Vermeulen doc/libpqxx.sgml: - Removed part about unwritten reference (use doxygen now!) 2002-06-04 01:45 Jeroen T. Vermeulen configure.ac: - Removed check for std::multimap include/pqxx/connection.h: - Made use of multimap for triggers list unconditional - Removed overdone sanity check from Perform() 2002-06-03 00:45 Jeroen T. Vermeulen configure.ac: - Added check for std::multimap include/pqxx/connection.h: - Use std::multimap for triggers, if available 2002-06-02 23:00 Jeroen T. Vermeulen include/pqxx/result.h: - Made design decision on ColumnNumber() (not checked, return -1 on failure) include/pqxx/tablereader.h: - Now also handles \t and \n coming from backend 2002-06-01 20:30 Jeroen T. Vermeulen configure.ac: - Now checks for PostgreSQL libpq header in /usr/include/postgresql/ - No longer uses -Wpadded compiler option include/pqxx/compiler.h, include/pqxx/result.h: - Hopefully fixed "multiple definition of std::iterator" problem 2002-05-29 22:00 Jeroen T. Vermeulen include/pqxx/util.h: - Added ToString()/FromString()/FmtString() specializations for short, bool, unsigned char. Thanks Jonathan C. Bodner. 2002-05-27 22:30 Jeroen T. Vermeulen Makefile.am: - Removed autom4te.cache from MAINTAINERCLEANFILES (won't work for dirs) doc/libpqxx.sgml, include/pqxx/result.h, test/test11.cxx: - Renamed Result::Field::name() to Name() include/pqxx/connection.h: - Renamed Transactor::TRANSACTIONTYPE to argument_type - Made RemoveTrigger take non-const argument include/pqxx/result.h: - Fixed documentation comment include/pqxx/tablewriter.h: - Rewrote ezinekoT() to make more use of STL - Low-level optimizations include/pqxx/transactor.h, test/test(1[357]|[467]).cxx, doc/libpqxx.sgml: - Renamed Transactor::TRANSACTIONTYPE to argument_type include/pqxx/util.h: - Rewrote Quote() to make more use of STL src/connection.cxx: - Rewrote RemoveTrigger() to make more use of STL test/test5.cxx: - Added row with empty field to test data set 2002-05-20 15:15 Jeroen T. Vermeulen include/pqxx/transactor.h: - Made adaptable (argument_type etc. typedefs) 2002-05-20 05:45 Jeroen T. Vermeulen configure.ac: - Moved config.h.in into include/pqxx - Removed -Wdisabled-optimization in maintainer mode - Removed unnecessary checks AC_STRUCT_TM, AC_FUNC_MALLOC, AC_CHECK_FUNCS(memset). doc/libpqxx.sgml: - More about transactions, in_doubt_error - Documented Quote(), ToString(), FromString() Doxyfile: - Removed LaTeX output - Moved HTML output to doc/html/Reference - Tweaked output some more - Removed version number include/pqxx/compiler.h: - Moved config.h into include/pqxx include/pqxx/result.h: - Fixed some type typos in function parameters 2002-05-17 23:30 Jeroen T. Vermeulen configure.ac: - Removed ${with_postgres_include}/(internal|server) from include path - Bumped version to 0.3.1 include/pqxx/util.h: - Removed troublesome postgres_fe.h include! 2002-05-12 23:30 Jeroen T. Vermeulen configure.ac: - Included ${with_postgres_include}/internal in include path to help users of RedHat-like systems find postgres_fe.h. Doxyfile: - Created include/pqxx/compiler.h: - Doxygenized some comments include/pqxx/cursor.h: - More comments include/pqxx/robusttransaction.h: - Doxygenized some comments include/pqxx/tablereader.h: - Doxygenized some comments include/pqxx/tablestream.h: - Doxygenized some comments include/pqxx/tablewriter.h: - Doxygenized some comments include/pqxx/transaction.h: - Doxygenized some comments include/pqxx/transactionitf.h: - Doxygenized some comments include/pqxx/util.h: - Doxygenized some comments 2002-05-05 03:45 Jeroen T. Vermeulen include/libpqxx/*.h: - Converted many comments to doxygen/javadoc format README: - More useful information 2002-05-05 01:30 Jeroen T. Vermeulen README: - Greatly extended build documentation 2002-05-04 20:30 Jeroen T. Vermeulen include/pqxx/result.h: - Added clear(), capacity() include/pqxx/tablewriter.h: - Added "range" versions of insert() etc. - Added dummy reserve() include/pqxx/transactor.h: - Protected against multiple inclusion include/pqxx/*.h: - Changed PG_[...] macros to PQXX_[...] test/test5.cxx: - Simplified using range versions of TableWriter methods test/test6.cxx: - Table arguments now default to "orgevents" and "events" test/test*.cxx: - Included libpqxx headers with <>, rather than "" 2002-04-28 23:45 Jeroen T. Vermeulen autogen.sh: - Used automake's --copy option config/Makefile.am: - Created so config stuff can get packaged configure.ac: - Added AM_MAINTAINER_MODE - Moved generated config files into directory of their own - Bumped version to 0.2 doc/Makefile.am: - Got html subdir into package include/Makefile.am: - Moved pqxx from SUBDIRS to EXTRA_DIST Makefile.am: - Added doc and config subdirs 2002-04-27 13:20 Jeroen T. Vermeulen autogen.sh: - Added --copy option to automake invocation 2002-04-07 02:30 Jeroen T. Vermeulen Configure.ac: - Fixed AM_INIT_AUTOMAKE line Readme: - Described build & install procedure Test6: - Fixed handling of (expected) CreateTable failure 2002-04-05 21:30 Jeroen T. Vermeulen Configure: - Finally found out what was missing: VERSION was undefined - Added -ffor-scope to compiler command line - Changed -fascist to -ffascist - Cleaned up --with-postgres code, fixed typo test/Makefile.am: - Replaced John Anderson's test environment parameters with my own Test6: - Creates destination table if it didn't already exist 2002-04-02 01:45 Jeroen T. Vermeulen TableWriter: - Wrapped back_insert_iterator specialization in namespace PGSTD { ... } Test1, Test2, Test4, Test7, Test10, Test14, Test15, Test16, Test17, Test19: - Made argc anonymous to silence "unused parameter" warnings TransactionItf: - Begin() now calls End() on failure (thanks Clinton James for bug report) - End() now ignores redundant invocations - Destructor checks that End() has been called - Added empty throw specification to End() 2002-04-01 01:45 Jeroen T. Vermeulen Configure: - More help from John Anderson TableWriter: - Enclosed std::back_insert_iterator specialization in namespace PGSTD 2002-03-31 01:00 Jeroen T. Vermeulen All: - Integrated John Anderson's autoconf/automake files and Ray Dassen's fixes Result: - Moved some inline functions to silence compiler warnings 2002-03-30 J.H.M. Dassen (Ray) configure.in: - Renamed from configure.ac - Added bug report address to AC_INIT - Check for and enable several compiler warnings etc. - Detect whether is available - Detect whether defines Util: - Look for postgres_fe.h in a "server" subdirectory Compiler: - Use configure-determined HAVE_LIMITS doc/Makefile: - Created Docs: - Added DOCTYPE, made proper DocBook, use for libpq reference. 2002-03-29 01:30 Jeroen T. Vermeulen All: - DLL export directives for Windows, thanks Clinton James ChangeLog: - Created - Moved NEWS over to ChangeLog News: - Created for more high-level changes Selftest: - Exits when any command fails Test4: - sleep() workaround for Windows, thanks Clinton James 2002-03-27 01:00 Jeroen T. Vermeulen AUTHORS: - Created CHANGES: - Renamed to NEWS 2002-03-26 22:30 Jeroen T. Vermeulen Makefile: - Put regression test into separate script Result: - Inlined Result::Field methods Selftest: - Created 2002-03-26 00:30 Jeroen T. Vermeulen Doc: - Added HTML docs, fixed bugs in SGML; thanks Bruce Momjian. 2002-03-23 05:30 Jeroen T. Vermeulen Result, TransactionItf, Transactor: - Several compile fixes (especially under MS Visual C++)--Clinton James 2002-03-22 02:45 Jeroen T. Vermeulen All: - Renamed *.cc to *.cxx for MS Visual C++, thanks Clinton James 2002-03-20 14:15 Jeroen T. Vermeulen Result: - Fixed to compile errors on gcc 2.96.x, thanks Vyacheslav Ignatyuk 2002-03-20 02:00 Jeroen T. Vermeulen All: - Renamed namespace Pg to pqxx for consistency 2002-03-20 01:30 Jeroen T. Vermeulen All: - Renamed library source files to match new header file names 2002-03-20 01:00 Jeroen T. Vermeulen All: - Great Renaming of header files (pg_*.h to pqxx/*.h) 2002-03-20 00:30 Jeroen T. Vermeulen All: - Moved library header files into include directory - Moved library source files into src directory - Moved test source files into test directory Makefile: - Reduced use of repetitive explicit rules 2002-03-17 01:30 Jeroen T. Vermeulen All: - Full test coverage! Cursor: - Full test coverage - Removed PostgreSQL-specific FORWARD/BACKWARD, previously labeled "ANSI" - Kludged BACKWARD_ALL around breakage - Implemented += and -= NonTransaction, RobustTransaction, Transaction: - Documented test coverage of overridables, even though they're private Test1: - More comments Test19: - Created Test3: - Improved Cursor test coverage TransactionItf: - Updated header comments 2002-03-05 17:45 Jeroen T. Vermeulen Makefile: - Now queries log table at end of regression test; should be empty Test4, Test6, Test7, Test13, Test15, Test17: - Recommended practice is now to use TRANSACTIONTYPE in Transactors Test18: - Created 2002-03-05 00:30 Jeroen T. Vermeulen RobustTransaction: - Initial implementation Test14: - Oops, tested Transaction instead of NonTransaction Test16: - Created Test17: - Created 2002-03-04 22:00 Jeroen T. Vermeulen RobustTransaction: - Created as outline based on Transaction 2002-03-04 00:30 Jeroen T. Vermeulen NonTransaction: - Created Test14: - Created Test15: - Created Transaction: - Made subclass of new abstract base class TransactionItf TransactionItf: - Created Transactor: - Made choice of transaction class parameterizable 2002-03-03 17:00 Jeroen T. Vermeulen Transactor: - Made Transaction class selectable, so can add more transaction types later - Added OnDoubt() 2002-03-03 16:15 Jeroen T. Vermeulen Connection: - In-doubt transactions are no longer retried Makefile: - Added /usr/include/postgresql/internal to include path - Works for PostgreSQL 7.1 and 7.2 now Transaction: - Introduced checking for in-doubt transactions - Minor improvements in error handling 2002-03-02 14:15 Jeroen T. Vermeulen TableReader: - Full test coverage Test6: - Added consistency check for TableReader's operator!()/operator bool() Test8: - Added consistency check for TableReader's GetRawLine()/Tokenize() 2002-03-01 00:45 Jeroen T. Vermeulen TableStream: - Full test coverage 2002-03-01 00:15 Jeroen T. Vermeulen TableWriter: - Full test coverage Test10: - Used TableWriter to insert tuple 2002-02-28 23:30 Jeroen T. Vermeulen Test13: - Created Transactor: - Full test coverage 2002-02-27 00:00 Jeroen T. Vermeulen Result: - Full test coverage Test12: - Created 2002-02-26 23:00 Jeroen T. Vermeulen Result: - Extended test coverage to metadata queries Test11: - Created 2002-02-24 22:00 Jeroen T. Vermeulen Result: - Documented method coverage Test10: - Disabled trace output 2002-02-24 05:00 Jeroen T. Vermeulen Transaction: - Full method coverage by self-test - Found recently introduced bug in implicit abort! 2002-02-24 04:00 Jeroen T. Vermeulen TableStream: - Documented method coverage TableReader: - Documented method coverage TableWriter: - Documented method coverage Test10: - Created Transaction: - Documented method coverage - Improved test coverage Transactor: - Documented method coverage 2002-02-24 01:30 Jeroen T. Vermeulen CONCEPT: - Removed unneeded old file Connection: - Full method coverage by self-test Cursor: - Documented method coverage Trigger: - Full method coverage by self-test 2002-02-15 01:30 Jeroen T. Vermeulen Docs: - More explanation on transaction bracketing Transaction: - Deferring commits to destruction time was wrong 2002-02-03 20:15 Jeroen T. Vermeulen Result: - Added metadata query methods - Removed unnecessary friendship with Tuple 2002-02-03 06:00 Jeroen T. Vermeulen Docs: - More examples Makefile: - No longer removes old library. Same difference. - Abstracted away source tarball, source directory name 2002-02-02 18:45 Jeroen T. Vermeulen Docs: - More on exceptions, more on executing queries. Makefile: - Now builds an actual (but static) library 2002-01-26 21:15 Jeroen T. Vermeulen CVS: - Imported into CVS Makefile: - Fixed "std namespace compiler workaround" breako - Added "dist" target 2002-01-26 00:30 Jeroen T. Vermeulen All: - New #define PGSTD to replace std if needed Compiler: - New header pg_compiler.h - Genericized workaround for missing numeric_limits - Disable braindead Microsoft Visual C++ warnings 2002-01-20 14:50 Jeroen T. Vermeulen Result: - Fixed Result::Field::name() -- thanks to Gilberto Ribeiro de Queiroz 2002-01-08 21:50 Jeroen T. Vermeulen TableWriter: - operator= forgot to return *this Test9: - Created to test TableWriter's back_insert_iterator 2002-01-07 00:15 Jeroen T. Vermeulen TableWriter: - Implemented back_insert_iterator 2002-01-01 23:45 Jeroen T. Vermeulen TableWriter: - Forgot to separate fields in output Tests: - Rearranged to set up their own database environment - New test writes orgevents table Transaction: - Merged "clean" state into "active" state - Moved back-end COMMIT into Transaction's destructor 2001-12-30 18:00 Docs: - Added why-a-new-library section - Explained transactions Transaction: - Abort no longer does a redundant ABORT WORK if already aborted 2001-12-23 22:30 Docs: - Mentions Trigger and TableStream now 2001-12-23 14:40 Connection: - Support removal of triggers - Reserved AddTrigger() and RemoveTrigger() for use by Trigger Test3: - Updated for revised Transactor interface Test4: - Changed "Got [] rows" in output to "Got [] row(s)" Test5: - Updated for revised Trigger interface Test7: - Updated for revised Transactor interface Transactor: - Built name into Transactor as data member - Added name as constructor argument - Name() returns std::string Trigger: - Built registering/unregistering into Trigger; constructor change! - Name() returns std::string 2001-12-16 00:45 Connection: - Added COPY support Makefile: - Now sets my personal connect string as CONNSTR for regression test - Uses test7 to restore events table clobbered in test3 - Now requires new table "orgevents" TableReader: - Basic functionality implemented TableWriter: - Basic functionality implemented Test4: - Updated comments to reflect new cursor "count" convention Test6: - Created Test7: - Created Transaction: - Added COPY support Util: - Added FromString() analogous (but opposite) to ToString() 2001-12-12 22:20 Connection: - Uses new Unique<> template for m_Trans TableReader: - Created TableStream: - Created TableWriter: - Created Transaction: - Now checks for active stream - Destructor catches Abort() exceptions Util: - Introduced Unique<> class template 2001-12-02 20:30 All: - Inlined more functions Connection: - Misc. query functions added 2001-12-02 17:30 Connection: - ProcessNotice() to call (possibly client-defined) notice processor Transaction: - Now calls notice processor when it can't throw exceptions - Checks for pending triggers before it begins Trigger: - Guarantees that no notifications are delivered inside transactions 2001-12-02 16:00 Makefile: - check target now depends on executables - Passes more interesting "count" argument to test4 Connection: - MakeEmpty() to create empty result set - Stricter error checking on opening/closing transactions Cursor: - Irregular meaning of 0 for fetch/move no longer used - Added Fetch() and Move() - Fixed "done" accounting in SetCount() - Separated creation of FETCH command into MakeFetchCmd() method Transaction: - Added MakeEmpty() Util: - Added Result_size_type_max test4: - Seeks to end of query first if backwards retrieval requested libpqxx-4.0.1+dfsg/INSTALL000077500000000000000000000172271224474465600152050ustar00rootroot00000000000000Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. libpqxx-4.0.1+dfsg/Makefile.am000066400000000000000000000005541224474465600162000ustar00rootroot00000000000000SUBDIRS = include src test tools win32 config debian doc EXTRA_DIST = autogen.sh configure.ac.in libpqxx.spec libpqxx.spec.in \ configitems README-UPGRADE VERSION MAINTAINERCLEANFILES=Makefile.in aclocal.m4 config.h.in config.log configure \ stamp-h.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libpqxx.pc bin_SCRIPTS=pqxx-config TESTS = tools/lint libpqxx-4.0.1+dfsg/Makefile.in000066400000000000000000000755031224474465600162170ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libpqxx.pc.in \ $(srcdir)/libpqxx.spec.in $(srcdir)/pqxx-config.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = libpqxx.pc pqxx-config libpqxx.spec CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ SUBDIRS = include src test tools win32 config debian doc EXTRA_DIST = autogen.sh configure.ac.in libpqxx.spec libpqxx.spec.in \ configitems README-UPGRADE VERSION MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.h.in config.log configure \ stamp-h.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libpqxx.pc bin_SCRIPTS = pqxx-config TESTS = tools/lint all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): libpqxx.pc: $(top_builddir)/config.status $(srcdir)/libpqxx.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ pqxx-config: $(top_builddir)/config.status $(srcdir)/pqxx-config.in cd $(top_builddir) && $(SHELL) ./config.status $@ libpqxx.spec: $(top_builddir)/config.status $(srcdir)/libpqxx.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binSCRIPTS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-TESTS check-am clean \ clean-generic clean-libtool ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-binSCRIPTS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-binSCRIPTS uninstall-pkgconfigDATA # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/NEWS000066400000000000000000000721331224474465600146450ustar00rootroot000000000000004.0.1 - Support for REPEATABLE READ isolation level. - Build fix for OS X. - Build fixes for clang++ 3.2. - Build fixes for clang++ 3.0. - Build fix for MinGW. - Build fix for BSD (and possibly other grep flavours). - Compatibility typedefs: pqxx::result::tuple & pqxx::result::field. - Supports C++11. - Fixed failure to detect some integer overflows during conversion. 4.0 - API change: noticers are gone! Use errorhandlers to capture error output. - API change: tablereaders and tablewriters are gone; they weren't safe. - API change: prepared statements are now weakly-typed, and much simpler. - API change: fields and tuples are now stand-alone classes in ::pqxx. - API change: thread-safety field have_strerror_r is now have_safe_strerror. - API change: notify_listener has been replaced with notification_receiver. - notification_receiver takes a payload parameter. - Easier Visual C++ setup. - Absolutely requires a libpq version with PQescapeStringConn. - Absolutely requires libpq 8.0 or better. - Changes for C++0x. - Supports clang++. - Visual C++ makefiles now support new-style unit tests. - Sample headers for more recent Visual Studio versions. - Fixes binary-data escaping problems with postgres 9.0. - Fixes problems with binary-string handling and escaping. - Fixes compatibility problems between 9.x libpq and 7.x backend. - quote_name to escape SQL identifiers for use in queries. - syntax_error reports error's approximate location in the query. - On Windows, now uses ws2_32 instead of wsock32. - Various Windows build fixes. - Updated for gcc 4.6.0. - configure script supports --enable-documentation/--disable-documentation. - Streamlined test/release toolchain. 3.1 - Shared libraries are now versioned by ABI: 3.1 instead of 3.1.0 etc. - Threading behaviour is now documented, and can be queried. - Version information available at compile time. - Supports parameterized statements. - Result tuples now support slicing. - Configure with --with-tr1=boost to use BOOST shared_ptr. - String conversion now has its own header file. - Supports read-only transactions. - Fixed breakage with Solaris "make". - Uses shared_ptr if available. - binarystring::str() is no longer cached; no longer returns reference. - Fixed problems in Visual C++ Makefile for test suite. - Fixed problems with RPM packaging. - Fixed build problem on RedHat/CentOS 5. - Lets you check whether a prepared statement has been defined. - "Varargs" prepared statements. - Unnamed prepared statements now supported. - Results have iterator as well as const_iterator. - Rewrite of robusttransaction logic; may actually do its job now. - Connections support async query cancel from signal handler or thread. - More documentation for performance features. 3.0 - Website is now at http://pqxx.org/ (no redirects) - Completely replaced cursor classes - More helpful error messages on failed connections - More detailed hierarchy of constraint-violation exception classes - trigger is now called notify_listener, trigger header is now notify-listen - New mixin base class pqxx_exception distinguishes libpqxx exception types - Quoting is back! transaction_base::quote() & connection_base::quote() - Several build & documentation problems with Visual C++ fixed - Compile fixes for gcc 4.2, 4.3 - Compile fixes for Sun Studio Express 5.9 - Uses strlcpy() where available, instead of strncpy() - Keeps better track of applicable text encodings - Fixed bug with prepared statement parameters in separate C++ statements - robusttransaction now works for multiple users - Pipeline lets you cancel ongoing queries, e.g. because they run for too long - Fixed broken escaping of binary values in tablewriter - Floating-point types now represented with full precision - Proper unit tests for new functionality - New traits-based system for adding data types - Floating-point infinities now supported - Flushing/completing a pipeline now frees up the transaction for other use - Completely reworked test suite, builds and runs much faster - tablewriter supports writing of raw lines 2.6.9 - Removed old 1.x API (that means all identifiers with capital letters!) - Tested with all current libpq versions and oldest/newest supported backends - No longer have old OnCommit()/OnAbort()/OnDoubt() callbacks in transactor! - Fixes failure when closing cursors with upper-case letters in their names - Fixes bug when adding triggers to connections that aren't open yet - Fixes bug when removing triggers - Fixes small memory leak when preparing statements - Fixes many problems with older backends - Fixes bug in result::swap(): protocol versions were not swapped - Some errors went undetected when using certain libpq versions - Fixes prepared statements on new libpq versions talking to old backends - Can estimate server version if libpq does not know how to obtain it - Greatly reduced memory usage while escaping strings - With Visual C++, creates lib/ directory if not already present - Useful error messages when preparing statements - Allows prepared statements to be registered explicitly - Support for "long long" types; enable with PQXX_ALLOW_LONG_LONG macro - Compilation errors for older libpq versions fixed - Some new small utility classes for disabling notice processing etc. - Result sets remember the queries that yielded them - New test script, pqxx-fulltest, tests against all current postgres versions - Connections can simulate failure - Adds password encryption function 2.6.8 - Fixes bug: binary parameters to prepared statements truncated at nul bytes - New, more specific exception types to distinguish errors from server - Resolved serious problems with generated reference documentation - Automatically detect Windows socket library with MinGW - Windows "make" fixed to run from main directory, not win32 - Fixes "mktemp" problems on some BSD-based platforms - pqxx-config is deprecated; use pkg-config instead - On GNU/Linux, uses poll() instead of select() to avoid file descriptor limit - Will provide server and protocol version information where available - New cursor class, absolute_cursor 2.6.7 - New escape functions for binary data: transaction_base::esc_raw() - Improved detection of socket libraries, especially for MinGW - Works around bug in some versions of GNU grep 2.5.1 - Fixes problem with configuration headers - Fixes PQprepare() detection - Fixes incomplete Visual C++ Makefile - Fixes compile error in workaround for older libpq versions - Removes "rpath" link option 2.6.6 - New, encoding-safe string-escaping functions - Upper-case letters now allowed in prepared-statement names - Fixes crash in test005 - More Visual C++ improvements - Removed collaboration diagrams from reference docs - New templating system for generating Windows Makefiles etc. 2.6.5 - Visual C++ users: copy win32/common-sample to win32/common before editing it - Should fix problems finding socket library on MinGW - Even more work on Visual C++ problems - Updated documentation for Visual C++ users - Fixed bug in prepared statements (mostly visible on Visual C++) - Nested transactions work harder to detect backend support 2.6.4 - Massively improved compatibility with Windows and Visual C++ - Fixed late initialization of "direct" connection state - Fixed problem with initialization of connection capabilities - Fixed configuration bug for libpq in nonstandard locations - Sample configuration header for libpq found in PostgreSQL 8.1 2.6.3 - Radical rework of prepared statements; INCOMPATIBLE INTERFACE CHANGE! - Dropped support for g++ 2.95 - Emulate prepared statements support on old libpq or old backend - Bug fix: missing tutorial (release script now tests for this) - Automatically links in socket library on Windows or Solaris, if needed - Bug fix: check for std namespace didn't work - Fixes for Cygwin/MSYS/MinGW 2.6.2 - Bug fix: connection state was not set up properly in some common cases - Bug fix: headers were installed in "include" instead of "include/pqxx" - Bug fix: sqlesc(string) broke with multibyte or multiple encodings - namedclass is now used as a virtual base; affects all subclass constructors - Initial implementation of subtransactions - Detect more connection capabilities - Standard library namespace can be set from configure script's command line - Completely reworked connection hierarchy, with separate policy objects - Clients can now define their own connection policies - Paved the way for client-defined thread synchronization - Now lives at http://thaiopensource.org/development/libpqxx/ 2.6.1 - Hugely improved recognition of different strerror_r() versions - Resolved link problems with gcc 4.0 and shared library 2.6.0 - New macro PQXX_SHARED defines whether to use/build libpqxx as shared library - Robusttransaction compatible with PostgreSQL 8.1 - Infrastructure for querying connection/backend capabilities at runtime - Greatly improved cursor support - Connection reactivation can be inhibited explicitly - Tries even harder to make sense of conflicting strerror_r() definitions - Detects connection failures that libpq glosses over - Reference documentation grouped into more coherent sections - Assumes strerror() is threadsafe on systems that have no strerror_r() - Now allows connection's socket number to be queried - New internal_error class for libpqxx-internal errors - With Visual C++, doesn't redefine NOMINMAX if it is defined already - Several compatibility improvements for Visual C++ - Fixes and workarounds for HP-UX and HP aCC compiler - Phased old cursor interface out of test suite; tests ported to new interface - Added documentation on thread safety - New thread safety model - Large objects have functions to tell current position - Minor updates to tutorial (somebody pay me and I'll do more :) - No longer needs libpq-fs.h header - Meaningful error messages for ambiguous string conversions fixed 2.5.6 - Support null parameters to prepared statements (use C-style char pointers) 2.5.5 - Diagnoses connection failure during result transfer - Fixes invalid -R link option in pqxx-config 2.5.4 - Fix workaround code for older libpq versions without PQunescapeBytea() - Work around grep bug in Fedora Core 4 that broke configure in UTF-8 locales - In Visual C++, assume libpqxx is a DLL when linking to std library as DLL - Missing documentation in distribution archive is back again - Export fewer symbols from library binary with gcc 4.0 - Releases now automatically tested against gcc 4.0 - Meaningful link errors for additional ambiguous string conversions - DLL symbol exports now automatically tested before each release 2.5.3 - Greatly improved builds on MinGW with MSYS - All known problems with MinGW fixed - Fix bugs in stream classes that caused failures and crashes with STLport - Detects and uses STLport automatically 2.5.2 - Fix memory leaks - Fix problems with NaN (not-a-number values) on some compilers 2.5.1 - Fix configure script; broke when very recent libpqxx was already installed - Fix cursor breakage when "long" is more than 32 bits - Fix cases where new-style abort/doubt handlers are used - Fix for division-by-zero error in Visual C++ (changed sample headers) - Improved checking for strerror_r in configure script - Fix for problem MinGW has with configure script - Fix spurious failure of Oid check in configure script 2.5.0 - Fix race condition in removing triggers - Fix binary string conversion with older libpq - Fix some error strings that may previously have come out wrong - No longer includes any libpq headers while compiling client code - Improved thread safety: avoid strerror() where possible - Prepared statements - Translate more error conditions to std::bad_alloc exception - Clearer and more specific explanations for configuration failures - Improved documentation - Looks for standard library in global namespace as well as std - Accepts standard C library in std namespace - Release script automatically tests with a range of compilers, not just one - Compatible with g++ 2.95 again; this time it's tested automatically 2.4.4 - Fix problems building shared library in Visual C++ - Fix autobuild in Debian, which was broken by mistake in BSD grep workaround - Fix conversion of string to floating-point type NaN - Remove stray CVS directories from distribution archive - Workaround for Visual C++ problem when issuing messages from destructors - Yet more workarounds for Visual C++ bugs - Fix situation where connection state might not be restored after failure - Fix configuration problem on SunOS - Network speedup in connection setup with pending variables and/or triggers 2.4.3 - Yet more workarounds for bugs in Visual C++ .NET 2003 - Fixes for SunC++ 5.5 - On Visual C++, now defines NOMINMAX, fixing large object support - Workaround for BSD grep - Improvements for builds from CVS - Sample config headers for Sun ONE Studio 8 2.4.2 - Fix minor problems with Apple's version of g++ 3.3 - Fix problem with MingW on Windows - Workarounds and fixes for Visual C++.NET 2003 - Renewed compatibility with g++ 2.95 - More sample configuration headers - Updated reference documentation - Removed assert code 2.4.1 - Several bugs in icursor_iterator fixed; incompatible interface changes - Tightens throw specifications on begin(), end(), size(), capacity() - Containers define reference and pointer types - Implements swap() in all container types - Implements == and != in all container types - Stabilizes new (but still limited) cursor interface - icursor_iterator thinks purely in stride granularity - Introduces />= comparisons for icursor_iterators - Allows "adopted SQL cursors" in new cursor interface - Reference-counting in binarystrings, so they can be copied (and efficiently) - Fixes reference-to-temporary problem with std::reverse_iterator in results - Result/tuple reverse_iterators no longer require std::reverse_iterator - Includes some sample config headers (in config/sample-headers) - Replaces iffy autoconf checks (avoid failures with maintainer mode's -Werror) - Fixes incompatibility with some implementations of Unix "cut" program (again) 2.4.0 - Fixes incompatibility with some implementations of Unix "cut" program - Fixes "ptrdiff_t redefinition" problem in some environments - More container-like tuples, so fields can be iterated - All size_type types are now unsigned - More conservative robusttransaction--thanks Tom Lane - Stream-like extraction operator for result field conversion - Warnings about deprecated headers now suppressed while compiling library - Iterator constructors and copy assignments now have empty throw specs 2.3.0 - Generates MinGW Makefile automatically - Documents MinGW build - Workaround for missing prepared-statement support - Potential bug fixed in closing of connections - Fixed incompatibility between new cursor streams and older backends - Removed pqxxbench 2.2.9 - Bugfix in removing trigger - Added "failed connection" to regression test - Some changes to throw specifications - Putting libpq in its own namespace is optional 2.2.8 - Moved libpq into pqxx::internal::pq namespace - New config system separates compiler-related items from libpq-related ones - Auto-generates Visual C++ Makefile, should always remain up-to-date now 2.2.7 - Bugfix: from_string() didn't handle LONG_MIN--thanks Yannick Boivin 2.2.6 - Complete "pipeline" rewrite, for better exception safety - New garbage collection scheme for "result;" constructors now exception-free 2.2.5 - First new cursor classes! - Fixed strange failure in tablewriter during large insertions - Updated tutorial 2.2.4 - New utility class template, items<> for easy container initialization - New utility function template, separated_list() - Error handling bugfix in tablewriter - Fixed tablereader handling of lines ending in empty fields - tablereader lines no longer end in newline with old libpq versions 2.2.3 - Trigger names no longer need to be proper identifiers - Compile fixes for g++ 3.4.0 and other modern compilers - Tablestreams may specify column lists - Deprecated Quote() in favour of sqlesc(); improved quoting - Fixed generation of libpqxx.spec 2.2.2 - Bugfix in fieldstream w.r.t. reading strings on some systems - Renamed config.h to internalconfig.h to avoid confusion - New connection functions allow client to sleep until notification arrives - Notification functions return number of notifications received - Even fewer client-visible macros exported by libconfig.h 2.2.1 - New, 2.x-style string conversions without locale problem - Documentation improvements - Implemented result::swap() 2.2.0 - Installs to /usr/local by default, NOT to /usr/local/pqxx like before! - Uses Postgres-provided script to find Postgres (thanks Peter Eisentraut) - Which means no more configure arguments required on Irix (thanks Arjen Baart) - Fixes long-standing bug in result class! - New pipeline class for throughput optimization - New field stream class: read result field as C++ stream - Separate namespace pqxx::internal for definitions not relevant to the user - More Windows compilation fixes - SUN Workshop 6 compile fixes and workarounds (thanks Jon Meinecke) - Implemented reverse_iterator for result class - Checks for functional std::reverse_iterator template - Preliminary Makefile for MinGW compiler (thanks Pasquale Fersini) - Changed the way unique<> works - Checks for functional std::count_if() - Bugs fixed & test programs added 2.1.3 - Makefile fixes for Visual C++, thanks Paresh Patel - Library ABI versioning implemented, thanks Roger Leigh - Uses old SQL isolation level syntax for compatibility, thanks koun@sina.com - tablestreams can explicitly complete() before destructor - Bugfix in robusttransaction: forgot to set isolation level - Fixed off-by-ones in tablewriter escape code - tablestreams now use \n-style escape sequences - tablestreams support octal numbers - Freely definable "null" strings in tablestreams, as originally intended - Improved Debian packaging, thanks Roger Leigh - tablestreams use libpq's new-style COPY functions, if available - Extended automation of build/release procedure - tablewriter writes in nonblocking mode to help hide communication latency - Can get backend variables as well as set them - More configuration macro cleanups - Workaround for missing clear() in standard string - Merry Christmas! 2.1.2 - Compile fix for gcc libstdc++ 2.9, thanks Jaroslaw Staniek - Moved deprecated functions below current ones - Cleanups for Debian packaging (thanks Roger Leigh, new Debian maintainer!) - Updated authors listings - Bumped ABI version number for the first time (now 2:0:1) 2.1.1 - More workarounds for gcc 2.95 - Automated tools keep test makefiles up to date 2.1.0 - Asynchronous connections - Fixed configure --includedir option (thanks Ray Dassen!) - Compile fixes for SUN Workshop 6, and one for gcc on FreeBSD 4.8 2.0.0 - New stable release! - Includes all changes since 1.5 release. - Workarounds for Microsoft Visual C++ 7 problems. Thanks Costin Musteata! - No longer need to define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION - Integrated Windows configuration into regular configuration - Only uses #warning if preprocessor supports it - Works on libpq versions without PQ[un]escapeBytea() 1.9.9 - Minor documentation changes 1.9.8 - Workaround for compile problem with postgres 7.3 - Convenience typedef for transaction<>: "work" 1.9.7 - binarystring rewritten and moved to its own file - binarystring::size() does not include terminating null byte! - Implemented escaping of binary strings - Fix in workaround for missing numeric_limits on some compilers - String conversion supported for unsigned char * - More helpful link errors for unsupported string conversions - Complete test coverage 1.9.6 - Fixes in "field table" support - Improved coexistence with client program's config.h, if any - Prefixed autoconf macros used in headers with "PQXX_" 1.9.5 - Header file contents moved to .hxx files for editor filetype recognition - Fixes wrong timestamp for include/pqxx/result in 1.9.4 distribution 1.9.4 - Fixes Visual C++ build problem when compiling as library 1.9.3 - Quick release for various minor changes 1.9.2 - Renamed most public member functions to all-lower-case names - (previously is now called 1.9.1 - tablestream destructor crashed if table didn't exist (thanks Sean [Rogers?]) - Renamed all header files to remove ".h" suffix - Tables created by regression test now prefixed with "pqxx" for safety - Large objects now considered stable - Migrated tutorial from SGML to DocBook XML (thanks Wichert Akkerman) - Added tests 57-59 - Fixed compile error in largeobject - Updated Windows makefiles 1.9.0 - EVERYTHING HAS CHANGED. Read the list or run into trouble! - CURSOR HAS INCOMPATIBLE CHANGES AND MAY BE REPLACED COMPLETELY - CACHEDRESULT HAS INCOMPATIBLE CHANGES (won't compile without changes) - REVISE YOUR TRANSACTORS; now templatized on transaction type - Finally got license file in order - Incompatible change in setting transactor quality of service - Cursors require serializable isolation level (checked at link time) - Renamed Connection_base to connection_base, Connection to connection, LazyConnection to lazyconnection - Renamed LargeObject to largeobject, LargeObjectAccess to largeobjectaccess - Renamed Noticer to noticer - Renamed Trigger to trigger - Renamed Result to result, Tuple to tuple, Field to field - Renamed Unique<> to unique<> - Renamed CachedResult to cachedresult - Transformed Transaction Taxonomy (TTT): - Renamed Transaction_base to transaction_base - Renamed Transaction to transaction - Renamed Transactor to transactor<> (now a template) - Implemented transaction isolation levels as compile-time static properties - transaction and robusttransaction now templatized on their isolation levels - cachedresult requires serializable isolation level (checked at link time) - Now need to include pqxx/transactor.h yourself if you need transactors - Large objects require real backend transaction at compile time - New type oid and constant oid_none for row identifiers resp. null oid - Added some forgotten PQXX_LIBEXPORTs - Tweaked documentation in many places 1.8.1 - By popular request: more convenient way to read field values - Documented locale sensitivity of ToString(), FromString(), Field::to() 1.8.0 - Compiles on gcc 2.95 again (heavy streambuf workarounds in largeobject.h) - ConnectionItf renamed to Connection_base, TransactionItf to Transaction_base - connectionitf.h is now connection_base.h, transactionitf.h connection_base.h 1.7.8 - BinaryString class for unescaping bytea strings - PQAlloc template keeps track of libpq-allocated objects - Removed some consts in Unique<>, ConnectionItf, sorry! - Can now set session variables on connections, transactions 1.7.7 - ./configure also looks for postgres in /usr/local/pgsql - test007 now uses SQL_ASCII as its test encoding - integrated Greg Hookey's Debian packaging 1.7.6 - added postgres library (libpq) to dynamic link path 1.7.5 - added test052 - test055 - added Result::Tuple::ColumnNumber() - also test setting of client encodings - removed superfluous versions of to_file() from large object classes 1.7.4 - new exception class, sql_error, remembers query text - moved exception classes to new file include/pqxx/except.h - test cases report texts of any failed queries - added tools/rmlo.cxx 1.7.3 - default constructors for connection classes - revamped seeking operations on large objects - better error messages in large objects - added test050, test051 1.7.2 - more workarounds for Sun CC 5.1, thanks Jeroen van Erp! - preliminary support for "named" queries - can now Quote() string constants - included Doxyfile in distribution archive - helps avoid Windows memory allocation problem in DLLs - allows setting of client character set encoding 1.7.1 - regenerated documentation 1.7.0 - removed all deprecated features - connection string documentation in README - separate Connection, LazyConnection classes - made test001 more concise - added test049 1.6.4 - configure script now respects different std namespace 1.6.3 - olostream, lostream now flush themselves before closing - fixed compilation problems when using ToString<>() on a plain char * - compilation fixes for Sun compiler (thanks Jeroen van Erp!) - added .pc file for pkgconfig (thanks Ray Dassen!) 1.6.2 - Debian packaging added to distribution archive - new ilostream, olostream, lostream classes 1.6.1 - large object's cunlink() replaced by remove() - default constructor for LargeObject 1.6.0 - new large objects interface - added test048 1.5.0 - allow result fields to be written to streams - removed confusing CachedResult::clear() - minor documentation updates - added test046, test047 - added convenience header 1.4.5 - fixed crash CachedResult that was less shallow than I thought - fixed quoting problem with adopted SQL cursors 1.4.4 - (forgot to save cursor.cxx with new constructor in 1.4.4, sorry) 1.4.3 - all tests now have three-digit numbers - Cursor can adopt SQL cursor returned by a function 1.4.2 - bugfix in CachedResult when accessing empty Results - minor documentation improvements 1.4.1 - documents new homepage: http://pqxx.tk/ - Connection constructor accepts null connect string - Exec() now also takes queries as C++ strings 1.4.0 - Connection::IsOpen() renamed to is_open() - NoticeProcessor replaced by Noticer (with C++ linkage) 1.3.7: - detects nasty rare problem case with Cursors in unknown positions 1.3.6: - fixed detection of missing PQescapeString(). Thanks David Wright! v1.3.5: - documented Windows build procedure - fixed problem with upper-case letters in cursor names. Thanks key88! 2003-01-19 16:00, v1.3.4: - support long double type - clarified some error messages 2003-01-08 18:45, v1.3.3: - fix missing include in test13 2003-01-07 02:30, v1.3.2: - configure looks for postgres includes/library in more places, thanks Ray! 2003-01-02 23:00, v1.3.1: - bugfix in Cursor positioning 2003-01-02 20:30, v1.3.0: - absolute positioning for Cursor - better documentation on cursors - reduced, but improved test suite output 2002-12-23 17:30, v1.2.8: - Cursor::Move() returns number of rows skipped - new typedef Cursor::size_type 2002-12-14 23:30, v1.2.7: - test suite now distinguishes expected errors from unexpected ones 2002-12-09 20:00, v1.2.6: - fixed some Cursor test cases for change in postgres 7.3 - added important warning to Cursor 2002-12-09 02:00, v1.2.5: - added important warning to CachedResult 2002-12-08 14:14, v1.2.4: - fixed compile error on some systems in include/pqxx/util.h 2002-12-04 12:00, v1.2.3: - workaround for broken on some systems - fixed Quote() bug 2002-12-03 01:30, v1.2.2: - fixed serious CachedResult bug - added test41 2002-12-02 17:00, v1.2.1: - hopefully fixed cursor bug with PostgreSQL 7.3 2002-12-01 22:00, v1.2.0: - new CachedResult class 2002-11-07 13:15, v1.1.4: - workaround for missing InvalidOid definition 2002-10-23 16:00, v1.1.3: - Cursor & TableStream hierarchy now work on any transaction type - get no. of affected rows & oid of inserted row from Result - increased test coverage 2002-10-21 01:30, v1.1.2: - updated build procedure - Debian packaging improvements 2002-09-25 03:00, v1.1.1: - supports activating/deactivating of connections - various Connection getters now activate deferred connection first 2002-09-23 01:00, v1.1.0: - supports lazy connections (added 19 test cases just for these) - greatly reduced performance overhead for RobustTransaction - removed id field from RobustTransaction's transaction log tables 2002-09-14 20:00, v1.0.1: - now lives on GBorg - various packaging updates 2002-06-12 17:30, v0.5.1: - no longer have to destroy one transaction before creating the next 2002-06-07 17:15, v0.5.0: - "make install" now finally installs headers! - distribution now includes SGML (DocBook) version of tutorial 2002-06-04 15:00, v0.4.4: - may now have multiple triggers with same name on single connection 2002-06-02 23:00, v0.4.3: - fixed TableReader problem with \t and \n 2002-06-01 21:00, v0.4.2: - hopefully fixes compile problem with broken std::iterator - configure no longer requires --with-postgres-include=/usr/include/postgresql 2002-05-29 22:00, v0.4.1: - can now also handle bool, unsigned char, short field types 2002-05-27 22:30, v0.4.0: - RENAMED Transactor::TRANSACTIONTYPE to argument_type for STL conformance - RENAMED Result::Field::name() to Name() - documentation improvements - minor optimizations 2002-05-18 00:00, v0.3.1: - removed broken postgres_fe.h dependency (hopefully permanent fix) 2002-05-12 22:45, v0.3.0: - also looks for postgres_fe.h in postgres' internal/ directory (tmp fix) 2002-05-05 01:30, v0.2.3: - extensive build instructions in README - make check now controlled through PG environment variables 2002-05-04 19:30, v0.2.2: - more STL conformance - fixed regression test - test6 now copies "orgevents" to "events" by default 2002-04-28 23:45 Version bumped to 0.2 2002-04-28 23:45 Self-generated distribution archive 2002-04-27 14:20 Replaced automake symlinks with actual files 2002-04-07 02:30 Released with configure script 2002-03-29 01:15 Not yet released. Still integrating autogen stuff... libpqxx-4.0.1+dfsg/README000066400000000000000000000447051224474465600150320ustar00rootroot00000000000000Introduction Welcome to libpqxx, the C++ API to the PostgreSQL database management system. This package requires PostgreSQL to be installed--including the C headers for client development. The library builds on top of PostgreSQL's standard C API, libpq, though this fact is almost completely hidden from programs that use libpqxx. Further information, as well as updates, a mailing list, and a bug reporting system can be found at http://pqxx.org/ There are also ready-made libpqxx packages available for several systems: Debian packages are available on any Debian download mirror, Mark Round maintains a Blastwave package for Solaris, and Arjen Baart has made RPM packages (source and i386 binaries) available on http://www.andromeda.nl/UNIX/packages/ You may want to check these before going to the trouble of building libpqxx yourself. Getting Started All of this applies only to Unix-like operating systems: GNU/Linux, Apple OSX and the BSD family, AIX, HP-UX, Irix, Solaris, etc. Microsoft Windows with a Unix-like environment such as Cygwin or MinGW installed should also be able to use these intructions. There is a separate section below for Windows users without such an environment. For the Unix-like systems the procedure is the standard "configure, make, make install" sequence. In order to run the test suite, you'll also need to set up a database for the tests to play with. Run the "configure" script with the --help option to see build and installation options. You need to get these right before you compile. Then: ./configure # (plus any options you find appropriate) make This will compile the library. You'll also want to run the test suite to make sure that everything works. To prepare for that, you need to set up a disposable test database that the test suite to play with. You'll want password-less authentication to avoid having to log in too many times. In this example, the test database is called pqxx-test and runs on a server at IP address 192.168.1.99. Before running the test, make sure you can log into your test database with psql, the command-line SQL shell that comes with PostgreSQL: env PGHOST=192.168.1.99 PGDATฺABASE=pqxx-test psql (This is using "env" as a way of setting shell variables for the duration of one command; your shell may have different ways of setting variables.) Once you have that working, use the same login parameters to run the libpqxx test suite: make PGHOST=192.168.1.99 PGDATABASE=pqxx-test check Assuming that the test suite runs successfully, you are now ready to install. You'll typically need superuser privileges to do run this command: make install Now you should be able to link your own programs with libpqxx. If something went wrong on the way, or what you have isn't quite what you want, it's time to move on to the fineprint we hinted at. 1. Configure A word on the configure script. It needs to find the C header and the binary for libpq, the C-level client library, so that the libpqxx build procedure can make use of them. The configure script finds these files by running a script called pg_config that comes with PostgresQL. If you have postgres installed, pg_config should be somewhere on your system. It will "know" where the relevant files are. The configure script just needs to run it. Make sure that the folder containing pg_config is in your executable path before you run the configure script, or it will fail with a message like: configure: error: PostgreSQL configuration script pg_config was not found. If you don't want to have pg_config in your path for whatever reason, or you have multiple PostgreSQL installations on your system (each with their own copy of pg_config) and wish to override the default version, add an option like PG_CONFIG=/home/me/postgres/bin/pg_config to your "configure" command line. Here /home/me/postgres/bin/pg_config is just an example of where your preferred copy of pg_config might be. This would tell the configure script that you wish to build a libpqxx based on the postgres version found in /home/me/postgres. About installing: if you wish to install libpqxx in a custom location, such as your home directory /home/me, you can specify this to the configure script before you build libpqxx. You select the installation location using the configure script's --prefix option, e.g.: ./configure --prefix=/home/me A custom location can be useful to keep locally-build software separate from packaged software. Conventional installation locations for custom software on Unix-like systems are /usr/local and /opt. Custom installation locations can also be handy if you don't have administrator rights on the machine you're working on! The configure scripts supports many other options to tweak how and where libpqxx is to be built and installed; try the --help option to get an overview if you're interested. If configuration just absolutely plain won't work for whatever reason: take a look in the config/sample-headers/ directory. Here you will find configuration headers for various compilers and libpq versions. Pick the config-internal-*.h and config-public-*.h headers for the compiler and libpq version most closely matching your own, and see if they work for you. You may also want to tweak them manually. 2. Make One problem some people have run into at this stage is that the header files for PostgreSQL need the OpenSSL header files to be installed. If this happens to you, make sure openssl is installed and its headers are in your compiler's include path. 3. Make Check "Make check" is where you compile and run the test suite that verifies the library's functionality. The "make check" procedure needs a database to play with. It will create and drop various tables in that database. Use a throwaway database for this or risk losing data! (Actually the test only manipulates tables whose names start with "pqxx" so in practice the risk will be small. But better safe than sorry: use a disposable test database separate from your own data.) To direct the test suite to the right database, set some or all of the following environment variables as needed for "make check": PGDATABASE (name of database; defaults to your user name) PGHOST (database server; defaults to local machine) PGPORT (TCP port to connect to; default is 5432) PGUSER (your PostgreSQL user ID; defaults to your login name) PGPASSWORD (your PostgreSQL password, if needed) Further environment variables that may be of use to you are documented in the libpq documentation and in the manpage for Postgres' command-line client, psql. Setting environment variables works differently depending on your shell, but try one of these: VARIABLE=value export VARIABLE or set VARIABLE=value Try printing the variable afterwards to make sure. The command is normally echo $VARIABLE If you set the variable successfully, it should print the value you assigned. It will print nothing if you failed to set the variable. On Unix-like systems, postgres may be listening on a Unix domain socket instead of a TCP port. The socket will appear as a file somewhere in the filesystem with a name like .s.PGSQL.5432. To connect to this type of socket, set PGHOST to the directory where you find this file, as an absolute path. For example, it may be "/tmp" or "/var/run" or "/var/run/postgresql". The leading slash tells libpq that this is not a network address but a local Unix socket. 4. Make Install This is where you install the libpqxx library and header files to your system. Assuming this succeeds, you should now be able to build your own programs by adding the location of the header files (e.g. /usr/local/pqxx/include) to your compiler's include path when compiling your application. Similarly, add the location of the library binary (e.g. /usr/local/pqxx/lib) to your library search path when linking your application. See the documentation and the test programs for more information on using libpqxx. If you link with the dynamic version of the library, you may find that your program fails to run because the run-time loader cannot find the library. There are several ways around that. Pick the first option that works for you: (i) by linking to the static version of the library, or (ii) adding a link to the dynamic libpqxx library somewhere in your system's standard library locations, or (iii) adding libpqxx's lib/ directory to your loader's search path before running your program. On Unix-like systems including GNU/Linux, the loader's search path can be extended by setting the LD_LIBRARY_PATH variable. Enjoy! Building on Windows Project files for Visual C++ are provided in the win32 directory, along with some other Windows-specific material. You'll need at least version 7 of the VC compiler (also called VC.NET), earlier versions being too severely flawed to build serious post-1996 C++ code. Some of the 7.x versions will work; others may not. Versions of the library have also been built with Intel's compiler running as a Visual C++ plugin. Instead of going this route, you may want to try if the Unix build procedure works for you instead, e.g. using the Cygwin tools. In theory it should be possible to run the configure script and build with Visual C++ or any other compiler. If you do proceed without the configure script, you'll need to copy the most appropriate compile-time configuration files from various subdirectories in config/example-headers/ to include/pqxx. You may need to tweak them manually to define the exact features your system, compiler, and PostgreSQL versions support. Normally the configure script would do this for you. Before trying to compile with Visual C++, you'll at least need to copy the file win32/common-sample to win32/common, and edit the latter to reflect the proper paths to your PostgreSQL headers and the libpq library. See the win32 subdirectory for more documentation. Manual Configuration: config-*-*.h Normally, on any vaguely Unix-like system, the configuration headers (called config-internal-*.h for the library's internal use, config-public-*.h for both the library and client programs) are generated from config.h.in. All these files, once generated, are situated in the include/pqxx/ directory. The configitems file lists all configuration items and where they go; but see win32/INSTALL.txt for a detailed description of how these files work. Getting the compiler-related configuration right can take several stages of trying to build, looking at error messages, looking for configuration items that may be related, changing them, and building again. If nothing seems to help, try the libpqxx mailing list or register a bug report or support request on the website. Be sure to read the FAQ though, because there are some known problems with various compilers. Windows-Specific Build Problems If you're using Microsoft's compiler, you may find that some features of the library are left out in order to work around compiler limitations. Several other workarounds for compiler bugs are automatically enabled when using Visual C++, regardless of whether you use the configure script. Another problem specific to Windows is that apparently it doesn't let you free memory in a DLL that was allocated in the main program or in another DLL, or vice versa. This can cause trouble when setting your own notice handlers to process error or warning output. For this reason, among others, recommended practice is to build libpqxx as a static library, not a DLL. Documentation The doc/ directory contains API reference documentation and a tutorial, both in HTML format. These are also available online. For more detailed information, look at the header files themselves. These are in the include/pqxx/ directory. The reference documentation is extracted from the headers using a program called Doxygen. When learning about programming with libpqxx, you'll want to start off by reading about the connection_base class and its children, as well as the transaction_base class. For programming examples, take a look at the test programs in the test/ directory. If you don't know how a certain function or class is used, try searching the test programs for that name. Programming with libpqxx Your first program will involve the libpqxx classes "connection" (see headers "pqxx/connection_base.hxx" and "pqxx/connection.hxx"), and "work" (a convenience typedef for transaction<> which conforms to the interface defined in "pqxx/transaction_base.hxx"). These "*.hxx" headers are not the ones you include in your program. Instead, include the versions without filename suffix (i.e. "pqxx/connection_base" etc.) and they will include the .hxx files for you. This was done so that includes are in standard C++ style (as in etc.), but an editor will still recognize them as files containing C++ code. Continuing the list of classes, you will most likely also need the result class ("pqxx/result.hxx"). In a nutshell, you create a "connection" based on a Postgres connection string (see below), create a "work" in the context of that connection, and run one or more queries on the work which return "result" objects. The results are containers of rows of data, each of which you can treat as an array of strings: one for each field in the row. It's that simple. Here is a simple example program to get you going, with full error handling: #include #include using namespace std; using namespace pqxx; int main() { try { connection C; cout << "Connected to " << C.dbname() << endl; work W(C); result R = W.exec("SELECT name FROM employee"); cout << "Found " << R.size() << "employees:" << endl; for (result::const_iterator r = R.begin(); r != R.end(); ++r) { cout << r[0].c_str() << endl; } cout << "Doubling all employees' salaries..." << endl; W.exec("UPDATE employee SET salary=salary*2"); cout << "Making changes definite: "; W.commit(); cout << "ok." << endl; } catch (const exception &e) { cerr << e.what() << endl; return 1; } return 0; } Connection strings Postgres connection strings state which database server you wish to connect to, under which username, using which password, and so on. Their format is defined in the documentation for libpq, the C client interface for PostgreSQL. Alternatively, these values may be defined by setting certain environment variables as documented in e.g. the manual for psql, the command line interface to PostgreSQL. Again the definitions are the same for libpqxx-based programs. The connection strings and variables are not fully and definitively documented here; this document will tell you just enough to get going. Check the PostgreSQL documentation for authoritative information. The connection string consists of attribute=value pairs separated by spaces, e.g. "user=john password=1x2y3z4". The valid attributes include: host Name of server to connect to, or the full file path (beginning with a slash) to a Unix-domain socket on the local machine. Defaults to "/tmp". Equivalent to (but overrides) environment variable PGHOST. hostaddr IP address of a server to connect to; mutually exclusive with "host". port Port number at the server host to connect to, or socket file name extension for Unix-domain connections. Equivalent to (but overrides) environment variable PGPORT. dbname Name of the database to connect to. A single server may host multiple databases. Defaults to the same name as the current user's name. Equivalent to (but overrides) environment variable PGDATABASE. user User name to connect under. This defaults to the name of the current user, although PostgreSQL users are not necessarily the same thing as system users. requiressl If set to 1, demands an encrypted SSL connection (and fails if no SSL connection can be created). Settings in the connection strings override the environment variables, which in turn override the default, on a variable-by-variable basis. You only need to define those variables that require non-default values. Linking with libpqxx To link your final program, make sure you link to both the C-level libpq library and the actual C++ library, libpqxx. On most Unix-style compilers, this can be done using the options -lpq -lpqxx while linking. Note that both libraries must be in your link path, so the linker knows where to find them. Any dynamic libraries you use must also be in a place where the loader can find them when loading your program at runtime. Some users have reported problems using the above syntax, however, particularly when multiple versions of libpqxx are partially or incorrectly installed on the system. If you get massive link errors, try removing the "-lpqxx" argument from the command line and replacing it with the name of the libpqxx library binary instead. That's typically libpqxx.a, but you'll have to add the path to its location as well, e.g. /usr/local/pqxx/lib/libpqxx.a. This will ensure that the linker will use that exact version of the library rather than one found elsewhere on the system, and eliminate worries about the exact right version of the library being installed with your program.. APPENDIX A - Links Apple MacOS X http://www.apple.com/macosx/ BSD http://www.bsd.org/ C++ http://www.cs.rpi.edu/~musser/stl-book/ Cygwin http://cygwin.com/ Doxygen http://www.stack.nl/~dimitri/doxygen/ gcc http://gcc.gnu.org/ Google http://www.google.com/ libpq http://candle.pha.pa.us/main/writings/pgsql/sgml/libpq.html libpqxx http://pqxx.org/ Linux http://www.linux.org/ MinGW http://www.mingw.org/ OpenSSL http://www.openssl.org/ PostgreSQL http://www.postgresql.org/ zlib http://www.zlib.org/ APPENDIX B - Projects Using libpqxx This list is far from complete. It is known that there are many other projects using libpqxx that are not included here. Some of them may be proprietary, or even have no names. Inclusion does not imply endorsement. For all I know, the people running the Google projects may be unhappy with libpqxx--or perhaps they may have stopped using it by the time you read this! But obviously I'll do my best to ensure that this does not happen. On to the list: As found on Google: DocConversion http://docconversion.sourceforge.net/ Genea http://savannah.nongnu.org/projects/genea/ Gnucomo http://www.gnucomo.org/ MapServer http://mapserver.gis.umn.edu/ QHacc http://qhacc.sourceforge.net/ Vocal / Mascarpone http://www.vovida.org/ Confirmed by authors: OKE http://www.liacs.nl/home/bsamwel/oke/prerelease-0.10/ KOffice / Kexi http://www.kexi-project.org/ KPoGre http://kpogre.sourceforge.net/ Once MMORPG http://sourceforge.net/projects/once/ Scippy http://dicomlib.swri.ca/scippy.html libpqxx-4.0.1+dfsg/README-UPGRADE000066400000000000000000000220111224474465600161010ustar00rootroot00000000000000NOTICES FOR USERS UPGRADING FROM 3.0 TO 3.1 The machinery to support conversion between the database's textual format and the client's native types are now in a separate header, pqxx/strconv. If your program fails to compile, try adding an include statement to include this new header. In binarystring objects, the results of the str() function are no longer cached inside the object. This means that calling this function repeatedly will be a lot slower (but keeping and caching the result yourself could be a lot faster) than it was in previous versions. It also means that subsequent invocations will return different string objects, not references to the same one. NOTICES FOR USERS UPGRADING FROM 2.x TO 3.x All items marked as deprecated in the 2.x API have been removed. The Cursor and CachedResult classes are gone. A new class "stateless_cursor" offers the functionality of Cursor combined with CachedResult's ease of use. The only thing still missing is that stateless_cursor does not do any client-side caching. The sql_base class is still there, and sql_cursor offers low-level cursor access for those who want to get close to the metal. The cursor stream API remains unchanged. NOTICES FOR USERS UPGRADING FROM 2.0 AND 2.1 VERSIONS TO 2.2.0 OR LATER The default installation location has changed from /usr/local/pqxx to /usr/local which should make it easier to run programs linked to libpqxx. If you upgrade, be sure to remove your old /usr/local/pqxx is removed, or at least remove it from your header and library paths when compiling your libpqxx programs. The configure script no longer requires the --with-postgres options, nor does it recognize them. Instead, it finds the PostgreSQL headers and libraries by running Postgres' pg_config script. This should have been installed in the binaries directory of your PostgreSQL installation; make sure it's in your command path before running the libpqxx configure script. IMPORTANT NOTICE FOR USERS UPGRADING TO 1.9.0 OR LATER FROM OLDER VERSIONS Version 1.9.0 marks a radical change in the library, preparatory to the 2.0.0 release2003. These may require changes in your code; see the NEWS file for quick overview of the changes. Most of these are also relevant for users upgrading from 1.x to 2.x versions of the library. Not all the changes will be of immediate importance to you; where possible, typedefs have been provided to maintain backwards compatibility. In some cases however, your existing code may fail to compile, or changes may be needed to stay compatible with future versions of libpqxx. 1. The Great Renaming Practically all classes have been renamed to fully lower-case names. This was requested by several users, and should help stylistic integration with the C++ Standard Library. Typedefs have been provided where necessary, so no immediate changes in your code are needed on that score (although eventually of course the typedefs will be phased out); however, don't be surprised if class names are spelled differently in the documentation or in compiler messages than you're used to. 2. The Transformed Transaction Taxonomy (TTT) The old Transaction hierarchy has been transformed to accomodate transaction isolation levels as compile-time type properties. Also, there is now a separate dbtransaction base class to indicate that a subclass opens a real transaction on the backend. As you may have guessed, nontransaction is the only type of transaction implementation that isn't derived from dbtransaction. The new root of the inheritance tree is transaction_base. Isolation levels are modeled as template arguments to the transaction types that support them, i.e. those classes derived from dbtransaction. This makes it easy to adapt if the set of isolation levels implemented by the underlying database should ever change. To limit the amount of inlined code, these newly templatized classes (i.e. transaction and robusttransaction) are not derived directly from dbtransaction. Instead, their implementations are mostly contained in basic_transaction and basic_robusttransaction respectively. The template classes inherit their implementations from these classes and only add the minimal changes required to set their isolation levels. To express that a function requires a robusttransaction of any isolation level, for instance, make its parameter refer to a basic_robusttransaction. The database's default isolation level is "read committed," which means that a transaction will read newly changed values as they become available from other transactions as they commit. PostgreSQL also implements "serializable," which completely isolates each transaction from seeing changes made by other transactions while it is active. The drawback of the serializable level is that the database may occasionally need to abort the transaction because its "snapshot" view of the database has become impossible to maintain. Using libpqxx transactors will isolate you from this concern. The old Transaction name is now typedef'ed to mean transaction; to get a serializable one, declare a transaction. The same goes for robusttransaction. To use the default isolation level, just write transaction<> (or, naturally, robusttransaction<>). This will use the default template parameter, which is read_committed. For transaction<>, which you'll usually want to use, there is also a convenience typedef called "work." Isolation levels are defined in the new header file pqxx/isolation.h. 3. If you use Cursor or CachedResult... These classes have contained a serious bug for some time now, which is related to the transaction isolation levels described above. Even if you don't want to upgrade right away, please try to avoid the "absolute positioning" feature of Cursor, and avoid CachedResult altogether. Either will be safe if you only read your result set once, in a strict forward-only manner, but please consider upgrading libpqxx. Newer version ensure that your code will not build until you fix the problem. The problem is this: due to the database's default transaction isolation level of "read committed," it is possible for another transaction to modify the contents of your query's result set as you access them. The Cursor class in recent versions of libpqxx knew how to keep track of their absolute position to let you scroll directly to a given row, or to determine the size of the result set. If another transaction modifies the rows you're interested in, however, that may affect the number of rows in your result set and confuse your cursor object's positioning logic. The CachedResult class was built on top of Cursor's absolute positioning functionality, and so has the same problem. TTT to the rescue. The new transaction hierarchy allows the constructors for cursor and cachedresult to demand that they be passed a transaction with isolation level "serializable." Failure to do so will yield a compile-time or link-time error for the symbol error_permitted_isolation_level(). If you want to continue using cursors and cachedresults the way you were used to, you'll need to replace the relevant transactions with ones declared as serializable: transaction or robusttransaction. This may require some restructuring or templatization of your program in some cases, because the constructors for cursor and cachedresult must be able to see the correct transaction isolation level at compile time, but I hope you'll agree it was the only solution that was both safe and efficient. The offending functionality will be spliced out of the cursor class; in fact, the class may disappear altogether and be replaced by a set of iterator-based interfaces; random-access iterators will only be available in serializable transactions, and some optimizations will be possible for forward-only iterators. The difference between updateable and read-only cursors may be reflected as a distinction between regular iterators and const_iterators. 4. If you use Transactors The old way of setting a transaction type as your transactor's "quality of service," by overriding the nested typedef for "argument_type," has been deprecated. It will still work as far as I can make out, but may at some point in the future development of libpqxx fail to do what you expect. There will be no compile-time warning of this, so please inspect your transactors manually. The new way to set a transactor's quality of service is to pass the desired transaction type as a template argument. The old Transactor name is defined to mean "transactor<>", maintaining the old default of Transaction (which is now really a transaction). To replace this with, say, a nontransaction write: class UnsafeTransactor : public transactor For a super-robust, highly reliable transactor, write: class SafeTransactor : public transactor > Note the space between the two closing angled-brackets: "> >" instead of merely ">>". This is due to an ambiguity in the C++ syntax. Without the whitespace, the two consecutive larger-than signs would be parsed as a >> (shift-right) operator. libpqxx-4.0.1+dfsg/VERSION000066400000000000000000000000231224474465600152030ustar00rootroot00000000000000PQXX_VERSION 4.0.1 libpqxx-4.0.1+dfsg/aclocal.m4000066400000000000000000001100111224474465600157720ustar00rootroot00000000000000# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/m4/libtool.m4]) m4_include([config/m4/ltoptions.m4]) m4_include([config/m4/ltsugar.m4]) m4_include([config/m4/ltversion.m4]) m4_include([config/m4/lt~obsolete.m4]) libpqxx-4.0.1+dfsg/autogen.sh000077500000000000000000000044521224474465600161460ustar00rootroot00000000000000#! /bin/sh # Run this to generate all the initial makefiles, etc. # Set CONFIG_ARGS to the argument list you wish to pass to configure set -e # Optionally run in "dumb" locale to avoid performance overhead (and risk of # bugs) involved in localization, encoding issues etc. We only do ASCII here. #export LC_ALL=C latest_automake() { for v in "-1.11" "-1.10" "-1.9" "-1.8" "-1.7" "-1.6" "" ; do if which "automake$v" >/dev/null ; then echo "$v" return fi done } ver="`latest_automake`" # The VERSION file defines our versioning PQXXVERSION=`./tools/extract_version` echo "libpqxx version $PQXXVERSION" PQXX_ABI=`./tools/extract_version --abi` echo "libpqxx ABI version $PQXX_ABI" PQXX_MAJOR="`echo "$PQXXVERSION" | sed -e 's/[[:space:]]*\([0-9]*\)\..*$/\1/'`" PQXX_MINOR="`echo "$PQXXVERSION" | sed -e 's/[^.]*\.\([0-9]*\).*$/\1/'`" substitute() { sed -e "s/@PQXXVERSION@/$PQXXVERSION/g" \ -e "s/@PQXX_MAJOR@/$PQXX_MAJOR/g" \ -e "s/@PQXX_MINOR@/$PQXX_MINOR/g" \ -e "s/@PQXX_ABI@/$PQXX_ABI/g" \ "$1" } # Generate configure.ac based on current version numbers substitute configure.ac.in >configure.ac # Generate version header. substitute include/pqxx/version.hxx.template >include/pqxx/version.hxx # Generate Windows makefiles (adding carriage returns to make it MS-DOS format) makewinmake() { ./tools/template2mak.py "$1" | sed -e 's/$/\r/' >"$2" } if which python >/dev/null ; then # Use templating system to generate various Makefiles ./tools/template2mak.py test/Makefile.am.template test/Makefile.am ./tools/template2mak.py test/unit/Makefile.am.template test/unit/Makefile.am makewinmake win32/vc-libpqxx.mak.template win32/vc-libpqxx.mak makewinmake win32/vc-test.mak.template win32/vc-test.mak makewinmake win32/vc-test-unit.mak.template win32/vc-test-unit.mak makewinmake win32/mingw.mak.template win32/MinGW.mak else echo "Python not available--not generating Visual C++ makefiles." fi autoheader libtoolize --force --automake --copy aclocal${ver} -I . -I config/m4 automake${ver} --verbose --add-missing --copy autoconf conf_flags="--enable-maintainer-mode $CONFIG_ARGS" if test -z "$NOCONFIGURE" ; then echo Running $srcdir/configure $conf_flags "$@" ... ./configure $conf_flags "$@" \ && echo Now type \`make\' to compile $PKG_NAME || exit 1 else echo Skipping configure process. fi libpqxx-4.0.1+dfsg/config/000077500000000000000000000000001224474465600154055ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/Makefile.am000066400000000000000000000004341224474465600174420ustar00rootroot00000000000000EXTRA_DIST=m4/Makefile.am sample-headers MAINTAINERCLEANFILES=Makefile.in config.guess config.sub install-sh \ ltmain.sh missing mkinstalldirs dist-hook: find "${distdir}" -type d -name CVS -print0 | xargs -0 rm -rf find "${distdir}" -type d -name .svn -print0 | xargs -0 rm -rf libpqxx-4.0.1+dfsg/config/Makefile.in000066400000000000000000000262641224474465600174640ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = config DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in config.guess \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ EXTRA_DIST = m4/Makefile.am sample-headers MAINTAINERCLEANFILES = Makefile.in config.guess config.sub install-sh \ ltmain.sh missing mkinstalldirs all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am dist-hook: find "${distdir}" -type d -name CVS -print0 | xargs -0 rm -rf find "${distdir}" -type d -name .svn -print0 | xargs -0 rm -rf # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/config/config.guess000077500000000000000000001276371224474465600177450ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2009-12-30' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libpqxx-4.0.1+dfsg/config/config.sub000077500000000000000000001034451224474465600173770ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libpqxx-4.0.1+dfsg/config/depcomp000077500000000000000000000442671224474465600167770ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpqxx-4.0.1+dfsg/config/install-sh000077500000000000000000000325371224474465600174230ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpqxx-4.0.1+dfsg/config/ltmain.sh000066400000000000000000010520401224474465600172270ustar00rootroot00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1ubuntu2" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 libpqxx-4.0.1+dfsg/config/m4/000077500000000000000000000000001224474465600157255ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/m4/Makefile.am000066400000000000000000000001501224474465600177550ustar00rootroot00000000000000MAINTAINERCLEANFILES=Makefile.in config.guess config.sub install-sh \ ltmain.sh missing mkinstalldirs libpqxx-4.0.1+dfsg/config/m4/libtool.m4000066400000000000000000010604341224474465600176430ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS libpqxx-4.0.1+dfsg/config/m4/ltoptions.m4000066400000000000000000000300731224474465600202250ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libpqxx-4.0.1+dfsg/config/m4/ltsugar.m4000066400000000000000000000104241224474465600176510ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) libpqxx-4.0.1+dfsg/config/m4/ltversion.m4000066400000000000000000000012621224474465600202150ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libpqxx-4.0.1+dfsg/config/m4/lt~obsolete.m4000066400000000000000000000137561224474465600205550ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) libpqxx-4.0.1+dfsg/config/missing000077500000000000000000000262331224474465600170120ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpqxx-4.0.1+dfsg/config/mkinstalldirs000077500000000000000000000013141224474465600202120ustar00rootroot00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs 137 2002-08-28 14:28:24Z jtv $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here libpqxx-4.0.1+dfsg/config/sample-headers/000077500000000000000000000000001224474465600202775ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/000077500000000000000000000000001224474465600221115ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/MinGW-3.4/000077500000000000000000000000001224474465600233745ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/MinGW-3.4/pqxx/000077500000000000000000000000001224474465600243745ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/MinGW-3.4/pqxx/config-internal-compiler.h000066400000000000000000000004561224474465600314410ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_QUIET_NAN 1 /* #define PQXX_HAVE_SLEEP 1 */ #define PQXX_HAVE_STRING_CLEAR 1 /* #define PQXX_HAVE_SYS_SELECT_H 1 */ #define PQXX_SELECT_ACCEPTS_NULL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/MinGW-3.4/pqxx/config-public-compiler.h000066400000000000000000000005251224474465600311000ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 #define PQXX_HAVE_CPP_WARNING 1 #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/SunStudio-8/000077500000000000000000000000001224474465600242135ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/SunStudio-8/pqxx/000077500000000000000000000000001224474465600252135ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/SunStudio-8/pqxx/config-internal-compiler.h000066400000000000000000000004121224474465600322500ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 /* #undef PQXX_HAVE_COUNT_IF */ #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_SLEEP 1 #define PQXX_HAVE_STRING_CLEAR 1 #define PQXX_HAVE_SYS_SELECT_H 1 /* #undef PQXX_SELECT_ACCEPTS_NULL */ libpqxx-4.0.1+dfsg/config/sample-headers/compiler/SunStudio-8/pqxx/config-public-compiler.h000066400000000000000000000005341224474465600317170ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 /* #undef PQXX_HAVE_CPP_WARNING */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 /* #undef PQXX_HAVE_REVERSE_ITERATOR */ #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualC++.NET-2003/000077500000000000000000000000001224474465600246145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualC++.NET-2003/pqxx/000077500000000000000000000000001224474465600256145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualC++.NET-2003/pqxx/config-internal-compiler.h000066400000000000000000000005221224474465600326530ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 /* #define HAVE_UNISTD_H 1 */ #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_QUIET_NAN 1 /* #define PQXX_HAVE_SLEEP 1 */ #define PQXX_HAVE_STRING_CLEAR 1 /* #define PQXX_HAVE_SYS_SELECT_H 1 */ #define PQXX_SELECT_ACCEPTS_NULL 1 #define HAVE_VSNPRINTF_DECL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualC++.NET-2003/pqxx/config-public-compiler.h000066400000000000000000000006371224474465600323240ustar00rootroot00000000000000#define PGSTD std /* #define PQXX_BROKEN_ITERATOR 1 */ /* #define PQXX_BROKEN_USING_DECL 1 */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 /* #define PQXX_HAVE_CPP_WARNING 1 */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_LONG 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 #define PQXX_PQ_IN_NAMESPACE 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2005/000077500000000000000000000000001224474465600250535ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2005/pqxx/000077500000000000000000000000001224474465600260535ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2005/pqxx/config-internal-compiler.h000066400000000000000000000005221224474465600331120ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 /* #define HAVE_UNISTD_H 1 */ #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_QUIET_NAN 1 /* #define PQXX_HAVE_SLEEP 1 */ #define PQXX_HAVE_STRING_CLEAR 1 /* #define PQXX_HAVE_SYS_SELECT_H 1 */ #define PQXX_SELECT_ACCEPTS_NULL 1 #define HAVE_VSNPRINTF_DECL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2005/pqxx/config-public-compiler.h000066400000000000000000000006751224474465600325650ustar00rootroot00000000000000#define PGSTD std /* #define PQXX_BROKEN_ITERATOR 1 */ /* #define PQXX_BROKEN_USING_DECL 1 */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 /* #define PQXX_HAVE_CPP_WARNING 1 */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_LONG 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 #define PQXX_PQ_IN_NAMESPACE 1 #define PQXX_HAVE_STRERROR_S 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2008/000077500000000000000000000000001224474465600250565ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2008/pqxx/000077500000000000000000000000001224474465600260565ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2008/pqxx/config-internal-compiler.h000066400000000000000000000005221224474465600331150ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 /* #define HAVE_UNISTD_H 1 */ #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_QUIET_NAN 1 /* #define PQXX_HAVE_SLEEP 1 */ #define PQXX_HAVE_STRING_CLEAR 1 /* #define PQXX_HAVE_SYS_SELECT_H 1 */ #define PQXX_SELECT_ACCEPTS_NULL 1 #define HAVE_VSNPRINTF_DECL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2008/pqxx/config-public-compiler.h000066400000000000000000000007651224474465600325700ustar00rootroot00000000000000#define PGSTD std /* #define PQXX_BROKEN_ITERATOR 1 */ /* #define PQXX_BROKEN_USING_DECL 1 */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 /* #define PQXX_HAVE_CPP_WARNING 1 */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_LONG 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 #define PQXX_PQ_IN_NAMESPACE 1 #define PQXX_HAVE_STRERROR_S 1 #define PQXXTR1 std::tr1 #define PQXX_HAVE_SHARED_PTR 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2010/000077500000000000000000000000001224474465600250475ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2010/pqxx/000077500000000000000000000000001224474465600260475ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2010/pqxx/config-internal-compiler.h000066400000000000000000000005221224474465600331060ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 /* #define HAVE_UNISTD_H 1 */ #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_QUIET_NAN 1 /* #define PQXX_HAVE_SLEEP 1 */ #define PQXX_HAVE_STRING_CLEAR 1 /* #define PQXX_HAVE_SYS_SELECT_H 1 */ #define PQXX_SELECT_ACCEPTS_NULL 1 #define HAVE_VSNPRINTF_DECL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/VisualStudio2010/pqxx/config-public-compiler.h000066400000000000000000000007651224474465600325610ustar00rootroot00000000000000#define PGSTD std /* #define PQXX_BROKEN_ITERATOR 1 */ /* #define PQXX_BROKEN_USING_DECL 1 */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 /* #define PQXX_HAVE_CPP_WARNING 1 */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_LONG 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 #define PQXX_PQ_IN_NAMESPACE 1 #define PQXX_HAVE_STRERROR_S 1 #define PQXXTR1 std::tr1 #define PQXX_HAVE_SHARED_PTR 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-2.95/000077500000000000000000000000001224474465600232405ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-2.95/pqxx/000077500000000000000000000000001224474465600242405ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-2.95/pqxx/config-internal-compiler.h000066400000000000000000000004151224474465600313000ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define PQXX_HAVE_COUNT_IF 1 /* #undef PQXX_HAVE_IMBUE */ /* #undef PQXX_HAVE_LOCALE */ #define PQXX_HAVE_SLEEP 1 /* #undef PQXX_HAVE_STRING_CLEAR */ #define PQXX_HAVE_SYS_SELECT_H 1 #define PQXX_SELECT_ACCEPTS_NULL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-2.95/pqxx/config-public-compiler.h000066400000000000000000000005441224474465600307450ustar00rootroot00000000000000#define PGSTD std #define PQXX_BROKEN_ITERATOR 1 #define PQXX_BROKEN_USING_DECL 1 /* #undef PQXX_HAVE_CHAR_TRAITS */ /* #undef PQXX_HAVE_CPP_PRAGMA_MESSAGE */ /* #undef PQXX_HAVE_CPP_WARNING */ /* #undef PQXX_HAVE_IOS */ /* #undef PQXX_HAVE_LIMITS */ #define PQXX_HAVE_LONG_DOUBLE 1 /* #undef PQXX_HAVE_REVERSE_ITERATOR */ /* #undef PQXX_HAVE_STREAMBUF */ libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3-apple/000077500000000000000000000000001224474465600242455ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3-apple/config-public-compiler.h_strict000066400000000000000000000005411224474465600323370ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 /* #undef PQXX_HAVE_CPP_PRAGMA_MESSAGE */ /* #undef PQXX_HAVE_CPP_WARNING */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 /* #define PQXX_HAVE_LONG_DOUBLE 1 */ #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3-apple/pqxx/000077500000000000000000000000001224474465600252455ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3-apple/pqxx/config-internal-compiler.h000066400000000000000000000004071224474465600323060ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_SLEEP 1 #define PQXX_HAVE_STRING_CLEAR 1 /* #undef PQXX_HAVE_SYS_SELECT_H */ #define PQXX_SELECT_ACCEPTS_NULL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3-apple/pqxx/config-public-compiler.h000066400000000000000000000005251224474465600317510ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 #define PQXX_HAVE_CPP_WARNING 1 #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3/000077500000000000000000000000001224474465600231465ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3/config-public-compiler.h_strict000066400000000000000000000005471224474465600312460ustar00rootroot00000000000000#define PGSTD std /* #define PQXX_BROKEN_ITERATOR 1 */ /* #define PQXX_BROKEN_USING_DECL 1 */ #define PQXX_HAVE_CHAR_TRAITS 1 /* #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 */ /* #define PQXX_HAVE_CPP_WARNING 1 */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3/pqxx/000077500000000000000000000000001224474465600241465ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3/pqxx/config-internal-compiler.h000066400000000000000000000004421224474465600312060ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_SLEEP 1 #define PQXX_HAVE_QUIET_NAN 1 #define PQXX_HAVE_STRING_CLEAR 1 #define PQXX_HAVE_SYS_SELECT_H 1 #define PQXX_SELECT_ACCEPTS_NULL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-3.3/pqxx/config-public-compiler.h000066400000000000000000000005251224474465600306520ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1 #define PQXX_HAVE_CPP_WARNING 1 #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-4.2/000077500000000000000000000000001224474465600231465ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-4.2/pqxx/000077500000000000000000000000001224474465600241465ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-4.2/pqxx/config-internal-compiler.h000066400000000000000000000010071224474465600312040ustar00rootroot00000000000000#define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define PQXX_HAVE_COUNT_IF 1 #define PQXX_HAVE_C_NAN 1 #define PQXX_HAVE_DISTANCE 1 #define PQXX_HAVE_GCC_VISIBILITY 1 #define PQXX_HAVE_IMBUE 1 #define PQXX_HAVE_LOCALE 1 #define PQXX_HAVE_NAN 1 #define PQXX_HAVE_POLL 1 #define PQXX_HAVE_QUIET_NAN 1 #define PQXX_HAVE_SLEEP 1 #define PQXX_HAVE_STRERROR_R 1 #define PQXX_HAVE_STRING_CLEAR 1 /* #undef PQXX_HAVE_STRLCPY */ #define PQXX_HAVE_STRNLEN 1 #define PQXX_HAVE_SYS_SELECT_H 1 #define PQXX_SELECT_ACCEPTS_NULL 1 libpqxx-4.0.1+dfsg/config/sample-headers/compiler/gcc-4.2/pqxx/config-public-compiler.h000066400000000000000000000005741224474465600306560ustar00rootroot00000000000000#define PGSTD std /* #undef PQXX_BROKEN_ITERATOR */ /* #undef PQXX_BROKEN_USING_DECL */ #define PQXX_HAVE_CHAR_TRAITS 1 /* #undef PQXX_HAVE_CPP_PRAGMA_MESSAGE */ /* #undef PQXX_HAVE_CPP_WARNING */ #define PQXX_HAVE_IOS 1 #define PQXX_HAVE_LIMITS 1 #define PQXX_HAVE_LONG_DOUBLE 1 /* #undef PQXX_HAVE_LONG_LONG */ #define PQXX_HAVE_REVERSE_ITERATOR 1 #define PQXX_HAVE_STREAMBUF 1 libpqxx-4.0.1+dfsg/config/sample-headers/libpq/000077500000000000000000000000001224474465600214065ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.0/000077500000000000000000000000001224474465600217135ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.0/pqxx/000077500000000000000000000000001224474465600227135ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.0/pqxx/config-internal-libpq.h000066400000000000000000000015451224474465600272550ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 /* #undef PQXX_HAVE_PQDESCRIBEPORTAL */ /* #undef PQXX_HAVE_PQENCRYPTPASSWORD */ #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 /* #undef PQXX_HAVE_PQISTHREADSAFE */ #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */ libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.1/000077500000000000000000000000001224474465600217145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.1/pqxx/000077500000000000000000000000001224474465600227145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.1/pqxx/config-internal-libpq.h000066400000000000000000000015451224474465600272560ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 /* #undef PQXX_HAVE_PQDESCRIBEPORTAL */ /* #undef PQXX_HAVE_PQENCRYPTPASSWORD */ #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 /* #undef PQXX_HAVE_PQISTHREADSAFE */ #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */ libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.2/000077500000000000000000000000001224474465600217155ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.2/pqxx/000077500000000000000000000000001224474465600227155ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.2/pqxx/config-internal-libpq.h000066400000000000000000000015341224474465600272550ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 #define PQXX_HAVE_PQDESCRIBEPORTAL 1 #define PQXX_HAVE_PQENCRYPTPASSWORD 1 #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 #define PQXX_HAVE_PQISTHREADSAFE 1 #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */ libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.3/000077500000000000000000000000001224474465600217165ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.3/pqxx/000077500000000000000000000000001224474465600227165ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.3/pqxx/config-internal-libpq.h000066400000000000000000000015341224474465600272560ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 #define PQXX_HAVE_PQDESCRIBEPORTAL 1 #define PQXX_HAVE_PQENCRYPTPASSWORD 1 #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 #define PQXX_HAVE_PQISTHREADSAFE 1 #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */ libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.4/000077500000000000000000000000001224474465600217175ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.4/pqxx/000077500000000000000000000000001224474465600227175ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/8.4/pqxx/config-internal-libpq.h000066400000000000000000000015341224474465600272570ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 #define PQXX_HAVE_PQDESCRIBEPORTAL 1 #define PQXX_HAVE_PQENCRYPTPASSWORD 1 #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 #define PQXX_HAVE_PQISTHREADSAFE 1 #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */ libpqxx-4.0.1+dfsg/config/sample-headers/libpq/9.0/000077500000000000000000000000001224474465600217145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/9.0/pqxx/000077500000000000000000000000001224474465600227145ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/config/sample-headers/libpq/9.0/pqxx/config-internal-libpq.h000066400000000000000000000015311224474465600272510ustar00rootroot00000000000000#define PQXX_HAVE_LO_TELL 1 #define PQXX_HAVE_PQCANCEL 1 #define PQXX_HAVE_PQCLIENTENCODING 1 #define PQXX_HAVE_PQDESCRIBEPORTAL 1 #define PQXX_HAVE_PQENCRYPTPASSWORD 1 #define PQXX_HAVE_PQESCAPEBYTEA 1 #define PQXX_HAVE_PQESCAPEBYTEACONN 1 #define PQXX_HAVE_PQESCAPESTRING 1 #define PQXX_HAVE_PQESCAPESTRINGCONN 1 #define PQXX_HAVE_PQEXECPARAMS 1 #define PQXX_HAVE_PQEXECPREPARED 1 #define PQXX_HAVE_PQFREEMEM 1 #define PQXX_HAVE_PQFREENOTIFY 1 #define PQXX_HAVE_PQFTABLE 1 #define PQXX_HAVE_PQFTABLECOL 1 #define PQXX_HAVE_PQISTHREADSAFE 1 #define PQXX_HAVE_PQMBLEN 1 #define PQXX_HAVE_PQPREPARE 1 #define PQXX_HAVE_PQPROTOCOLVERSION 1 #define PQXX_HAVE_PQPUTCOPY 1 #define PQXX_HAVE_PQRESULTERRORFIELD 1 #define PQXX_HAVE_PQSERVERVERSION 1 #define PQXX_HAVE_PQSETERRORVERBOSITY 1 #define PQXX_HAVE_PQUNESCAPEBYTEA 1 #define PQXX_HAVE_PQUNESCAPEBYTEA_9 1 libpqxx-4.0.1+dfsg/configitems000066400000000000000000000043351224474465600163770ustar00rootroot00000000000000HAVE_SYS_TYPES_H internal compiler HAVE_UNISTD_H internal compiler PACKAGE internal autotools PACKAGE_BUGREPORT internal autotools PACKAGE_NAME internal autotools PACKAGE_STRING internal autotools PACKAGE_TARNAME internal autotools PACKAGE_VERSION internal autotools PGSTD public compiler PQXX_BROKEN_ITERATOR public compiler PQXX_BROKEN_USING_DECL public compiler PQXX_HAVE_GCC_CONST public compiler PQXX_HAVE_GCC_DEPRECATED public compiler PQXX_HAVE_GCC_NORETURN public compiler PQXX_HAVE_GCC_PURE public compiler PQXX_HAVE_AUTO_PTR public compiler PQXX_HAVE_BOOST_SMART_PTR public compiler PQXX_HAVE_CHAR_TRAITS public compiler PQXX_HAVE_COUNT_IF internal compiler PQXX_HAVE_CPP_PRAGMA_MESSAGE public compiler PQXX_HAVE_CPP_WARNING public compiler PQXX_HAVE_DISTANCE internal compiler PQXX_HAVE_IMBUE internal compiler PQXX_HAVE_IOS public compiler PQXX_HAVE_LIMITS public compiler PQXX_HAVE_LO_TELL internal libpq PQXX_HAVE_LONG_LONG public compiler PQXX_HAVE_LOCALE internal compiler PQXX_HAVE_LONG_DOUBLE public compiler PQXX_HAVE_NAN internal compiler PQXX_HAVE_C_NAN internal compiler PQXX_HAVE_GCC_VISIBILITY internal compiler PQXX_HAVE_MOVE public compiler PQXX_HAVE_POLL internal compiler PQXX_HAVE_PQCANCEL internal libpq PQXX_HAVE_PQCLIENTENCODING internal libpq PQXX_HAVE_PQDESCRIBEPORTAL internal libpq PQXX_HAVE_PQESCAPELITERAL internal libpq PQXX_HAVE_PQESCAPEIDENTIFIER internal libpq PQXX_HAVE_PQISTHREADSAFE internal libpq PQXX_HAVE_PQENCRYPTPASSWORD internal libpq PQXX_HAVE_PQUNESCAPEBYTEA_9 internal libpq PQXX_HAVE_PQCLIENTENCODING internal libpq PQXX_HAVE_PQMBLEN internal libpq PQXX_HAVE_QUIET_NAN internal compiler PQXX_HAVE_REVERSE_ITERATOR public compiler PQXX_HAVE_SHARED_PTR public compiler PQXX_HAVE_SLEEP internal compiler PQXX_HAVE_STREAMBUF public compiler PQXX_HAVE_STRERROR_R internal compiler PQXX_HAVE_STRERROR_R_GNU internal compiler PQXX_HAVE_STRING_CLEAR internal compiler PQXX_HAVE_STRNLEN internal compiler PQXX_HAVE_STRLCPY internal compiler PQXX_HAVE_SYS_SELECT_H internal compiler PQXX_HAVE_UNIQUE_PTR public compiler PQXX_SEEKDIRS_MATCH_C internal compiler PQXX_PQ_IN_NAMESPACE public compiler PQXX_SELECT_ACCEPTS_NULL internal compiler PQXX_TR1_HEADERS public compiler PQXXTR1 public compiler VERSION internal autotools libpqxx-4.0.1+dfsg/configure000077500000000000000000022606411224474465600160620ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for libpqxx 4.0.1. # # Report bugs to >. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and Jeroen T. $0: Vermeulen about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpqxx' PACKAGE_TARNAME='libpqxx' PACKAGE_VERSION='4.0.1' PACKAGE_STRING='libpqxx 4.0.1' PACKAGE_BUGREPORT='Jeroen T. Vermeulen ' PACKAGE_URL='' ac_unique_file="src/connection.cxx" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS POSTGRES_INCLUDE POSTGRES_LIB with_postgres_include with_postgres_lib PG_CONFIG MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE BUILD_TUTORIAL_FALSE BUILD_TUTORIAL_TRUE XMLTO HAVE_DOT BUILD_REFERENCE_FALSE BUILD_REFERENCE_TRUE DOXYGEN PKG_CONFIG MKDIR CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX PQXX_MINOR PQXX_MAJOR PQXX_ABI PQXXVERSION am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_documentation enable_maintainer_mode with_std with_tr1 ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libpqxx 4.0.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libpqxx] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libpqxx 4.0.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-documentation Generate documentation --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-std name of standard library namespace (normally "std") --with-tr1 namespace of TR1 extension to the C++ standard Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to >. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libpqxx configure 4.0.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------------------- ## ## Report this to Jeroen T. Vermeulen ## ## -------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libpqxx $as_me 4.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=libpqxx VERSION=4.0.1 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' PQXXVERSION=4.0.1 PQXX_ABI=4.0 PQXX_MAJOR=4 PQXX_MINOR=0 ac_config_headers="$ac_config_headers include/pqxx/config.h" # default prefix for installs # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKDIR+:} false; then : $as_echo_n "(cached) " >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 $as_echo "$MKDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Documentation. # Check whether --enable-documentation was given. if test "${enable_documentation+set}" = set; then : enableval=$enable_documentation; else enable_documentation=yes fi if test "$enable_documentation" = "yes" then # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if /bin/true; then BUILD_REFERENCE_TRUE= BUILD_REFERENCE_FALSE='#' else BUILD_REFERENCE_TRUE='#' BUILD_REFERENCE_FALSE= fi # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HAVE_DOT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HAVE_DOT"; then ac_cv_prog_HAVE_DOT="$HAVE_DOT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_DOT="YES" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_DOT" && ac_cv_prog_HAVE_DOT="NO" fi fi HAVE_DOT=$ac_cv_prog_HAVE_DOT if test -n "$HAVE_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_DOT" >&5 $as_echo "$HAVE_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XMLTO+:} false; then : $as_echo_n "(cached) " >&6 else case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if /bin/true; then BUILD_TUTORIAL_TRUE= BUILD_TUTORIAL_FALSE='#' else BUILD_TUTORIAL_TRUE='#' BUILD_TUTORIAL_FALSE= fi else if /bin/false; then BUILD_REFERENCE_TRUE= BUILD_REFERENCE_FALSE='#' else BUILD_REFERENCE_TRUE='#' BUILD_REFERENCE_FALSE= fi if /bin/false; then BUILD_TUTORIAL_TRUE= BUILD_TUTORIAL_FALSE='#' else BUILD_TUTORIAL_TRUE='#' BUILD_TUTORIAL_FALSE= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # see if we want verbose compiler warnings { $as_echo "$as_me:${as_lineno-$LINENO}: checking maintainer mode" >&5 $as_echo_n "checking maintainer mode... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_maintainer_mode}" >&5 $as_echo "${enable_maintainer_mode}" >&6; } # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; fi if test "${shared}" = "yes" ; then CPPFLAGS="$CPPFLAGS -DPQXX_SHARED" fi # Add options to compiler command line, if compiler accepts it add_compiler_opts() { for option in $* ; do ACO_SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $option" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts $option" >&5 $as_echo_n "checking whether $CXX accepts $option... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : has_option=yes else has_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 $as_echo "$has_option" >&6; } if test "$has_option" = "no" ; then CXXFLAGS="$ACO_SAVE_CXXFLAGS" fi done } # Let's try to get the compiler to be helpful # (Omit options -Weffc++ and -Wabi because they currently yield too many # warnings in gcc's standard headers; omit -Wunreachable-code because it isn't # always right) if test "$GCC" = "yes" ; then # In maintainer mode, enable all the warning options we can if test "$enable_maintainer_mode" = "yes"; then add_compiler_opts \ -Werror \ -Wno-div-by-zero \ -fnothrow-opt \ -ffor-scope \ -fstrict-enums \ -fstrict-aliasing \ -Wstrict-aliasing \ -funit-at-a-time \ -pedantic \ -fno-nonansi-builtins \ -Wall \ -Wmultichar \ -W \ -Wextra \ -Wfloat-equal \ -Wundef \ -Wshadow \ -Wpointer-arith \ -Wcast-qual \ -Wcast-align \ -Wconversion \ -Wctor-dtor-privacy \ -Wendif-labels \ -Wlogical-op \ -Woverlength-strings \ -Wredundant-decls \ -Wsign-compare \ -Wwrite-strings \ -Wnon-virtual-dtor \ -Wreorder \ -Wold-style-cast \ -Woverloaded-virtual \ -Wsign-promo \ -Wstrict-null-sentinel \ -Wformat-security \ -Winit-self \ -Wswitch \ -Wmissing-field-initializers \ -Wmissing-include-dirs \ -Wunused fi if test "$enable_long_long" = "yes" ; then add_compiler_opts -Wno-long-long fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ visibility attribute" >&5 $as_echo_n "checking g++ visibility attribute... " >&6; } gcc_visibility=yes SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ struct __attribute__ ((visibility("hidden"))) d { d() {} void f() {} }; int main () { d D;D.f() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_GCC_VISIBILITY 1" >>confdefs.h else gcc_visibility=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_visibility" >&5 $as_echo "$gcc_visibility" >&6; } if test "$gcc_visibility" = "yes" ; then # Setting default symbol visibility to "hidden" vastly reduces # library size with g++ 4.0, but unfortunately this will require # some more work in the libpqxx setup. Instead, we make only # inline functions hidden. add_compiler_opts -fvisibility-inlines-hidden #add_compiler_opts -fvisibility=hidden fi CXXFLAGS="$SAVE_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ const attribute" >&5 $as_echo_n "checking g++ const attribute... " >&6; } gcc_const_attr=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void __attribute__ ((const)) f(); int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_GCC_CONST 1" >>confdefs.h else gcc_const_attr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_const_attr" >&5 $as_echo "$gcc_const_attr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ deprecation attribute" >&5 $as_echo_n "checking g++ deprecation attribute... " >&6; } gcc_deprecated=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void __attribute__ ((deprecated)) f(); int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_GCC_DEPRECATED 1" >>confdefs.h else gcc_deprecated=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_deprecated" >&5 $as_echo "$gcc_deprecated" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ noreturn attribute" >&5 $as_echo_n "checking g++ noreturn attribute... " >&6; } gcc_noreturn=yes # Needs a throw spec and a definition in order to trip up a bug in clang++ 2.8. # It'll claim the throw spec is missing on the definition. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void __attribute__ ((noreturn)) f() throw (int); void f()throw(int){throw 1;} int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_GCC_NORETURN 1" >>confdefs.h else gcc_noreturn=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_noreturn" >&5 $as_echo "$gcc_noreturn" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ pure attribute" >&5 $as_echo_n "checking g++ pure attribute... " >&6; } gcc_pure=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ void __attribute__ ((pure)) f(); int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_GCC_PURE 1" >>confdefs.h else gcc_pure=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_pure" >&5 $as_echo "$gcc_pure" >&6; } fi # Determine name of standard namespace. PGSTD will be set to this name. The # --with-std= option takes precedence if given; otherwise, several alternatives # are tried. # As a special case, if the argument to the --with-std option is "yes" (as would # be the case if the user specified the option but no argument for it), the # guessing logic is enabled as if the option had not been used. { $as_echo "$as_me:${as_lineno-$LINENO}: checking name of standard library namespace (normally \"std\")" >&5 $as_echo_n "checking name of standard library namespace (normally \"std\")... " >&6; } guessstd=no # Check whether --with-std was given. if test "${with_std+set}" = set; then : withval=$with_std; std=${withval}; else guessstd=yes fi if test "${guessstd}" = "yes" -o "${withval}" = "yes"; then # No explicit std namespace given. Check for alternative "standard" # namespaces, in order of preference. for ns in std _STL stlp_std "" ; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${ns}::string justastring; _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : std="${ns}"; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done fi cat >>confdefs.h <<_ACEOF #define PGSTD $std _ACEOF if ! test -z "${std}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ::${std}" >&5 $as_echo "::${std}" >&6; } usestd="namespace ${std} {} using namespace ${std};" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ::" >&5 $as_echo "::" >&6; } fi boost_smart_ptr=yes ac_fn_cxx_check_header_mongrel "$LINENO" "boost/smart_ptr.hpp" "ac_cv_header_boost_smart_ptr_hpp" "$ac_includes_default" if test "x$ac_cv_header_boost_smart_ptr_hpp" = xyes; then : $as_echo "#define PQXX_HAVE_BOOST_SMART_PTR 1" >>confdefs.h else boost_smart_ptr=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TR1 headers live in tr1 directory" >&5 $as_echo_n "checking whether TR1 headers live in tr1 directory... " >&6; } tr1headers=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_TR1_HEADERS 1" >>confdefs.h else tr1headers=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tr1headers" >&5 $as_echo "$tr1headers" >&6; } if test "${tr1headers}" = "yes" ; then tr1dir="tr1/" else tr1dir="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking namespace of TR1 extension to the C++ standard" >&5 $as_echo_n "checking namespace of TR1 extension to the C++ standard... " >&6; } guesstr1=no # Check whether --with-tr1 was given. if test "${with_tr1+set}" = set; then : withval=$with_tr1; tr1=${withval}; else guesstr1=yes fi if test "${guesstr1}" = "yes" ; then # No explicit TR1 namespace given. Try PGSTD::tr1. If that doesn't # work, assume PGSTD as our best bet. tr1="${std}::tr1" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${tr1dir}memory> int main () { using namespace ${tr1} ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else tr1=${std} fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi cat >>confdefs.h <<_ACEOF #define PQXXTR1 $tr1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tr1" >&5 $as_echo "$tr1" >&6; } ioshdr=yes ac_fn_cxx_check_header_mongrel "$LINENO" "ios" "ac_cv_header_ios" "$ac_includes_default" if test "x$ac_cv_header_ios" = xyes; then : $as_echo "#define PQXX_HAVE_IOS 1" >>confdefs.h else ioshdr=no fi streambuf=yes ac_fn_cxx_check_header_mongrel "$LINENO" "streambuf" "ac_cv_header_streambuf" "$ac_includes_default" if test "x$ac_cv_header_streambuf" = xyes; then : $as_echo "#define PQXX_HAVE_STREAMBUF 1" >>confdefs.h else streambuf=no fi localehdr=yes ac_fn_cxx_check_header_mongrel "$LINENO" "locale" "ac_cv_header_locale" "$ac_includes_default" if test "x$ac_cv_header_locale" = xyes; then : $as_echo "#define PQXX_HAVE_LOCALE 1" >>confdefs.h else localehdr=no fi imbue=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking locale function and stringstream::imbue" >&5 $as_echo_n "checking locale function and stringstream::imbue... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef PQXX_HAVE_LOCALE #include #endif ${usestd} int main () { stringstream S; S.imbue(locale("C")) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_IMBUE 1" >>confdefs.h else imbue=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $imbue" >&5 $as_echo "$imbue" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking char_traits template" >&5 $as_echo_n "checking char_traits template... " >&6; } char_traits=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { char_traits::eof() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_CHAR_TRAITS 1" >>confdefs.h else char_traits=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $char_traits" >&5 $as_echo "$char_traits" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"warning\" preprocessor directive" >&5 $as_echo_n "checking \"warning\" preprocessor directive... " >&6; } cpp_warning=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #warning cpp supports warning directive int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_CPP_WARNING 1" >>confdefs.h else cpp_warning=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp_warning" >&5 $as_echo "$cpp_warning" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"message\" preprocessor pragma" >&5 $as_echo_n "checking \"message\" preprocessor pragma... " >&6; } cpp_pragma_message=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #pragma message("cpp supports message pragma") int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1" >>confdefs.h else cpp_pragma_message=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpp_pragma_message" >&5 $as_echo "$cpp_pragma_message" >&6; } # Find PostgreSQL includes and libraries for ac_prog in pg_config do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PG_CONFIG="$PG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PG_CONFIG=$ac_cv_path_PG_CONFIG if test -n "$PG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PG_CONFIG" >&5 $as_echo "$PG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PG_CONFIG" && break done if test -z "$PG_CONFIG" || test ! -r "$PG_CONFIG"; then as_fn_error $? " PostgreSQL configuration script pg_config not found. Make sure this is in your command path before configuring. Without it, the configure script has no way to find the right location for the libpq library and its headers. " "$LINENO" 5 fi with_postgres_include=`$PG_CONFIG --includedir` { $as_echo "$as_me:${as_lineno-$LINENO}: using PostgreSQL headers at $with_postgres_include" >&5 $as_echo "$as_me: using PostgreSQL headers at $with_postgres_include" >&6;} with_postgres_lib=`$PG_CONFIG --libdir` { $as_echo "$as_me:${as_lineno-$LINENO}: using PostgreSQL libraries at $with_postgres_lib" >&5 $as_echo "$as_me: using PostgreSQL libraries at $with_postgres_lib" >&6;} #POSTGRES_LIB="-R${with_postgres_lib}" POSTGRES_INCLUDE="-I${with_postgres_include}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking ability to compile programs using the standard C library" >&5 $as_echo_n "checking ability to compile programs using the standard C library... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} namespace std {} // In case string.h does not define it. extern void f(size_t); int main () { f(strlen("")) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else as_fn_error $? " Could not build even a tiny test program using the standard C library. Something very basic has gone wrong; try reading config.log to find out what. You'll probably want to go straight to the end of that file and read backwards until you find an error message. Then identify the problem, try to fix it, and run this script again. The configure script's --help option may provide useful tips on how to influence what compiler and command line options are used, what additional libraries are linked in, and so on. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # After this check, we should be able to link socket-based programs. socklibok=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing select" >&5 $as_echo_n "checking for library containing select... " >&6; } if ${ac_cv_search_select+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char select (); int main () { return select (); ; return 0; } _ACEOF for ac_lib in '' socket nsl ws2_32 wsock32 winsock; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_select=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_select+:} false; then : break fi done if ${ac_cv_search_select+:} false; then : else ac_cv_search_select=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_select" >&5 $as_echo "$ac_cv_search_select" >&6; } ac_res=$ac_cv_search_select if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" socklibok=yes fi # Microsoft proprietary libraries do not work with code that is generated with # autoconf's SEARCH_LIBS macro, so we need to check manually and just use the # first socket library available. # We only do this if select() is not available by other means, to avoid picking # up an unnecessary Windows compatibility library on a non-Windows system. for l in ws2_32 wsock32 winsock ; do if test "${socklibok}" != "yes" ; then as_ac_Lib=`$as_echo "ac_cv_lib_$l''_main" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$l" >&5 $as_echo_n "checking for main in -l$l... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$l $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : LIBS="$LIBS -l$l";socklibok=yes fi fi done if test "${socklibok}" != "yes" ; then as_fn_error $? " Could not figure out how to link a simple sockets-based program. Please read the config.log file for more clues as to why this failed. " "$LINENO" 5 fi as_ac_Header=`$as_echo "ac_cv_header_${with_postgres_include}/libpq-fe.h" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "${with_postgres_include}/libpq-fe.h" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : else as_fn_error $? " Can't find libpq-fe.h in ${with_postgres_include}. Are you sure the libpq headers are installed correctly? They should be in the directory returned by \"pg_config --includedir\". If you do have libpq (the C-language client library for PostgreSQL) installed, make sure you have the related development materials--mainly its header files-- as well as the library binary. Some system distributions keep the two in seperate packages with names like \"alibrary\" and \"alibrary-dev\", respectively. In that case, make sure you have the latter installed as well. " "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ability to compile source files using libpq" >&5 $as_echo_n "checking for ability to compile source files using libpq... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQexec(0,"") ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else as_fn_error $? " Could not compile a call to a basic libpq function. There must be something seriously wrong with the headers that \"pg_config --includedir\" pointed to; the contents of config.log may give you a clue about the nature of the failure. Source including the libpq header libpq-fe.h can be compiled, but a call to the most basic libpq function PQexec() failed to compile successfully. This is the litmus test for a working libpq. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # Perform this check in C; autoconf's AC_HAVE_LIBRARY breaks in C++ because it # tries to call main() ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LDFLAGS="$LDFLAGS -L${with_postgres_lib}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpq" >&5 $as_echo_n "checking for main in -lpq... " >&6; } if ${ac_cv_lib_pq_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpq -L${with_postgres_lib} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pq_main=yes else ac_cv_lib_pq_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_main" >&5 $as_echo "$ac_cv_lib_pq_main" >&6; } if test "x$ac_cv_lib_pq_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ 1 _ACEOF LIBS="-lpq $LIBS" else as_fn_error $? " Could not link to libpq. Make sure you have the PostgreSQL client library installed, and that the library binary can be found in the location returned by \"pg_config --libdir\". " "$LINENO" 5 fi ac_cv_lib_pq=ac_cv_lib_pq_main { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PQexec in -lpq" >&5 $as_echo_n "checking for PQexec in -lpq... " >&6; } if ${ac_cv_lib_pq_PQexec+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpq -L${with_postgres_lib} $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char PQexec (); int main () { return PQexec (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pq_PQexec=yes else ac_cv_lib_pq_PQexec=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pq_PQexec" >&5 $as_echo "$ac_cv_lib_pq_PQexec" >&6; } if test "x$ac_cv_lib_pq_PQexec" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPQ 1 _ACEOF LIBS="-lpq $LIBS" else as_fn_error $? " Did not find the PQexec() function in libpq. This is the litmus test for a working libpq installation. A source file using the PQexec() function did compile without problems, and the libpq library is available for linking, but for some reason a call to PQexec() failed to link properly to the libpq library. This may be because the libpq library file is damaged, or in some incorrect format. or if your libpq is much more recent than libpqxx version 4.0.1, perhaps libpq has undergone a radical ABI change. The last parts of config.log may give you a clue as to what really went wrong, but be warned that this is no easy reading. Look for the last error message occurring in the file. " "$LINENO" 5 fi # Remove redundant occurrances of -lpq LIBS="`echo "$LIBS" | sed -e 's/-lpq[:space:]*[:space:]-lpq\>/-lpq/g'`" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct C++ linkage of basic libpq functions" >&5 $as_echo_n "checking for correct C++ linkage of basic libpq functions... " >&6; } if test "$enable_maintainer_mode" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? " Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Alternatively, this may be caused by a bug in autoconf or automake. Since you are configuring libpqxx using the --enable-maintainer-mode option, any compiler warnings for autoconf test programs will be treated as errors. The problem may just go away if you run the configure script again but with the maintainer mode option omitted. Please report such cases (including the config.log produced by the failed attempt) so future versions can attempt to work around the problem. Should this error occur even while not in maintainer mode, read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? " Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking that type of libpq's Oid is as expected" >&5 $as_echo_n "checking that type of libpq's Oid is as expected... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> #include"${srcdir}/include/pqxx/internal/libpq-forward.hxx" extern void f(pqxx::oid&); int main () { Oid o;f(o) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else as_fn_error $? " The Oid typedef in libpq has changed. Please notify the libpqxx authors of the change! " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lo_tell()" >&5 $as_echo_n "checking lo_tell()... " >&6; } lotell=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> void f(PGconn *c) { lo_tell(c,2); } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_LO_TELL 1" >>confdefs.h else lotell=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lotell" >&5 $as_echo "$lotell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r" >&5 $as_echo_n "checking for strerror_r... " >&6; } strerror_r=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} bool f(char x[]) { return strerror_r(0,x,10) != 0; } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_STRERROR_R 1" >>confdefs.h else strerror_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $strerror_r" >&5 $as_echo "$strerror_r" >&6; } if test "$strerror_r" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No definition of strerror_r, the thread-safe version of strerror(), was found in your header. This may be because your implementation strerror() is threadsafe, in which case there is nothing to worry about. " >&5 $as_echo "$as_me: WARNING: No definition of strerror_r, the thread-safe version of strerror(), was found in your header. This may be because your implementation strerror() is threadsafe, in which case there is nothing to worry about. " >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU-style strerror_r" >&5 $as_echo_n "checking for GNU-style strerror_r... " >&6; } gnu_strerror_r=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} const char *it_is_a_string(char *x) { return strerror_r(0,x,10); } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_STRERROR_R_GNU 1" >>confdefs.h else gnu_strerror_r=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gnu_strerror_r" >&5 $as_echo "$gnu_strerror_r" >&6; } fi # strerror_r { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strnlen" >&5 $as_echo_n "checking for strnlen... " >&6; } strnlen=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { return strnlen("",1) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_STRNLEN 1" >>confdefs.h else strnlen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $strnlen" >&5 $as_echo "$strnlen" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strlcpy" >&5 $as_echo_n "checking for strlcpy... " >&6; } strlcpy=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { char buf[2];return strlcpy(buf,"",1) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_STRLCPY 1" >>confdefs.h else strlcpy=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $strlcpy" >&5 $as_echo "$strlcpy" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long" >&5 $as_echo_n "checking for long long... " >&6; } long_long=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { long long l=0LL; return int(l) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_LONG_LONG 1" >>confdefs.h else long_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $long_long" >&5 $as_echo "$long_long" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 $as_echo_n "checking for long double... " >&6; } long_double=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { long double x=0;return int(x) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_LONG_DOUBLE 1" >>confdefs.h else long_double=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $long_double" >&5 $as_echo "$long_double" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working " >&5 $as_echo_n "checking for working ... " >&6; } select_h=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include ${usestd} int main () { select(0,0,0,0,0) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_SYS_SELECT_H 1" >>confdefs.h else select_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $select_h" >&5 $as_echo "$select_h" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for poll()" >&5 $as_echo_n "checking for poll()... " >&6; } poll=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { pollfd p = { 0,0,0 }; poll(&p,1,0) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_POLL 1" >>confdefs.h else poll=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $poll" >&5 $as_echo "$poll" >&6; } # Long-standing annoyance in glibc: the definition for FD_SET includes an # unnecessary C-style cast that the compiler may warn for. If the compiler is # configured to treat warnings as errors, that may be a problem for us. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fd_set" >&5 $as_echo_n "checking for working fd_set... " >&6; } if test "$enable_maintainer_mode" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" void f() { fd_set s; FD_ZERO(&s); FD_SET(1, &s); } int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else as_fn_error $? " Could not compile code using fd_set. This may be a known problem with GNU libc and the extremely strict compiler options used in libpqxx's maintainer mode; try configuring again, this time omitting the --enable-maintainer-mode option. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} int main () { fd_set s;FD_ZERO(&s);FD_SET(1,&s) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else as_fn_error $? " Could not compile code using fd_set. There is something seriously wrong, or maybe your warning options are too strict. If you are using GNU libc (as will be the case on a GNU/Linux system) and are telling the compiler to treat warnings as errors, the cause may be an old-style cast in the definition of FD_SET that triggers a compiler warning. See config.log for more details; look for the last error message in the file. " "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select() accepts NULL fdsets" >&5 $as_echo_n "checking if select() accepts NULL fdsets... " >&6; } select_accepts_null=yes if test "$cross_compiling" = yes; then : select_accepts_null=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" int foo(){fd_set f; FD_SET(1,&f); return select(2,0,&f,&f,0)<0;} int main() { return foo(); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : $as_echo "#define PQXX_SELECT_ACCEPTS_NULL 1" >>confdefs.h else select_accepts_null=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $select_accepts_null" >&5 $as_echo "$select_accepts_null" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking sleep()" >&5 $as_echo_n "checking sleep()... " >&6; } sleep=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_UNISTD_H #include #endif ${usestd} int main () { sleep(0x01) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_SLEEP 1" >>confdefs.h else sleep=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sleep" >&5 $as_echo "$sleep" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQisthreadsafe()" >&5 $as_echo_n "checking PQisthreadsafe()... " >&6; } pqisthreadsafe=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQisthreadsafe() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQISTHREADSAFE 1" >>confdefs.h else pqisthreadsafe=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqisthreadsafe" >&5 $as_echo "$pqisthreadsafe" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQescapeLiteral()" >&5 $as_echo_n "checking PQescapeLiteral()... " >&6; } pqescapeliteral=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQescapeLiteral(0,"x",1) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQESCAPELITERAL 1" >>confdefs.h else pqescapeliteral=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqescapeliteral" >&5 $as_echo "$pqescapeliteral" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking support for hex binary escaping format" >&5 $as_echo_n "checking support for hex binary escaping format... " >&6; } pqunescapebytea_9=yes if test "$cross_compiling" = yes; then : pqunescapebytea_9=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include<${with_postgres_include}/libpq-fe.h> int main() { typedef unsigned char *ucharptr; size_t sz = 0; /* Pre-9.0 octal escaping will unescape this as "x20". */ const unsigned char *foo; foo = PQunescapeBytea(ucharptr("\\\\x20"), &sz); return *foo != 0x20; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQUNESCAPEBYTEA_9 1" >>confdefs.h else pqunescapebytea_9=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqunescapebytea_9" >&5 $as_echo "$pqunescapebytea_9" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQescapeIdentifier()" >&5 $as_echo_n "checking PQescapeIdentifier()... " >&6; } pqescapeidentifier=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQescapeIdentifier(NULL, "foo", 3) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQESCAPEIDENTIFIER 1" >>confdefs.h else pqescapeidentifier=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: pqescapeidentifier" >&5 $as_echo "pqescapeidentifier" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQencryptPassword()" >&5 $as_echo_n "checking PQencryptPassword()... " >&6; } pqencryptpassword=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQencryptPassword("x","y") ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQENCRYPTPASSWORD 1" >>confdefs.h else pqencryptpassword=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqencryptpassword" >&5 $as_echo "$pqencryptpassword" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQmblen()" >&5 $as_echo_n "checking PQmblen()... " >&6; } pqmblen=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { return PQmblen(NULL,1) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQMBLEN 1" >>confdefs.h else pqmblen=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqmblen" >&5 $as_echo "$pqmblen" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQdescribePortal()" >&5 $as_echo_n "checking PQdescribePortal()... " >&6; } pqdescribeportal=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { return PQdescribePortal(NULL, "foo")!=0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQDESCRIBEPORTAL 1" >>confdefs.h else pqdescribeportal=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqdescribeportal" >&5 $as_echo "$pqdescribeportal" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQclientEncoding()" >&5 $as_echo_n "checking PQclientEncoding()... " >&6; } pqclientencoding=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQclientEncoding(0) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQCLIENTENCODING 1" >>confdefs.h else pqclientencoding=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqclientencoding" >&5 $as_echo "$pqclientencoding" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking PQcancel()" >&5 $as_echo_n "checking PQcancel()... " >&6; } pqcancel=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include<${with_postgres_include}/libpq-fe.h> int main () { PQcancel(NULL, NULL, 0) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_PQCANCEL 1" >>confdefs.h else pqcancel=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pqcancel" >&5 $as_echo "$pqcancel" >&6; } ac_fn_cxx_check_header_mongrel "$LINENO" "limits" "ac_cv_header_limits" "$ac_includes_default" if test "x$ac_cv_header_limits" = xyes; then : $as_echo "#define PQXX_HAVE_LIMITS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 isnan()" >&5 $as_echo_n "checking for C99 isnan()... " >&6; } c_isnan=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern double f(); ${usestd} int main () { if(isnan(f())f() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_C_ISNAN 1" >>confdefs.h else c_isnan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_isnan" >&5 $as_echo "$c_isnan" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::numeric_limits<>::quiet_NaN()" >&5 $as_echo_n "checking for std::numeric_limits<>::quiet_NaN()... " >&6; } quiet_nan=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern void f(double); ${usestd} int main () { f(numeric_limits::quiet_NaN()) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_QUIET_NAN 1" >>confdefs.h else quiet_nan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $quiet_nan" >&5 $as_echo "$quiet_nan" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C NAN macro" >&5 $as_echo_n "checking for C NAN macro... " >&6; } c_nan=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern void f(double); ${usestd} int main () { f(NAN) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_C_NAN 1" >>confdefs.h else c_nan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_nan" >&5 $as_echo "$c_nan" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 nan() family" >&5 $as_echo_n "checking for C99 nan() family... " >&6; } nan=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} extern void f(double); int main () { f(nan("")) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_NAN 1" >>confdefs.h else nan=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nan" >&5 $as_echo "$nan" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 isinf()" >&5 $as_echo_n "checking for C99 isinf()... " >&6; } c_isnan=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern double f(); ${usestd} int main () { if(isinf(f())f() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_C_ISINF 1" >>confdefs.h else c_isinf=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $c_isinf" >&5 $as_echo "$c_isinf" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether std::string has a clear() function" >&5 $as_echo_n "checking whether std::string has a clear() function... " >&6; } string_clear=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { string i;i.clear() ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_STRING_CLEAR 1" >>confdefs.h else string_clear=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $string_clear" >&5 $as_echo "$string_clear" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for standard distance()" >&5 $as_echo_n "checking for standard distance()... " >&6; } distance=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { int i[1]; return distance(i, i+1) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_DISTANCE 1" >>confdefs.h else distance='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $distance" >&5 $as_echo "$distance" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if count_if() works as expected" >&5 $as_echo_n "checking if count_if() works as expected... " >&6; } count_if='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include ${usestd} struct P{P(){}bool operator()(const int&)const{return false;}}p; int main () { int v;return int(count_if(&v,&v,p)) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_COUNT_IF 1" >>confdefs.h else count_if='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $count_if" >&5 $as_echo "$count_if" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines a usable iterator template" >&5 $as_echo_n "checking whether defines a usable iterator template... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int main () { struct I:iterator{} ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : it='yes' else $as_echo "#define PQXX_BROKEN_ITERATOR 1" >>confdefs.h it='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $it" >&5 $as_echo "$it" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for reverse_iterator template" >&5 $as_echo_n "checking for reverse_iterator template... " >&6; } reverseit='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} struct I:iterator{}; int main () { reverse_iterator rit ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_REVERSE_ITERATOR 1" >>confdefs.h else reverseit='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $reverseit" >&5 $as_echo "$reverseit" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for auto_ptr" >&5 $as_echo_n "checking for auto_ptr... " >&6; } auto_ptr='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int *get_ptr(); int main () { auto_ptr i(get_ptr()) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_AUTO_PTR 1" >>confdefs.h else auto_ptr='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $auto_ptr" >&5 $as_echo "$auto_ptr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tr1::shared_ptr" >&5 $as_echo_n "checking for tr1::shared_ptr... " >&6; } sharedptr='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${tr1dir}memory> int main () { ${tr1}::shared_ptr i(new int(1)); return *i; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_SHARED_PTR 1" >>confdefs.h else sharedptr='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sharedptr" >&5 $as_echo "$sharedptr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unique_ptr" >&5 $as_echo_n "checking for unique_ptr... " >&6; } unique_ptr='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int *get_ptr(); int main () { unique_ptr i(get_ptr()) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_UNIQUE_PTR 1" >>confdefs.h else unique_ptr='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unique_ptr" >&5 $as_echo "$unique_ptr" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for move()" >&5 $as_echo_n "checking for move()... " >&6; } move='yes' cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include ${usestd} int foo(int &i) { return move(i); } int main () { int i = 0; return foo(i); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define PQXX_HAVE_MOVE 1" >>confdefs.h else move='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $move" >&5 $as_echo "$move" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether overloaded using-declarations work" >&5 $as_echo_n "checking whether overloaded using-declarations work... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ struct A {A(){} void f(int){}}; struct B:A {B(){} using A::f; void f(int,bool){}}; int main () { B b;b.f(1,true); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : usingdecl='yes' else $as_echo "#define PQXX_BROKEN_USING_DECL 1" >>confdefs.h usingdecl='no' fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usingdecl" >&5 $as_echo "$usingdecl" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi ac_config_files="$ac_config_files Makefile config/Makefile debian/Makefile doc/Makefile doc/Doxyfile src/Makefile test/Makefile test/unit/Makefile tools/Makefile win32/Makefile include/Makefile include/pqxx/Makefile libpqxx.pc pqxx-config libpqxx.spec" ac_config_commands="$ac_config_commands configitems" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_REFERENCE_TRUE}" && test -z "${BUILD_REFERENCE_FALSE}"; then as_fn_error $? "conditional \"BUILD_REFERENCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TUTORIAL_TRUE}" && test -z "${BUILD_TUTORIAL_FALSE}"; then as_fn_error $? "conditional \"BUILD_TUTORIAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_REFERENCE_TRUE}" && test -z "${BUILD_REFERENCE_FALSE}"; then as_fn_error $? "conditional \"BUILD_REFERENCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TUTORIAL_TRUE}" && test -z "${BUILD_TUTORIAL_FALSE}"; then as_fn_error $? "conditional \"BUILD_TUTORIAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libpqxx $as_me 4.0.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to >." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libpqxx config.status 4.0.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/pqxx/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/pqxx/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "debian/Makefile") CONFIG_FILES="$CONFIG_FILES debian/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Doxyfile") CONFIG_FILES="$CONFIG_FILES doc/Doxyfile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/unit/Makefile") CONFIG_FILES="$CONFIG_FILES test/unit/Makefile" ;; "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; "win32/Makefile") CONFIG_FILES="$CONFIG_FILES win32/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "include/pqxx/Makefile") CONFIG_FILES="$CONFIG_FILES include/pqxx/Makefile" ;; "libpqxx.pc") CONFIG_FILES="$CONFIG_FILES libpqxx.pc" ;; "pqxx-config") CONFIG_FILES="$CONFIG_FILES pqxx-config" ;; "libpqxx.spec") CONFIG_FILES="$CONFIG_FILES libpqxx.spec" ;; "configitems") CONFIG_COMMANDS="$CONFIG_COMMANDS configitems" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "configitems":C) "${srcdir}/tools/splitconfig" "${srcdir}" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi libpqxx-4.0.1+dfsg/configure.ac000066400000000000000000000713161224474465600164360ustar00rootroot00000000000000# # CAUTION: THE configure.ac FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT IT. # # If you want to make changes to configure.ac, edit configure.ac.in instead. # # Process configure.ac.in with autoconf to produce a configure script. # All text in libpqxx is pure ASCII, so we can afford the "C" locale which is # likely to be faster than any other. This may also work around bugs in some # environments, esp. with UTF-8 locales. LC_ALL=C AC_PREREQ(2.59) AC_INIT(libpqxx, 4.0.1, [Jeroen T. Vermeulen ]) AC_LANG(C++) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([config/m4]) AM_INIT_AUTOMAKE(libpqxx, 4.0.1) PQXXVERSION=4.0.1 PQXX_ABI=4.0 PQXX_MAJOR=4 PQXX_MINOR=0 AC_SUBST(PQXXVERSION) AC_SUBST(PQXX_ABI) AC_SUBST(PQXX_MAJOR) AC_SUBST(PQXX_MINOR) AC_CONFIG_SRCDIR([src/connection.cxx]) AC_CONFIG_HEADER([include/pqxx/config.h]) # default prefix for installs AC_PREFIX_DEFAULT(/usr/local) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_DISABLE_SHARED AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PATH_PROG([MKDIR], [mkdir]) AC_PATH_PROG([PKG_CONFIG], [pkg-config]) # Documentation. AC_ARG_ENABLE( documentation, [AS_HELP_STRING([--enable-documentation], [Generate documentation])], [], [enable_documentation=yes]) if test "$enable_documentation" = "yes" then AC_PATH_PROG([DOXYGEN], [doxygen]) AM_CONDITIONAL([BUILD_REFERENCE], [/bin/true]) AC_CHECK_PROG(HAVE_DOT, dot, YES, NO) AC_PATH_PROG([XMLTO], [xmlto]) AM_CONDITIONAL([BUILD_TUTORIAL], [/bin/true]) else AM_CONDITIONAL(BUILD_REFERENCE, [/bin/false]) AM_CONDITIONAL(BUILD_TUTORIAL, [/bin/false]) fi AM_MAINTAINER_MODE # see if we want verbose compiler warnings AC_MSG_CHECKING([maintainer mode]) AC_ARG_ENABLE(maintainer-mode) AC_MSG_RESULT(${enable_maintainer_mode}) AC_ARG_ENABLE(shared) if test "${shared}" = "yes" ; then CPPFLAGS="$CPPFLAGS -DPQXX_SHARED" fi # Add options to compiler command line, if compiler accepts it add_compiler_opts() { for option in $* ; do ACO_SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $option" AC_MSG_CHECKING([whether $CXX accepts $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) AC_MSG_RESULT($has_option) if test "$has_option" = "no" ; then CXXFLAGS="$ACO_SAVE_CXXFLAGS" fi done } # Let's try to get the compiler to be helpful # (Omit options -Weffc++ and -Wabi because they currently yield too many # warnings in gcc's standard headers; omit -Wunreachable-code because it isn't # always right) if test "$GCC" = "yes" ; then # In maintainer mode, enable all the warning options we can if test "$enable_maintainer_mode" = "yes"; then add_compiler_opts \ -Werror \ -Wno-div-by-zero \ -fnothrow-opt \ -ffor-scope \ -fstrict-enums \ -fstrict-aliasing \ -Wstrict-aliasing \ -funit-at-a-time \ -pedantic \ -fno-nonansi-builtins \ -Wall \ -Wmultichar \ -W \ -Wextra \ -Wfloat-equal \ -Wundef \ -Wshadow \ -Wpointer-arith \ -Wcast-qual \ -Wcast-align \ -Wconversion \ -Wctor-dtor-privacy \ -Wendif-labels \ -Wlogical-op \ -Woverlength-strings \ -Wredundant-decls \ -Wsign-compare \ -Wwrite-strings \ -Wnon-virtual-dtor \ -Wreorder \ -Wold-style-cast \ -Woverloaded-virtual \ -Wsign-promo \ -Wstrict-null-sentinel \ -Wformat-security \ -Winit-self \ -Wswitch \ -Wmissing-field-initializers \ -Wmissing-include-dirs \ -Wunused fi if test "$enable_long_long" = "yes" ; then add_compiler_opts -Wno-long-long fi AC_MSG_CHECKING([g++ visibility attribute]) gcc_visibility=yes SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror" AC_TRY_COMPILE([ struct __attribute__ ((visibility("hidden"))) d { d() {} void f() {} }; ], [d D;D.f()], AC_DEFINE([PQXX_HAVE_GCC_VISIBILITY],1, [Define if g++ supports visibility attribute, as in g++ 4.0]), gcc_visibility=no) AC_MSG_RESULT($gcc_visibility) if test "$gcc_visibility" = "yes" ; then # Setting default symbol visibility to "hidden" vastly reduces # library size with g++ 4.0, but unfortunately this will require # some more work in the libpqxx setup. Instead, we make only # inline functions hidden. add_compiler_opts -fvisibility-inlines-hidden #add_compiler_opts -fvisibility=hidden fi CXXFLAGS="$SAVE_CXXFLAGS" AC_MSG_CHECKING([g++ const attribute]) gcc_const_attr=yes AC_TRY_COMPILE([void __attribute__ ((const)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_CONST], 1, [Define if g++ supports const attribute]), gcc_const_attr=yes) AC_MSG_RESULT($gcc_const_attr) AC_MSG_CHECKING([g++ deprecation attribute]) gcc_deprecated=yes AC_TRY_COMPILE([void __attribute__ ((deprecated)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_DEPRECATED],1, [Define if g++ supports deprecated attribute, as in g++ 4.0]), gcc_deprecated=no) AC_MSG_RESULT($gcc_deprecated) AC_MSG_CHECKING([g++ noreturn attribute]) gcc_noreturn=yes # Needs a throw spec and a definition in order to trip up a bug in clang++ 2.8. # It'll claim the throw spec is missing on the definition. AC_TRY_COMPILE([ void __attribute__ ((noreturn)) f() throw (int); void f()throw(int){throw 1;} ], [], AC_DEFINE([PQXX_HAVE_GCC_NORETURN],1, [Define if g++ supports noreturn attribute]), gcc_noreturn=no) AC_MSG_RESULT($gcc_noreturn) AC_MSG_CHECKING([g++ pure attribute]) gcc_pure=yes AC_TRY_COMPILE([void __attribute__ ((pure)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_PURE], 1, [Define if g++ supports pure attribute]), gcc_pure=yes) AC_MSG_RESULT($gcc_pure) fi # Determine name of standard namespace. PGSTD will be set to this name. The # --with-std= option takes precedence if given; otherwise, several alternatives # are tried. # As a special case, if the argument to the --with-std option is "yes" (as would # be the case if the user specified the option but no argument for it), the # guessing logic is enabled as if the option had not been used. AH_TEMPLATE(PGSTD,[name of standard library namespace (normally "std")]) AC_MSG_CHECKING([name of standard library namespace (normally "std")]) guessstd=no AC_ARG_WITH(std, AC_HELP_STRING( [--with-std], [name of standard library namespace (normally "std")]), [std=${withval};], [guessstd=yes]) if test "${guessstd}" = "yes" -o "${withval}" = "yes"; then # No explicit std namespace given. Check for alternative "standard" # namespaces, in order of preference. for ns in std _STL stlp_std "" ; do AC_COMPILE_IFELSE([#include ${ns}::string justastring;], [std="${ns}"; break]) done fi AC_DEFINE_UNQUOTED( PGSTD, [$std], [name of standard library namespace (normally "std")]) if ! test -z "${std}" ; then AC_MSG_RESULT([::${std}]) usestd="namespace ${std} {} using namespace ${std};" else AC_MSG_RESULT([::]) fi boost_smart_ptr=yes AC_CHECK_HEADER(boost/smart_ptr.hpp, AC_DEFINE(PQXX_HAVE_BOOST_SMART_PTR, 1, [Define if you have the header]), boost_smart_ptr=no) AC_MSG_CHECKING([whether TR1 headers live in tr1 directory]) tr1headers=yes AC_TRY_COMPILE( [#include ], [], AC_DEFINE( [PQXX_TR1_HEADERS], 1, [Define if headers for TR1 extension to standard live in tr1/]), tr1headers=no) AC_MSG_RESULT($tr1headers) if test "${tr1headers}" = "yes" ; then tr1dir="tr1/" else tr1dir="" fi AH_TEMPLATE(PQXXTR1, [namespace of TR1 extension to the C++ standard]) AC_MSG_CHECKING([namespace of TR1 extension to the C++ standard]) guesstr1=no AC_ARG_WITH( tr1, AC_HELP_STRING( [--with-tr1], [namespace of TR1 extension to the C++ standard]), [tr1=${withval};], [guesstr1=yes]) if test "${guesstr1}" = "yes" ; then # No explicit TR1 namespace given. Try PGSTD::tr1. If that doesn't # work, assume PGSTD as our best bet. tr1="${std}::tr1" AC_TRY_COMPILE( [#include <${tr1dir}memory>], [using namespace ${tr1}], [], [tr1=${std}]) fi AC_DEFINE_UNQUOTED( PQXXTR1, [$tr1], [namespace of TR1 standard extensions (e.g. "std" or "std::tr1")]) AC_MSG_RESULT([$tr1]) ioshdr=yes AC_CHECK_HEADER(ios,AC_DEFINE(PQXX_HAVE_IOS,1, [Define if you have the header]), ioshdr=no) streambuf=yes AC_CHECK_HEADER(streambuf,AC_DEFINE(PQXX_HAVE_STREAMBUF,1, [Define if you have the header; if not, is used]), streambuf=no) localehdr=yes AC_CHECK_HEADER(locale,AC_DEFINE(PQXX_HAVE_LOCALE,1, [Define if you have the header]), localehdr=no) imbue=yes AC_MSG_CHECKING([locale function and stringstream::imbue]) AC_TRY_COMPILE([#include #ifdef PQXX_HAVE_LOCALE #include #endif ${usestd}], [stringstream S; S.imbue(locale("C"))], [AC_DEFINE(PQXX_HAVE_IMBUE, 1, [Define if stringstream::imbue works])], [imbue=no]) AC_MSG_RESULT($imbue) AC_MSG_CHECKING([char_traits template]) char_traits=yes AC_TRY_COMPILE([#include ${usestd}], [char_traits::eof()], AC_DEFINE(PQXX_HAVE_CHAR_TRAITS, 1, [Define if std provides the char_traits template and specialization]), char_traits=no) AC_MSG_RESULT($char_traits) AC_MSG_CHECKING(["warning" preprocessor directive]) cpp_warning=yes AC_TRY_COMPILE([#warning cpp supports warning directive], [], AC_DEFINE(PQXX_HAVE_CPP_WARNING, 1, [Define if preprocessor supports nonstandard "warning" directive]), cpp_warning=no) AC_MSG_RESULT($cpp_warning) AC_MSG_CHECKING(["message" preprocessor pragma]) cpp_pragma_message=yes AC_TRY_COMPILE([#pragma message("cpp supports message pragma")], [], AC_DEFINE(PQXX_HAVE_CPP_PRAGMA_MESSAGE, 1, [Define if preprocessor supports pragma "message"]), cpp_pragma_message=no) AC_MSG_RESULT($cpp_pragma_message) # Find PostgreSQL includes and libraries AC_PATH_PROGS(PG_CONFIG, pg_config) if test -z "$PG_CONFIG" || test ! -r "$PG_CONFIG"; then AC_MSG_ERROR([ PostgreSQL configuration script pg_config not found. Make sure this is in your command path before configuring. Without it, the configure script has no way to find the right location for the libpq library and its headers. ]) fi with_postgres_include=`$PG_CONFIG --includedir` AC_MSG_NOTICE([using PostgreSQL headers at $with_postgres_include]) with_postgres_lib=`$PG_CONFIG --libdir` AC_MSG_NOTICE([using PostgreSQL libraries at $with_postgres_lib]) AC_SUBST(with_postgres_lib) AC_SUBST(with_postgres_include) #POSTGRES_LIB="-R${with_postgres_lib}" AC_SUBST(POSTGRES_LIB) POSTGRES_INCLUDE="-I${with_postgres_include}" AC_SUBST(POSTGRES_INCLUDE) AC_HEADER_STDC AC_MSG_CHECKING([ability to compile programs using the standard C library]) AC_TRY_COMPILE([#include ${usestd} namespace std {} // In case string.h does not define it. extern void f(size_t);], [f(strlen(""))],[], [AC_MSG_ERROR([ Could not build even a tiny test program using the standard C library. Something very basic has gone wrong; try reading config.log to find out what. You'll probably want to go straight to the end of that file and read backwards until you find an error message. Then identify the problem, try to fix it, and run this script again. The configure script's --help option may provide useful tips on how to influence what compiler and command line options are used, what additional libraries are linked in, and so on. ])]) AC_MSG_RESULT(yes) # After this check, we should be able to link socket-based programs. socklibok=no AC_SEARCH_LIBS(select, socket nsl ws2_32 wsock32 winsock, [socklibok=yes]) # Microsoft proprietary libraries do not work with code that is generated with # autoconf's SEARCH_LIBS macro, so we need to check manually and just use the # first socket library available. # We only do this if select() is not available by other means, to avoid picking # up an unnecessary Windows compatibility library on a non-Windows system. for l in ws2_32 wsock32 winsock ; do if test "${socklibok}" != "yes" ; then AC_CHECK_LIB($l,main,LIBS="$LIBS -l$l";[socklibok=yes]) fi done if test "${socklibok}" != "yes" ; then AC_MSG_ERROR([ Could not figure out how to link a simple sockets-based program. Please read the config.log file for more clues as to why this failed. ]) fi AC_CHECK_HEADER([${with_postgres_include}/libpq-fe.h],[],[AC_MSG_ERROR([ Can't find libpq-fe.h in ${with_postgres_include}. Are you sure the libpq headers are installed correctly? They should be in the directory returned by "pg_config --includedir". If you do have libpq (the C-language client library for PostgreSQL) installed, make sure you have the related development materials--mainly its header files-- as well as the library binary. Some system distributions keep the two in seperate packages with names like "alibrary" and "alibrary-dev", respectively. In that case, make sure you have the latter installed as well. ])]) AC_MSG_CHECKING([for ability to compile source files using libpq]) AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>],[PQexec(0,"")], [], [AC_MSG_ERROR([ Could not compile a call to a basic libpq function. There must be something seriously wrong with the headers that "pg_config --includedir" pointed to; the contents of config.log may give you a clue about the nature of the failure. Source including the libpq header libpq-fe.h can be compiled, but a call to the most basic libpq function PQexec() failed to compile successfully. This is the litmus test for a working libpq. ])]) AC_MSG_RESULT(yes) # Perform this check in C; autoconf's AC_HAVE_LIBRARY breaks in C++ because it # tries to call main() AC_LANG_PUSH(C) LDFLAGS="$LDFLAGS -L${with_postgres_lib}" AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR([ Could not link to libpq. Make sure you have the PostgreSQL client library installed, and that the library binary can be found in the location returned by "pg_config --libdir". ])], -L${with_postgres_lib}) AC_CHECK_LIB([pq], [PQexec],[], [AC_MSG_ERROR([ Did not find the PQexec() function in libpq. This is the litmus test for a working libpq installation. A source file using the PQexec() function did compile without problems, and the libpq library is available for linking, but for some reason a call to PQexec() failed to link properly to the libpq library. This may be because the libpq library file is damaged, or in some incorrect format. or if your libpq is much more recent than libpqxx version 4.0.1, perhaps libpq has undergone a radical ABI change. The last parts of config.log may give you a clue as to what really went wrong, but be warned that this is no easy reading. Look for the last error message occurring in the file. ])], -L${with_postgres_lib}) # Remove redundant occurrances of -lpq LIBS="`echo "$LIBS" | sed -e 's/-lpq[[:space:]]*[[:space:]]-lpq\>/-lpq/g'`" AC_LANG_POP(C) AC_MSG_CHECKING([for correct C++ linkage of basic libpq functions]) if test "$enable_maintainer_mode" = "yes"; then AC_LINK_IFELSE([ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);}], [], [AC_MSG_ERROR([ Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Alternatively, this may be caused by a bug in autoconf or automake. Since you are configuring libpqxx using the --enable-maintainer-mode option, any compiler warnings for autoconf test programs will be treated as errors. The problem may just go away if you run the configure script again but with the maintainer mode option omitted. Please report such cases (including the config.log produced by the failed attempt) so future versions can attempt to work around the problem. Should this error occur even while not in maintainer mode, read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. ])]) else AC_LINK_IFELSE([ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);}], [], [AC_MSG_ERROR([ Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. ])]) fi AC_MSG_RESULT(yes) AC_MSG_CHECKING([that type of libpq's Oid is as expected]) AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h> #include"${srcdir}/include/pqxx/internal/libpq-forward.hxx" extern void f(pqxx::oid&);], [Oid o;f(o)], [], [AC_MSG_ERROR([ The Oid typedef in libpq has changed. Please notify the libpqxx authors of the change! ])]) AC_MSG_RESULT(yes) AC_MSG_CHECKING([lo_tell()]) lotell=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h> void f(PGconn *c) { lo_tell(c,2); }], [], AC_DEFINE(PQXX_HAVE_LO_TELL, 1, [Define if libpq has lo_tell()]), [lotell=no] ) AC_MSG_RESULT($lotell) AC_MSG_CHECKING([for strerror_r]) strerror_r=yes AC_TRY_COMPILE( [#include ${usestd} bool f(char x[]) { return strerror_r(0,x,10) != 0; }], [], [AC_DEFINE(PQXX_HAVE_STRERROR_R,1,[Define if strerror_r exists])], [strerror_r=no]) AC_MSG_RESULT($strerror_r) if test "$strerror_r" != "yes" ; then AC_MSG_WARN([ No definition of strerror_r, the thread-safe version of strerror(), was found in your header. This may be because your implementation strerror() is threadsafe, in which case there is nothing to worry about. ]) else AC_MSG_CHECKING([for GNU-style strerror_r]) gnu_strerror_r=yes AC_TRY_COMPILE( [#include ${usestd} const char *it_is_a_string(char *x) { return strerror_r(0,x,10); }], [], [AC_DEFINE( PQXX_HAVE_STRERROR_R_GNU,1,[Define for GNU-style strerror_r])], [gnu_strerror_r=no]) AC_MSG_RESULT($gnu_strerror_r) fi # strerror_r AC_MSG_CHECKING([for strnlen]) strnlen=yes AC_TRY_COMPILE( [#include ${usestd}], [return strnlen("",1)], [AC_DEFINE(PQXX_HAVE_STRNLEN,1,[Define if strnlen exists])], strnlen=no) AC_MSG_RESULT($strnlen) AC_MSG_CHECKING([for strlcpy]) strlcpy=yes AC_TRY_COMPILE( [#include ${usestd}], [char buf[2];return strlcpy(buf,"",1)], [AC_DEFINE(PQXX_HAVE_STRLCPY,1,[Define if strlcpy exists])], strlcpy=no) AC_MSG_RESULT($strlcpy) AC_MSG_CHECKING([for long long]) long_long=yes AC_TRY_COMPILE(,[long long l=0LL; return int(l)], AC_DEFINE(PQXX_HAVE_LONG_LONG,1, [Define if the compiler supports "long long" types]), long_long=no) AC_MSG_RESULT($long_long) AC_MSG_CHECKING([for long double]) long_double=yes AC_TRY_COMPILE(,[long double x=0;return int(x)], AC_DEFINE(PQXX_HAVE_LONG_DOUBLE,1, [Define if the compiler supports the standard "long double" type]), long_double=no) AC_MSG_RESULT($long_double) AC_MSG_CHECKING([for working ]) select_h=yes AC_TRY_COMPILE( [#include #include ${usestd}] , [select(0,0,0,0,0)] , AC_DEFINE(PQXX_HAVE_SYS_SELECT_H,1, [Define if the sys/select.h header defines a working select() and friends, as per POSIX 1003.1-2001]) ,select_h=no ) AC_MSG_RESULT($select_h) AC_MSG_CHECKING([for poll()]) poll=yes AC_TRY_COMPILE( [#include ${usestd}], [pollfd p = { 0,0,0 }; poll(&p,1,0)], AC_DEFINE(PQXX_HAVE_POLL,1, [Define if the system has the poll() function (mainly GNU/Linux)]), poll=no ) AC_MSG_RESULT($poll) # Long-standing annoyance in glibc: the definition for FD_SET includes an # unnecessary C-style cast that the compiler may warn for. If the compiler is # configured to treat warnings as errors, that may be a problem for us. AC_MSG_CHECKING([for working fd_set]) if test "$enable_maintainer_mode" = "yes"; then AC_TRY_COMPILE( [#include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" void f() { fd_set s; FD_ZERO(&s); FD_SET(1, &s); }], [], [], [AC_MSG_ERROR([ Could not compile code using fd_set. This may be a known problem with GNU libc and the extremely strict compiler options used in libpqxx's maintainer mode; try configuring again, this time omitting the --enable-maintainer-mode option. ])]) else AC_TRY_COMPILE( [#include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd}], [fd_set s;FD_ZERO(&s);FD_SET(1,&s)], [], [AC_MSG_ERROR([ Could not compile code using fd_set. There is something seriously wrong, or maybe your warning options are too strict. If you are using GNU libc (as will be the case on a GNU/Linux system) and are telling the compiler to treat warnings as errors, the cause may be an old-style cast in the definition of FD_SET that triggers a compiler warning. See config.log for more details; look for the last error message in the file. ])]) fi AC_MSG_RESULT(yes) AC_MSG_CHECKING([if select() accepts NULL fdsets]) select_accepts_null=yes AC_RUN_IFELSE( [#ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" int foo(){fd_set f; FD_SET(1,&f); return select(2,0,&f,&f,0)<0;} int main() { return foo(); }], AC_DEFINE(PQXX_SELECT_ACCEPTS_NULL,1, [Define if select() accepts NULL fd_set arguments]), select_accepts_null=no, select_accepts_null=no ) AC_MSG_RESULT($select_accepts_null) AC_MSG_CHECKING([sleep()]) sleep=yes AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H #include #endif ${usestd}],[sleep(0x01)], AC_DEFINE(PQXX_HAVE_SLEEP, 1, [Define if POSIX sleep() exists]), [sleep=no] ) AC_MSG_RESULT($sleep) AC_MSG_CHECKING([PQisthreadsafe()]) pqisthreadsafe=yes AC_TRY_COMPILE( [#include<${with_postgres_include}/libpq-fe.h>], [PQisthreadsafe()], AC_DEFINE( PQXX_HAVE_PQISTHREADSAFE, 1, [Define if libpq has PQisthreadsafe()]), [pqisthreadsafe=no]) AC_MSG_RESULT($pqisthreadsafe) AC_MSG_CHECKING([PQescapeLiteral()]) pqescapeliteral=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQescapeLiteral(0,"x",1)], AC_DEFINE(PQXX_HAVE_PQESCAPELITERAL, 1, [Define if libpq has PQescapeLiteral()]), [pqescapeliteral=no] ) AC_MSG_RESULT($pqescapeliteral) AC_MSG_CHECKING([support for hex binary escaping format]) pqunescapebytea_9=yes AC_RUN_IFELSE([ #include #include<${with_postgres_include}/libpq-fe.h> int main() { typedef unsigned char *ucharptr; size_t sz = 0; /* Pre-9.0 octal escaping will unescape this as "x20". */ const unsigned char *foo; foo = PQunescapeBytea(ucharptr("\\\\x20"), &sz); return *foo != 0x20; } ], AC_DEFINE(PQXX_HAVE_PQUNESCAPEBYTEA_9, 1, [Define if PQunescapeBytea() supports hex escape format]), pqunescapebytea_9=no, pqunescapebytea_9=no) AC_MSG_RESULT($pqunescapebytea_9) AC_MSG_CHECKING([PQescapeIdentifier()]) pqescapeidentifier=yes AC_TRY_COMPILE( [#include<${with_postgres_include}/libpq-fe.h>], [PQescapeIdentifier(NULL, "foo", 3)], AC_DEFINE( PQXX_HAVE_PQESCAPEIDENTIFIER, 1, [Define if libpq has PQescapeIdentifier()]), [pqescapeidentifier=no] ) AC_MSG_RESULT(pqescapeidentifier) AC_MSG_CHECKING([PQencryptPassword()]) pqencryptpassword=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQencryptPassword("x","y")], AC_DEFINE(PQXX_HAVE_PQENCRYPTPASSWORD,1,[Define if libpq has PQencryptPassword()]), [pqencryptpassword=no] ) AC_MSG_RESULT($pqencryptpassword) AC_MSG_CHECKING([PQmblen()]) pqmblen=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [return PQmblen(NULL,1)], AC_DEFINE(PQXX_HAVE_PQMBLEN,1,[Define if libpq has PQmblen()]), [pqmblen=no] ) AC_MSG_RESULT($pqmblen) AC_MSG_CHECKING([PQdescribePortal()]) pqdescribeportal=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [return PQdescribePortal(NULL, "foo")!=0;], AC_DEFINE(PQXX_HAVE_PQDESCRIBEPORTAL,1,[Define if libpq has PQdescribePortal()]), [pqdescribeportal=no] ) AC_MSG_RESULT($pqdescribeportal) AC_MSG_CHECKING([PQclientEncoding()]) pqclientencoding=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQclientEncoding(0)], AC_DEFINE(PQXX_HAVE_PQCLIENTENCODING, 1, [Define if libpq has PQclientEncoding()]), [pqclientencoding=no] ) AC_MSG_RESULT($pqclientencoding) AC_MSG_CHECKING([PQcancel()]) pqcancel=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQcancel(NULL, NULL, 0)], AC_DEFINE(PQXX_HAVE_PQCANCEL, 1, [Define if libpq has PQcancel() and friends]), [pqcancel=no] ) AC_MSG_RESULT($pqcancel) AC_CHECK_HEADER(limits, [AC_DEFINE(PQXX_HAVE_LIMITS, 1, [Define if exists])]) AC_MSG_CHECKING([for C99 isnan()]) c_isnan=yes AC_TRY_COMPILE([#include extern double f(); ${usestd}], [if(isnan(f())f()], AC_DEFINE(PQXX_HAVE_C_ISNAN,1,[Define if math.h defines C99 isnan()]), [c_isnan=no] ) AC_MSG_RESULT($c_isnan) AC_MSG_CHECKING([for std::numeric_limits<>::quiet_NaN()]) quiet_nan=yes AC_TRY_COMPILE([#include extern void f(double); ${usestd}], [f(numeric_limits::quiet_NaN())], [AC_DEFINE(PQXX_HAVE_QUIET_NAN,1, [Define if std::numeric_limits has quiet_NaN()])], [quiet_nan=no]) AC_MSG_RESULT($quiet_nan) AC_MSG_CHECKING([for C NAN macro]) c_nan=yes AC_TRY_COMPILE([#include extern void f(double); ${usestd}], [f(NAN)], [AC_DEFINE(PQXX_HAVE_C_NAN,1, [Define if C math header defines NAN])], [c_nan=no]) AC_MSG_RESULT($c_nan) AC_MSG_CHECKING([for C99 nan() family]) nan=yes AC_TRY_COMPILE([#include ${usestd} extern void f(double);], [f(nan(""))], [AC_DEFINE(PQXX_HAVE_NAN,1, [Define if C99 fnan()/nan()/lnan() are available])], [nan=no]) AC_MSG_RESULT($nan) AC_MSG_CHECKING([for C99 isinf()]) c_isnan=yes AC_TRY_COMPILE([#include extern double f(); ${usestd}], [if(isinf(f())f()], AC_DEFINE(PQXX_HAVE_C_ISINF,1,[Define if math.h defines C99 isinf()]), [c_isinf=no] ) AC_MSG_RESULT($c_isinf) AC_MSG_CHECKING([whether std::string has a clear() function]) string_clear=yes AC_TRY_COMPILE([#include ${usestd}], [string i;i.clear()], [AC_DEFINE(PQXX_HAVE_STRING_CLEAR, 1, [Define if string class has the clear() function])], [string_clear=no]) AC_MSG_RESULT($string_clear) AC_MSG_CHECKING([for standard distance()]) distance=yes AC_TRY_COMPILE([#include ${usestd}], [int i[1]; return distance(i, i+1)], [AC_DEFINE(PQXX_HAVE_DISTANCE, 1, [Define if distance() works according to the standard])], [distance='no']) AC_MSG_RESULT($distance) AC_MSG_CHECKING([if count_if() works as expected]) count_if='yes' AC_TRY_COMPILE([#include #include ${usestd} struct P{P(){}bool operator()(const int&)const{return false;}}p;], [int v;return int(count_if(&v,&v,p))], [AC_DEFINE(PQXX_HAVE_COUNT_IF, 1, [Define if count_if() works according to the standard])], [count_if='no']) AC_MSG_RESULT($count_if) AC_MSG_CHECKING([whether defines a usable iterator template]) AC_TRY_COMPILE([#include ${usestd}], [struct I:iterator{}], [it='yes'], [AC_DEFINE(PQXX_BROKEN_ITERATOR, 1, [Define if lacks an iterator template definition]) it='no']) AC_MSG_RESULT($it) AC_MSG_CHECKING([for reverse_iterator template]) reverseit='yes' AC_TRY_COMPILE([#include ${usestd} struct I:iterator{};], [reverse_iterator rit], [AC_DEFINE(PQXX_HAVE_REVERSE_ITERATOR, 1, [Define if reverse_iterator template works as expected])], [reverseit='no']) AC_MSG_RESULT($reverseit) AC_MSG_CHECKING([for auto_ptr]) auto_ptr='yes' AC_TRY_COMPILE([ #include ${usestd} int *get_ptr();], [auto_ptr i(get_ptr())], [AC_DEFINE(PQXX_HAVE_AUTO_PTR, 1, [Define if compiler has auto_ptr])], [auto_ptr='no']) AC_MSG_RESULT($auto_ptr) AC_MSG_CHECKING([for tr1::shared_ptr]) sharedptr='yes' AC_TRY_COMPILE([#include <${tr1dir}memory>], [${tr1}::shared_ptr i(new int(1)); return *i;], [AC_DEFINE(PQXX_HAVE_SHARED_PTR, 1, [Define if compiler has shared_ptr])], [sharedptr='no']) AC_MSG_RESULT($sharedptr) AC_MSG_CHECKING([for unique_ptr]) unique_ptr='yes' AC_TRY_COMPILE([ #include ${usestd} int *get_ptr();], [unique_ptr i(get_ptr())], [AC_DEFINE(PQXX_HAVE_UNIQUE_PTR, 1, [Define if compiler has unique_ptr])], [unique_ptr='no']) AC_MSG_RESULT($unique_ptr) AC_MSG_CHECKING([for move()]) move='yes' AC_TRY_COMPILE([ #include ${usestd} int foo(int &i) { return move(i); }], [int i = 0; return foo(i);], [AC_DEFINE(PQXX_HAVE_MOVE, 1, [Define if compiler has move().])], [move='no']) AC_MSG_RESULT($move) AC_MSG_CHECKING([whether overloaded using-declarations work]) AC_TRY_COMPILE([ struct A {A(){} void f(int){}}; struct B:A {B(){} using A::f; void f(int,bool){}};], [B b;b.f(1,true);], [usingdecl='yes'], [AC_DEFINE(PQXX_BROKEN_USING_DECL, 1, [Define if function overloading using "using" breaks]) usingdecl='no']) AC_MSG_RESULT($usingdecl) AC_PROG_MAKE_SET AC_CONFIG_FILES([Makefile config/Makefile debian/Makefile doc/Makefile doc/Doxyfile src/Makefile test/Makefile test/unit/Makefile tools/Makefile win32/Makefile include/Makefile include/pqxx/Makefile libpqxx.pc pqxx-config libpqxx.spec]) AC_CONFIG_COMMANDS([configitems], ["${srcdir}/tools/splitconfig" "${srcdir}"]) AC_OUTPUT libpqxx-4.0.1+dfsg/configure.ac.in000066400000000000000000000714131224474465600170410ustar00rootroot00000000000000# # CAUTION: THE configure.ac FILE IS AUTOMATICALLY GENERATED! DO NOT EDIT IT. # # If you want to make changes to configure.ac, edit configure.ac.in instead. # # Process configure.ac.in with autoconf to produce a configure script. # All text in libpqxx is pure ASCII, so we can afford the "C" locale which is # likely to be faster than any other. This may also work around bugs in some # environments, esp. with UTF-8 locales. LC_ALL=C AC_PREREQ(2.59) AC_INIT(libpqxx, @PQXXVERSION@, [Jeroen T. Vermeulen ]) AC_LANG(C++) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([config/m4]) AM_INIT_AUTOMAKE(libpqxx, @PQXXVERSION@) PQXXVERSION=@PQXXVERSION@ PQXX_ABI=@PQXX_ABI@ PQXX_MAJOR=@PQXX_MAJOR@ PQXX_MINOR=@PQXX_MINOR@ AC_SUBST(PQXXVERSION) AC_SUBST(PQXX_ABI) AC_SUBST(PQXX_MAJOR) AC_SUBST(PQXX_MINOR) AC_CONFIG_SRCDIR([src/connection.cxx]) AC_CONFIG_HEADER([include/pqxx/config.h]) # default prefix for installs AC_PREFIX_DEFAULT(/usr/local) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_PROG_INSTALL AC_DISABLE_SHARED AC_PROG_LIBTOOL AC_PROG_MAKE_SET AC_PATH_PROG([MKDIR], [mkdir]) AC_PATH_PROG([PKG_CONFIG], [pkg-config]) # Documentation. AC_ARG_ENABLE( documentation, [AS_HELP_STRING([--enable-documentation], [Generate documentation])], [], [enable_documentation=yes]) if test "$enable_documentation" = "yes" then AC_PATH_PROG([DOXYGEN], [doxygen]) AM_CONDITIONAL([BUILD_REFERENCE], [/bin/true]) AC_CHECK_PROG(HAVE_DOT, dot, YES, NO) AC_PATH_PROG([XMLTO], [xmlto]) AM_CONDITIONAL([BUILD_TUTORIAL], [/bin/true]) else AM_CONDITIONAL(BUILD_REFERENCE, [/bin/false]) AM_CONDITIONAL(BUILD_TUTORIAL, [/bin/false]) fi AM_MAINTAINER_MODE # see if we want verbose compiler warnings AC_MSG_CHECKING([maintainer mode]) AC_ARG_ENABLE(maintainer-mode) AC_MSG_RESULT(${enable_maintainer_mode}) AC_ARG_ENABLE(shared) if test "${shared}" = "yes" ; then CPPFLAGS="$CPPFLAGS -DPQXX_SHARED" fi # Add options to compiler command line, if compiler accepts it add_compiler_opts() { for option in $* ; do ACO_SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $option" AC_MSG_CHECKING([whether $CXX accepts $option]) AC_TRY_COMPILE([], [], has_option=yes, has_option=no,) AC_MSG_RESULT($has_option) if test "$has_option" = "no" ; then CXXFLAGS="$ACO_SAVE_CXXFLAGS" fi done } # Let's try to get the compiler to be helpful # (Omit options -Weffc++ and -Wabi because they currently yield too many # warnings in gcc's standard headers; omit -Wunreachable-code because it isn't # always right) if test "$GCC" = "yes" ; then # In maintainer mode, enable all the warning options we can if test "$enable_maintainer_mode" = "yes"; then add_compiler_opts \ -Werror \ -Wno-div-by-zero \ -fnothrow-opt \ -ffor-scope \ -fstrict-enums \ -fstrict-aliasing \ -Wstrict-aliasing \ -funit-at-a-time \ -pedantic \ -fno-nonansi-builtins \ -Wall \ -Wmultichar \ -W \ -Wextra \ -Wfloat-equal \ -Wundef \ -Wshadow \ -Wpointer-arith \ -Wcast-qual \ -Wcast-align \ -Wconversion \ -Wctor-dtor-privacy \ -Wendif-labels \ -Wlogical-op \ -Woverlength-strings \ -Wredundant-decls \ -Wsign-compare \ -Wwrite-strings \ -Wnon-virtual-dtor \ -Wreorder \ -Wold-style-cast \ -Woverloaded-virtual \ -Wsign-promo \ -Wstrict-null-sentinel \ -Wformat-security \ -Winit-self \ -Wswitch \ -Wmissing-field-initializers \ -Wmissing-include-dirs \ -Wunused fi if test "$enable_long_long" = "yes" ; then add_compiler_opts -Wno-long-long fi AC_MSG_CHECKING([g++ visibility attribute]) gcc_visibility=yes SAVE_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Werror" AC_TRY_COMPILE([ struct __attribute__ ((visibility("hidden"))) d { d() {} void f() {} }; ], [d D;D.f()], AC_DEFINE([PQXX_HAVE_GCC_VISIBILITY],1, [Define if g++ supports visibility attribute, as in g++ 4.0]), gcc_visibility=no) AC_MSG_RESULT($gcc_visibility) if test "$gcc_visibility" = "yes" ; then # Setting default symbol visibility to "hidden" vastly reduces # library size with g++ 4.0, but unfortunately this will require # some more work in the libpqxx setup. Instead, we make only # inline functions hidden. add_compiler_opts -fvisibility-inlines-hidden #add_compiler_opts -fvisibility=hidden fi CXXFLAGS="$SAVE_CXXFLAGS" AC_MSG_CHECKING([g++ const attribute]) gcc_const_attr=yes AC_TRY_COMPILE([void __attribute__ ((const)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_CONST], 1, [Define if g++ supports const attribute]), gcc_const_attr=yes) AC_MSG_RESULT($gcc_const_attr) AC_MSG_CHECKING([g++ deprecation attribute]) gcc_deprecated=yes AC_TRY_COMPILE([void __attribute__ ((deprecated)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_DEPRECATED],1, [Define if g++ supports deprecated attribute, as in g++ 4.0]), gcc_deprecated=no) AC_MSG_RESULT($gcc_deprecated) AC_MSG_CHECKING([g++ noreturn attribute]) gcc_noreturn=yes # Needs a throw spec and a definition in order to trip up a bug in clang++ 2.8. # It'll claim the throw spec is missing on the definition. AC_TRY_COMPILE([ void __attribute__ ((noreturn)) f() throw (int); void f()throw(int){throw 1;} ], [], AC_DEFINE([PQXX_HAVE_GCC_NORETURN],1, [Define if g++ supports noreturn attribute]), gcc_noreturn=no) AC_MSG_RESULT($gcc_noreturn) AC_MSG_CHECKING([g++ pure attribute]) gcc_pure=yes AC_TRY_COMPILE([void __attribute__ ((pure)) f();], [], AC_DEFINE([PQXX_HAVE_GCC_PURE], 1, [Define if g++ supports pure attribute]), gcc_pure=yes) AC_MSG_RESULT($gcc_pure) fi # Determine name of standard namespace. PGSTD will be set to this name. The # --with-std= option takes precedence if given; otherwise, several alternatives # are tried. # As a special case, if the argument to the --with-std option is "yes" (as would # be the case if the user specified the option but no argument for it), the # guessing logic is enabled as if the option had not been used. AH_TEMPLATE(PGSTD,[name of standard library namespace (normally "std")]) AC_MSG_CHECKING([name of standard library namespace (normally "std")]) guessstd=no AC_ARG_WITH(std, AC_HELP_STRING( [--with-std], [name of standard library namespace (normally "std")]), [std=${withval};], [guessstd=yes]) if test "${guessstd}" = "yes" -o "${withval}" = "yes"; then # No explicit std namespace given. Check for alternative "standard" # namespaces, in order of preference. for ns in std _STL stlp_std "" ; do AC_COMPILE_IFELSE([#include ${ns}::string justastring;], [std="${ns}"; break]) done fi AC_DEFINE_UNQUOTED( PGSTD, [$std], [name of standard library namespace (normally "std")]) if ! test -z "${std}" ; then AC_MSG_RESULT([::${std}]) usestd="namespace ${std} {} using namespace ${std};" else AC_MSG_RESULT([::]) fi boost_smart_ptr=yes AC_CHECK_HEADER(boost/smart_ptr.hpp, AC_DEFINE(PQXX_HAVE_BOOST_SMART_PTR, 1, [Define if you have the header]), boost_smart_ptr=no) AC_MSG_CHECKING([whether TR1 headers live in tr1 directory]) tr1headers=yes AC_TRY_COMPILE( [#include ], [], AC_DEFINE( [PQXX_TR1_HEADERS], 1, [Define if headers for TR1 extension to standard live in tr1/]), tr1headers=no) AC_MSG_RESULT($tr1headers) if test "${tr1headers}" = "yes" ; then tr1dir="tr1/" else tr1dir="" fi AH_TEMPLATE(PQXXTR1, [namespace of TR1 extension to the C++ standard]) AC_MSG_CHECKING([namespace of TR1 extension to the C++ standard]) guesstr1=no AC_ARG_WITH( tr1, AC_HELP_STRING( [--with-tr1], [namespace of TR1 extension to the C++ standard]), [tr1=${withval};], [guesstr1=yes]) if test "${guesstr1}" = "yes" ; then # No explicit TR1 namespace given. Try PGSTD::tr1. If that doesn't # work, assume PGSTD as our best bet. tr1="${std}::tr1" AC_TRY_COMPILE( [#include <${tr1dir}memory>], [using namespace ${tr1}], [], [tr1=${std}]) fi AC_DEFINE_UNQUOTED( PQXXTR1, [$tr1], [namespace of TR1 standard extensions (e.g. "std" or "std::tr1")]) AC_MSG_RESULT([$tr1]) ioshdr=yes AC_CHECK_HEADER(ios,AC_DEFINE(PQXX_HAVE_IOS,1, [Define if you have the header]), ioshdr=no) streambuf=yes AC_CHECK_HEADER(streambuf,AC_DEFINE(PQXX_HAVE_STREAMBUF,1, [Define if you have the header; if not, is used]), streambuf=no) localehdr=yes AC_CHECK_HEADER(locale,AC_DEFINE(PQXX_HAVE_LOCALE,1, [Define if you have the header]), localehdr=no) imbue=yes AC_MSG_CHECKING([locale function and stringstream::imbue]) AC_TRY_COMPILE([#include #ifdef PQXX_HAVE_LOCALE #include #endif ${usestd}], [stringstream S; S.imbue(locale("C"))], [AC_DEFINE(PQXX_HAVE_IMBUE, 1, [Define if stringstream::imbue works])], [imbue=no]) AC_MSG_RESULT($imbue) AC_MSG_CHECKING([char_traits template]) char_traits=yes AC_TRY_COMPILE([#include ${usestd}], [char_traits::eof()], AC_DEFINE(PQXX_HAVE_CHAR_TRAITS, 1, [Define if std provides the char_traits template and specialization]), char_traits=no) AC_MSG_RESULT($char_traits) AC_MSG_CHECKING(["warning" preprocessor directive]) cpp_warning=yes AC_TRY_COMPILE([#warning cpp supports warning directive], [], AC_DEFINE(PQXX_HAVE_CPP_WARNING, 1, [Define if preprocessor supports nonstandard "warning" directive]), cpp_warning=no) AC_MSG_RESULT($cpp_warning) AC_MSG_CHECKING(["message" preprocessor pragma]) cpp_pragma_message=yes AC_TRY_COMPILE([#pragma message("cpp supports message pragma")], [], AC_DEFINE(PQXX_HAVE_CPP_PRAGMA_MESSAGE, 1, [Define if preprocessor supports pragma "message"]), cpp_pragma_message=no) AC_MSG_RESULT($cpp_pragma_message) # Find PostgreSQL includes and libraries AC_PATH_PROGS(PG_CONFIG, pg_config) if test -z "$PG_CONFIG" || test ! -r "$PG_CONFIG"; then AC_MSG_ERROR([ PostgreSQL configuration script pg_config not found. Make sure this is in your command path before configuring. Without it, the configure script has no way to find the right location for the libpq library and its headers. ]) fi with_postgres_include=`$PG_CONFIG --includedir` AC_MSG_NOTICE([using PostgreSQL headers at $with_postgres_include]) with_postgres_lib=`$PG_CONFIG --libdir` AC_MSG_NOTICE([using PostgreSQL libraries at $with_postgres_lib]) AC_SUBST(with_postgres_lib) AC_SUBST(with_postgres_include) #POSTGRES_LIB="-R${with_postgres_lib}" AC_SUBST(POSTGRES_LIB) POSTGRES_INCLUDE="-I${with_postgres_include}" AC_SUBST(POSTGRES_INCLUDE) AC_HEADER_STDC AC_MSG_CHECKING([ability to compile programs using the standard C library]) AC_TRY_COMPILE([#include ${usestd} namespace std {} // In case string.h does not define it. extern void f(size_t);], [f(strlen(""))],[], [AC_MSG_ERROR([ Could not build even a tiny test program using the standard C library. Something very basic has gone wrong; try reading config.log to find out what. You'll probably want to go straight to the end of that file and read backwards until you find an error message. Then identify the problem, try to fix it, and run this script again. The configure script's --help option may provide useful tips on how to influence what compiler and command line options are used, what additional libraries are linked in, and so on. ])]) AC_MSG_RESULT(yes) # After this check, we should be able to link socket-based programs. socklibok=no AC_SEARCH_LIBS(select, socket nsl ws2_32 wsock32 winsock, [socklibok=yes]) # Microsoft proprietary libraries do not work with code that is generated with # autoconf's SEARCH_LIBS macro, so we need to check manually and just use the # first socket library available. # We only do this if select() is not available by other means, to avoid picking # up an unnecessary Windows compatibility library on a non-Windows system. for l in ws2_32 wsock32 winsock ; do if test "${socklibok}" != "yes" ; then AC_CHECK_LIB($l,main,LIBS="$LIBS -l$l";[socklibok=yes]) fi done if test "${socklibok}" != "yes" ; then AC_MSG_ERROR([ Could not figure out how to link a simple sockets-based program. Please read the config.log file for more clues as to why this failed. ]) fi AC_CHECK_HEADER([${with_postgres_include}/libpq-fe.h],[],[AC_MSG_ERROR([ Can't find libpq-fe.h in ${with_postgres_include}. Are you sure the libpq headers are installed correctly? They should be in the directory returned by "pg_config --includedir". If you do have libpq (the C-language client library for PostgreSQL) installed, make sure you have the related development materials--mainly its header files-- as well as the library binary. Some system distributions keep the two in seperate packages with names like "alibrary" and "alibrary-dev", respectively. In that case, make sure you have the latter installed as well. ])]) AC_MSG_CHECKING([for ability to compile source files using libpq]) AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>],[PQexec(0,"")], [], [AC_MSG_ERROR([ Could not compile a call to a basic libpq function. There must be something seriously wrong with the headers that "pg_config --includedir" pointed to; the contents of config.log may give you a clue about the nature of the failure. Source including the libpq header libpq-fe.h can be compiled, but a call to the most basic libpq function PQexec() failed to compile successfully. This is the litmus test for a working libpq. ])]) AC_MSG_RESULT(yes) # Perform this check in C; autoconf's AC_HAVE_LIBRARY breaks in C++ because it # tries to call main() AC_LANG_PUSH(C) LDFLAGS="$LDFLAGS -L${with_postgres_lib}" AC_HAVE_LIBRARY(pq, [], [AC_MSG_ERROR([ Could not link to libpq. Make sure you have the PostgreSQL client library installed, and that the library binary can be found in the location returned by "pg_config --libdir". ])], -L${with_postgres_lib}) AC_CHECK_LIB([pq], [PQexec],[], [AC_MSG_ERROR([ Did not find the PQexec() function in libpq. This is the litmus test for a working libpq installation. A source file using the PQexec() function did compile without problems, and the libpq library is available for linking, but for some reason a call to PQexec() failed to link properly to the libpq library. This may be because the libpq library file is damaged, or in some incorrect format. or if your libpq is much more recent than libpqxx version @PQXXVERSION@, perhaps libpq has undergone a radical ABI change. The last parts of config.log may give you a clue as to what really went wrong, but be warned that this is no easy reading. Look for the last error message occurring in the file. ])], -L${with_postgres_lib}) # Remove redundant occurrances of -lpq LIBS="`echo "$LIBS" | sed -e 's/-lpq[[:space:]]*[[:space:]]-lpq\>/-lpq/g'`" AC_LANG_POP(C) AC_MSG_CHECKING([for correct C++ linkage of basic libpq functions]) if test "$enable_maintainer_mode" = "yes"; then AC_LINK_IFELSE([ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);}], [], [AC_MSG_ERROR([ Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Alternatively, this may be caused by a bug in autoconf or automake. Since you are configuring libpqxx using the --enable-maintainer-mode option, any compiler warnings for autoconf test programs will be treated as errors. The problem may just go away if you run the configure script again but with the maintainer mode option omitted. Please report such cases (including the config.log produced by the failed attempt) so future versions can attempt to work around the problem. Should this error occur even while not in maintainer mode, read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. ])]) else AC_LINK_IFELSE([ #include <${with_postgres_include}/libpq-fe.h> int main(){return !PQexec(0,0);}], [], [AC_MSG_ERROR([ Linking a call to libpq failed in C++, even though it succeeded in C. If your C and C++ compilers are very different beasts, this may mean that we do not have the right options for linking with it after all. Read the config.log file for more detailed information. Look for the last error message, which may be several pages up from the end of the file. ])]) fi AC_MSG_RESULT(yes) AC_MSG_CHECKING([that type of libpq's Oid is as expected]) AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h> #include"${srcdir}/include/pqxx/internal/libpq-forward.hxx" extern void f(pqxx::oid&);], [Oid o;f(o)], [], [AC_MSG_ERROR([ The Oid typedef in libpq has changed. Please notify the libpqxx authors of the change! ])]) AC_MSG_RESULT(yes) AC_MSG_CHECKING([lo_tell()]) lotell=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h> void f(PGconn *c) { lo_tell(c,2); }], [], AC_DEFINE(PQXX_HAVE_LO_TELL, 1, [Define if libpq has lo_tell()]), [lotell=no] ) AC_MSG_RESULT($lotell) AC_MSG_CHECKING([for strerror_r]) strerror_r=yes AC_TRY_COMPILE( [#include ${usestd} bool f(char x[]) { return strerror_r(0,x,10) != 0; }], [], [AC_DEFINE(PQXX_HAVE_STRERROR_R,1,[Define if strerror_r exists])], [strerror_r=no]) AC_MSG_RESULT($strerror_r) if test "$strerror_r" != "yes" ; then AC_MSG_WARN([ No definition of strerror_r, the thread-safe version of strerror(), was found in your header. This may be because your implementation strerror() is threadsafe, in which case there is nothing to worry about. ]) else AC_MSG_CHECKING([for GNU-style strerror_r]) gnu_strerror_r=yes AC_TRY_COMPILE( [#include ${usestd} const char *it_is_a_string(char *x) { return strerror_r(0,x,10); }], [], [AC_DEFINE( PQXX_HAVE_STRERROR_R_GNU,1,[Define for GNU-style strerror_r])], [gnu_strerror_r=no]) AC_MSG_RESULT($gnu_strerror_r) fi # strerror_r AC_MSG_CHECKING([for strnlen]) strnlen=yes AC_TRY_COMPILE( [#include ${usestd}], [return strnlen("",1)], [AC_DEFINE(PQXX_HAVE_STRNLEN,1,[Define if strnlen exists])], strnlen=no) AC_MSG_RESULT($strnlen) AC_MSG_CHECKING([for strlcpy]) strlcpy=yes AC_TRY_COMPILE( [#include ${usestd}], [char buf[2];return strlcpy(buf,"",1)], [AC_DEFINE(PQXX_HAVE_STRLCPY,1,[Define if strlcpy exists])], strlcpy=no) AC_MSG_RESULT($strlcpy) AC_MSG_CHECKING([for long long]) long_long=yes AC_TRY_COMPILE(,[long long l=0LL; return int(l)], AC_DEFINE(PQXX_HAVE_LONG_LONG,1, [Define if the compiler supports "long long" types]), long_long=no) AC_MSG_RESULT($long_long) AC_MSG_CHECKING([for long double]) long_double=yes AC_TRY_COMPILE(,[long double x=0;return int(x)], AC_DEFINE(PQXX_HAVE_LONG_DOUBLE,1, [Define if the compiler supports the standard "long double" type]), long_double=no) AC_MSG_RESULT($long_double) AC_MSG_CHECKING([for working ]) select_h=yes AC_TRY_COMPILE( [#include #include ${usestd}] , [select(0,0,0,0,0)] , AC_DEFINE(PQXX_HAVE_SYS_SELECT_H,1, [Define if the sys/select.h header defines a working select() and friends, as per POSIX 1003.1-2001]) ,select_h=no ) AC_MSG_RESULT($select_h) AC_MSG_CHECKING([for poll()]) poll=yes AC_TRY_COMPILE( [#include ${usestd}], [pollfd p = { 0,0,0 }; poll(&p,1,0)], AC_DEFINE(PQXX_HAVE_POLL,1, [Define if the system has the poll() function (mainly GNU/Linux)]), poll=no ) AC_MSG_RESULT($poll) # Long-standing annoyance in glibc: the definition for FD_SET includes an # unnecessary C-style cast that the compiler may warn for. If the compiler is # configured to treat warnings as errors, that may be a problem for us. AC_MSG_CHECKING([for working fd_set]) if test "$enable_maintainer_mode" = "yes"; then AC_TRY_COMPILE( [#include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" void f() { fd_set s; FD_ZERO(&s); FD_SET(1, &s); }], [], [], [AC_MSG_ERROR([ Could not compile code using fd_set. This may be a known problem with GNU libc and the extremely strict compiler options used in libpqxx's maintainer mode; try configuring again, this time omitting the --enable-maintainer-mode option. ])]) else AC_TRY_COMPILE( [#include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd}], [fd_set s;FD_ZERO(&s);FD_SET(1,&s)], [], [AC_MSG_ERROR([ Could not compile code using fd_set. There is something seriously wrong, or maybe your warning options are too strict. If you are using GNU libc (as will be the case on a GNU/Linux system) and are telling the compiler to treat warnings as errors, the cause may be an old-style cast in the definition of FD_SET that triggers a compiler warning. See config.log for more details; look for the last error message in the file. ])]) fi AC_MSG_RESULT(yes) AC_MSG_CHECKING([if select() accepts NULL fdsets]) select_accepts_null=yes AC_RUN_IFELSE( [#ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif ${usestd} extern "C" int foo(){fd_set f; FD_SET(1,&f); return select(2,0,&f,&f,0)<0;} int main() { return foo(); }], AC_DEFINE(PQXX_SELECT_ACCEPTS_NULL,1, [Define if select() accepts NULL fd_set arguments]), select_accepts_null=no, select_accepts_null=no ) AC_MSG_RESULT($select_accepts_null) AC_MSG_CHECKING([sleep()]) sleep=yes AC_TRY_COMPILE([#ifdef HAVE_UNISTD_H #include #endif ${usestd}],[sleep(0x01)], AC_DEFINE(PQXX_HAVE_SLEEP, 1, [Define if POSIX sleep() exists]), [sleep=no] ) AC_MSG_RESULT($sleep) AC_MSG_CHECKING([PQisthreadsafe()]) pqisthreadsafe=yes AC_TRY_COMPILE( [#include<${with_postgres_include}/libpq-fe.h>], [PQisthreadsafe()], AC_DEFINE( PQXX_HAVE_PQISTHREADSAFE, 1, [Define if libpq has PQisthreadsafe()]), [pqisthreadsafe=no]) AC_MSG_RESULT($pqisthreadsafe) AC_MSG_CHECKING([PQescapeLiteral()]) pqescapeliteral=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQescapeLiteral(0,"x",1)], AC_DEFINE(PQXX_HAVE_PQESCAPELITERAL, 1, [Define if libpq has PQescapeLiteral()]), [pqescapeliteral=no] ) AC_MSG_RESULT($pqescapeliteral) AC_MSG_CHECKING([support for hex binary escaping format]) pqunescapebytea_9=yes AC_RUN_IFELSE([ #include #include<${with_postgres_include}/libpq-fe.h> int main() { typedef unsigned char *ucharptr; size_t sz = 0; /* Pre-9.0 octal escaping will unescape this as "x20". */ const unsigned char *foo; foo = PQunescapeBytea(ucharptr("\\\\x20"), &sz); return *foo != 0x20; } ], AC_DEFINE(PQXX_HAVE_PQUNESCAPEBYTEA_9, 1, [Define if PQunescapeBytea() supports hex escape format]), pqunescapebytea_9=no, pqunescapebytea_9=no) AC_MSG_RESULT($pqunescapebytea_9) AC_MSG_CHECKING([PQescapeIdentifier()]) pqescapeidentifier=yes AC_TRY_COMPILE( [#include<${with_postgres_include}/libpq-fe.h>], [PQescapeIdentifier(NULL, "foo", 3)], AC_DEFINE( PQXX_HAVE_PQESCAPEIDENTIFIER, 1, [Define if libpq has PQescapeIdentifier()]), [pqescapeidentifier=no] ) AC_MSG_RESULT(pqescapeidentifier) AC_MSG_CHECKING([PQencryptPassword()]) pqencryptpassword=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQencryptPassword("x","y")], AC_DEFINE(PQXX_HAVE_PQENCRYPTPASSWORD,1,[Define if libpq has PQencryptPassword()]), [pqencryptpassword=no] ) AC_MSG_RESULT($pqencryptpassword) AC_MSG_CHECKING([PQmblen()]) pqmblen=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [return PQmblen(NULL,1)], AC_DEFINE(PQXX_HAVE_PQMBLEN,1,[Define if libpq has PQmblen()]), [pqmblen=no] ) AC_MSG_RESULT($pqmblen) AC_MSG_CHECKING([PQdescribePortal()]) pqdescribeportal=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [return PQdescribePortal(NULL, "foo")!=0;], AC_DEFINE(PQXX_HAVE_PQDESCRIBEPORTAL,1,[Define if libpq has PQdescribePortal()]), [pqdescribeportal=no] ) AC_MSG_RESULT($pqdescribeportal) AC_MSG_CHECKING([PQclientEncoding()]) pqclientencoding=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQclientEncoding(0)], AC_DEFINE(PQXX_HAVE_PQCLIENTENCODING, 1, [Define if libpq has PQclientEncoding()]), [pqclientencoding=no] ) AC_MSG_RESULT($pqclientencoding) AC_MSG_CHECKING([PQcancel()]) pqcancel=yes AC_TRY_COMPILE([#include<${with_postgres_include}/libpq-fe.h>], [PQcancel(NULL, NULL, 0)], AC_DEFINE(PQXX_HAVE_PQCANCEL, 1, [Define if libpq has PQcancel() and friends]), [pqcancel=no] ) AC_MSG_RESULT($pqcancel) AC_CHECK_HEADER(limits, [AC_DEFINE(PQXX_HAVE_LIMITS, 1, [Define if exists])]) AC_MSG_CHECKING([for C99 isnan()]) c_isnan=yes AC_TRY_COMPILE([#include extern double f(); ${usestd}], [if(isnan(f())f()], AC_DEFINE(PQXX_HAVE_C_ISNAN,1,[Define if math.h defines C99 isnan()]), [c_isnan=no] ) AC_MSG_RESULT($c_isnan) AC_MSG_CHECKING([for std::numeric_limits<>::quiet_NaN()]) quiet_nan=yes AC_TRY_COMPILE([#include extern void f(double); ${usestd}], [f(numeric_limits::quiet_NaN())], [AC_DEFINE(PQXX_HAVE_QUIET_NAN,1, [Define if std::numeric_limits has quiet_NaN()])], [quiet_nan=no]) AC_MSG_RESULT($quiet_nan) AC_MSG_CHECKING([for C NAN macro]) c_nan=yes AC_TRY_COMPILE([#include extern void f(double); ${usestd}], [f(NAN)], [AC_DEFINE(PQXX_HAVE_C_NAN,1, [Define if C math header defines NAN])], [c_nan=no]) AC_MSG_RESULT($c_nan) AC_MSG_CHECKING([for C99 nan() family]) nan=yes AC_TRY_COMPILE([#include ${usestd} extern void f(double);], [f(nan(""))], [AC_DEFINE(PQXX_HAVE_NAN,1, [Define if C99 fnan()/nan()/lnan() are available])], [nan=no]) AC_MSG_RESULT($nan) AC_MSG_CHECKING([for C99 isinf()]) c_isnan=yes AC_TRY_COMPILE([#include extern double f(); ${usestd}], [if(isinf(f())f()], AC_DEFINE(PQXX_HAVE_C_ISINF,1,[Define if math.h defines C99 isinf()]), [c_isinf=no] ) AC_MSG_RESULT($c_isinf) AC_MSG_CHECKING([whether std::string has a clear() function]) string_clear=yes AC_TRY_COMPILE([#include ${usestd}], [string i;i.clear()], [AC_DEFINE(PQXX_HAVE_STRING_CLEAR, 1, [Define if string class has the clear() function])], [string_clear=no]) AC_MSG_RESULT($string_clear) AC_MSG_CHECKING([for standard distance()]) distance=yes AC_TRY_COMPILE([#include ${usestd}], [int i[1]; return distance(i, i+1)], [AC_DEFINE(PQXX_HAVE_DISTANCE, 1, [Define if distance() works according to the standard])], [distance='no']) AC_MSG_RESULT($distance) AC_MSG_CHECKING([if count_if() works as expected]) count_if='yes' AC_TRY_COMPILE([#include #include ${usestd} struct P{P(){}bool operator()(const int&)const{return false;}}p;], [int v;return int(count_if(&v,&v,p))], [AC_DEFINE(PQXX_HAVE_COUNT_IF, 1, [Define if count_if() works according to the standard])], [count_if='no']) AC_MSG_RESULT($count_if) AC_MSG_CHECKING([whether defines a usable iterator template]) AC_TRY_COMPILE([#include ${usestd}], [struct I:iterator{}], [it='yes'], [AC_DEFINE(PQXX_BROKEN_ITERATOR, 1, [Define if lacks an iterator template definition]) it='no']) AC_MSG_RESULT($it) AC_MSG_CHECKING([for reverse_iterator template]) reverseit='yes' AC_TRY_COMPILE([#include ${usestd} struct I:iterator{};], [reverse_iterator rit], [AC_DEFINE(PQXX_HAVE_REVERSE_ITERATOR, 1, [Define if reverse_iterator template works as expected])], [reverseit='no']) AC_MSG_RESULT($reverseit) AC_MSG_CHECKING([for auto_ptr]) auto_ptr='yes' AC_TRY_COMPILE([ #include ${usestd} int *get_ptr();], [auto_ptr i(get_ptr())], [AC_DEFINE(PQXX_HAVE_AUTO_PTR, 1, [Define if compiler has auto_ptr])], [auto_ptr='no']) AC_MSG_RESULT($auto_ptr) AC_MSG_CHECKING([for tr1::shared_ptr]) sharedptr='yes' AC_TRY_COMPILE([#include <${tr1dir}memory>], [${tr1}::shared_ptr i(new int(1)); return *i;], [AC_DEFINE(PQXX_HAVE_SHARED_PTR, 1, [Define if compiler has shared_ptr])], [sharedptr='no']) AC_MSG_RESULT($sharedptr) AC_MSG_CHECKING([for unique_ptr]) unique_ptr='yes' AC_TRY_COMPILE([ #include ${usestd} int *get_ptr();], [unique_ptr i(get_ptr())], [AC_DEFINE(PQXX_HAVE_UNIQUE_PTR, 1, [Define if compiler has unique_ptr])], [unique_ptr='no']) AC_MSG_RESULT($unique_ptr) AC_MSG_CHECKING([for move()]) move='yes' AC_TRY_COMPILE([ #include ${usestd} int foo(int &i) { return move(i); }], [int i = 0; return foo(i);], [AC_DEFINE(PQXX_HAVE_MOVE, 1, [Define if compiler has move().])], [move='no']) AC_MSG_RESULT($move) AC_MSG_CHECKING([whether overloaded using-declarations work]) AC_TRY_COMPILE([ struct A {A(){} void f(int){}}; struct B:A {B(){} using A::f; void f(int,bool){}};], [B b;b.f(1,true);], [usingdecl='yes'], [AC_DEFINE(PQXX_BROKEN_USING_DECL, 1, [Define if function overloading using "using" breaks]) usingdecl='no']) AC_MSG_RESULT($usingdecl) AC_PROG_MAKE_SET AC_CONFIG_FILES([Makefile config/Makefile debian/Makefile doc/Makefile doc/Doxyfile src/Makefile test/Makefile test/unit/Makefile tools/Makefile win32/Makefile include/Makefile include/pqxx/Makefile libpqxx.pc pqxx-config libpqxx.spec]) AC_CONFIG_COMMANDS([configitems], ["${srcdir}/tools/splitconfig" "${srcdir}"]) AC_OUTPUT libpqxx-4.0.1+dfsg/debian/000077500000000000000000000000001224474465600153625ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/debian/Makefile.am000066400000000000000000000016041224474465600174170ustar00rootroot00000000000000@SET_MAKE@ MAINT_CHARSET = latin1 EXTRA_DIST = \ changelog \ compat \ control \ copyright \ libpqxx-dev.dirs \ libpqxx-dev.docs \ libpqxx-dev.install \ libpqxx-dev.preinst \ libpqxx-doc.doc-base.reference \ libpqxx-doc.doc-base.tutorial \ libpqxx-doc.install \ libpqxx.docs \ libpqxx.install \ rules \ watch ## Rules dist-hook: # Distribute debian/control (not in EXTRA_DIST to avoid $(srcdir) dependencies # Do nothing actually, left in for compatibility DEBUILD_OPTIONS = -us -uc deb: changelog control rules $(MAKE) -C ../ dist -$(RM) -r debian-build -mkdir debian-build cd debian-build ; \ mv ../../$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz ; \ tar xfvz $(PACKAGE)_$(VERSION).orig.tar.gz ; \ cd $(PACKAGE)-$(VERSION) ; \ debuild $(DEBUILD_OPTIONS) ; \ cd .. ; \ $(RM) -r $(PACKAGE)-$(VERSION) MAINTAINERCLEANFILES = \ Makefile.in .PHONY: deb libpqxx-4.0.1+dfsg/debian/Makefile.in000066400000000000000000000272761224474465600174450ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = debian DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ MAINT_CHARSET = latin1 EXTRA_DIST = \ changelog \ compat \ control \ copyright \ libpqxx-dev.dirs \ libpqxx-dev.docs \ libpqxx-dev.install \ libpqxx-dev.preinst \ libpqxx-doc.doc-base.reference \ libpqxx-doc.doc-base.tutorial \ libpqxx-doc.install \ libpqxx.docs \ libpqxx.install \ rules \ watch # Distribute debian/control (not in EXTRA_DIST to avoid $(srcdir) dependencies # Do nothing actually, left in for compatibility DEBUILD_OPTIONS = -us -uc MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu debian/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu debian/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am @SET_MAKE@ dist-hook: deb: changelog control rules $(MAKE) -C ../ dist -$(RM) -r debian-build -mkdir debian-build cd debian-build ; \ mv ../../$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)_$(VERSION).orig.tar.gz ; \ tar xfvz $(PACKAGE)_$(VERSION).orig.tar.gz ; \ cd $(PACKAGE)-$(VERSION) ; \ debuild $(DEBUILD_OPTIONS) ; \ cd .. ; \ $(RM) -r $(PACKAGE)-$(VERSION) .PHONY: deb # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/debian/changelog000066400000000000000000000203541224474465600172400ustar00rootroot00000000000000libpqxx (4.0.1-1) unstable; urgency=low * Build fix for OS X. Thanks Torsten Hilgenberg. -- Jeroen T. Vermeulen Tue, 28 Feb 2012 19:16:00 +0700 libpqxx (4.0-1) unstable; urgency=medium * Forked 4.0. -- Jeroen T. Vermeulen Sun, 27 Nov 2011 18:10:00 +0700 libpqxx (3.1.0-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 15 Feb 2010 21:00:00 +0100 libpqxx (3.0.0-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 01 Nov 2008 00:00:00 +0700 libpqxx (2.6.9-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Thu, 01 Feb 2007 18:00:00 +0700 libpqxx (2.6.8-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Thu, 07 Sep 2006 17:00:00 +0700 libpqxx (2.6.7-1) stable; urgency=high * New upstream release. -- Jeroen T. Vermeulen Fri, 01 Jun 2006 02:30:00 +0700 libpqxx (2.6.6-1) stable; urgency=high * New upstream release. * Fixes security problem with string escaping -- Jeroen T. Vermeulen Sat, 27 May 2006 17:20:00 +0700 libpqxx (2.6.5-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 06 Mar 2006 20:00:00 +0700 libpqxx (2.6.4-1) unstable; urgency=medium [ Jeroen T. Vermeulen ] * New upstream release. [ Roger Leigh ] * debian/control.in: - Build-Depend upon debhelper v4, and libpq-dev rather than postgresql-dev. - libpqxx-dev: Depend upon libpq-dev rather than postgresql-dev. * debian/libpqxx-dev.docs: Include README-UPGRADE. * debian/rules: - Use debhelper v4 compatibility mode. -- Roger Leigh Sat, 11 Feb 2006 14:14:05 +0000 libpqxx (2.6.3-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Sat, 11 Feb 2006 16:00:00 +0700 libpqxx (2.6.2-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Sun, 13 Nov 2005 11:30:00 +0700 libpqxx (2.6.1-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 17 Jul 2005 19:30:00 +0700 libpqxx (2.6.0-1) unstable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Mon, 17 Jul 2005 19:30:00 +0700 libpqxx (2.5.6-1) stable; urgency=high * New upstream release. -- Jeroen T. Vermeulen Fri, 01 Jul 2005 20:30:00 +0700 libpqxx (2.5.5-1) stable; urgency=high * New upstream release. -- Jeroen T. Vermeulen Tue, 28 Jun 2005 16:00:00 +0700 libpqxx (2.5.4-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Tue, 20 Jun 2005 16:00:00 +0700 libpqxx (2.5.3-1) stable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Mon, 16 May 2005 19:00:00 +0700 libpqxx (2.5.2-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 09 May 2005 12:00:00 +0700 libpqxx (2.5.1-1) stable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Thu, 31 Mar 2005 14:00:00 +0700 libpqxx (2.5.0-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Sat, 05 Mar 2005 14:35:00 +0700 libpqxx (2.4.4-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 28 Feb 2005 10:32:00 +0700 libpqxx (2.4.3-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 07 Feb 2005 16:40:00 +0700 libpqxx (2.4.2-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Mon, 15 Nov 2004 17:30:00 +0700 libpqxx (2.4.1-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Wed, 03 Nov 2004 14:10:00 +0700 libpqxx (2.4.0-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Thu, 14 Oct 2004 16:40:00 +0700 libpqxx (2.3.0-2) unstable; urgency=low * debian/control.in: - Add chrpath to build dependencies to strip rpath from binaries - Depend on at least version 7.4.2-1 of postgresql for binary compatibility reasons (libpq dependency). * debian/rules: - Don't package tests which make use of internal headers as examples. -- Roger Leigh Thu, 02 Sep 2004 00:09:51 +0100 libpqxx (2.3.0-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Sat, 21 Aug 2004 03:50:00 +0200 libpqxx (2.2.9-1) unstable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Thu, 12 Aug 2004 21:15:00 +0200 libpqxx (2.2.8-1) unstable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Mon, 9 Aug 2004 00:50:00 +0200 libpqxx (2.2.7-1) stable; urgency=medium * New upstream release. -- Jeroen T. Vermeulen Fri, 2 Jul 2004 21:40:31 +0200 libpqxx (2.2.6-1) unstable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Thu, 19 Jun 2004 23:55:55 +0200 libpqxx (2.2.5-1) unstable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Thu, 17 Jun 2004 19:00:00 +0200 libpqxx (2.2.4-1) unstable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Sun, 6 Jun 2004 20:45:00 +0200 libpqxx (2.2.3-1) stable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Tue, 27 Apr 2004 02:45:00 +0200 libpqxx (2.2.2-1) stable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Tue, 27 Apr 2004 01:25:00 +0200 libpqxx (2.2.1-1) stable; urgency=low * New upstream release. -- Jeroen T. Vermeulen Mon, 23 Feb 2004 15:20:00 +0200 libpqxx (2.2.0-1) stable; urgency=low * New upstream release. -- Roger Leigh Tue, 13 Jan 2004 21:58:03 +0000 libpqxx (2.1.3-1) stable; urgency=low * New upstream release. * Switched to using the new library versioning scheme with package version string in the library DT_SONAME. This requires preprocessing of debian/control, and versioned symlinks are created at build time. -- Roger Leigh Sat, 6 Dec 2003 20:09:44 +0000 libpqxx (2.0.0-1) unstable; urgency=low * New upstream release. * Added myself as the new maintainer of libpqxx. * Merge upstream Debian packaging changes: - 1.7.6-1: Example packaging to be used with libpqxx development version 1.7.6 (Greg Hookey). - 1.9.6-1: Source changes (Jeroen T. Vermeulen). - 2.0.0-1: [debian/control, dedian/rules] Use chrpath to get rid of RPATH in the shared library (J.H.M. Dassen (Ray)) * Merge changes made in pervious NMUs (Closes: #217203, #198441, #201263) * Added the new tutorial to libpqxx-dev. -- Roger Leigh Thu, 20 Nov 2003 21:09:06 +0000 libpqxx (1.5.1-1.2) unstable; urgency=low * Non-maintainer upload. * Include test/*.cxx as usage examples in libpqxx-dev (Closes: #217203). -- Roger Leigh Mon, 27 Oct 2003 22:23:31 +0000 libpqxx (1.5.1-1.1) unstable; urgency=low * Non-maintainer upload. * Add API reference documentation to libpqxx-dev (Closes: #198441, #201263). * Use dh_install instead of the old dh_movefiles, to enable copying of the HTML documentation. * Use DESTDIR rather than prefix for make install, since overriding prefix may cause subtle breakage. * /usr/share/doc/libpqxx-dev may no longer be a symbolic link. libpqxx now has a preinst script to remove the link if it is detected, to prevent the documentation being incorrectly installed under /usr/share/doc/libpqxx0 (since dpkg follows symbolic links). * CVS directories present in the upstream tarball are removed in the debian/rules clean rule, to prevent inclusion in a binary package. * Fold lines over 79 columns in debian/copyright. * Change section of libpqxx-dev from libs to libdevel. -- Roger Leigh Thu, 4 Sep 2003 23:49:17 +0100 libpqxx (1.5.1-1) unstable; urgency=low * Initial Release. (closes: #170932) -- Greg Hookey Sat, 22 Mar 2003 16:00:10 -0800 libpqxx-4.0.1+dfsg/debian/compat000066400000000000000000000000021224474465600165600ustar00rootroot000000000000005 libpqxx-4.0.1+dfsg/debian/control000066400000000000000000000035641224474465600167750ustar00rootroot00000000000000Source: libpqxx Section: libs Priority: optional Maintainer: Eugene V. Lyubimkin Uploaders: Martin Pitt Build-Depends: debhelper (>> 5.0.0), libpq-dev (>= 8.0.3), chrpath, libtool, doxygen, xmlto Standards-Version: 3.8.0 Homepage: http://pqxx.org Package: libpqxx-dev Section: libdevel Architecture: any Depends: libpq-dev (>= 8.0.3-1), libpqxx-4.0 (= ${binary:Version}), pkg-config Suggests: libpqxx-doc Description: C++ library to connect to PostgreSQL (development files) C++ library to enable user programs to communicate with the PostgreSQL database back-end. . This package contains header files for linking against libpqxx. Obsoletes the libpqpp-dev package. Package: libpqxx-doc Section: doc Architecture: all Suggests: libpqxx-dev (>= ${binary:Version}) Conflicts: libpqxx-dev (<< 4.0.0~) Replaces: libpqxx-dev (<< 4.0.0~) Description: C++ library to connect to PostgreSQL (documentation) C++ library to enable user programs to communicate with the PostgreSQL database back-end. . This package contains documentation and examples. Package: libpqxx-4.0 Section: libs Architecture: any Depends: ${shlibs:Depends} Description: C++ library to connect to PostgreSQL C++ library to enable user programs to communicate with the PostgreSQL database back-end. The database back-end can be local or it may be on another machine, accessed via TCP/IP. This package obsoletes the libpqpp package. Package: libpqxx-4.0-dbg Section: libdevel Priority: extra Architecture: any Depends: libpqxx-4.0 (= ${binary:Version}) Description: C++ library to connect to PostgreSQL (debugging symbols) C++ library to enable user programs to communicate with the PostgreSQL database back-end. . This package contains debugging symbols for the libpqxx library. It is usually needed to get a useful backtrace when applications using the libpqxx library crashes. libpqxx-4.0.1+dfsg/debian/copyright000066400000000000000000000010041224474465600173100ustar00rootroot00000000000000This package was debianized by Greg Hookey on Thu, 12 Dec 2002 00:27:01 -0800. It was downloaded from ; now moved to Upstream Author: Jeroen T. Vermeulen Copyrights: Copyright © 2001-2008, Jeroen T. Vermeulen. Copyright © 1994-2008, Free Software Foundation. This project is released under the Berkeley/BSD license. On Debian systems, the complete text of the BSD License can be found in the file `/usr/share/common-licenses/BSD'. libpqxx-4.0.1+dfsg/debian/libpqxx-dev.dirs000066400000000000000000000000241224474465600205040ustar00rootroot00000000000000usr/lib usr/include libpqxx-4.0.1+dfsg/debian/libpqxx-dev.docs000066400000000000000000000000331224474465600204730ustar00rootroot00000000000000NEWS README README-UPGRADE libpqxx-4.0.1+dfsg/debian/libpqxx-dev.install000066400000000000000000000002541224474465600212160ustar00rootroot00000000000000debian/install/usr/include usr debian/install/usr/lib/libpqxx.la usr/lib debian/install/usr/lib/libpqxx.so usr/lib debian/install/usr/lib/pkgconfig usr/lib libpqxx-4.0.1+dfsg/debian/libpqxx-dev.preinst000066400000000000000000000013461224474465600212370ustar00rootroot00000000000000#! /bin/sh # preinst script for libpqxx-dev # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' case "$1" in install|upgrade) # Remove symbolic link if it exists. if test -h /usr/share/doc/libpqxx-dev; then rm -f /usr/share/doc/libpqxx-dev fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 0 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 libpqxx-4.0.1+dfsg/debian/libpqxx-doc.doc-base.reference000066400000000000000000000004601224474465600231500ustar00rootroot00000000000000Document: libpqxx-reference Title: libpqxx Reference Manual Author: Jeroen T. Vermeulen Abstract: A C++ API to the PostgreSQL database management system. Section: Programming/C++ Format: HTML Index: /usr/share/doc/libpqxx-doc/html/Reference/index.html Files: /usr/share/doc/libpqxx-doc/html/Reference/* libpqxx-4.0.1+dfsg/debian/libpqxx-doc.doc-base.tutorial000066400000000000000000000004731224474465600230610ustar00rootroot00000000000000Document: libpqxx-tutorial Title: libpqxx Tutorial Author: Jeroen T. Vermeulen Abstract: Tutorial for libpqxx, a C++ API to the PostgreSQL database management system. Section: Programming/C++ Format: HTML Index: /usr/share/doc/libpqxx-doc/html/Tutorial/index.html Files: /usr/share/doc/libpqxx-doc/html/Tutorial/* libpqxx-4.0.1+dfsg/debian/libpqxx-doc.install000066400000000000000000000001451224474465600212040ustar00rootroot00000000000000doc/html usr/share/doc/libpqxx-doc test/*.cxx usr/share/doc/libpqxx-doc/examples libpqxx-4.0.1+dfsg/debian/libpqxx.docs000066400000000000000000000000141224474465600177160ustar00rootroot00000000000000NEWS README libpqxx-4.0.1+dfsg/debian/libpqxx.install000066400000000000000000000000561224474465600204420ustar00rootroot00000000000000debian/install/usr/lib/libpqxx-*.so* usr/lib libpqxx-4.0.1+dfsg/debian/rules000066400000000000000000000060451224474465600164440ustar00rootroot00000000000000#!/usr/bin/make -f #export DH_VERBOSE=1 # 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) CXXFLAGS = $(CFLAGS) CXXFLAGS += -D_REENTRANT ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKEFLAGS += -j$(NUMJOBS) endif # Get upstream version, and define libpqxx suffix LIBRARY_VERSION = -4.0 autoconfigure: autoconfigure-stamp autoconfigure-stamp: debian/control dh_testdir [ -r config/config.sub.orig ] || \ cp -f config/config.sub config/config.sub.orig [ -r config/config.guess.orig ] || \ cp -f config/config.guess config/config.guess.orig [ ! -r /usr/share/misc/config.sub ] || \ cp -f /usr/share/misc/config.sub config/config.sub [ ! -r /usr/share/misc/config.guess ] || \ cp -f /usr/share/misc/config.guess config/config.guess # Create versioned symlinks cd debian; \ for file in libpqxx.*; do \ ln -sf $$file `echo $$file | sed -e 's/libpqxx/libpqxx$(LIBRARY_VERSION)/'`; \ done -rm debian/libpqxx$(LIBRARY_VERSION)*.in mkdir debian/build && \ cd debian/build && \ ../../configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-shared --disable-static --enable-maintainer-mode CXXFLAGS="$(CXXFLAGS)" && \ mkdir doc/html touch autoconfigure-stamp build: build-stamp build-stamp: autoconfigure-stamp dh_testdir cd debian/build; \ $(MAKE) touch build-stamp clean: dh_testdir dh_testroot [ ! -f Makefile ] || $(MAKE) distclean rm -f build-stamp autoconfigure-stamp rm -rf debian/build debian/install rm -rf debian/libpqxx$(LIBRARY_VERSION)* [ ! -r config/config.guess.orig ] || \ mv -f config/config.guess.orig config/config.guess || : [ ! -r config/config.sub.orig ] || \ mv -f config/config.sub.orig config/config.sub || : dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Install into virtual root cd debian/build; \ $(MAKE) install DESTDIR=$(CURDIR)/debian/install # We don't want an RPATH in a Debian package chrpath --delete debian/install/usr/lib/lib*.so dh_install # Remove examples which include internal headers rm -f `grep -l config\\.h debian/libpqxx-doc/usr/share/doc/libpqxx-doc/examples/*.cxx` rm -f `grep -l config-internal debian/libpqxx-doc/usr/share/doc/libpqxx-doc/examples/*.cxx` rm -f `grep -l compiler\\.h debian/libpqxx-doc/usr/share/doc/libpqxx-doc/examples/*.cxx` binary-indep: install binary-arch: install dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installchangelogs ChangeLog dh_link dh_strip --dbg-package=libpqxx$(LIBRARY_VERSION)-dbg dh_compress dh_fixperms dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install libpqxx-4.0.1+dfsg/debian/watch000066400000000000000000000001001224474465600164020ustar00rootroot00000000000000version=3 ftp://pqxx.org/software/libpqxx/libpqxx-(.+)\.tar\.gz libpqxx-4.0.1+dfsg/doc/000077500000000000000000000000001224474465600147055ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/doc/Doxyfile.in000066400000000000000000001536571224474465600170410ustar00rootroot00000000000000# Doxyfile 1.5.5 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libpqxx # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = @PQXXVERSION@ # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = html/Reference # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, # Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, # Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, # and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = ../ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = NO # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = @top_srcdir@/include/pqxx \ @top_srcdir@/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.cxx \ *.hxx \ *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = *.o \ *.lo \ *.a \ .cvsignore # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = . # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = YES # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = YES # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = PGSTD=std \ PQXX_ABI="@PQXX_ABI@" \ PQXX_DEPRECATED= \ PQXX_LIBEXPORT= \ PQXX_NOVTABLE= \ PQXX_PRIVATE= \ PQXX_TYPENAME=typename \ PQXX_VERSION="@PQXXVERSION@" \ PQXX_MAJOR=@PQXX_MAJOR@ \ PQXX_MINOR=@PQXX_MINOR@ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = @HAVE_DOT@ # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = NO # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is enabled by default, which results in a transparent # background. Warning: Depending on the platform used, enabling this option # may lead to badly anti-aliased labels on the edges of a graph (i.e. they # become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO libpqxx-4.0.1+dfsg/doc/Makefile.am000066400000000000000000000042131224474465600167410ustar00rootroot00000000000000MAINTAINERCLEANFILES = Makefile.in maintainer-clean-local: $(RM) -rf html/Reference html/Tutorial $(RM) reference-stamp tutorial-stamp $(MKDIR) html/Reference html/Tutorial EXTRA_DIST= Doxyfile.in libpqxx.xml reference-stamp tutorial-stamp all-local: docs if BUILD_REFERENCE REFERENCE_DOCS = reference else REFERENCE_DOCS = endif if BUILD_TUTORIAL TUTORIAL_DOCS = tutorial else TUTORIAL_DOCS = endif if MAINTAINER_MODE REFERENCE_STAMP_DEPENDENCIES = ../src/libpqxx.la else REFERENCE_STAMP_DEPENDENCIES = endif DOCS = $(REFERENCE_DOCS) $(TUTORIAL_DOCS) docs: $(DOCS) reference: reference-stamp reference-stamp: Doxyfile.in $(REFERENCE_STAMP_DEPENDENCIES) if test -x "$(DOXYGEN)"; then \ $(DOXYGEN) Doxyfile; \ touch $@; \ else \ echo >&2; \ echo >&2 "*****************************************************"; \ echo >&2; \ echo >&2 "Doxygen not found."; \ echo >&2 "Install it, or configure with --disable-documentation"; \ echo >&2; \ echo >&2 "*****************************************************"; \ exit 1; \ fi ../src/libpqxx.la: cd ../src; \ $(MAKE) libpqxx.la tutorial: tutorial-stamp tutorial-stamp: libpqxx.xml if test -x "$(XMLTO)"; then \ $(XMLTO) -o html/Tutorial xhtml $<; \ touch $@; \ else \ echo >&2; \ echo >&2 "*****************************************************"; \ echo >&2; \ echo >&2 "xmlto not found."; \ echo >&2 "Install it, or configure with --disable-documentation"; \ echo >&2; \ echo >&2 "*****************************************************"; \ exit 1; \ fi DISTHOOKDIRS = html/Reference html/Tutorial dist-hook: reference tutorial mkdir $(distdir)/html # Do a shallow copy of each directory for dir in $(DISTHOOKDIRS); do \ if test -d $(srcdir)/$$dir; then \ mkdir $(distdir)/$$dir; \ for dirfile in $(srcdir)/$$dir/*; do \ if test -f $$dirfile; then \ cp -p $$dirfile $(distdir)/$$dir; \ fi ; \ if test -d $$dirfile ; then \ subdir="`basename "$$dirfile"`"; \ if test "$$subdir" != "CVS" && "$$subdir" != ".svn" ; then \ cp -pR $$dirfile $(distdir)/$$dir; \ fi \ fi \ done \ fi \ done libpqxx-4.0.1+dfsg/doc/Makefile.in000066400000000000000000000323241224474465600167560ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Doxyfile.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = Doxyfile CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = Doxyfile.in libpqxx.xml reference-stamp tutorial-stamp @BUILD_REFERENCE_FALSE@REFERENCE_DOCS = @BUILD_REFERENCE_TRUE@REFERENCE_DOCS = reference @BUILD_TUTORIAL_FALSE@TUTORIAL_DOCS = @BUILD_TUTORIAL_TRUE@TUTORIAL_DOCS = tutorial @MAINTAINER_MODE_FALSE@REFERENCE_STAMP_DEPENDENCIES = @MAINTAINER_MODE_TRUE@REFERENCE_STAMP_DEPENDENCIES = ../src/libpqxx.la DOCS = $(REFERENCE_DOCS) $(TUTORIAL_DOCS) DISTHOOKDIRS = html/Reference html/Tutorial all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): Doxyfile: $(top_builddir)/config.status $(srcdir)/Doxyfile.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ clean-libtool dist-hook distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am maintainer-clean-local: $(RM) -rf html/Reference html/Tutorial $(RM) reference-stamp tutorial-stamp $(MKDIR) html/Reference html/Tutorial all-local: docs docs: $(DOCS) reference: reference-stamp reference-stamp: Doxyfile.in $(REFERENCE_STAMP_DEPENDENCIES) if test -x "$(DOXYGEN)"; then \ $(DOXYGEN) Doxyfile; \ touch $@; \ else \ echo >&2; \ echo >&2 "*****************************************************"; \ echo >&2; \ echo >&2 "Doxygen not found."; \ echo >&2 "Install it, or configure with --disable-documentation"; \ echo >&2; \ echo >&2 "*****************************************************"; \ exit 1; \ fi ../src/libpqxx.la: cd ../src; \ $(MAKE) libpqxx.la tutorial: tutorial-stamp tutorial-stamp: libpqxx.xml if test -x "$(XMLTO)"; then \ $(XMLTO) -o html/Tutorial xhtml $<; \ touch $@; \ else \ echo >&2; \ echo >&2 "*****************************************************"; \ echo >&2; \ echo >&2 "xmlto not found."; \ echo >&2 "Install it, or configure with --disable-documentation"; \ echo >&2; \ echo >&2 "*****************************************************"; \ exit 1; \ fi dist-hook: reference tutorial mkdir $(distdir)/html # Do a shallow copy of each directory for dir in $(DISTHOOKDIRS); do \ if test -d $(srcdir)/$$dir; then \ mkdir $(distdir)/$$dir; \ for dirfile in $(srcdir)/$$dir/*; do \ if test -f $$dirfile; then \ cp -p $$dirfile $(distdir)/$$dir; \ fi ; \ if test -d $$dirfile ; then \ subdir="`basename "$$dirfile"`"; \ if test "$$subdir" != "CVS" && "$$subdir" != ".svn" ; then \ cp -pR $$dirfile $(distdir)/$$dir; \ fi \ fi \ done \ fi \ done # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/doc/html/000077500000000000000000000000001224474465600156515ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/doc/html/Reference/000077500000000000000000000000001224474465600175475ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/doc/html/Reference/a00001.html000066400000000000000000000231101224474465600212330ustar00rootroot00000000000000 libpqxx: Getting started
Getting started

The most basic three types in libpqxx are the connection (which inherits its API from pqxx::connection_base and its setup behaviour from pqxx::connectionpolicy), the transaction (derived from pqxx::transaction_base), and the result (pqxx::result).

They fit together as follows:

  • You connect to the database by creating a connection object (see Connection classes). The connection type you'll usually want is pqxx::connection.
  • You create a transaction object (see Transaction classes) operating on that connection. You'll usually want the pqxx::work variety. If you don't want transactional behaviour, use pqxx::nontransaction. Once you're done you call the transaction's commit function to make its work final. If you don't call this, the work will be rolled back when the transaction object is destroyed.
  • Until then, use the transaction's exec function to execute queries, which you pass in as simple strings.
  • The function returns a pqxx::result object, which acts as a standard container of rows. Each row in itself acts as a container of fields. You can use array indexing and/or iterators to access either.
  • The field's data is stored as a text string. You can read it as such using its c_str() function, or convert it to other types using its as() and to() member functions. These are templated on the destination type: myfield.as<int>(); or myfield.to(myint);
  • After you've closed the transaction, the connection is free to run a next transaction.

Here's a very basic example. It connects to the default database (you'll need to have one set up), queries it for a very simple result, converts it to an int, and prints it out. It also contains some basic error handling.

#include <iostream>
#include <pqxx/pqxx>
int main()
{
try
{
pqxx::work w(c);
pqxx::result r = w.exec("SELECT 1");
w.commit();
std::cout << r[0][0].as<int>() << std::endl;
}
catch (const std::exception &e)
{
std::cerr << e.what() << std::endl;
return 1;
}
}

This prints the number 1. Notice that you can keep the result object around after the transaction (or even the connection) has been closed.

Here's a slightly more complicated example. It takes an argument from the command line and retrieves a string with that value. The interesting part is that it uses the escaping-and-quoting function quote() to embed this string value in SQL safely. It also reads the result field's value as a plain C-style string using its c_str() function.

#include <iostream>
#include <pqxx/pqxx>
int main(int argc, char *argv[])
{
if (!argv[1])
{
std::cerr << "Give me a string!" << std::endl;
return 1;
}
try
{
pqxx::work w(c);
pqxx::result r = w.exec("SELECT " + w.quote(argv[1]));
w.commit();
std::cout << r[0][0].c_str() << std::endl;
}
catch (const std::exception &e)
{
std::cerr << e.what() << std::endl;
return 1;
}
}

You can find more about converting field values to native types, or converting values to strings for use with libpqxx, under String conversion. More about getting to the tuples and fields of a result is under Accessing results and result rows.

If you want to handle exceptions thrown by libpqxx in more detail, for example to print the SQL contents of a query that failed, see Exception classes.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00002.html000066400000000000000000000153431224474465600212450ustar00rootroot00000000000000 libpqxx: Accessing results and result rows
Accessing results and result rows

Let's say you have a result object. For example, your program may have done:

pqxx::result r = w.exec("SELECT * FROM mytable");

Now how do you access the data inside r?

The simplest way is array indexing. A result acts as an array of tuples, and a tuple acts as an array of fields.

const int num_rows = r.size();
for (int rownum=0; rownum < num_rows; ++rownum)
{
const pqxx::tuple row = r[rownum];
const int num_cols = row.size();
for (int colnum=0; colnum < num_cols; ++colnum)
{
const pqxx::field field = row[colnum];
std::cout << field.c_str() << '\t';
}
std::cout << std::endl;
}

But results and rows also define const_iterator types:

row != r.end();
++row)
{
field != row->end();
++field)
std::cout << field->c_str() << '\t';
std::cout << std::endl;
}

They also have const_reverse_iterator types, which iterate backwards from rbegin() to rend() exclusive.

All these iterator types provide one extra bit of convenience that you won't normally find in C++ iterators: referential transparency. You don't need to dereference them to get to the row or field they refer to. That is, instead of row->end() you can also choose to say row.end(). Similarly, you may prefer field.c_str() over field->c_str().

This becomes really helpful with the array-indexing operator. With regular C++ iterators you would need ugly expressions like (*row)[0] or row->operator[](0). With the iterator types defined by the result and tuple classes you can simply say row[0].

libpqxx-4.0.1+dfsg/doc/html/Reference/a00003.html000066400000000000000000000115771224474465600212530ustar00rootroot00000000000000 libpqxx: Thread safety
Thread safety

This library does not contain any locking code to protect objects against simultaneous modification in multi-threaded programs. There are many different threading interfaces and libpqxx does not dictate your choice.

Therefore it is up to you, the user of the library, to ensure that your threaded client programs perform no conflicting operations concurrently.

The library does try to avoid non-obvious unsafe operations and so does the underlying libpq. Here's what you should do to keep your threaded libpqxx application safe:

  • Treat a connection, together with any and all objects related to it, as a "world" of its own. You should generally make sure that the same "world" is never accessed concurrently by multiple threads. There are a few cases where you don't need to be this careful, however; see below.
  • Result sets (pqxx::result) and binary data (pqxx::binarystring) are special. Copying these objects is very cheap, and you can give the copy to another thread. Just make sure that no other thread accesses the same copy when it's being assigned to, swapped, cleared, or destroyed.
Warning
Prior to libpqxx 3.1, or in C++ environments without the standard "shared_ptr" smart pointer type, copying, assigning, or destroying a pqxx::result or pqxx::binarystring could also affect any other other object of the same type referring to the same underlying data.

Use pqxx::describe_thread_safety to find out at runtime what level of thread safety is implemented in your build and version of libpqxx. It returns a pqxx::thread_safety_model describing what you can and cannot rely on. A command-line utility tools/pqxxthreadsafety prints out the same information.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00004.html000066400000000000000000000155121224474465600212450ustar00rootroot00000000000000 libpqxx: pqxx::argument_error Class Reference
pqxx::argument_error Class Reference

Invalid argument passed to libpqxx, similar to std::invalid_argument. More...

#include <except.hxx>

Inheritance diagram for pqxx::argument_error:
pqxx::pqxx_exception

Public Member Functions

 argument_error (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Invalid argument passed to libpqxx, similar to std::invalid_argument.

Constructor & Destructor Documentation

pqxx::argument_error::argument_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00004.js000066400000000000000000000001411224474465600207050ustar00rootroot00000000000000var a00004 = [ [ "argument_error", "a00004.html#a1b68c0e492e7cb4f9458ca0de1b85862", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00004.png000066400000000000000000000010661224474465600210640ustar00rootroot00000000000000‰PNG  IHDRƒP é6ÕPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÅIDATxíkŽÃ „ǃÔûyË36”’>v‰V®˜@À&ŽþE!lIn•38Ã&I$;ý-IŽ:„’¬î×6Pž‹åx_ûj»ìÇéNÍ y‹dMáÐfËê”fZuBê¦æ†8ô6õzf¹.ä¹2ßù<Àû2Cüõ yîM†1Ø‹euôczÇ’A½ðG9ù|ù€«Ý"&q˜$~õý°.J.·¹Ù»xRÉ‹e’œieÿ1CÊ;œ$iõë $¹Ðy’Ü#gp†Ž!„ö >Ó 6ë ·Û~ˆ 0ܶC\Áë¨æ Îà `å Îà `å Îà `å ÿŠADd³ °UÎà Âð¶—b¸Ò(Vkè­bWû\Ññ>ue\L²1]³ÿ1aòNú è–ÕlCz¨¹oT-"ÕU;–Sš8ègéPŒ›YÓSu£0z‰!}SŸ3d“‘A¹B£9ƒ9Û£Ìâ`Wmvž`Ðçs²¾I‹ï½‹I]ÔmÄ+9Ø'o« õ6m]´K>ÂJû›_•wt`¢”‹]iÀ ·âpjg8'ÿßt† 2ˆˆìÕPêô‘ôjIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00005.html000066400000000000000000000236751224474465600212570ustar00rootroot00000000000000 libpqxx: std::back_insert_iterator< pqxx::tablewriter > Class Template Reference
std::back_insert_iterator< pqxx::tablewriter > Class Template Reference

#include <tablewriter.hxx>

Public Member Functions

 back_insert_iterator (pqxx::tablewriter &W) throw ()
back_insert_iteratoroperator= (const back_insert_iterator &rhs) throw ()
template<typename TUPLE >
back_insert_iteratoroperator= (const TUPLE &T)
back_insert_iteratoroperator++ ()
back_insert_iteratoroperator++ (int)
back_insert_iteratoroperator* ()

Constructor & Destructor Documentation

std::back_insert_iterator< pqxx::tablewriter >::back_insert_iterator ( pqxx::tablewriter W) throw ()
explicit

Member Function Documentation

back_insert_iterator& std::back_insert_iterator< pqxx::tablewriter >::operator* ( )
back_insert_iterator& std::back_insert_iterator< pqxx::tablewriter >::operator++ ( )
back_insert_iterator& std::back_insert_iterator< pqxx::tablewriter >::operator++ ( int  )
back_insert_iterator& std::back_insert_iterator< pqxx::tablewriter >::operator= ( const back_insert_iterator< pqxx::tablewriter > &  rhs) throw ()
template<typename TUPLE >
back_insert_iterator& std::back_insert_iterator< pqxx::tablewriter >::operator= ( const TUPLE &  T)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00005.js000066400000000000000000000007451224474465600207200ustar00rootroot00000000000000var a00005 = [ [ "back_insert_iterator", "a00005.html#a25f4372dfc9c449cae4572f01de65323", null ], [ "operator*", "a00005.html#a0b513557015fe5eda72c189dd488d5dd", null ], [ "operator++", "a00005.html#a0b7adddc8406229b9c5a161302dffba5", null ], [ "operator++", "a00005.html#ad4658fc955fd5a74ece771106a7edee0", null ], [ "operator=", "a00005.html#a2aaa8274759d9d84964e8235ec59bac0", null ], [ "operator=", "a00005.html#a673f58eda786a37dd76ebcfd7bd5cd96", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00006.html000066400000000000000000001215061224474465600212500ustar00rootroot00000000000000 libpqxx: pqxx::basic_connection< CONNECTPOLICY > Class Template Reference
pqxx::basic_connection< CONNECTPOLICY > Class Template Reference

The ultimate template that defines a connection type. More...

#include <basic_connection.hxx>

Inheritance diagram for pqxx::basic_connection< CONNECTPOLICY >:
pqxx::connection_base

Public Member Functions

 basic_connection ()
 basic_connection (const std::string &opt)
 basic_connection (const char opt[])
 ~basic_connection () throw ()
const std::string & options () const throw ()
- Public Member Functions inherited from pqxx::connection_base
void disconnect () throw ()
 Explicitly close connection.
bool PQXX_PURE is_open () const throw ()
 Is this connection open at the moment?
void process_notice (const char[]) throw ()
 Invoke notice processor function. The message should end in newline.
void process_notice (const std::string &) throw ()
 Invoke notice processor function. Newline at end is recommended.
void trace (std::FILE *) throw ()
 Enable tracing to a given output stream, or NULL to disable.
void set_client_encoding (const std::string &Encoding)
 Set client-side character encoding.
void set_variable (const std::string &Var, const std::string &Value)
 Set session variable.
std::string get_variable (const std::string &)
 Read session variable.
std::string adorn_name (const std::string &)
 Suffix unique number to name to make it unique within session context.
std::string esc (const char str[])
 Escape string for use as SQL string literal on this connection.
std::string esc (const char str[], size_t maxlen)
 Escape string for use as SQL string literal on this connection.
std::string esc (const std::string &str)
 Escape string for use as SQL string literal on this connection.
std::string esc_raw (const unsigned char str[], size_t len)
 Escape binary string for use as SQL string literal on this connection.
std::string quote_raw (const unsigned char str[], size_t len)
 Escape and quote a string of binary data.
std::string quote_name (const std::string &identifier)
 Escape and quote an SQL identifier for use in a query.
template<typename T >
std::string quote (const T &t)
 Represent object as SQL string, including quoting & escaping.
std::string quote (const binarystring &)
void cancel_query ()
 Attempt to cancel the ongoing query, if any.
void set_verbosity (error_verbosity verbosity) throw ()
 Set session verbosity.
error_verbosity get_verbosity () const throw ()
 Retrieve current error verbosity.
std::vector< errorhandler * > get_errorhandlers () const
 Return pointers to the active errorhandlers.
void activate ()
 Explicitly activate deferred or deactivated connection.
void deactivate ()
 Explicitly deactivate connection.
void inhibit_reactivation (bool inhibit)
 Disallow (or permit) connection recovery.
void simulate_failure ()
 Make the connection fail.
const char * dbname ()
 Name of database we're connected to, if any.
const char * username ()
 Database user ID we're connected under, if any.
const char * hostname ()
 Address of server, or NULL if none specified (i.e. default or local)
const char * port ()
 Server port number we're connected to.
int PQXX_PURE backendpid () const throw ()
 Process ID for backend process.
int PQXX_PURE sock () const throw ()
 Socket currently used for connection, or -1 for none. Use with care!
int get_notifs ()
 Check for pending notifications and take appropriate action.
int await_notification ()
 Wait for a notification to come in.
int await_notification (long seconds, long microseconds)
 Wait for a notification to come in, or for given timeout to pass.
void prepare (const std::string &name, const std::string &definition)
 Define a prepared statement.
void prepare (const std::string &definition)
 Define a nameless prepared statement.
void unprepare (const std::string &name)
 Drop prepared statement.
void prepare_now (const std::string &name)
 Request that prepared statement be registered with the server.
template<typename TRANSACTOR >
void perform (const TRANSACTOR &T, int Attempts)
 Perform the transaction defined by a transactor-based object.
template<typename TRANSACTOR >
void perform (const TRANSACTOR &T)
 Perform the transaction defined by a transactor-based object.
bool supports (capability c) const throw ()
 Does this connection seem to support the given capability?
int PQXX_PURE protocol_version () const throw ()
 What version of the PostgreSQL protocol is this connection using?
int PQXX_PURE server_version () const throw ()
 What version of the PostgreSQL server are we connected to?

Additional Inherited Members

- Public Types inherited from pqxx::connection_base
enum  error_verbosity { terse = 0, normal = 1, verbose = 2 }
 Error verbosity levels. More...
enum  capability {
  cap_prepared_statements, cap_create_table_with_oids, cap_nested_transactions, cap_cursor_scroll,
  cap_cursor_with_hold, cap_cursor_update, cap_cursor_fetch_0, cap_table_column,
  cap_read_only_transactions, cap_statement_varargs, cap_prepare_unnamed_statement, cap_parameterized_statements,
  cap_notify_payload, cap_end
}
 Session capabilities. More...
- Protected Member Functions inherited from pqxx::connection_base
 connection_base (connectionpolicy &)
void init ()
void close () throw ()
void wait_read () const
void wait_read (long seconds, long microseconds) const
void wait_write () const

Detailed Description

template<typename CONNECTPOLICY>
class pqxx::basic_connection< CONNECTPOLICY >

The ultimate template that defines a connection type.

Combines connection_base (the highly complex class implementing essentially all connection-related functionality) with a connection policy (a simpler helper class determining the rules that govern the process of setting up the underlying connection to the backend).

The pattern used to combine these classes is the same as for basic_transaction. Through use of the template mechanism, the policy object is embedded in the basic_connection object so that it does not need to be allocated separately. At the same time this construct avoids the need for any virtual functions in this class, which reduces risks of bugs in construction and destruction; as well as any need to templatize the larger body of code in the connection_base class which might otherwise lead to unacceptable code duplication.

Constructor & Destructor Documentation

template<typename CONNECTPOLICY >
pqxx::basic_connection< CONNECTPOLICY >::basic_connection ( )
template<typename CONNECTPOLICY >
pqxx::basic_connection< CONNECTPOLICY >::basic_connection ( const std::string &  opt)
explicit
template<typename CONNECTPOLICY >
pqxx::basic_connection< CONNECTPOLICY >::basic_connection ( const char  opt[])
explicit
template<typename CONNECTPOLICY >
pqxx::basic_connection< CONNECTPOLICY >::~basic_connection ( ) throw ()

Member Function Documentation

template<typename CONNECTPOLICY >
const std::string& pqxx::basic_connection< CONNECTPOLICY >::options ( ) const throw ()

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00006.js000066400000000000000000000006471224474465600207220ustar00rootroot00000000000000var a00006 = [ [ "basic_connection", "a00006.html#aa02e7329e13fdc9809c1215f224ab5fe", null ], [ "basic_connection", "a00006.html#a0436a1271586987e97bdf5b59b96f607", null ], [ "basic_connection", "a00006.html#aa6c74a9abcfa2b13c2334d0c38f66305", null ], [ "~basic_connection", "a00006.html#a3abaa953e318c2dda1b61b3f5861140e", null ], [ "options", "a00006.html#af041bd491664d3d3c81e7ad9e701d593", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00006.png000066400000000000000000000015421224474465600210650ustar00rootroot00000000000000‰PNG  IHDRP 9±ÁPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ñIDATxíÛ’ë ›qUþÿ“O_ÐÎeãÔIvåb !½2MÓ”.&IJÛ®$"É”D$™’ˆ$S‘dúH"å*Iêlï¾$cŸJD’Fö]DŠÊuÂçß­QÖ»—fñ©®µ¹ü\Ÿ™Gûø…è!I¯Ø¡Dæh¿®IEÅfó<8vßPQÕ±slŒ´+YcÀw‹oš¸Ö~½áßæÿ;‰\®gˆÌþËÉ[þHÒëö6"ÓÅH»û·ˆÔ›7ê’$=oïÊ#ƒÌzï¸ìå'òeyd§Ö¬³öZc«ñg^k libpqxx: pqxx::basic_fieldstream< CHAR, TRAITS > Class Template Reference
pqxx::basic_fieldstream< CHAR, TRAITS > Class Template Reference

Input stream that gets its data from a result field. More...

#include <field.hxx>

Inherits std::istream.

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef traits_type::pos_type pos_type
typedef traits_type::off_type off_type

Public Member Functions

 basic_fieldstream (const field &F)

Detailed Description

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
class pqxx::basic_fieldstream< CHAR, TRAITS >

Input stream that gets its data from a result field.

Use this class exactly as you would any other istream to read data from a field. All formatting and streaming operations of std::istream are supported. What you'll typically want to use, however, is the fieldstream typedef (which defines a basic_fieldstream for char). This is similar to how e.g. std::ifstream relates to std::basic_ifstream.

This class has only been tested for the char type (and its default traits).

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::basic_fieldstream< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::basic_fieldstream< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::off_type pqxx::basic_fieldstream< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::pos_type pqxx::basic_fieldstream< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::basic_fieldstream< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_fieldstream< CHAR, TRAITS >::basic_fieldstream ( const field F)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00007.js000066400000000000000000000007371224474465600207230ustar00rootroot00000000000000var a00007 = [ [ "char_type", "a00007.html#acb9db31f275560a165bb466555f30986", null ], [ "int_type", "a00007.html#a8f1cd9fcb08f673ef02776beb52ceefd", null ], [ "off_type", "a00007.html#a5f11dbcdcaf2c705935e099debb68cd8", null ], [ "pos_type", "a00007.html#ab2bc41979cc1d0d8a349a6b82dd5077f", null ], [ "traits_type", "a00007.html#a60c8c26735eb6e96fc915968ea13c7bc", null ], [ "basic_fieldstream", "a00007.html#a1f1918fb6cf893bb59e8b3e2921c22fd", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00008.html000066400000000000000000000341511224474465600212510ustar00rootroot00000000000000 libpqxx: pqxx::basic_ilostream< CHAR, TRAITS > Class Template Reference
pqxx::basic_ilostream< CHAR, TRAITS > Class Template Reference

Input stream that gets its data from a large object. More...

#include <largeobject.hxx>

Inherits std::istream.

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef traits_type::pos_type pos_type
typedef traits_type::off_type off_type

Public Member Functions

 basic_ilostream (dbtransaction &T, largeobject O, largeobject::size_type BufSize=512)
 Create a basic_ilostream.
 basic_ilostream (dbtransaction &T, oid O, largeobject::size_type BufSize=512)
 Create a basic_ilostream.

Detailed Description

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
class pqxx::basic_ilostream< CHAR, TRAITS >

Input stream that gets its data from a large object.

Use this class exactly as you would any other istream to read data from a large object. All formatting and streaming operations of std::istream are supported. What you'll typically want to use, however, is the ilostream typedef (which defines a basic_ilostream for char). This is similar to how e.g. std::ifstream relates to std::basic_ifstream.

Currently only works for <char, std::char_traits<char> >.

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::basic_ilostream< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::basic_ilostream< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::off_type pqxx::basic_ilostream< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::pos_type pqxx::basic_ilostream< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::basic_ilostream< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_ilostream< CHAR, TRAITS >::basic_ilostream ( dbtransaction T,
largeobject  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_ilostream.

Parameters
TTransaction in which this stream is to exist
OLarge object to access
BufSizeSize of buffer to use internally (optional)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_ilostream< CHAR, TRAITS >::basic_ilostream ( dbtransaction T,
oid  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_ilostream.

Parameters
TTransaction in which this stream is to exist
OIdentifier of a large object to access
BufSizeSize of buffer to use internally (optional)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00008.js000066400000000000000000000010571224474465600207200ustar00rootroot00000000000000var a00008 = [ [ "char_type", "a00008.html#ad94ea6936b6a5ee2983bdcbacdf364a9", null ], [ "int_type", "a00008.html#a1cffaceb7db5daf482bcb7f73aeaa0b0", null ], [ "off_type", "a00008.html#a8ef4183e4700b8859a1f0950e6dff8ee", null ], [ "pos_type", "a00008.html#a9b47ff8b4b3863983169e64b69cee6fa", null ], [ "traits_type", "a00008.html#af70c033d70d77ee3e4942112ad9e54c2", null ], [ "basic_ilostream", "a00008.html#a53f0bc4d9eed45617ae14bf553efa429", null ], [ "basic_ilostream", "a00008.html#af46e0f2cfe62a5c75b431e56065ad883", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00009.html000066400000000000000000000355301224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::basic_lostream< CHAR, TRAITS > Class Template Reference
pqxx::basic_lostream< CHAR, TRAITS > Class Template Reference

Stream that reads and writes a large object. More...

#include <largeobject.hxx>

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef traits_type::pos_type pos_type
typedef traits_type::off_type off_type

Public Member Functions

 basic_lostream (dbtransaction &T, largeobject O, largeobject::size_type BufSize=512)
 Create a basic_lostream.
 basic_lostream (dbtransaction &T, oid O, largeobject::size_type BufSize=512)
 Create a basic_lostream.
 ~basic_lostream ()

Detailed Description

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
class pqxx::basic_lostream< CHAR, TRAITS >

Stream that reads and writes a large object.

Use this class exactly as you would a std::iostream to read data from, or write data to a large object. All formatting and streaming operations of std::iostream are supported. What you'll typically want to use, however, is the lostream typedef (which defines a basic_lostream for char). This is similar to how e.g. std::fstream is related to std::basic_fstream.

Currently only works for <char, std::char_traits<char> >.

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::basic_lostream< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::basic_lostream< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::off_type pqxx::basic_lostream< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::pos_type pqxx::basic_lostream< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::basic_lostream< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_lostream< CHAR, TRAITS >::basic_lostream ( dbtransaction T,
largeobject  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_lostream.

Parameters
TTransaction in which this stream is to exist
OLarge object to access
BufSizeSize of buffer to use internally (optional)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_lostream< CHAR, TRAITS >::basic_lostream ( dbtransaction T,
oid  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_lostream.

Parameters
TTransaction in which this stream is to exist
OLarge object to access
BufSizeSize of buffer to use internally (optional)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_lostream< CHAR, TRAITS >::~basic_lostream ( )

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00009.js000066400000000000000000000011771224474465600207240ustar00rootroot00000000000000var a00009 = [ [ "char_type", "a00009.html#a6defd7dc017956dcda572ff9d54b394d", null ], [ "int_type", "a00009.html#a7d45a1d6dc270b8a793a5e3cde0fb2c3", null ], [ "off_type", "a00009.html#a94b75418ccf0801a3f7fd62d3f0897d7", null ], [ "pos_type", "a00009.html#a411cd2fbec4a9f5bfa07030d8a77b482", null ], [ "traits_type", "a00009.html#ac41b5c92c32c7d99a86e887d8fc9f33e", null ], [ "basic_lostream", "a00009.html#a82775c94f45b87a6b9e082900d2d9d2b", null ], [ "basic_lostream", "a00009.html#a60e982e6fba23c8067404af0a4f5d05a", null ], [ "~basic_lostream", "a00009.html#a57d98a1321d8f5d00027810bb811025c", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00010.html000066400000000000000000000357111224474465600212450ustar00rootroot00000000000000 libpqxx: pqxx::basic_olostream< CHAR, TRAITS > Class Template Reference
pqxx::basic_olostream< CHAR, TRAITS > Class Template Reference

Output stream that writes data back to a large object. More...

#include <largeobject.hxx>

Inherits std::ostream.

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef traits_type::pos_type pos_type
typedef traits_type::off_type off_type

Public Member Functions

 basic_olostream (dbtransaction &T, largeobject O, largeobject::size_type BufSize=512)
 Create a basic_olostream.
 basic_olostream (dbtransaction &T, oid O, largeobject::size_type BufSize=512)
 Create a basic_olostream.
 ~basic_olostream ()

Detailed Description

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
class pqxx::basic_olostream< CHAR, TRAITS >

Output stream that writes data back to a large object.

Use this class exactly as you would any other ostream to write data to a large object. All formatting and streaming operations of std::ostream are supported. What you'll typically want to use, however, is the olostream typedef (which defines a basic_olostream for char). This is similar to how e.g. std::ofstream is related to std::basic_ofstream.

Currently only works for <char, std::char_traits<char> >.

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::basic_olostream< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::basic_olostream< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::off_type pqxx::basic_olostream< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::pos_type pqxx::basic_olostream< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::basic_olostream< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_olostream< CHAR, TRAITS >::basic_olostream ( dbtransaction T,
largeobject  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_olostream.

Parameters
Ttransaction in which this stream is to exist
Oa large object to access
BufSizesize of buffer to use internally (optional)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_olostream< CHAR, TRAITS >::basic_olostream ( dbtransaction T,
oid  O,
largeobject::size_type  BufSize = 512 
)

Create a basic_olostream.

Parameters
Ttransaction in which this stream is to exist
Oa large object to access
BufSizesize of buffer to use internally (optional)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::basic_olostream< CHAR, TRAITS >::~basic_olostream ( )

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00010.js000066400000000000000000000012021224474465600207010ustar00rootroot00000000000000var a00010 = [ [ "char_type", "a00010.html#a5c09652a33d59854940ef5ad36522bef", null ], [ "int_type", "a00010.html#a0e9bac94644a39ea5465d9b7aeba62dd", null ], [ "off_type", "a00010.html#acd6a237e073930d1c9b52de0c4cc9ba7", null ], [ "pos_type", "a00010.html#a472b319febd6757f32a06541ecb5fd99", null ], [ "traits_type", "a00010.html#afa10568556220285b8f77e6bc6a65c63", null ], [ "basic_olostream", "a00010.html#a627ef8d2f00596a80104f81bac097f61", null ], [ "basic_olostream", "a00010.html#af5a32597bd7cf509cb8593daf9e5f0f1", null ], [ "~basic_olostream", "a00010.html#a514945ec9aeaa6bdd455f21ccd9d3876", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00011.html000066400000000000000000000765271224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::basic_robusttransaction Class Reference

#include <robusttransaction.hxx>

Inheritance diagram for pqxx::basic_robusttransaction:
pqxx::dbtransaction pqxx::transaction_base pqxx::internal::namedclass pqxx::robusttransaction< ISOLATIONLEVEL >

Public Types

typedef isolation_traits
< read_committed
isolation_tag
 Isolation level is read_committed by default.

Public Member Functions

virtual ~basic_robusttransaction ()=0
- Public Member Functions inherited from pqxx::dbtransaction
virtual ~dbtransaction ()
- Public Member Functions inherited from pqxx::transaction_base
virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Protected Member Functions

 basic_robusttransaction (connection_base &C, const std::string &IsolationLevel, const std::string &table_name=std::string())
- Protected Member Functions inherited from pqxx::dbtransaction
 dbtransaction (connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)
 dbtransaction (connection_base &, bool direct=true, readwrite_policy rw=read_write)
void start_backend_transaction ()
 Start a transaction on the backend and set desired isolation level.
virtual void do_begin ()
 Sensible default implemented here: begin backend transaction.
virtual result do_exec (const char Query[])
 Sensible default implemented here: perform query.
virtual void do_commit ()=0
 To be implemented by derived class: commit backend transaction.
virtual void do_abort ()
 Sensible default implemented here: abort backend transaction.
- Protected Member Functions inherited from pqxx::transaction_base
 transaction_base (connection_base &c, bool direct=true)
 Create a transaction (to be called by implementation classes only)
void Begin ()
 Begin transaction (to be called by implementing class)
void End () throw ()
 End transaction. To be called by implementing class' destructor.
result DirectExec (const char C[], int Retries=0)
 Execute query on connection directly.
void reactivation_avoidance_clear () throw ()
 Forget about any reactivation-blocking resources we tried to allocate.

Additional Inherited Members

- Static Protected Member Functions inherited from pqxx::dbtransaction
static std::string fullname (const std::string &ttype, const std::string &isolation)
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Member Typedef Documentation

Isolation level is read_committed by default.

Constructor & Destructor Documentation

pqxx::basic_robusttransaction::~basic_robusttransaction ( )
pure virtual
pqxx::basic_robusttransaction::basic_robusttransaction ( connection_base C,
const std::string &  IsolationLevel,
const std::string &  table_name = std::string() 
)
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00011.js000066400000000000000000000004251224474465600207100ustar00rootroot00000000000000var a00011 = [ [ "isolation_tag", "a00011.html#aad0757a015b2ddfe476e3d83f812bbff", null ], [ "~basic_robusttransaction", "a00011.html#a4fa796f8dff9f236c36f292898eaeaad", null ], [ "basic_robusttransaction", "a00011.html#a0761b12be4f64a7bccba1d2e7bf3d4a2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00011.png000066400000000000000000000037461224474465600210710ustar00rootroot00000000000000‰PNG  IHDR øÁäC$PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2uIDATxíë’³*EÛª¼ÿ#墙d’Ì$ßÙ–[.6˦û/ÔkÙ®­ù?m׺òår» Ã0Îe>0†ÐÊ…ÅZYi¼î#©µÓWvéöyû<ééë-4~…|ÞÅ-Ðî˜'#|ò:s†}t“i]U~–J^cYäþs™È]¹;÷çGõ„lÜÆ­ÅÚ½Ùoã³å ©Œoí\¨ó”­÷¨¯É*e“ååÚú,n_7Ñú{{ÛÌ8n¶oãKG3´Û¸þ½¿µÿ2Ån¶þɲ™ýOíg{õ˜m·Ý¾•Û¸1løuÞüp¼„?÷ŒNc+6·a r½4Ö®! ŽÝÄ:r„2Ù¿û³’9"Úÿ| ý6Xûí°mª›ìG¸‡ùvbÒî)5+=Xk†}$…öEO­ÃšÎvÇcÀbOoÇ2¶{`?•ÆD×8·GûÁ]÷l0¸wuøé8lIa”S -i§ClYc;“Ý–Mj–z`?…Æ#î5DñÝô ʥĎ&×£æÊ³JË=Vüaü[¥aŒ%9rÆ^Ö kµ¬4 £–™FËví±äÿÙx],Ó˜u¹‡iœ”a‡i2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$ÓxG˲,Öv±H’U.Ó0 IŠd¦!I‘~F’¤›”-¯ß>‰$ݯ÷¤!I‘>‡FR*‹ÍÏVéHk+¿Ùj£õþv7Z'h}»ÝñçÁ’ô¨žH£zxÙ’‚{7Ùl”Ôï¹8Ù¾¡¤~?ÍgžéÇ]ìÏñõæv7 'iöŸM#;ö°ËæìwѨöuðZs“Ï9îòä(ßÓ8 –¤gè5qãE¯Ðø>nÌ4>(n\É)-´¶“R;ç“2¤›9§Ì¾q°ßœV%ésô4J¤|ž HR(ûÆkhHÒ§Ë4LC’"™†iHR¤LcY–ŪÀè`™À¬ËÅ8LठÃ8L Y˜@$Ó0 €H¦a‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™Æ;ÒX–e±¶‹E’¬r™†iHR$Ó0 IŠôG4R¹·š$Ý >F’^¢Ï¢!I¯Ô+h$¥²òül•q7kÿn•Ê£´‹ÕaÈP¬b1ÙIÒóôõÏ—()ºwUF[µ½î¹8ÙIÒõß8®{F¯¯™{ƒ3“¤çè}hä04Ûù·hL.þÓ.OŽò©4†øDÑ nDŒ¾‰äWrJš-§ôpXsÆé¤ éfÎ)ŸtRÎUIzw™†iHR¤WФϔi˜†$E2 Ó¤H™Æ²,‹U/€7ÐÀ2 €Y—‹q˜ÀI†q˜@ ³0 €H¦a‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2w¤‘RJÖv‘¬ê¦aLÃ4"½†F4ç—ß¹2àöµÝe ê÷h\Õ3h<¨ÒÈÃʸ5Cï•aM½·¿,ªíñÛµkÐíÊ‹òîluœ|{ß?°ÛÜ¥ŸÒ¨?®¬ƒÄén5Ó=~n³ún@d5Ù’è÷`pŸ~ìǯïÏñõäïçÞp.NøŽ¯ç9#B÷éµ4ª¯·Sp+iÀ~ޝ‡¾·¢19jkZìM4ŽGëÊë·ñ!DDQô¶¸1ì39Wi|7~Ý7®ä”}U=Þï')Ê)§,ÐRCŸ{˜ètR†t3ç”ß?)OÍô¯? ±F¿ÙIÞBö'Ðøe¦É4L R¦‘RJÖ[¥ý €e³.ã0 €“2 ã0 €@fa‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2 ÓˆdïHcY–åïuY–eù{±H’U.Ó0 IŠd¦!I‘~B#IÒA¹/ê–¤³¾3^_¦|ÕÆVé#j³^½Ñmúô›ÍÐ?uHÒ¤¿¢!IWµOV¨L•ÚØ÷z¶Ùk£E@é[ùæ^9­¡þ‚Í¢ib~´jÏ^ì¿t¶‹Ñöm]§1Úl‹:Ðèk½•F£,VIÇ{¿´^) wl5Ù*©ßƒ]ã6ýæ€FßÔ“h ?cðã'»q¾s1¶Íé¸O{›§?6À¹—Æ0÷7†Dq£}úqmÕý·gy\D@c:-¦=¾†6»g#ïtðOg³vÄ4ŽŒ¿¤qØÝµ×÷ùF¼Ó“[<‡FàC܈£h’4Þ1³oâÆ|4¾Ë)c%¢1Ž»)n\É)‡3p0m'¥v6«φœÒÓÍœSNŽ»Ÿðv2†Ñè6 æf|8V=n´~IýžNÊ×éG’þq™†iHR¤FC’þ÷2 Ó¤H¦a’)ÓX–e±êõ”ú»Øm…`ÙIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00012.html000066400000000000000000000412321224474465600212420ustar00rootroot00000000000000 libpqxx: pqxx::basic_transaction Class Reference
pqxx::basic_transaction Class Reference

#include <transaction.hxx>

Inheritance diagram for pqxx::basic_transaction:
pqxx::dbtransaction pqxx::transaction_base pqxx::internal::namedclass pqxx::transaction< ISOLATIONLEVEL, READWRITE >

Protected Member Functions

 basic_transaction (connection_base &C, const std::string &IsolationLevel, readwrite_policy)
- Protected Member Functions inherited from pqxx::dbtransaction
 dbtransaction (connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)
 dbtransaction (connection_base &, bool direct=true, readwrite_policy rw=read_write)
void start_backend_transaction ()
 Start a transaction on the backend and set desired isolation level.
virtual void do_begin ()
 Sensible default implemented here: begin backend transaction.
virtual result do_exec (const char Query[])
 Sensible default implemented here: perform query.
virtual void do_commit ()=0
 To be implemented by derived class: commit backend transaction.
virtual void do_abort ()
 Sensible default implemented here: abort backend transaction.
- Protected Member Functions inherited from pqxx::transaction_base
 transaction_base (connection_base &c, bool direct=true)
 Create a transaction (to be called by implementation classes only)
void Begin ()
 Begin transaction (to be called by implementing class)
void End () throw ()
 End transaction. To be called by implementing class' destructor.
result DirectExec (const char C[], int Retries=0)
 Execute query on connection directly.
void reactivation_avoidance_clear () throw ()
 Forget about any reactivation-blocking resources we tried to allocate.

Additional Inherited Members

- Public Types inherited from pqxx::transaction_base
typedef isolation_traits
< read_committed
isolation_tag
 If nothing else is known, our isolation level is at least read_committed.
- Public Member Functions inherited from pqxx::dbtransaction
virtual ~dbtransaction ()
- Static Protected Member Functions inherited from pqxx::dbtransaction
static std::string fullname (const std::string &ttype, const std::string &isolation)
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Constructor & Destructor Documentation

pqxx::basic_transaction::basic_transaction ( connection_base C,
const std::string &  IsolationLevel,
readwrite_policy  rw 
)
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00012.js000066400000000000000000000001441224474465600207070ustar00rootroot00000000000000var a00012 = [ [ "basic_transaction", "a00012.html#ac37eaf1787575f972034ddb87c496eb7", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00012.png000066400000000000000000000043721224474465600210660ustar00rootroot00000000000000‰PNG  IHDR:øKËÚePLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2‰IDATxíë–²:+;kùþ|¸…$€£ôÇñÛ3–ÜšHŠN÷_˜ÿòò·úøññ¼£áÏÛó[°¹wo³MĶ™lќսû—Ózœ~ŠÞ·Ž“Þ5IÝ/¾»q¢O>1ΰ÷žçÏÃ×%FRš¶ãΔ ÓŒJn ÛùBÏ_sŽ ÿë}cüPâ—ûÇÍ8š‡Í¤ng¼¿žŸN_cpn±/y22åÂ8­yg1VÏ×ãeæí}}üzÿhfrp\×€ú;åüz|Mî]ðN–œ) š(õ¨Ltέ’cM®-·¯õkÉÍèM5«|5vQÎ]en^5Õ಺Z³MŽŒËj^·ãâ«5[N—\[ÃjnÕ¸ýï¾¼Ç^0rÍ©©€Õ\YÍ.9ÖäVI­õ¾.¾}›ñŠº¦Ž–œ{ô5cê°¯¹$ǶbW³]=ªõn»šÞDS/ëq“|ÇqWäܨîå#Ï-±TôuÕ”ÞØ—Áyuõõnì]][{èxa5¾öÐe•wqKo{öë×Ö¤îõ#7=íšÕòÛ<|]0rS™/zç¿¿[ìËG^{c­o_ið{gfsŸºÍ6ÛNÖ&b97ª³‰ÀvP7×»¼ü--×Ç>—€8‹ÕD¸Ýì €ÕDÌÙÀy¬ ˆÅ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„ølu9çlrÎù,dI2’t«“¤V'I!¬N’BX$…øeuI’žbˆ¼üü ’ô2þ’:I:âKÕ%¥ifÃ÷ºSg›Æ£áʲ×F—«%h`=Wâ¶¿±¿Y’.âruóB›&¯¤ƒO Yb”T?ýf·û %ÕÏÕÙx}Öm§\¾ÛËm5ë­Ô=йdÿ‡Ô ë«Q²®¹Sêæøùæqÿ›ÔuË©ŸõVÉ.«ÛÝ,IòÎZ·owÔ=®u½ºo­uw:ìÚ;Ö;ŸìlÓ|ûÛgÝ&þK:ìá®$ýyþ²º©\ž\’tˆ³N’B\­N’¾«“¤V'I!¬N’BX$…Ô圳É9ç“|.7p«ˆp»Ù@«ˆ0˜³;€óX@‹au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«ñÙêrÎÙäœóYÈ’d$éV'I!¬N’BX$…°:I ñQêÒôYö$é ê=’ôN¾A$ýïS—”¦ißëN;õñ|‰JÓ×tÍcÍ6jT‚ös4@p —gÝv6廽ÜÕ©ÝŒ[‘½­m…;Ò p Ÿ¡nXb%·~P7GÕ{ús_­®[Rf»ÉïÕÝ þÚ¬kÊÚQ›xºÖí3øa­ûóYw§Ã–YÖYô¶ÃÖz?GílÓ|ûû÷ì~àïóÁêÆÐ¥Àá¬q±:€oÅêBX@«au!u)¥dRJé$ŸË ÀœÅê"ÜnvÀê" æìà(bö1e¯8PºW·{£å¥l´µÏÖHÒ–UÝhw~u§Þ·¼Íù­ôÑåj Z’¥;ÎÊêྺ6¦]wOïÿœºr娛çÉ+éàSB–%ÕO¿ÙÅ­’»:PW \©®¿¡{îGêšLh²n;å.nóhý$ö“Ü ·i9qV]3v[ºêñºnÑn^ÀF]_Èw1eAl[K—GY×ÔVÏVݶÄîìò„Çê¶/XJêè~x·Žeݱ–]½RݾͽùÀÖ]uY×Ôº}›¸£îq­ëWè£{ n»s¤®½ï´º®àkÝ»öŽuÁ¶©Ýœ+Mµï°û·¶®ðf§«R›§^cÖ/Á›Õ]k]·Û_iŠØOêúZwÜ&î¼5Iú‹\ libpqxx: pqxx::binarystring Class Reference

#include <binarystring.hxx>

Inheritance diagram for pqxx::binarystring:
pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >

Public Types

typedef content_type char_type
typedef std::char_traits
< char_type >::char_type 
value_type
typedef size_t size_type
typedef long difference_type
typedef const value_typeconst_reference
typedef const value_typeconst_pointer
typedef const_pointer const_iterator

Public Member Functions

 binarystring (const field &)
 Read and unescape bytea field.
 binarystring (const std::string &)
 Copy binary data from std::string.
 binarystring (const void *, size_t)
 Copy binary data of given length straight out of memory.
size_type size () const throw ()
 Size of converted string in bytes.
size_type length () const throw ()
 Size of converted string in bytes.
bool empty () const throw ()
const_iterator begin () const throw ()
const_iterator end () const throw ()
const_reference front () const throw ()
const_reference back () const throw ()
const value_typedata () const throw ()
 Unescaped field contents.
const_reference operator[] (size_type i) const throw ()
bool PQXX_PURE operator== (const binarystring &) const throw ()
bool operator!= (const binarystring &rhs) const throw ()
const_reference at (size_type) const
 Index contained string, checking for valid index.
void swap (binarystring &)
 Swap contents with other binarystring.
const char * get () const throw ()
 Raw character buffer (no terminating zero is added)
std::string str () const
 Read as regular C++ string (may include null characters)

Related Functions

(Note that these are not member functions.)

std::string escape_binary (const std::string &bin)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[], size_t len)
 Escape binary string for inclusion in SQL.

Additional Inherited Members

- Private Types inherited from pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >
typedef unsigned char content_type
- Private Member Functions inherited from pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >
 PQAlloc () throw ()
 PQAlloc (const PQAlloc &rhs) throw ()
 PQAlloc (unsigned char *obj) throw ()
 Assume ownership of a pointer.
 ~PQAlloc () throw ()
PQAllocoperator= (const PQAlloc &rhs) throw ()
void swap (PQAlloc &rhs) throw ()
 operator bool () const throw ()
 Is this pointer non-null?
bool operator! () const throw ()
 Is this pointer null?
unsigned char * operator-> () const throw (std::logic_error)
 Dereference pointer.
unsigned char & operator* () const throw (std::logic_error)
 Dereference pointer.
unsigned char * get () const throw ()
 Obtain underlying pointer.
void reset () throw ()

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::binarystring::binarystring ( const field F)
explicit

Read and unescape bytea field.

The field will be zero-terminated, even if the original bytea field isn't.

Parameters
Fthe field to read; must be a bytea field

References pqxx::field::c_str(), pqxx::internal::PQAlloc< T, DELETER >::operator=(), and pqxx::field::size().

pqxx::binarystring::binarystring ( const std::string &  s)
explicit

Copy binary data from std::string.

References pqxx::internal::PQAlloc< T, DELETER >::operator=().

pqxx::binarystring::binarystring ( const void *  binary_data,
size_t  len 
)

Copy binary data of given length straight out of memory.

References pqxx::internal::PQAlloc< T, DELETER >::operator=().

Member Function Documentation

pqxx::binarystring::const_reference pqxx::binarystring::at ( size_type  n) const

Index contained string, checking for valid index.

References pqxx::to_string().

const_reference pqxx::binarystring::back ( ) const throw ()
const_iterator pqxx::binarystring::begin ( ) const throw ()
const value_type* pqxx::binarystring::data ( ) const throw ()

Unescaped field contents.

Referenced by pqxx::connection_base::quote().

bool pqxx::binarystring::empty ( ) const throw ()
const_iterator pqxx::binarystring::end ( ) const throw ()
const_reference pqxx::binarystring::front ( ) const throw ()
const char* pqxx::binarystring::get ( ) const throw ()

Raw character buffer (no terminating zero is added)

Warning
No terminating zero is added! If the binary data did not end in a null character, you will not find one here.
size_type pqxx::binarystring::length ( ) const throw ()

Size of converted string in bytes.

bool pqxx::binarystring::operator!= ( const binarystring rhs) const throw ()
bool pqxx::binarystring::operator== ( const binarystring rhs) const throw ()
const_reference pqxx::binarystring::operator[] ( size_type  i) const throw ()
size_type pqxx::binarystring::size ( ) const throw ()

Size of converted string in bytes.

Referenced by pqxx::connection_base::quote().

string pqxx::binarystring::str ( ) const

Read as regular C++ string (may include null characters)

Warning
libpqxx releases before 3.1 stored the string and returned a reference to it. This is no longer the case! It now creates and returns a new string object. Avoid repeated use of this function; retrieve your string once and keep it in a local variable. Also, do not expect to be able to compare the string's address to that of an earlier invocation.
void pqxx::binarystring::swap ( binarystring rhs)

Swap contents with other binarystring.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00013.js000066400000000000000000000043671224474465600207230ustar00rootroot00000000000000var a00013 = [ [ "char_type", "a00013.html#abadf5cc14e19fc0c1f8838d1518baefa", null ], [ "const_iterator", "a00013.html#acb7da4766d133d40e1f4b294c2dd14d9", null ], [ "const_pointer", "a00013.html#abcf73d6a9164ac4f0ffaf4012e774016", null ], [ "const_reference", "a00013.html#a5a3869fa04853d5ab14b6676953143be", null ], [ "difference_type", "a00013.html#a121db85dcf088809bd4b95e617324971", null ], [ "size_type", "a00013.html#af4269ef0ff7802a8bc5c5a0d54cca60d", null ], [ "value_type", "a00013.html#a18e4f5fe0683c746f949db5d3c1c914c", null ], [ "binarystring", "a00013.html#a575ec98218f850b4c1b91a8edb677681", null ], [ "binarystring", "a00013.html#a569aac459e41d91ca04adcfcea5646fd", null ], [ "binarystring", "a00013.html#a7cfccba27491d78841be64193dc556ab", null ], [ "at", "a00013.html#a48d3b98f62d903bc99555d6c786d334a", null ], [ "back", "a00013.html#af837e6e843633027fdfcfa5e68975edb", null ], [ "begin", "a00013.html#a8cee54a0d93f38368fd885d6ef3733a7", null ], [ "data", "a00013.html#ad9042fbae551a4404e175a431139ca8c", null ], [ "empty", "a00013.html#adfb2644b600416cb5eaf43cea64e99ab", null ], [ "end", "a00013.html#abf2511857a61d4835cf6d326bb539a19", null ], [ "front", "a00013.html#a565339d41daf2278ac02ce543e715cd2", null ], [ "get", "a00013.html#a37efe53d810e83dc4894cb405ba31dfa", null ], [ "length", "a00013.html#a065a1d5f2e87f640b57ce35580b11659", null ], [ "operator!=", "a00013.html#a56acf785f1c0a44c93d40f8b1bdc2921", null ], [ "operator==", "a00013.html#a7ed7a9968baffb67dc5d2fde25cfa4c8", null ], [ "operator[]", "a00013.html#a47aa4553c316eeab7461c368e0ce2bac", null ], [ "size", "a00013.html#af10f41451b711337a25cec42598229fb", null ], [ "str", "a00013.html#ab6642dd3f5147bc104c3cdf0c8d2cc9e", null ], [ "swap", "a00013.html#ad6e5000885dd6f0b7bdf1f5d7f365dd9", null ], [ "escape_binary", "a00203.html#ga9c1a379cd2ba4eea395fb79df463eb98", null ], [ "escape_binary", "a00203.html#ga5b230e243d4ebbe8085a8048e912601e", null ], [ "escape_binary", "a00203.html#ga787364a7ae884b781b58ac248ff0925c", null ], [ "escape_binary", "a00203.html#ga1147c3174b747009783b65981d4707f0", null ], [ "escape_binary", "a00203.html#gaeb5da84878d4ea8f902f956b8240e73e", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00013.png000066400000000000000000000024011224474465600210560ustar00rootroot00000000000000‰PNG  IHDRFPËJñPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÙ–›0D¯Jóÿßl³´˜0 åÃå`mt7¥Ò+9çlrÎÙäœó>È’d$ÉHÒ,#I2’tËH’Œ$À2’$#I°Œ$ÉHÒÞ•Qê$£á¿>rxË=KñhzzËh0],ÃgÑD óð¥uZ£ÙÑã:E¯ eónpÀ"‘øÒ3’œßW%3ÆÇ7 ·c ±…æž1ˆy©"È"Í“«(I‹Œ^Á>#SRB«’Š«–Q ˜0yU<úê×…š÷­Î›c,¡'Ù$óigüÖ˜éé`ÅÈÎRMήb,gxnTÅ^Žë_P™÷ â¸s7eÔ¾ªÐ~†Z…Í«ÊÇs’¬Rkd³"£~siG}ÑvXÙ3§U±+¤}2  >ÛT¸Zv™ÕäWXF§4Ý<¿o¥¥ŽÏK2¤¶RþNFõ˜¥¿ê©JÙ–á¯U±R_Fm^ÍF]݈­ŒâÁ¿RÕõ}´²ñ:;¥lªLä¼$«}»é4+nÔ¼ó{ßjfo»Ñ«øÅý± «oúýšŒêRw÷Vsª‡-’¤åêÕ¡9Õ·dtB’‡ÚšŒ’/%-ׯ¡¶-¨¿SÅ®ˆ 7š [V¸ >|„Òýº;üe‹­-²øÐS­7Ís¸áMM@˧>+ɘEsj‡ñ[czUkzƘúÅv¨Ëøù*JÒ Å¡V;‰$ý*öFV9öïNR’z|,âRÿwdÔœP’ôíQûkeôðîŽA,âU”¤5þ!7Z©®$½‹ÝèU”¤ŠYF’d$ÉHÒϰŒ$ÉHÒ,#I2’tËH’Œ$À2’$#Id”sÎ&çœMÎ9ïÀ¬ó` À>,#°Ÿ¯/ëÀìÆ20ûTd€½XFÀ€«°`®Án` €¸»€0àìFÀ€k°`®Án` €¸»€0àìFÀ€k°`®Án` €¸»€0àìFÀ€k°l“RJ&¥”LJ)íƒ` À,#pËÀÀ20°Œ À,#€’±"ofrûZF%ïWĵ»³Œ†¤ŸY÷ù¡ð–çÿ¥ð*דG÷óöjŒkÜ‹{&ýüìÏk”‰pužéL›;z“îÄM÷NTG4¤ª{ÒJ^­UC9à.XFïÈh8½j ÅËÈ2*N¨¾Œ¢b–Š•–À­x8ÉxE+š*ºWeT¹U¡=ËàÿgHzRO)£IÓ‰µÅ¯Æû«½•Ú]+ p/BÊ;²ÿvŠeðÿsHFÛ3æ³à>XF?à» óà^ÜRFàSXFà–€8€e``€ 2J)%“RJ&¥”vñlss ž†å¾IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00014.html000066400000000000000000000221061224474465600212430ustar00rootroot00000000000000 libpqxx: pqxx::broken_connection Class Reference
pqxx::broken_connection Class Reference

Exception class for lost or failed backend connection. More...

#include <except.hxx>

Inheritance diagram for pqxx::broken_connection:
pqxx::failure pqxx::pqxx_exception pqxx::too_many_connections

Public Member Functions

 broken_connection ()
 broken_connection (const std::string &)
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Exception class for lost or failed backend connection.

Warning
When this happens on Unix-like systems, you may also get a SIGPIPE signal. That signal aborts the program by default, so if you wish to be able to continue after a connection breaks, be sure to disarm this signal.

If you're working on a Unix-like system, see the manual page for signal (2) on how to deal with SIGPIPE. The easiest way to make this signal harmless is to make your program ignore it:

#include <signal.h>
int main()
{
signal(SIGPIPE, SIG_IGN);
// ...

Constructor & Destructor Documentation

pqxx::broken_connection::broken_connection ( )
pqxx::broken_connection::broken_connection ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00014.js000066400000000000000000000002701224474465600207110ustar00rootroot00000000000000var a00014 = [ [ "broken_connection", "a00014.html#abead818453c7c47646f924c0b6cbff7d", null ], [ "broken_connection", "a00014.html#a003c1c85d2c6c40f6d5b985394aa34b2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00014.png000066400000000000000000000022331224474465600210620ustar00rootroot00000000000000‰PNG  IHDR¬À®ÙxËPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2*IDATxíi®„ ‹Äûù¹¡ ¸½±3CÒK”Ͳ…ž¿Äc+%© \V’,pYI²à˲a<$éß—•¤›œË…qºþ¼\d¸hîSè†2õŠiÄp=Þeu’tÀ…ìô¬qZ펣æ,nEuV)?²:IªsÙídé|§95LusýfLå=$©Ž­ìðÛÊNuÖ²ûï|Ñœs­Þø=ÙlQÖ6Øyóú©¸X³ŸFö`»§‡|˜ æ¹Ô}¼ N2âE³$ñ´¿ì¸‰ÎsæïÈJÒ²’ôC¸¬$YಒdA/cŒ`@Ð -Év]C¶-Éö®íØ6%ëÙÀ—°Àe,pY \À—°Àe,pY \À—°Àe,pY \bŒ±ˆ’Ô.+I¸¬$Y`$Âr5’ô96²¥Þ·eûþ¼\¬Za¼›ÏKp'†›5î’tŸÿÊ.ƒ®vGbS‘]KÒ3þÙÜ!nñákö¿)ÛíºìÔ IyC¶PÊ›´Fõ¥5»ß`Uٴݾ± ²Aâá5Rż×IzÌËàí,*I縬$Y`ów+I¸¬$YಒdA/cŒ`@Ð -Év]C¶-Éö®íØ6%ëÙÀ—°Àe,pY \À—°Àe,pY \À—°Àe,pY \B¡mಸ,€Ïe+ý_yß~’«y~JàŒŠl_5Ö i-]d“-µc,Æë9(éfj_ÓøZÌmëÄk‘²hu’ÙéÙãvÇ¢6—i’tS|Ïü]Ö©—ÉÊb×Èjd·ÃÒ9oÞúmÇ•wçµ)rßý$²ãâÙuÀ;²Å÷9”Í'Ù¢Ëd³åYÛ`Ù\Õå¶“=ûþGkö~d²Aš.“_²A‘ò97Ù P)ÛÊlð`¼™@ÞÁJvÜ<µ\ ð_Z,ÀoⲸ,€CŠ!„60 h…–d»®!Û–d{×vl›’õl`ƒËXಸ,€. `ËXಸ,€. `ËXಸ,€. 1Æø>]Œ1¾Q’ÚÀe%É—•$ îÊI²§ÌÉ“~OV’XdƒÂس?/ëè0ܧ¥X†Í¦êyt"õÊG.]Šé–'Œm›;Ùé¡ãÕ¬X4ÖþóàJ§bdêR›µ¬+*ÊÈnûe¯t"›OvÒ©òˆ]QL·kzU¶ÿtÛÝ’]ÇÈÖ–AÞaÿ²ÛÜ–Ýv©=i· ²5»ß`ŸËž}ÿ£5»ýJ×Ù ÛÕl-ƒY±xËZ6Ø|ä¼­ÌgËàÍœj‘˜ÿ+;î‹<Ä’ò#Eë´“$=Á(²6xwÿn%é븬$YಒdA/cŒðšºhjð°IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00015.html000066400000000000000000000075641224474465600212570ustar00rootroot00000000000000 libpqxx: std::char_traits< CHAR > Struct Template Reference
std::char_traits< CHAR > Struct Template Reference

Work around missing std::char_traits. More...

#include <compiler-public.hxx>

Detailed Description

template<typename CHAR>
struct std::char_traits< CHAR >

Work around missing std::char_traits.


The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00016.html000066400000000000000000000201361224474465600212460ustar00rootroot00000000000000 libpqxx: std::char_traits< char > Struct Template Reference
std::char_traits< char > Struct Template Reference

Work around missing std::char_traits<char> More...

#include <compiler-public.hxx>

Public Types

typedef int int_type
typedef size_t pos_type
typedef long off_type
typedef char char_type

Static Public Member Functions

static int_type eof ()

Detailed Description

template<>
struct std::char_traits< char >

Work around missing std::char_traits<char>

Member Typedef Documentation

typedef char std::char_traits< char >::char_type
typedef int std::char_traits< char >::int_type
typedef long std::char_traits< char >::off_type
typedef size_t std::char_traits< char >::pos_type

Member Function Documentation

static int_type std::char_traits< char >::eof ( )
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00016.js000066400000000000000000000006031224474465600207130ustar00rootroot00000000000000var a00016 = [ [ "char_type", "a00016.html#a1a64cbf69fea84c3ac667ff3b82f0f5b", null ], [ "int_type", "a00016.html#a905e17859fef67e93d7baeef86dee98b", null ], [ "off_type", "a00016.html#a85661c90be7df5a4f32cb40fa63c4311", null ], [ "pos_type", "a00016.html#ab17e48ba1fdbf06183149442e78cb1d0", null ], [ "eof", "a00016.html#af4835e096d911543121767d0402e212a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00017.html000066400000000000000000000203451224474465600212510ustar00rootroot00000000000000 libpqxx: std::char_traits< unsigned char > Struct Template Reference
std::char_traits< unsigned char > Struct Template Reference

Work around missing std::char_traits<unsigned char> More...

#include <compiler-public.hxx>

Public Types

typedef int int_type
typedef size_t pos_type
typedef long off_type
typedef unsigned char char_type

Static Public Member Functions

static int_type eof ()

Detailed Description

template<>
struct std::char_traits< unsigned char >

Work around missing std::char_traits<unsigned char>

Member Typedef Documentation

typedef unsigned char std::char_traits< unsigned char >::char_type
typedef int std::char_traits< unsigned char >::int_type
typedef long std::char_traits< unsigned char >::off_type
typedef size_t std::char_traits< unsigned char >::pos_type

Member Function Documentation

static int_type std::char_traits< unsigned char >::eof ( )
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00017.js000066400000000000000000000006031224474465600207140ustar00rootroot00000000000000var a00017 = [ [ "char_type", "a00017.html#a36f5165a10ea513315f12ed9f31c573b", null ], [ "int_type", "a00017.html#ae800195a00697cc19af347efb85911ae", null ], [ "off_type", "a00017.html#a8f7c4801c946a458c3b909375e934e76", null ], [ "pos_type", "a00017.html#a4878de00d941c62fc466ef18b8327e95", null ], [ "eof", "a00017.html#aef731d39bc5048c2a417b6822fd125f6", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00018.html000066400000000000000000000266251224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::check_violation Class Reference
pqxx::check_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::check_violation:
pqxx::integrity_constraint_violation pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 check_violation (const std::string &err)
 check_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::integrity_constraint_violation
 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::check_violation::check_violation ( const std::string &  err)
explicit
pqxx::check_violation::check_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00018.js000066400000000000000000000002641224474465600207200ustar00rootroot00000000000000var a00018 = [ [ "check_violation", "a00018.html#a2d18d99434781303ae1099876049d623", null ], [ "check_violation", "a00018.html#a33fa66dcc36972c8afa2d17987fb391d", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00018.png000066400000000000000000000027341224474465600210740ustar00rootroot00000000000000‰PNG  IHDRÌø—ù{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2kIDATxííÒ« —‡ïÿ’ß"¢ÕÚÚ¼œt\«€˜5ÿcŒµ@”¤:pI²ˆËH’EŒÉ„~“¤w°'#IorM&(ô·k÷óA‹îî|zôÝÿ4¦û®èŽû³¤M’NrQfˆ¥¿­‚6Û^wòÜWÍÉ_Ò-i“¤s\ÍL~³i¦{êÚÆöìš‚§$ãY™î—Ë m¿–Ù®£ÝI2–æM‚ž“I^ŠR8î^,§¿ïÌ·3³S®¦ nV³±pÌm__f_„Ý’´Ç½Ì“2ýK~üÍø;2’ô‚ÈH’a\F’,â2’d‘V&Æ+à€Z¨I¦i*²©I¦u©Ç¦*¯f6q‹¸ €E\À".`—°ˆËXÄe,â2q‹¸ €E\À".pc¬¢$ÕËH’E\F’,òLóQ¿IÒçyFf¾u™0>ûv?,a‡þlÜÏÉèN–¼IÒû|JfޱӑÂf›È’cIºÇÇ2“Ƙ&gµ°JvS¦]Me™¡C’nò ™UÈi·‚–íÃYùÒ;³-E™©X\f;Õ,IQ§95Œubé¤Û|p™}û+"IǸŒ$­©JF’~ËH’E\F’,ÒÊÄc%<@P 5É4ME65É´.õØT%ãÕ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe®cŒµ@”¤:pI²ˆËH’E” ’ôU\faèƒl÷óAøÒ›Ê„iTû7ì’IzÛ2}8C< ÚßÒ8»£ži·j¤÷¸Ÿ™)Ü1äuHÃÑÐ[ÉOn®Ä/ËŒ?—é~ÖeÒu•Ž(efþ·$“¼…ðâ1—™j6%业ͻ¬JÒu>±ÌN}G¾ÿ•yX¦ño–_IÚÃ3#IqI²ˆËH’EZ™c¬€hj¡&™¦©È¦&™Ö¥›ªd¼šØÄe,â2q‹¸ €E\À".`—°ˆËXÄe,â2q‹¸ À5bŒ±ˆ’T.#IqI²ÈY™P8ÊúË’´%{0{©kïf×3³ó ™S“¼zž‰LPèÇ´ûù ¹®]S˜wÃØáÒ¾s:[n: GÍó“ô“Ž}éìKÄc æAËÝÓæùšEf¸°« Ò–ž$mÛŽB8Ù¨ä²Í웫wŽÖóf™ÉGLût™æs¦e¶3§mÉÔ«î=™Õð,Š·eºŸ´"´e™1™S÷<ÓFfX†yÔÉð³2ÛÐ6™‘ÖÌ—Ë'õX¦¸ÌJ2É»±WöÞ™™ÍM×ëñHfLÝ[2{Õ¬øÂeÕl-¶WÍÒe6Å=T¦|}¯e²jÖ˜5–Ù>W®•¤rGf“‰ä¥N>’tWßÊÌæž?ÍK"#I—‘$‹¸Œ$Y¤•‰1ÆJx€ j’išŠlj’i]걩JÆ«€M\À".`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆË\#„jP.`—°ÈdŠ–—¶ÕÑûýRæX à"—dÚÁýè® Oi]¥OG%«'ž4̽ÃÑô­XÏp†k2CýM ¶±/=›þ’û,];Gë™Nq13ù­¦}ºDr‹ù9Ê,/ÌæAœâ‹2ݯ,3Þ5‹zþ ™Õw2“6®S³‘).³¯Ê$ïL¡žvîÊûÇ2{Õl[š Õ,/…jÖÏ» à ——Ù'¾ßàQ™¾&\ûtœæÿÍ €e\À".`‘î3Buðf‹¢Âæ δIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00019.html000066400000000000000000000336751224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::connect_async Class Reference
pqxx::connect_async Class Reference

Asynchronous connection policy; connects "in the background". More...

#include <connection.hxx>

Inheritance diagram for pqxx::connect_async:
pqxx::connectionpolicy

Public Member Functions

 connect_async (const std::string &opts)
virtual handle do_startconnect (handle)
virtual handle do_completeconnect (handle)
virtual handle do_dropconnect (handle) throw ()
virtual bool is_ready (handle) const throw ()
- Public Member Functions inherited from pqxx::connectionpolicy
 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () throw ()
const std::string & options () const throw ()
virtual handle do_disconnect (handle orig) throw ()

Additional Inherited Members

- Public Types inherited from pqxx::connectionpolicy
typedef internal::pq::PGconn * handle
- Protected Member Functions inherited from pqxx::connectionpolicy
handle normalconnect (handle)

Detailed Description

Asynchronous connection policy; connects "in the background".

Connection is initiated immediately, but completion is deferred until the connection is actually needed.

This may help performance by allowing the client to do useful work while waiting for an answer from the server.

Constructor & Destructor Documentation

pqxx::connect_async::connect_async ( const std::string &  opts)
explicit

Member Function Documentation

pqxx::connectionpolicy::handle pqxx::connect_async::do_completeconnect ( handle  orig)
virtual
pqxx::connectionpolicy::handle pqxx::connect_async::do_dropconnect ( handle  orig) throw ()
virtual

Reimplemented from pqxx::connectionpolicy.

pqxx::connectionpolicy::handle pqxx::connect_async::do_startconnect ( handle  orig)
virtual

Reimplemented from pqxx::connectionpolicy.

bool pqxx::connect_async::is_ready ( handle  h) const throw ()
virtual

Reimplemented from pqxx::connectionpolicy.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00019.js000066400000000000000000000006431224474465600207220ustar00rootroot00000000000000var a00019 = [ [ "connect_async", "a00019.html#adcace783d423c5306fb72087d5171c31", null ], [ "do_completeconnect", "a00019.html#aa2b7f15be38163b46695c2739b59fb8b", null ], [ "do_dropconnect", "a00019.html#a36ed18e0528808b19df70dcf721da973", null ], [ "do_startconnect", "a00019.html#adc14fc627579522b2284af143b8ac9ea", null ], [ "is_ready", "a00019.html#a48a470b67ec1adb0459b0e009b0a60d0", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00019.png000066400000000000000000000011151224474465600210650ustar00rootroot00000000000000‰PNG  IHDR‹P>v!PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÜIDATxíÑŽã E©ÿÿÉÓЄà8̶ÝE+¸ÄÆœ1†¾’sΓˆ,IS(X$É+X$Éëó,©4Iê©çñI¨çQY’Rñy>ë —¶¯K·úì®{·<Š­ï¸æ¥¾l‹ì,/MI'­íªç‰íŽ£›uÈË1Æölóê–=tíb£Î¸”eù{ƒe[åœå8á:/Æå7,¯ÕúõrR»W›3®†A½œ²ôΑ©z[üuhlö­ŽÝsÔäÞìÑíB’~£aĉXvÛ?giLñ;-I^Á"I^“±äœóx_€I4Ëã1ÌD,O”i`fb‰sp¦`ð ¯`ð ¯`ð ¯`ð ¯`ð ¯`ðúYRJi‘¦P°x €×—Xþ(è¼,Ï·òºõmÐF^î€Ú­>»ëÞ­c;g ´˜í”Kq,­ZÛUÏ›É `Þºy9NÙžmæý²ÂîQýÞþ4K¹ÄOX^ßë™­š6`1™½•ëbœëè>KS/'µ{µ9—õâYFõÒ9GÛL{ŽlÒÍž£ºá¯ÕSú{ôÎ 0Ö(ì×XJ-Ûÿû*êßÍË8hüNx €×d,)¥4‡~ËßtéIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00020.html000066400000000000000000000271651224474465600212520ustar00rootroot00000000000000 libpqxx: pqxx::connect_direct Class Reference
pqxx::connect_direct Class Reference

Connection policy; creates an immediate connection to a database. More...

#include <connection.hxx>

Inheritance diagram for pqxx::connect_direct:
pqxx::connectionpolicy

Public Member Functions

 connect_direct (const std::string &opts)
virtual handle do_startconnect (handle)
- Public Member Functions inherited from pqxx::connectionpolicy
 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () throw ()
const std::string & options () const throw ()
virtual handle do_completeconnect (handle orig)
virtual handle do_dropconnect (handle orig) throw ()
virtual handle do_disconnect (handle orig) throw ()
virtual bool is_ready (handle) const throw ()

Additional Inherited Members

- Public Types inherited from pqxx::connectionpolicy
typedef internal::pq::PGconn * handle
- Protected Member Functions inherited from pqxx::connectionpolicy
handle normalconnect (handle)

Detailed Description

Connection policy; creates an immediate connection to a database.

This is the policy you typically need when you work with a database through libpqxx. It connects to the database immediately. Another option is to defer setting up the underlying connection to the database until it's actually needed; the connect_lazy policy implements such "lazy" * behaviour.

The advantage of having an "immediate" connection (as this policy gives you) is that any errors in setting up the connection will occur during construction of the connection object, rather than at some later point further down your program.

Constructor & Destructor Documentation

pqxx::connect_direct::connect_direct ( const std::string &  opts)
explicit

Member Function Documentation

pqxx::connectionpolicy::handle pqxx::connect_direct::do_startconnect ( handle  orig)
virtual

Reimplemented from pqxx::connectionpolicy.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00020.js000066400000000000000000000002631224474465600207100ustar00rootroot00000000000000var a00020 = [ [ "connect_direct", "a00020.html#a3ae8ab240a1f152c64cd40493d92f846", null ], [ "do_startconnect", "a00020.html#a2b3538872ddbadb1e1a4aadc7724afb6", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00020.png000066400000000000000000000011041224474465600210530ustar00rootroot00000000000000‰PNG  IHDR‹P>v!PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÓIDATxíÑnà ‡EÊÿrcllðN”¸EÕE^féqÐWbŒq%i 9‹$Y9‹$Y}Ÿ%¤G’zê9na‘¤zŽ%($Ïó½WÊq!]ŠÍsXby¥¾¾q‹ËÞÈ‹,«#ͦ ÆS»³Ñ÷ŠÑŒ:Åå`É«´YήãRYÞaYWëçK#w¯6gœ ƒ|i²ôÎQ•õuòïÕª¯>G›±{ŽŠØW{ôò !Iïh8ãD,Gߟ³]þZ’¬œE’¬&c‰1Æ9ð¹“h"–Çc˜‰Xž(ÓÀÌÄâç %g°r+g°r+g°r+g°r+g°r+g°ú‡,!„0‰SÈY¬œÀê.–zÖg«½Lõõ×X¬F,Ïfj/g=WÊ!Ë%°›ç°ÅV߯䏬•ŽÍ²¬£’@ã)‹ÝÙè«ö'ØZq9/–ßeHí|fözÌÑݵ}—%Ýâ×,ÛKµ5/Å¥¶tãҲ󥑻W›s•/Í)Þ>G{öUçèý¢¯}޶æ]Ý ·è>–”¤Õß 0ÒÄqø39 €•³X-wZ!L¡ÖyFáœIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00021.html000066400000000000000000000263511224474465600212470ustar00rootroot00000000000000 libpqxx: pqxx::connect_lazy Class Reference
pqxx::connect_lazy Class Reference

Lazy connection policy; causes connection to be deferred until first use. More...

#include <connection.hxx>

Inheritance diagram for pqxx::connect_lazy:
pqxx::connectionpolicy

Public Member Functions

 connect_lazy (const std::string &opts)
virtual handle do_completeconnect (handle)
- Public Member Functions inherited from pqxx::connectionpolicy
 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () throw ()
const std::string & options () const throw ()
virtual handle do_startconnect (handle orig)
virtual handle do_dropconnect (handle orig) throw ()
virtual handle do_disconnect (handle orig) throw ()
virtual bool is_ready (handle) const throw ()

Additional Inherited Members

- Public Types inherited from pqxx::connectionpolicy
typedef internal::pq::PGconn * handle
- Protected Member Functions inherited from pqxx::connectionpolicy
handle normalconnect (handle)

Detailed Description

Lazy connection policy; causes connection to be deferred until first use.

This is connect_direct's lazy younger brother. It does not attempt to open a connection right away; the connection is only created when it is actually used.

Constructor & Destructor Documentation

pqxx::connect_lazy::connect_lazy ( const std::string &  opts)
explicit

Member Function Documentation

pqxx::connectionpolicy::handle pqxx::connect_lazy::do_completeconnect ( handle  orig)
virtual

Reimplemented from pqxx::connectionpolicy.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00021.js000066400000000000000000000002641224474465600207120ustar00rootroot00000000000000var a00021 = [ [ "connect_lazy", "a00021.html#a9d93b15b0681f3b4e25e9fab79adb8cd", null ], [ "do_completeconnect", "a00021.html#ad5c2b3b6043ff998ad67cddc89e2669b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00021.png000066400000000000000000000011041224474465600210540ustar00rootroot00000000000000‰PNG  IHDR‹P>v!PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÓIDATxíYŽì E©ö¿äW˜bÈ êzZ.åB:6öic’_bŒq%i 9‹$Y9‹$Yý libpqxx: pqxx::connect_null Class Reference
pqxx::connect_null Class Reference

Nonfunctional, always-down connection policy for testing/debugging purposes. More...

#include <connection.hxx>

Inheritance diagram for pqxx::connect_null:
pqxx::connectionpolicy

Public Member Functions

 connect_null (const std::string &opts)
- Public Member Functions inherited from pqxx::connectionpolicy
 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () throw ()
const std::string & options () const throw ()
virtual handle do_startconnect (handle orig)
virtual handle do_completeconnect (handle orig)
virtual handle do_dropconnect (handle orig) throw ()
virtual handle do_disconnect (handle orig) throw ()
virtual bool is_ready (handle) const throw ()

Additional Inherited Members

- Public Types inherited from pqxx::connectionpolicy
typedef internal::pq::PGconn * handle
- Protected Member Functions inherited from pqxx::connectionpolicy
handle normalconnect (handle)

Detailed Description

Nonfunctional, always-down connection policy for testing/debugging purposes.

Warning
You don't want to use this policy in normal code. Written for debugging and testing, this "connection policy" always fails to connect, and the internal connection pointer always remains null.

Constructor & Destructor Documentation

pqxx::connect_null::connect_null ( const std::string &  opts)
explicit

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00022.js000066400000000000000000000001371224474465600207120ustar00rootroot00000000000000var a00022 = [ [ "connect_null", "a00022.html#a0f3aae5285574af29d06abdcb7f2560c", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00022.png000066400000000000000000000010571224474465600210640ustar00rootroot00000000000000‰PNG  IHDR‹P>v!PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¾IDATxíÑŽƒ E—¤ÿÿÉ«V°5­»“Íl¼bᜠûJÎ9;Y’\(X$É*X$Éêû,iy$i¤‘ãI:ÑÈQX’Òâ™Þ壞—¶Þ¹Y=»uoæ×266®y)?¶ ;ËÓ±¬¦¤ÎS7ÅÙ{Çhfòr\c{×y5aMì¬iì_e™ÿ>`Ù¢ôYŽ^祱\ayF×K§v_mÎy5œÔK—etŽšªo‹¿|6cí9ZÃsTå¾Ù£·oIº¢Ó±ìcÎR ÅÿiI² I²rÆ’sÎ>ð¹NäˆåñðãˆeBqã‰%Î@OÁ`,VÁ`,VÁ`,VÁ`,VÁ`,VÁ`õYRJɉH.,VÁ`u/Ëhí©¿3äžeê\zç¿}Ô+ÏWAiVÏnÝ›õ»ZrÕ–bÞ? OÝgg¬³äUl{×™·a D;ç×Y–»ü.–fkÞÊKkù”¥ª—Ní¾Úœn½ìWó28G[”öÕÑcM.מë{ôâ†ø¶îfYj¹ª{€‘Üçà,VÁ`5ßf)¥äB?/y[¶©ÑIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00023.html000066400000000000000000002722641224474465600212570ustar00rootroot00000000000000 libpqxx: pqxx::connection_base Class Reference

connection_base abstract base class; represents a connection to a database. More...

#include <connection_base.hxx>

Inheritance diagram for pqxx::connection_base:
pqxx::basic_connection< CONNECTPOLICY >

Public Types

enum  error_verbosity { terse = 0, normal = 1, verbose = 2 }
 Error verbosity levels. More...

Public Member Functions

void disconnect () throw ()
 Explicitly close connection.
bool PQXX_PURE is_open () const throw ()
 Is this connection open at the moment?
void process_notice (const char[]) throw ()
 Invoke notice processor function. The message should end in newline.
void process_notice (const std::string &) throw ()
 Invoke notice processor function. Newline at end is recommended.
void trace (std::FILE *) throw ()
 Enable tracing to a given output stream, or NULL to disable.
void set_client_encoding (const std::string &Encoding)
 Set client-side character encoding.
void set_variable (const std::string &Var, const std::string &Value)
 Set session variable.
std::string get_variable (const std::string &)
 Read session variable.
std::string adorn_name (const std::string &)
 Suffix unique number to name to make it unique within session context.
std::string esc (const char str[])
 Escape string for use as SQL string literal on this connection.
std::string esc (const char str[], size_t maxlen)
 Escape string for use as SQL string literal on this connection.
std::string esc (const std::string &str)
 Escape string for use as SQL string literal on this connection.
std::string esc_raw (const unsigned char str[], size_t len)
 Escape binary string for use as SQL string literal on this connection.
std::string quote_raw (const unsigned char str[], size_t len)
 Escape and quote a string of binary data.
std::string quote_name (const std::string &identifier)
 Escape and quote an SQL identifier for use in a query.
template<typename T >
std::string quote (const T &t)
 Represent object as SQL string, including quoting & escaping.
std::string quote (const binarystring &)
void cancel_query ()
 Attempt to cancel the ongoing query, if any.
void set_verbosity (error_verbosity verbosity) throw ()
 Set session verbosity.
error_verbosity get_verbosity () const throw ()
 Retrieve current error verbosity.
std::vector< errorhandler * > get_errorhandlers () const
 Return pointers to the active errorhandlers.
Activation

Connections can be temporarily deactivated, or they can break because of overly impatient firewalls dropping TCP connections. Where possible, libpqxx will try to re-activate these when resume using them, or you can wake them up explicitly. You probably won't need this feature, but you should be aware of it.

void activate ()
 Explicitly activate deferred or deactivated connection.
void deactivate ()
 Explicitly deactivate connection.
void inhibit_reactivation (bool inhibit)
 Disallow (or permit) connection recovery.
void simulate_failure ()
 Make the connection fail.
Connection properties

These are probably not of great interest, since most are derived from information supplied by the client program itself, but they are included for completeness.

const char * dbname ()
 Name of database we're connected to, if any.
const char * username ()
 Database user ID we're connected under, if any.
const char * hostname ()
 Address of server, or NULL if none specified (i.e. default or local)
const char * port ()
 Server port number we're connected to.
int PQXX_PURE backendpid () const throw ()
 Process ID for backend process.
int PQXX_PURE sock () const throw ()
 Socket currently used for connection, or -1 for none. Use with care!
Notifications and Receivers
int get_notifs ()
 Check for pending notifications and take appropriate action.
int await_notification ()
 Wait for a notification to come in.
int await_notification (long seconds, long microseconds)
 Wait for a notification to come in, or for given timeout to pass.
Prepared statements

PostgreSQL supports prepared SQL statements, i.e. statements that can be registered under a client-provided name, optimized once by the backend, and executed any number of times under the given name.

Prepared statement definitions are not sensitive to transaction boundaries; a statement defined inside a transaction will remain defined outside that transaction, even if the transaction itself is subsequently aborted. Once a statement has been prepared, only closing the connection or explicitly "unpreparing" it can make it go away.

Use the transaction classes' prepared().exec() function to execute a prepared statement. Use prepared().exists() to find out whether a statement has been prepared under a given name.

A special case is the nameless prepared statement. You may prepare a statement without a name. The unnamed statement can be redefined at any time, without un-preparing it first.

Warning
Prepared statements are not necessarily defined on the backend right away; libpqxx generally does that lazily. This means that you can prepare statements before the connection is fully established, and that it's relatively cheap to pre-prepare lots of statements that you may or may not use during the session. On the other hand, it also means that errors in a prepared statement may not show up until you first try to invoke it. Such an error may then break the transaction it occurs in.
Never try to prepare, execute, or unprepare a prepared statement manually using direct SQL queries. Always use the functions provided by libpqxx.
void prepare (const std::string &name, const std::string &definition)
 Define a prepared statement.
void prepare (const std::string &definition)
 Define a nameless prepared statement.
void unprepare (const std::string &name)
 Drop prepared statement.
void prepare_now (const std::string &name)
 Request that prepared statement be registered with the server.
Transactor framework

See the transactor class template for more about transactors. To use the transactor framework, encapsulate your transaction code in a class derived from an instantiation of the pqxx::transactor template. Then, to execute it, create an object of your transactor class and pass it to one of the perform() functions here.

The perform() functions may create and execute several copies of the transactor before succeeding or ultimately giving up. If there is any doubt over whether execution succeeded (this can happen if the connection to the server is lost just before the backend can confirm success), it is no longer retried and an in_doubt_error is thrown.

Take care: no member functions will ever be invoked on the transactor object you pass into perform(). The object you pass in only serves as a "prototype" for the job to be done. The perform() function will copy-construct transactors from the original you passed in, executing the copies only. The original object remains "clean" in its original state.

template<typename TRANSACTOR >
void perform (const TRANSACTOR &T, int Attempts)
 Perform the transaction defined by a transactor-based object.
template<typename TRANSACTOR >
void perform (const TRANSACTOR &T)
 Perform the transaction defined by a transactor-based object.

Protected Member Functions

 connection_base (connectionpolicy &)
void init ()
void close () throw ()
void wait_read () const
void wait_read (long seconds, long microseconds) const
void wait_write () const

Friends

class internal::gate::connection_prepare_invocation
class internal::gate::connection_errorhandler
class internal::gate::connection_transaction
class internal::gate::connection_largeobject
class internal::gate::connection_notification_receiver
class internal::gate::connection_pipeline
class internal::gate::connection_dbtransaction
class internal::gate::connection_sql_cursor
class internal::gate::connection_reactivation_avoidance_exemption
class internal::gate::connection_parameterized_invocation

Capabilities

Some functionality is only available in certain versions of the backend, or only when speaking certain versions of the communications protocol that connects us to the backend. This includes clauses for SQL statements that were not accepted in older database versions, but are required in newer versions to get the same behaviour.

enum  capability {
  cap_prepared_statements, cap_create_table_with_oids, cap_nested_transactions, cap_cursor_scroll,
  cap_cursor_with_hold, cap_cursor_update, cap_cursor_fetch_0, cap_table_column,
  cap_read_only_transactions, cap_statement_varargs, cap_prepare_unnamed_statement, cap_parameterized_statements,
  cap_notify_payload, cap_end
}
 Session capabilities. More...
bool supports (capability c) const throw ()
 Does this connection seem to support the given capability?
int PQXX_PURE protocol_version () const throw ()
 What version of the PostgreSQL protocol is this connection using?
int PQXX_PURE server_version () const throw ()
 What version of the PostgreSQL server are we connected to?

Detailed Description

connection_base abstract base class; represents a connection to a database.

This is the first class to look at when you wish to work with a database through libpqxx. Depending on the implementing concrete child class, a connection can be automatically opened when it is constructed, or when it is first used, or somewhere inbetween. The connection is automatically closed upon destruction (if it hasn't been closed already).

To query or manipulate the database once connected, use one of the transaction classes (see pqxx/transaction_base.hxx) or preferably the transactor framework (see pqxx/transactor.hxx).

If a network connection to the database server fails, the connection will be restored automatically (although any transaction going on at the time will have to be aborted). This also means that any information set in previous transactions that is not stored in the database, such as temp tables or connection-local variables defined with PostgreSQL's SET command, will be lost. Whenever you create such state, either keept it local to one transaction, where possible, or inhibit automatic reactivation of the connection using the inhibit_reactivation() method.

When a connection breaks, you will typically get a broken_connection exception. This can happen at almost any point, and the details may depend on which connection class (all derived from this one) you use.

As a general rule, always avoid raw queries if libpqxx offers a dedicated function for the same purpose. There may be hidden logic to hide certain complications from you, such as reinstating session variables when a broken or disabled connection is reactivated.

Warning
On Unix-like systems, including GNU and BSD systems, your program may receive the SIGPIPE signal when the connection to the backend breaks. By default this signal will abort your program. Use "signal(SIGPIPE, SIG_IGN)" if you want your program to continue running after a connection fails.

Member Enumeration Documentation

Session capabilities.

Enumerator:
cap_prepared_statements 

Does the backend support prepared statements? (If not, we emulate them)

cap_create_table_with_oids 

Can we specify WITH OIDS with CREATE TABLE?

cap_nested_transactions 

Can transactions be nested in other transactions?

cap_cursor_scroll 

Can cursors be declared SCROLL?

cap_cursor_with_hold 

Can cursors be declared WITH HOLD?

cap_cursor_update 

Can cursors be updateable?

cap_cursor_fetch_0 

Can cursors fetch zero elements? (Used to trigger a "fetch all")

cap_table_column 

Can we ask what table column a result column came from?

cap_read_only_transactions 

Can transactions be READ ONLY?

cap_statement_varargs 

Do prepared statements support varargs?

cap_prepare_unnamed_statement 

Is the unnamed prepared statement supported?

cap_parameterized_statements 

Can this connection execute parameterized statements?

cap_notify_payload 

Can notifications carry payloads?

cap_end 

Not a capability value; end-of-enumeration marker.

Error verbosity levels.

Enumerator:
terse 
normal 
verbose 

Constructor & Destructor Documentation

pqxx::connection_base::connection_base ( connectionpolicy pol)
explicitprotected

Member Function Documentation

void pqxx::connection_base::activate ( )

Explicitly activate deferred or deactivated connection.

Use of this method is entirely optional. Whenever a connection is used while in a deferred or deactivated state, it will transparently try to bring itself into an activated state. This function is best viewed as an explicit hint to the connection that "if you're not in an active state, now would be a good time to get into one." Whether a connection is currently in an active state or not makes no real difference to its functionality. There is also no particular need to match calls to activate() with calls to deactivate(). A good time to call activate() might be just before you first open a transaction on a lazy connection.

Referenced by pqxx::internal::sql_cursor::sql_cursor().

string pqxx::connection_base::adorn_name ( const std::string &  n)

Suffix unique number to name to make it unique within session context.

Used internally to generate identifiers for SQL objects (such as cursors and nested transactions) based on a given human-readable base name.

References pqxx::to_string().

int pqxx::connection_base::await_notification ( )

Wait for a notification to come in.

The wait may also be terminated by other events, such as the connection to the backend failing. Any pending or received notifications are processed as part of the call.

Returns
Number of notifications processed

References pqxx::internal::wait_read().

int pqxx::connection_base::await_notification ( long  seconds,
long  microseconds 
)

Wait for a notification to come in, or for given timeout to pass.

The wait may also be terminated by other events, such as the connection to the backend failing. Any pending or received notifications are processed as part of the call.

Returns
Number of notifications processed

References pqxx::internal::wait_read().

int pqxx::connection_base::backendpid ( ) const throw ()

Process ID for backend process.

Use with care: connections may be lost and automatically re-established without your knowledge, in which case this process ID may no longer be correct. You may, however, assume that this number remains constant and reliable within the span of a successful backend transaction. If the transaction fails, which may be due to a lost connection, then this number will have become invalid at some point within the transaction.

Returns
Process identifier, or 0 if not currently connected.
void pqxx::connection_base::cancel_query ( )

Attempt to cancel the ongoing query, if any.

void pqxx::connection_base::close ( ) throw ()
protected
const char * pqxx::connection_base::dbname ( )

Name of database we're connected to, if any.

Warning
This activates the connection, which may fail with a broken_connection exception.
void pqxx::connection_base::deactivate ( )

Explicitly deactivate connection.

Like its counterpart activate(), this method is entirely optional. Calling this function really only makes sense if you won't be using this connection for a while and want to reduce the number of open connections on the database server. There is no particular need to match or pair calls to deactivate() with calls to activate(), but calling deactivate() during a transaction is an error.

void pqxx::connection_base::disconnect ( ) throw ()

Explicitly close connection.

vector< errorhandler * > pqxx::connection_base::get_errorhandlers ( ) const

Return pointers to the active errorhandlers.

The entries are ordered from oldest to newest handler.

You may use this to find errorhandlers that your application wants to delete when destroying the connection. Be aware, however, that libpqxx may also add errorhandlers of its own, and those will be included in the list. If this is a problem for you, derive your errorhandlers from a custom base class derived from pqxx::errorhandler. Then use dynamic_cast to find which of the error handlers are yours.

The pointers point to the real errorhandlers. The container it returns however is a copy of the one internal to the connection, not a reference.

int pqxx::connection_base::get_notifs ( )

Check for pending notifications and take appropriate action.

All notifications found pending at call time are processed by finding any matching receivers and invoking those. If no receivers matched the notification string, none are invoked but the notification is considered processed.

Exceptions thrown by client-registered receivers are reported using the connection's errorhandlers, but the exceptions themselves are not passed on outside this function.

Returns
Number of notifications processed
string pqxx::connection_base::get_variable ( const std::string &  Var)

Read session variable.

Will try to read the value locally, from the list of variables set with the set_variable function. If that fails, the database is queried.

Warning
Do not mix the set_variable interface with manual setting of variables by executing the corresponding SQL commands, and do not get or set variables while a tablestream or pipeline is active on the same connection.
error_verbosity pqxx::connection_base::get_verbosity ( ) const throw ()

Retrieve current error verbosity.

const char * pqxx::connection_base::hostname ( )

Address of server, or NULL if none specified (i.e. default or local)

Warning
This activates the connection, which may fail with a broken_connection exception.
void pqxx::connection_base::inhibit_reactivation ( bool  inhibit)

Disallow (or permit) connection recovery.

A connection whose underlying socket is not currently connected to the server will normally (re-)establish communication with the server whenever needed, or when the client program requests it (although for reasons of integrity, never inside a transaction; but retrying the whole transaction may implicitly cause the connection to be restored). In normal use this is quite a convenient thing to have and presents a simple, safe, predictable interface.

There is at least one situation where this feature is not desirable, however. Although most session state (prepared statements, session variables) is automatically restored to its working state upon connection reactivation, temporary tables and so-called WITH HOLD cursors (which can live outside transactions) are not.

Cursors that live outside transactions are automatically handled, and the library will quietly ignore requests to deactivate or reactivate connections while they exist; it does not want to give you the illusion of being back in your transaction when in reality you just dropped a cursor. With temporary tables this is not so easy: there is no easy way for the library to detect their creation or track their lifetimes.

So if your program uses temporary tables, and any part of this use happens outside of any database transaction (or spans multiple transactions), some of the work you have done on these tables may unexpectedly be undone if the connection is broken or deactivated while any of these tables exists, and then reactivated or implicitly restored before you are finished with it.

If this describes any part of your program, guard it against unexpected reconnections by inhibiting reconnection at the beginning. And if you want to continue doing work on the connection afterwards that no longer requires the temp tables, you can permit it again to get the benefits of connection reactivation for the remainder of the program.

Parameters
inhibitshould reactivation be inhibited from here on?
Warning
Some connection types (the lazy and asynchronous types) defer completion of the socket-level connection until it is actually needed by the client program. Inhibiting reactivation before this connection is really established will prevent these connection types from doing their work. For those connection types, if you are sure that reactivation needs to be inhibited before any query goes across the connection, activate() the connection first. This will ensure that definite activation happens before you inhibit it.
void pqxx::connection_base::init ( )
protected
bool pqxx::connection_base::is_open ( ) const throw ()

Is this connection open at the moment?

Warning
This function is not needed in most code. Resist the temptation to check it after opening a connection; instead, rely on the broken_connection exception that will be thrown on connection failure.
template<typename TRANSACTOR >
void pqxx::connection_base::perform ( const TRANSACTOR &  T,
int  Attempts 
)

Perform the transaction defined by a transactor-based object.

Invokes the given transactor, making at most Attempts attempts to perform the encapsulated code. If the code throws any exception other than broken_connection, it will be aborted right away.

Parameters
TThe transactor to be executed.
AttemptsMaximum number of attempts to be made to execute T.
template<typename TRANSACTOR >
void pqxx::connection_base::perform ( const TRANSACTOR &  T)

Perform the transaction defined by a transactor-based object.

Parameters
TThe transactor to be executed.

References perform().

Referenced by perform().

const char * pqxx::connection_base::port ( )

Server port number we're connected to.

Warning
This activates the connection, which may fail with a broken_connection exception.
void pqxx::connection_base::prepare ( const std::string &  name,
const std::string &  definition 
)

Define a prepared statement.

The statement's definition can refer to a parameter using the parameter's positional number n in the definition. For example, the first parameter can be used as a variable "$1", the second as "$2" and so on.

Here's an example of how to use prepared statements. Note the unusual syntax for passing parameters: every new argument is a parenthesized expression that is simply tacked onto the end of the statement!

using namespace pqxx;
void foo(connection_base &C)
{
C.prepare("findtable", "select * from pg_tables where name=$1");
work W(C);
result R = W.prepared("findtable")("mytable").exec();
if (R.empty()) throw runtime_error("mytable not found!");
}

To save time, prepared statements aren't really registered with the backend until they are first used. If this is not what you want, e.g. because you have very specific realtime requirements, you can use the prepare_now() function to force immediate preparation.

Warning
The statement may not be registered with the backend until it is actually used. So if, for example, the statement is syntactically incorrect, you may see a syntax_error here, or later when you try to call the statement, or in a prepare_now() call.
Parameters
nameunique name for the new prepared statement.
definitionSQL statement to prepare.
void pqxx::connection_base::prepare ( const std::string &  definition)

Define a nameless prepared statement.

This can be useful if you merely want to pass large binary parameters to a statement without otherwise wishing to prepare it. If you use this feature, always keep the definition and the use close together to avoid the nameless statement being redefined unexpectedly by code somewhere else.

void pqxx::connection_base::prepare_now ( const std::string &  name)

Request that prepared statement be registered with the server.

If the statement had already been fully prepared, this will do nothing.

If the connection should break and be transparently restored, then the new connection will again defer registering the statement with the server. Since connections are never restored inside backend transactions, doing this once at the beginning of your transaction ensures that the statement will not be re-registered during that transaction. In most cases, however, it's probably better not to use this and let the connection decide when and whether to register prepared statements that you've defined.

void pqxx::connection_base::process_notice ( const char  msg[]) throw ()

Invoke notice processor function. The message should end in newline.

void pqxx::connection_base::process_notice ( const std::string &  msg) throw ()

Invoke notice processor function. Newline at end is recommended.

int pqxx::connection_base::protocol_version ( ) const throw ()

What version of the PostgreSQL protocol is this connection using?

The answer can be 0 (when there is no connection, or the libpq version being used is too old to obtain the information); 2 for protocol 2.0; 3 for protocol 3.0; and possibly higher values as newer protocol versions are taken into use.

If the connection is broken and restored, the restored connection could possibly a different server and protocol version. This would normally happen if the server is upgraded without shutting down the client program, for example.

Requires libpq version from PostgreSQL 7.4 or better.

int pqxx::connection_base::server_version ( ) const throw ()

What version of the PostgreSQL server are we connected to?

The result is a bit complicated: each of the major, medium, and minor release numbers is written as a two-digit decimal number, and the three are then concatenated. Thus server version 7.4.2 will be returned as the decimal number 70402. If there is no connection to the server, of if the libpq version is too old to obtain the information, zero is returned.

Warning
When writing version numbers in your code, don't add zero at the beginning! Numbers beginning with zero are interpreted as octal (base-8) in C++. Thus, 070402 is not the same as 70402, and 080000 is not a number at all because there is no digit "8" in octal notation. Use strictly decimal notation when it comes to these version numbers.
void pqxx::connection_base::set_client_encoding ( const std::string &  Encoding)

Set client-side character encoding.

Search the PostgreSQL documentation for "multibyte" or "character set encodings" to find out more about the available encodings, how to extend them, and how to use them. Not all server-side encodings are compatible with all client-side encodings or vice versa.

Parameters
EncodingName of the character set encoding to use
void pqxx::connection_base::set_variable ( const std::string &  Var,
const std::string &  Value 
)

Set session variable.

Set a session variable for this connection, using the SET command. If the connection to the database is lost and recovered, the last-set value will be restored automatically. See the PostgreSQL documentation for a list of variables that can be set and their permissible values. If a transaction is currently in progress, aborting that transaction will normally discard the newly set value. Known exceptions are nontransaction (which doesn't start a real backend transaction) and PostgreSQL versions prior to 7.3.

Warning
Do not mix the set_variable interface with manual setting of variables by executing the corresponding SQL commands, and do not get or set variables while a tablestream or pipeline is active on the same connection.
Parameters
VarVariable to set
ValueValue vor Var to assume: an identifier, a quoted string, or a number.
void pqxx::connection_base::set_verbosity ( error_verbosity  verbosity) throw ()

Set session verbosity.

Set the verbosity of error messages to "terse", "normal" (i.e. default) or "verbose."

If "terse", returned messages include severity, primary text, and position only; this will normally fit on a single line. "normal" produces messages that include the above plus any detail, hint, or context fields (these might span multiple lines). "verbose" includes all available fields.

void pqxx::connection_base::simulate_failure ( )

Make the connection fail.

Warning
Do not use this except for testing! Breaks the connection in some unspecified, horrible, dirty way to enable failure testing.

Do not use this in normal programs. This is only meant for testing.

int pqxx::connection_base::sock ( ) const throw ()

Socket currently used for connection, or -1 for none. Use with care!

Query the current socket number. This is intended for event loops based on functions such as select() or poll(), where multiple file descriptors are watched.

Please try to stay away from this function. It is really only meant for event loops that need to wait on more than one file descriptor. If all you need is to block until a notification arrives, for instance, use await_notification(). If you want to issue queries and retrieve results in nonblocking fashion, check out the pipeline class.

Warning
Don't store this value anywhere, and always be prepared for the possibility that there is no socket. The socket may change or even go away during any invocation of libpqxx code, no matter how trivial.
bool pqxx::connection_base::supports ( capability  c) const throw ()

Does this connection seem to support the given capability?

Don't try to be smart by caching this information anywhere. Obtaining it is quite fast (especially after the first time) and what's more, a capability may "suddenly" appear or disappear if the connection is broken or deactivated, and then restored. This may happen silently any time no backend transaction is active; if it turns out that the server was upgraded or restored from an older backup, or the new connection goes to a different backend, then the restored session may have different capabilities than were available previously.

Some guesswork is involved in establishing the presence of any capability; try not to rely on this function being exactly right.

Warning
Make sure your connection is active before calling this function, or the answer will always be "no." In particular, if you are using this function on a newly-created lazyconnection, activate the connection first.

Referenced by pqxx::internal::sql_cursor::sql_cursor().

void pqxx::connection_base::trace ( std::FILE *  ) throw ()

Enable tracing to a given output stream, or NULL to disable.

void pqxx::connection_base::unprepare ( const std::string &  name)

Drop prepared statement.

const char * pqxx::connection_base::username ( )

Database user ID we're connected under, if any.

Warning
This activates the connection, which may fail with a broken_connection exception.
void pqxx::connection_base::wait_read ( ) const
protected
void pqxx::connection_base::wait_read ( long  seconds,
long  microseconds 
) const
protected
void pqxx::connection_base::wait_write ( ) const
protected

Friends And Related Function Documentation

friend class internal::gate::connection_dbtransaction
friend
friend class internal::gate::connection_errorhandler
friend
friend class internal::gate::connection_largeobject
friend
friend class internal::gate::connection_notification_receiver
friend
friend class internal::gate::connection_parameterized_invocation
friend
friend class internal::gate::connection_pipeline
friend
friend class internal::gate::connection_prepare_invocation
friend
friend class internal::gate::connection_reactivation_avoidance_exemption
friend
friend class internal::gate::connection_sql_cursor
friend
friend class internal::gate::connection_transaction
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00023.js000066400000000000000000000156641224474465600207260ustar00rootroot00000000000000var a00023 = [ [ "capability", "a00023.html#a306a884246abc1051bab4fb06393ee71", [ [ "cap_prepared_statements", "a00023.html#a306a884246abc1051bab4fb06393ee71af5a4754aea608aaf5fca6caa51c44ce0", null ], [ "cap_create_table_with_oids", "a00023.html#a306a884246abc1051bab4fb06393ee71aba8a02f6bb5d2304bfbf2110c6cd791a", null ], [ "cap_nested_transactions", "a00023.html#a306a884246abc1051bab4fb06393ee71a973dc9e4f56818f82b86fb13a5bbc405", null ], [ "cap_cursor_scroll", "a00023.html#a306a884246abc1051bab4fb06393ee71a8034abdbcd193f25d9d93cf79156e1fc", null ], [ "cap_cursor_with_hold", "a00023.html#a306a884246abc1051bab4fb06393ee71ad97556afc36aff4a62c61b67437c20c4", null ], [ "cap_cursor_update", "a00023.html#a306a884246abc1051bab4fb06393ee71a8ab47c10b60d6bd6664f6e88f300edcb", null ], [ "cap_cursor_fetch_0", "a00023.html#a306a884246abc1051bab4fb06393ee71a86380c8c083847ba3d16764784f5914f", null ], [ "cap_table_column", "a00023.html#a306a884246abc1051bab4fb06393ee71a1f2b785abe834490c33dc4cf19c932d2", null ], [ "cap_read_only_transactions", "a00023.html#a306a884246abc1051bab4fb06393ee71a01e68a67b6a3c92ce9b0c92fa73e90b2", null ], [ "cap_statement_varargs", "a00023.html#a306a884246abc1051bab4fb06393ee71abefe533e379346c7b9644406c613eb02", null ], [ "cap_prepare_unnamed_statement", "a00023.html#a306a884246abc1051bab4fb06393ee71a6b019128f2fdcfa9d316042342846e2f", null ], [ "cap_parameterized_statements", "a00023.html#a306a884246abc1051bab4fb06393ee71a366c98bc3385ecfb39496bf7240e5973", null ], [ "cap_notify_payload", "a00023.html#a306a884246abc1051bab4fb06393ee71aabb5fb3d6d43442107e04e0982300d6e", null ], [ "cap_end", "a00023.html#a306a884246abc1051bab4fb06393ee71a4a873c5d7e7fb0a9022cdd110181a7de", null ] ] ], [ "error_verbosity", "a00023.html#a985f29750a981c8ba80bf91b22c2eee9", [ [ "terse", "a00023.html#a985f29750a981c8ba80bf91b22c2eee9af941ee6232e0e2704c00349b8b47feff", null ], [ "normal", "a00023.html#a985f29750a981c8ba80bf91b22c2eee9a3e74ba2b1506b7deb1fbea2834c574cf", null ], [ "verbose", "a00023.html#a985f29750a981c8ba80bf91b22c2eee9aff78876e731a924c5e25b06033fced2d", null ] ] ], [ "connection_base", "a00023.html#a33700cc6d830d28c3dbd48eb9b7276ab", null ], [ "activate", "a00023.html#a1aa330287775aa1ff83f94714f772673", null ], [ "adorn_name", "a00023.html#a4963aaba6da521d480c21c7ec01835cf", null ], [ "await_notification", "a00023.html#ab5c24029bda3198d826d24757e49c746", null ], [ "await_notification", "a00023.html#aa9e66faad88a94857c0749b9bbc5d352", null ], [ "backendpid", "a00023.html#a7179e32df28bd4bc81b85d99b36ad791", null ], [ "cancel_query", "a00023.html#a9709e4738b1bfb1dba547381749908cb", null ], [ "close", "a00023.html#af02016af0233bed748eb1ddab9685131", null ], [ "dbname", "a00023.html#a043e536c1923594c246f2ca8db31dffa", null ], [ "deactivate", "a00023.html#a10b275082e18dbcb177a8871f92c7523", null ], [ "disconnect", "a00023.html#a9bd21013745b4454e248e637cdae1287", null ], [ "esc", "a00203.html#ga8978ff727c03a1aaaa3a9d3fd3268abf", null ], [ "esc", "a00203.html#gae711f65dd793a70629f97a2e0e54d8db", null ], [ "esc", "a00203.html#gaca9ba750fd096cfd652a4323dab3a653", null ], [ "esc_raw", "a00203.html#ga6a8c83d3dcea7114a00c188fe6a92779", null ], [ "get_errorhandlers", "a00023.html#a33280d29c4db47c1e71eb82df921691a", null ], [ "get_notifs", "a00023.html#aa839a066c0289a12f664e29c9dbafd38", null ], [ "get_variable", "a00023.html#a908a2ffdf56d8259492e9f3894e24f65", null ], [ "get_verbosity", "a00023.html#a4344b95a9b950a0bc07dd1f2af7bb5f0", null ], [ "hostname", "a00023.html#a38dde9befa350a07a5ac093d13ee64e2", null ], [ "inhibit_reactivation", "a00023.html#aedf7ac72658efa92e702a06b1964747a", null ], [ "init", "a00023.html#a1d1c129c2c5797a82f251ee9dabec77e", null ], [ "is_open", "a00023.html#a36a26cf7e13f612749d49faf4f1654f8", null ], [ "perform", "a00023.html#abf3b71372850f86e4f5e67eb4b7d56bd", null ], [ "perform", "a00023.html#a5eac9840b79e7f1893d88b63f6d97b1d", null ], [ "port", "a00023.html#a826750f0f13ede4ac4e6ca8a84711b53", null ], [ "prepare", "a00023.html#ab71d463277c017f695eed71cdd87afb2", null ], [ "prepare", "a00023.html#a2d3fc0b15713b0bba8a6a286e4e67c10", null ], [ "prepare_now", "a00023.html#a32efdc645566975851bfc7d6b82d214c", null ], [ "process_notice", "a00023.html#a140578ed1e1c65c61deb0407ff25959f", null ], [ "process_notice", "a00023.html#a9d64420154827b3572dcdb955a93bfff", null ], [ "protocol_version", "a00023.html#ab63e45ad783d8adb8d4a9f03e03ef6ef", null ], [ "quote", "a00203.html#ga81fe65fbb9561af7c5f0b33a9fe27e5a", null ], [ "quote", "a00203.html#ga7e10c6bf1796584c0949383cb25541c2", null ], [ "quote_name", "a00203.html#gae68c4661843dcf695585f6e1b6011788", null ], [ "quote_raw", "a00203.html#ga8b59e512bedb3e8a69f3aa7e557daab7", null ], [ "server_version", "a00023.html#acdd295f691812773133147530aa6ff21", null ], [ "set_client_encoding", "a00023.html#a04895c06c5ae1d8b0863a32a28beff51", null ], [ "set_variable", "a00023.html#a120b9e03dcaa9b0c3ef7026afa64d954", null ], [ "set_verbosity", "a00023.html#acfb05dee4b2d29c9a3d4925d194d5ab9", null ], [ "simulate_failure", "a00023.html#a335ca1d83e65a9e57b907c431c3afbe1", null ], [ "sock", "a00023.html#a8ac078b1077fbe19ee1d713bb6b71e8f", null ], [ "supports", "a00023.html#aefdde864e05f88e84d748236b93659e7", null ], [ "trace", "a00023.html#aafade6d46c029d62f7bb10451f7e733e", null ], [ "unprepare", "a00023.html#a30ec51634479614b45106532e87e5dc7", null ], [ "username", "a00023.html#ae02522000400fc2782e892ac0387d85b", null ], [ "wait_read", "a00023.html#af860fe4c418cfa4f573f34d73327d111", null ], [ "wait_read", "a00023.html#ab8c7dd5e54493e18d5900dd70012d062", null ], [ "wait_write", "a00023.html#acfb8d53e6f105db280cd5d977c005bea", null ], [ "internal::gate::connection_dbtransaction", "a00023.html#af3dfec559fe2305e57aba653abe4c8ad", null ], [ "internal::gate::connection_errorhandler", "a00023.html#aa423170b8ec82df685a1e739f53f2b14", null ], [ "internal::gate::connection_largeobject", "a00023.html#ab15ff67d81467d271dc713b2584f1328", null ], [ "internal::gate::connection_notification_receiver", "a00023.html#abbdbf8e505eb3c23680d83df6c575889", null ], [ "internal::gate::connection_parameterized_invocation", "a00023.html#a0e64dc314f291c6f81a948c59d94aa8a", null ], [ "internal::gate::connection_pipeline", "a00023.html#a3b9c5dc16f04600aa5415e06f6ff8fa6", null ], [ "internal::gate::connection_prepare_invocation", "a00023.html#ac2eff365ba0aa25ebbf5f903ac3c7a54", null ], [ "internal::gate::connection_reactivation_avoidance_exemption", "a00023.html#a2247d8690958f634898bbf014a7d418c", null ], [ "internal::gate::connection_sql_cursor", "a00023.html#a84c1a28176815ab9103c7febec450755", null ], [ "internal::gate::connection_transaction", "a00023.html#a3c60c76e32687adce1e8c0dba0919773", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00023.png000066400000000000000000000015501224474465600210630ustar00rootroot00000000000000‰PNG  IHDRP 9±ÁPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2÷IDATxím’ã(D©ßÿÈk[€Úîiw¬=“D–@R!Á£ þRJ)±¦PbG À"€)DSˆ¦·$rÒÙ¨~´ïJ`fŸEäú­ûÇn)}o´“¸åú£Ú|ªk­n—û;óèÿÑþ¡õø‰½”Èí÷9Q˜¨­ÏÉ»‰ãð U¯]W€—Ø8åýÚü0ù®jç:η¹;üÿN"·ò"«ÿ¶ó¶€ŸÛ¯±˜~*FúÕÿŠH}øE^ø¾ýÖ929Ym—³sĉ|Ø9r’köQ{®±Ùø;Ï5#Õ±Ùšïšk¦M€O²O!r?=_ SKŒ¦Wø| À"€)DSˆ¦+‘RJ‰Õðvˆ…ÀÜ.— …Ðê $H€ªp À"€)DSˆ¦L!˜B0…` À"€)DSˆ¦L!˜B0…` À"€)DSˆ¦L!˜B0…` Àô>D–eYÞÁ.˲,ï`,’;JˆH2…ˆ$SˆH2…ˆ$Ó³DŠ$u6{&IOصëƒÞåZ¬±Ýµ{©>ë}YëIßµÚž_‘dú IúC{ø¹c"µ±·jcpî.Þðg‰ÜЮk£éRŸÖ—ë8ÛÖ%«]†žëj6½w±:—­‡5¼F¤í;FfCJRU%²º¯kP¤^GKE¦ñ'{uÒSEUDZ ÿ‘fIšéi~{Ýž‡?e0ŒÍ_õ¿ˆ¨Èµ;*Έld&ß%²ÿ¬[¦'ˆØè'D|ûM‰¬“°ÆiŒ<&Òï™ms"דYÚœž‘Éš+F~“È$FÚ`œœ¬pŽ|]DZ&'ùâ3Û-³\3~¤ûž“œž#'¹f|Mû®z˜kºhßy®™œúÛö¬îìjΑÖÙgÚ¾¯,÷!Ï2M·kæûK’þ!{ ‘u±þ‰I¦ƒˆ$ÅBD’: I¦‘d I¦+‘eY–X-ÿè¦7Ñvx×IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00024.html000066400000000000000000000400371224474465600212470ustar00rootroot00000000000000 libpqxx: pqxx::connectionpolicy Class Reference

#include <connectionpolicy.hxx>

Inheritance diagram for pqxx::connectionpolicy:
pqxx::connect_async pqxx::connect_direct pqxx::connect_lazy pqxx::connect_null

Public Types

typedef internal::pq::PGconn * handle

Public Member Functions

 connectionpolicy (const std::string &opts)
virtual ~connectionpolicy () throw ()
const std::string & options () const throw ()
virtual handle do_startconnect (handle orig)
virtual handle do_completeconnect (handle orig)
virtual handle do_dropconnect (handle orig) throw ()
virtual handle do_disconnect (handle orig) throw ()
virtual bool is_ready (handle) const throw ()

Protected Member Functions

handle normalconnect (handle)

Member Typedef Documentation

typedef internal::pq::PGconn* pqxx::connectionpolicy::handle

Constructor & Destructor Documentation

pqxx::connectionpolicy::connectionpolicy ( const std::string &  opts)
explicit
pqxx::connectionpolicy::~connectionpolicy ( ) throw ()
virtual

Member Function Documentation

pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_completeconnect ( handle  orig)
virtual

Reimplemented in pqxx::connect_async, and pqxx::connect_lazy.

pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_disconnect ( handle  orig) throw ()
virtual
pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_dropconnect ( handle  orig) throw ()
virtual

Reimplemented in pqxx::connect_async.

pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_startconnect ( handle  orig)
virtual

Reimplemented in pqxx::connect_async, and pqxx::connect_direct.

bool pqxx::connectionpolicy::is_ready ( handle  h) const throw ()
virtual

Reimplemented in pqxx::connect_async.

pqxx::connectionpolicy::handle pqxx::connectionpolicy::normalconnect ( handle  orig)
protected
const std::string& pqxx::connectionpolicy::options ( ) const throw ()

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00024.js000066400000000000000000000014551224474465600207200ustar00rootroot00000000000000var a00024 = [ [ "handle", "a00024.html#a15bb552a890c0fb28fab2413200dee18", null ], [ "connectionpolicy", "a00024.html#ab46be4bfe19a8a022f441d120b6b2f09", null ], [ "~connectionpolicy", "a00024.html#a69870c553a2ea10b2f1fbd6073c2fb25", null ], [ "do_completeconnect", "a00024.html#a0bbbedd08b7f579e5a2577e97b7e09b7", null ], [ "do_disconnect", "a00024.html#ae74d43f05d575eb142e18ed0939de151", null ], [ "do_dropconnect", "a00024.html#a3358c5c2ab741a6fd798db538516a349", null ], [ "do_startconnect", "a00024.html#ab7c76ae54326197bcbe6d35b5bbb246f", null ], [ "is_ready", "a00024.html#ae6c506b9822a94dffd7e58a917d5509e", null ], [ "normalconnect", "a00024.html#a5b4be97db7a8739e9f4fc7e1b7ab587c", null ], [ "options", "a00024.html#ae3164a06f63e76709e17065bea2bf938", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00024.png000066400000000000000000000023161224474465600210650ustar00rootroot00000000000000‰PNG  IHDRJPÑ/ªPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2]IDATxíÝír²JEá‡M•÷É'‰Áqò"Fs:Å„fØ™Y6á/3 Ãð"@ïÉë,`©oL©l¤T‚6R*A)• €ÁæiùW•vˆu~¹£+?eú\6¼Ëç]<ýâU2ÏÍ­%kv¥‡§Z_n…ow¥]‚M»eº$‹í^WÚy¾öVéÔ×ÿýñüÜ /WnW•n¤:s+ü~*µ‚M¯žëÓ´«J]óõc•V±Ëç³_Õ²x>ÚªÒCSýî7©ô°`ëPÇK²Ü~ ÒóÕ¥Òâ-»yºï^O¼ñò_½£ÏTZFº©Ò.©¦_ße ~•ö v¶ª?Wi×UìîJó³×!¦á§³W„X_[¤øl>3ÿS‹[îw¥=R­d¾Uv¯+=<Øtésĵ?éJûÄZN[× îò0IEkØÖ nßTIrƒ{/¸Ýƒý‹J¿2_»©ôù£:ë:÷F}‚J×S%É-ž¤ÒÍ`W~šJ?™¯çv¥ö Õ•’dÍõqß +%ÉïÑž $ù*T’ôP*%Iƒ •$=”JIÒ B%I¥R’4¨PIÒC©”$ *T’ôð¡Ò8Žãk°˜ qÇ× Bã8öð%¯xk}LJ0IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00025.html000066400000000000000000001405411224474465600212510ustar00rootroot00000000000000 libpqxx: pqxx::const_result_iterator Class Reference
pqxx::const_result_iterator Class Reference

Iterator for rows (tuples) in a result. Use as result::const_iterator. More...

#include <result.hxx>

Inheritance diagram for pqxx::const_result_iterator:
pqxx::tuple pqxx::const_reverse_result_iterator

Public Types

typedef const tuplepointer
typedef tuple reference
typedef result::size_type size_type
typedef result::difference_type difference_type
- Public Types inherited from pqxx::tuple
typedef tuple_size_type size_type
typedef tuple_difference_type difference_type
typedef const_tuple_iterator const_iterator
typedef const_iterator iterator
typedef field reference
typedef const_tuple_iterator pointer
typedef
const_reverse_tuple_iterator 
const_reverse_iterator
typedef const_reverse_iterator reverse_iterator

Public Member Functions

 const_result_iterator () throw ()
 const_result_iterator (const tuple &t) throw ()
Dereferencing operators
pointer operator-> () const
reference operator* () const
Manipulations
const_result_iterator operator++ (int)
const_result_iteratoroperator++ ()
const_result_iterator operator-- (int)
const_result_iteratoroperator-- ()
const_result_iteratoroperator+= (difference_type i)
const_result_iteratoroperator-= (difference_type i)
Comparisons
bool operator== (const const_result_iterator &i) const
bool operator!= (const const_result_iterator &i) const
bool operator< (const const_result_iterator &i) const
bool operator<= (const const_result_iterator &i) const
bool operator> (const const_result_iterator &i) const
bool operator>= (const const_result_iterator &i) const
- Public Member Functions inherited from pqxx::tuple
 tuple (const result *r, size_t i) throw ()
 ~tuple () throw ()
const_iterator begin () const throw ()
const_iterator end () const throw ()
size_type size () const throw ()
void swap (tuple &) throw ()
size_t rownumber () const throw ()
size_t num () const
tuple slice (size_type Begin, size_type End) const
bool PQXX_PURE empty () const throw ()
bool PQXX_PURE operator== (const tuple &) const throw ()
bool operator!= (const tuple &rhs) const throw ()
reference front () const throw ()
reference back () const throw ()
const_reverse_tuple_iterator rbegin () const
const_reverse_tuple_iterator rend () const
reference operator[] (size_type) const throw ()
reference operator[] (int) const throw ()
reference operator[] (const char[]) const
reference operator[] (const std::string &) const
reference at (size_type) const throw (pqxx::range_error)
reference at (int) const throw (pqxx::range_error)
reference at (const char[]) const
reference at (const std::string &) const
size_type column_number (const std::string &ColName) const
 Number of given column (throws exception if it doesn't exist)
size_type column_number (const char[]) const
 Number of given column (throws exception if it doesn't exist)
oid column_type (size_type) const
 Type of given column.
oid column_type (int ColNum) const
 Type of given column.
oid column_type (const std::string &ColName) const
 Type of given column.
oid column_type (const char ColName[]) const
 Type of given column.
oid column_table (size_type ColNum) const
 What table did this column come from?
oid column_table (int ColNum) const
 What table did this column come from?
oid column_table (const std::string &ColName) const
 What table did this column come from?
size_type table_column (size_type) const
 What column number in its table did this result column come from?
size_type table_column (int ColNum) const
 What column number in its table did this result column come from?
size_type table_column (const std::string &ColName) const
 What column number in its table did this result column come from?

Friends

class pqxx::result

Arithmetic operators

const_result_iterator operator+ (difference_type, const_result_iterator)
const_result_iterator operator+ (difference_type) const
const_result_iterator operator- (difference_type) const
difference_type operator- (const_result_iterator) const

Additional Inherited Members

- Protected Attributes inherited from pqxx::tuple
const resultm_Home
size_t m_Index
size_type m_Begin
size_type m_End

Detailed Description

Iterator for rows (tuples) in a result. Use as result::const_iterator.

A result, once obtained, cannot be modified. Therefore there is no plain iterator type for result. However its const_iterator type can be used to inspect its tuples without changing them.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::const_result_iterator::const_result_iterator ( ) throw ()
pqxx::const_result_iterator::const_result_iterator ( const tuple t) throw ()

Member Function Documentation

bool pqxx::const_result_iterator::operator!= ( const const_result_iterator i) const
reference pqxx::const_result_iterator::operator* ( ) const
const_result_iterator pqxx::const_result_iterator::operator+ ( result::difference_type  o) const
pqxx::const_result_iterator pqxx::const_result_iterator::operator++ ( int  )
const_result_iterator& pqxx::const_result_iterator::operator++ ( )
const_result_iterator& pqxx::const_result_iterator::operator+= ( difference_type  i)
const_result_iterator pqxx::const_result_iterator::operator- ( result::difference_type  o) const
result::difference_type pqxx::const_result_iterator::operator- ( const_result_iterator  i) const

References pqxx::tuple::num().

pqxx::const_result_iterator pqxx::const_result_iterator::operator-- ( int  )
const_result_iterator& pqxx::const_result_iterator::operator-- ( )
const_result_iterator& pqxx::const_result_iterator::operator-= ( difference_type  i)
pointer pqxx::const_result_iterator::operator-> ( ) const

The iterator "points to" its own tuple, which is also itself. This allows a result to be addressed as a two-dimensional container without going through the intermediate step of dereferencing the iterator. I hope this works out to be similar to C pointer/array semantics in useful cases.

IIRC Alex Stepanov, the inventor of the STL, once remarked that having this as standard behaviour for pointers would be useful in some algorithms. So even if this makes me look foolish, I would seem to be in distinguished company.

bool pqxx::const_result_iterator::operator< ( const const_result_iterator i) const
bool pqxx::const_result_iterator::operator<= ( const const_result_iterator i) const
bool pqxx::const_result_iterator::operator== ( const const_result_iterator i) const
bool pqxx::const_result_iterator::operator> ( const const_result_iterator i) const
bool pqxx::const_result_iterator::operator>= ( const const_result_iterator i) const

Friends And Related Function Documentation

friend class pqxx::result
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00025.js000066400000000000000000000036461224474465600207250ustar00rootroot00000000000000var a00025 = [ [ "difference_type", "a00025.html#af1bc6358a5c67e40dfca6acbbdee2eed", null ], [ "pointer", "a00025.html#af545df126c49a8ad52fc58ee4833e7d9", null ], [ "reference", "a00025.html#a0b197686648ddd4acb3c803d6a51fc8d", null ], [ "size_type", "a00025.html#ab8d1a4aa2c488d516b766e811a33fb6c", null ], [ "const_result_iterator", "a00025.html#a69a45f72ecd7d720ebdb830950df15ad", null ], [ "const_result_iterator", "a00025.html#a599088be998cb2998cd2cac6cd7bc9c6", null ], [ "operator!=", "a00025.html#a9c831865874ab49c5a8e552503d8d6f8", null ], [ "operator*", "a00025.html#ab58d13117556c7bbe935db018c4bbbd9", null ], [ "operator+", "a00025.html#a2faa42822a70d1ad0dbf426b69ee8a69", null ], [ "operator++", "a00025.html#a3321e9a66cc13e3455eeeeb23c9ce7a3", null ], [ "operator++", "a00025.html#ab92d7af9a2d9842cd5c1e12c99201893", null ], [ "operator+=", "a00025.html#a9eb6caf606fd73bd3bc0e0bbbcd3387a", null ], [ "operator-", "a00025.html#adfa0ccba45f501111664d5e0c4bfa766", null ], [ "operator-", "a00025.html#a4f404cbf15b073e6f877dbc405edabe0", null ], [ "operator--", "a00025.html#a1817b0a918bdf266d240ca5b4449ce6e", null ], [ "operator--", "a00025.html#a45a6644ccdf8648196d310ec643414fb", null ], [ "operator-=", "a00025.html#aac919ac1130c456cac33c2fb977e8f49", null ], [ "operator->", "a00025.html#a5a6e8b74cb15a24e923016d56cd74df5", null ], [ "operator<", "a00025.html#abc4bdb24c31faff8986730cc418225c4", null ], [ "operator<=", "a00025.html#a5838760d8c9620674b3bc530f95ec6d5", null ], [ "operator==", "a00025.html#a757c8e7d196c2a9d4e69af70a4234620", null ], [ "operator>", "a00025.html#a07d2e2279fef3c1476cffd06a8eb91de", null ], [ "operator>=", "a00025.html#a968c235eb6fecdf44b8f64827473c733", null ], [ "operator+", "a00025.html#a381a166248dfc07a1cc3b9e840263a89", null ], [ "pqxx::result", "a00025.html#ac9149722b80a911706d9ad204417a69a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00025.png000066400000000000000000000017301224474465600210650ustar00rootroot00000000000000‰PNG  IHDRшNeþâPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2gIDATxíë–£*F7½úýùxçjâéÑL5SYî$bl«À¿ÄãP%i ÜH’lãF’d›IÅÑ4HÒâF’tNPX&9}ÒÄÃܼžn×ÖIº…›–É.Ç2ù µÇv¹l¤{¸;Gõ´÷ïýr1¤Ñü‘¤»xШ(¬—9’¤Ûxnµ;CZb¿iìu…˯Ú뮾jžx¹‘$½e<#IúÛ¸‘$ÙÆ$É6“QŒ1ŽÀGøŠáŒ¾¿GSÎhLi<#ßë¬ãF¶q#Û¸€mÜÀ6n`7°ØÆlãF¶q#Û¸€mÜàg„ÂPÂlãF¶yÒèÂÈSHŠ*Nþç@6N»Ül4E,!óF¿ÿÉï2¿ŽŸ‘#áyº‹]më²Þ7o8åZÕýä½ð7xÖhYåo7ÜkQWøsð›p#Û¸€mæ×W! ÀGøŠáŒ¾¾FSÎhLi<#€Ñð ØÆs`Ï€múñÕŸÁÙôŠezZ_WŒÎöº½S¹×åUWÕæ^TÛwödú{]>ø>ƒ¬ôw£|WÛº¬SÍ[ëª{ô#IŸà£eÉO^’^r­Ë9G’4n$I¶q#I²ÍdcŒ#ñ² TR¥ÏIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00026.html000066400000000000000000001063511224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::const_reverse_result_iterator Class Reference
pqxx::const_reverse_result_iterator Class Reference

Reverse iterator for result. Use as result::const_reverse_iterator. More...

#include <result.hxx>

Inheritance diagram for pqxx::const_reverse_result_iterator:
pqxx::const_result_iterator

Public Types

typedef const_result_iterator super
typedef const_result_iterator iterator_type
typedef result::difference_type difference_type
typedef const tuplepointer
typedef tuple reference

Public Member Functions

 const_reverse_result_iterator (const const_reverse_result_iterator &rhs)
 const_reverse_result_iterator (const const_result_iterator &rhs)
const_result_iterator PQXX_PURE base () const throw ()
Manipulations
const_reverse_result_iteratoroperator= (const const_reverse_result_iterator &r)
const_reverse_result_iterator operator++ ()
const_reverse_result_iterator operator++ (int)
const_reverse_result_iteratoroperator-- ()
const_reverse_result_iterator operator-- (int)
const_reverse_result_iteratoroperator+= (difference_type i)
const_reverse_result_iteratoroperator-= (difference_type i)
Arithmetic operators
const_reverse_result_iterator operator+ (difference_type i) const
const_reverse_result_iterator operator- (difference_type i)
difference_type operator- (const const_reverse_result_iterator &rhs) const
Comparisons
bool operator== (const const_reverse_result_iterator &rhs) const throw ()
bool operator!= (const const_reverse_result_iterator &rhs) const throw ()
bool operator< (const const_reverse_result_iterator &rhs) const
bool operator<= (const const_reverse_result_iterator &rhs) const
bool operator> (const const_reverse_result_iterator &rhs) const
bool operator>= (const const_reverse_result_iterator &rhs) const

Additional Inherited Members

- Private Types inherited from pqxx::const_result_iterator
typedef const tuplepointer
typedef tuple reference
typedef result::size_type size_type
typedef result::difference_type difference_type
- Private Member Functions inherited from pqxx::const_result_iterator
 const_result_iterator () throw ()
 const_result_iterator (const tuple &t) throw ()
pointer operator-> () const
reference operator* () const
const_result_iterator operator++ (int)
const_result_iteratoroperator++ ()
const_result_iterator operator-- (int)
const_result_iteratoroperator-- ()
const_result_iteratoroperator+= (difference_type i)
const_result_iteratoroperator-= (difference_type i)
bool operator== (const const_result_iterator &i) const
bool operator!= (const const_result_iterator &i) const
bool operator< (const const_result_iterator &i) const
bool operator<= (const const_result_iterator &i) const
bool operator> (const const_result_iterator &i) const
bool operator>= (const const_result_iterator &i) const
const_result_iterator operator+ (difference_type) const
const_result_iterator operator- (difference_type) const
difference_type operator- (const_result_iterator) const
- Friends inherited from pqxx::const_result_iterator

Detailed Description

Reverse iterator for result. Use as result::const_reverse_iterator.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::const_reverse_result_iterator::const_reverse_result_iterator ( const const_reverse_result_iterator rhs)
pqxx::const_reverse_result_iterator::const_reverse_result_iterator ( const const_result_iterator rhs)
explicit

Member Function Documentation

pqxx::result::const_iterator pqxx::result::const_reverse_iterator::base ( ) const throw ()

Referenced by pqxx::operator+().

bool pqxx::const_reverse_result_iterator::operator!= ( const const_reverse_result_iterator rhs) const throw ()
const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator+ ( difference_type  i) const
const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator++ ( )
pqxx::const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator++ ( int  )
const_reverse_result_iterator& pqxx::const_reverse_result_iterator::operator+= ( difference_type  i)
const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator- ( difference_type  i)
difference_type pqxx::const_reverse_result_iterator::operator- ( const const_reverse_result_iterator rhs) const
const_reverse_result_iterator& pqxx::const_reverse_result_iterator::operator-- ( )
pqxx::const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator-- ( int  )
const_reverse_result_iterator& pqxx::const_reverse_result_iterator::operator-= ( difference_type  i)
bool pqxx::const_reverse_result_iterator::operator< ( const const_reverse_result_iterator rhs) const
bool pqxx::const_reverse_result_iterator::operator<= ( const const_reverse_result_iterator rhs) const
const_reverse_result_iterator& pqxx::const_reverse_result_iterator::operator= ( const const_reverse_result_iterator r)
bool pqxx::const_reverse_result_iterator::operator== ( const const_reverse_result_iterator rhs) const throw ()
bool pqxx::const_reverse_result_iterator::operator> ( const const_reverse_result_iterator rhs) const
bool pqxx::const_reverse_result_iterator::operator>= ( const const_reverse_result_iterator rhs) const

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00026.js000066400000000000000000000035411224474465600207200ustar00rootroot00000000000000var a00026 = [ [ "difference_type", "a00026.html#af1bc6358a5c67e40dfca6acbbdee2eed", null ], [ "iterator_type", "a00026.html#a3944431a48bc056755e618de31ccb101", null ], [ "pointer", "a00026.html#af545df126c49a8ad52fc58ee4833e7d9", null ], [ "reference", "a00026.html#a0b197686648ddd4acb3c803d6a51fc8d", null ], [ "super", "a00026.html#a9f89dabdd47d46a7e86551788620914b", null ], [ "const_reverse_result_iterator", "a00026.html#a6544eebac8fc1c8c7d8ea6d65a1332a8", null ], [ "const_reverse_result_iterator", "a00026.html#ac0716cbc925a9250ac448c6cd35cd797", null ], [ "base", "a00026.html#af0afdb9600704e015047eefae139bd27", null ], [ "operator!=", "a00026.html#a9791060c7f9c94370fccf4f2a053f451", null ], [ "operator+", "a00026.html#a248bd6095a955103131179b8b797a465", null ], [ "operator++", "a00026.html#aa0aef3bc029f501703e2f941c85d03d5", null ], [ "operator++", "a00026.html#af64ad7b0d03524e2631f06a7be70e918", null ], [ "operator+=", "a00026.html#a3f9fbd9b493b163a45b1c15d2e5ff6b7", null ], [ "operator-", "a00026.html#abd88da5b5bc0d9e63efba1a6ba9f14b3", null ], [ "operator-", "a00026.html#ab17e937b7d28ad346802a39d78a02af1", null ], [ "operator--", "a00026.html#af6c63db21df71be91a1cf1c2d9905c47", null ], [ "operator--", "a00026.html#a04258acb26509bcf495e7819de11d142", null ], [ "operator-=", "a00026.html#a31bfd0560cc60c2496c48cafc47aeb41", null ], [ "operator<", "a00026.html#a7b18a6e600a88ac9a5689b2cd9ee5c1b", null ], [ "operator<=", "a00026.html#a43793fc9e6cfcf3a400bcb9a3363dbf7", null ], [ "operator=", "a00026.html#a26592398ebce2937d32420e4fbfbdd87", null ], [ "operator==", "a00026.html#adeb96b3dd3de78f616e8ff6129cc8a26", null ], [ "operator>", "a00026.html#af1b380239968fd36cfb1b22f25fe3c67", null ], [ "operator>=", "a00026.html#aace3d30e02c3014d04cb1825dff7de6b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00026.png000066400000000000000000000013721224474465600210700ustar00rootroot00000000000000‰PNG  IHDRÑP°` PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2‰IDATxííº£ „_ÆÞÿ5¯ á«õœ­]ÊÒÇQÁ$d˜þeY–e(°HÒ@˜Œ$©oLF’Ô7îdä$é9V“h• ~¨OFM—73rr{Äõ~¾ØU\˜ÝÖÆAŒ¥wßé+?f§K1+IM\`tìãTN•Ë>œd¯,ˆœâUX%_J—sV’Ú¸¢Qžr׿eVy±$²¤öMFOg%©Ž{ÅʲA¶_Qu%£`ækùfFeEÕU—$ó²êJYßÊÈœ£Jg(Ë­zŽòô’3׬¯›µz]X'íu¶ê²ÚLwäÜÊt5ïr¬kg%©‰kU÷›ÿIú¸—Ñ~Ê_6ÜkV’tÿ£F’ôM˜Œ$©oLF’Ô7VF˲,#à#x …á=£QŽÑJh0Jã1 S!€¾15èS#€¾15èS#€¾15èS#€¾15èS#€¾15èS#€¾15èŸÓÈ9ç†` LF}c2èo`tÏ–¬Qcàdðbíï`Ô\å£õeÛúyx±.[£?ÖÆˆÑ‚‰Gˆ³1‘J—ã»Ç¶D\ü¤±’[d›r¬ë ¼ìý"íÂò$–Eª»äƒD°,Ve6Ó(O9ÅÊtÓôª&%£Ô壳Á(–‰Moû‘ãè4÷35—”^Á(e¿À¨¬¨:£¢êŠÈf?ëM+Ý“—UWÊÚfdÎQ¥3Tk© libpqxx: pqxx::const_reverse_tuple_iterator Class Reference
pqxx::const_reverse_tuple_iterator Class Reference

Reverse iterator for a tuple. Use as tuple::const_reverse_iterator. More...

#include <tuple.hxx>

Inheritance diagram for pqxx::const_reverse_tuple_iterator:
pqxx::const_tuple_iterator

Public Types

typedef const_tuple_iterator super
typedef const_tuple_iterator iterator_type
typedef tuple::difference_type difference_type
typedef field reference

Public Member Functions

 const_reverse_tuple_iterator (const const_reverse_tuple_iterator &r)
 const_reverse_tuple_iterator (const super &rhs) throw ()
iterator_type PQXX_PURE base () const throw ()
Manipulations
const_reverse_tuple_iteratoroperator= (const const_reverse_tuple_iterator &r)
const_reverse_tuple_iterator operator++ ()
const_reverse_tuple_iterator operator++ (int)
const_reverse_tuple_iteratoroperator-- ()
const_reverse_tuple_iterator operator-- (int)
const_reverse_tuple_iteratoroperator+= (difference_type i)
const_reverse_tuple_iteratoroperator-= (difference_type i)
Arithmetic operators
const_reverse_tuple_iterator operator+ (difference_type i) const
const_reverse_tuple_iterator operator- (difference_type i)
difference_type operator- (const const_reverse_tuple_iterator &rhs) const
Comparisons
bool operator== (const const_reverse_tuple_iterator &rhs) const throw ()
bool operator!= (const const_reverse_tuple_iterator &rhs) const throw ()
bool operator< (const const_reverse_tuple_iterator &rhs) const
bool operator<= (const const_reverse_tuple_iterator &rhs) const
bool operator> (const const_reverse_tuple_iterator &rhs) const
bool operator>= (const const_reverse_tuple_iterator &rhs) const

Additional Inherited Members

- Private Types inherited from pqxx::const_tuple_iterator
typedef tuple::size_type size_type
typedef tuple::difference_type difference_type
typedef field reference
- Private Member Functions inherited from pqxx::const_tuple_iterator
 const_tuple_iterator (const tuple &T, tuple::size_type C) throw ()
 const_tuple_iterator (const field &F) throw ()
pointer operator-> () const
reference operator* () const
const_tuple_iterator operator++ (int)
const_tuple_iteratoroperator++ ()
const_tuple_iterator operator-- (int)
const_tuple_iteratoroperator-- ()
const_tuple_iteratoroperator+= (difference_type i)
const_tuple_iteratoroperator-= (difference_type i)
bool operator== (const const_tuple_iterator &i) const
bool operator!= (const const_tuple_iterator &i) const
bool operator< (const const_tuple_iterator &i) const
bool operator<= (const const_tuple_iterator &i) const
bool operator> (const const_tuple_iterator &i) const
bool operator>= (const const_tuple_iterator &i) const
const_tuple_iterator operator+ (difference_type) const
const_tuple_iterator operator- (difference_type) const
difference_type operator- (const_tuple_iterator) const
- Friends inherited from pqxx::const_tuple_iterator

Detailed Description

Reverse iterator for a tuple. Use as tuple::const_reverse_iterator.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::const_reverse_tuple_iterator::const_reverse_tuple_iterator ( const const_reverse_tuple_iterator r)
pqxx::const_reverse_tuple_iterator::const_reverse_tuple_iterator ( const super rhs) throw ()
explicit

Member Function Documentation

pqxx::const_tuple_iterator pqxx::const_reverse_tuple_iterator::base ( ) const throw ()
bool pqxx::const_reverse_tuple_iterator::operator!= ( const const_reverse_tuple_iterator rhs) const throw ()
const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator+ ( difference_type  i) const
const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator++ ( )
pqxx::const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator++ ( int  )
const_reverse_tuple_iterator& pqxx::const_reverse_tuple_iterator::operator+= ( difference_type  i)
const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator- ( difference_type  i)
difference_type pqxx::const_reverse_tuple_iterator::operator- ( const const_reverse_tuple_iterator rhs) const
const_reverse_tuple_iterator& pqxx::const_reverse_tuple_iterator::operator-- ( )
pqxx::const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator-- ( int  )
const_reverse_tuple_iterator& pqxx::const_reverse_tuple_iterator::operator-= ( difference_type  i)
bool pqxx::const_reverse_tuple_iterator::operator< ( const const_reverse_tuple_iterator rhs) const
bool pqxx::const_reverse_tuple_iterator::operator<= ( const const_reverse_tuple_iterator rhs) const
const_reverse_tuple_iterator& pqxx::const_reverse_tuple_iterator::operator= ( const const_reverse_tuple_iterator r)
bool pqxx::const_reverse_tuple_iterator::operator== ( const const_reverse_tuple_iterator rhs) const throw ()
bool pqxx::const_reverse_tuple_iterator::operator> ( const const_reverse_tuple_iterator rhs) const
bool pqxx::const_reverse_tuple_iterator::operator>= ( const const_reverse_tuple_iterator rhs) const

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00027.js000066400000000000000000000034251224474465600207220ustar00rootroot00000000000000var a00027 = [ [ "difference_type", "a00027.html#adf1e8d933ff2f633c68a10261bdec228", null ], [ "iterator_type", "a00027.html#a5a6a65374213d98c1060687eac932a52", null ], [ "reference", "a00027.html#a5c99036c804619585245e453cd3788b2", null ], [ "super", "a00027.html#acfeaa999bdc29d7a00dd3c7b441159c9", null ], [ "const_reverse_tuple_iterator", "a00027.html#a6070a748f0a316013cda5a36e55ae967", null ], [ "const_reverse_tuple_iterator", "a00027.html#ac882fd1ecae81460033842c88aad95d3", null ], [ "base", "a00027.html#a9e2e8c01d5ad4477fa014ada68765bbd", null ], [ "operator!=", "a00027.html#a098f50ff4829f9ee993e886b5948583f", null ], [ "operator+", "a00027.html#abb4b905cf43a962fd80e2bbb3ebabb09", null ], [ "operator++", "a00027.html#aa2b622cb478e2423aba8013117483c41", null ], [ "operator++", "a00027.html#a92227217585360e6d35cf40d3e632065", null ], [ "operator+=", "a00027.html#a19df3962a332430fb1b531f24959a05b", null ], [ "operator-", "a00027.html#a11ca506e9cac97842a53ddb78f409fed", null ], [ "operator-", "a00027.html#a3303dbad6189d4c4eccac0e1bf6ede1e", null ], [ "operator--", "a00027.html#a3ac4f8c6dfd71aacfafb2c2c9080bf1d", null ], [ "operator--", "a00027.html#a036e91dab6151221c2713d1759c5a72c", null ], [ "operator-=", "a00027.html#adfa94c0a489aae615a2d09e8bf10939d", null ], [ "operator<", "a00027.html#a55e6dceb8e406e684340e10de40e5a48", null ], [ "operator<=", "a00027.html#a31697aa746ed96aa03373faf6d2a56bf", null ], [ "operator=", "a00027.html#a260dbe03a79907ee06b15b22f4757b53", null ], [ "operator==", "a00027.html#a801315de235f75a68367f998d928332a", null ], [ "operator>", "a00027.html#a9155b63bbbed74b28fb7364fdcc17d99", null ], [ "operator>=", "a00027.html#af96d51ef06328f74e7b24e95f3831d9a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00027.png000066400000000000000000000013661224474465600210740ustar00rootroot00000000000000‰PNG  IHDRÍPšÆPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2…IDATxíë–¤ „?ÊyÿgÞöJ$àº=öœ KK™ Ê™¿LÓ4u&IêC$ÅÄP#I1ñI5©2º¸X=S’Zˆ¢¦¹ï‡Õ$¥…ñu?v•´Gç‡ÍÙ^lïÖ·{‚ãý61ÏYÒsÀF%©‰jV,¤Jª\ö‘${}T&¸Œ,ÔÛ¨$µq§6ånN¼Û¨ÈòNs —j.£’TÇgÔd;]¨™¥š-¶{÷Ãj¼‹êjÚN;}ñ²§™šÔœ&I—ø·sSéÞbÍs³è»NûšVOÛ×9÷4ë4Ó÷riõ4ÛÆ5ÝF%©‰{N{§÷K’Ç’ÔÀgÕ,§úÔXK Ÿ!Iïâ«$ý 5’C$ÅÄKÍ4MS/ø|tƒ®Ô|}õ$§+5/1ÉéK @O•ˆ‰Q€˜µˆ‰Q€˜µˆ‰Q€˜µˆ‰Q€˜µˆ‰Q€˜µˆ‰Q€˜ø©Ú¤”R7 t‚¡ &†€˜x@Í·ÜäZ ¾B%_Ms…+5¯Á2š{ö>°Sæf~ libpqxx: pqxx::const_tuple_iterator Class Reference
pqxx::const_tuple_iterator Class Reference

Iterator for fields in a tuple. Use as tuple::const_iterator. More...

#include <tuple.hxx>

Inheritance diagram for pqxx::const_tuple_iterator:
pqxx::field pqxx::const_reverse_tuple_iterator

Public Types

typedef tuple::size_type size_type
typedef tuple::difference_type difference_type
typedef field reference
- Public Types inherited from pqxx::field
typedef size_t size_type

Public Member Functions

 const_tuple_iterator (const tuple &T, tuple::size_type C) throw ()
 const_tuple_iterator (const field &F) throw ()
Dereferencing operators
pointer operator-> () const
reference operator* () const
Manipulations
const_tuple_iterator operator++ (int)
const_tuple_iteratoroperator++ ()
const_tuple_iterator operator-- (int)
const_tuple_iteratoroperator-- ()
const_tuple_iteratoroperator+= (difference_type i)
const_tuple_iteratoroperator-= (difference_type i)
Comparisons
bool operator== (const const_tuple_iterator &i) const
bool operator!= (const const_tuple_iterator &i) const
bool operator< (const const_tuple_iterator &i) const
bool operator<= (const const_tuple_iterator &i) const
bool operator> (const const_tuple_iterator &i) const
bool operator>= (const const_tuple_iterator &i) const
- Public Member Functions inherited from pqxx::field
 field (const tuple &T, tuple_size_type C) throw ()
 Constructor.
template<>
bool to (const char *&Obj) const
 Specialization: to(const char *&).
bool operator== (const field &) const
 Byte-by-byte comparison of two fields (all nulls are considered equal)
bool operator!= (const field &rhs) const
 Byte-by-byte comparison (all nulls are considered equal)
const char * name () const
 Column name.
oid type () const
 Column type.
oid table () const
 What table did this column come from?
tuple_size_type num () const
tuple_size_type table_column () const
 What column number in its originating table did this column come from?
const char * c_str () const
 Read as plain C string.
template<typename T >
bool to (T &Obj) const
 Read value into Obj; or leave Obj untouched and return false if null.
template<typename T >
bool operator>> (T &Obj) const
 Read value into Obj; or leave Obj untouched and return false if null.
template<typename T >
bool to (T &Obj, const T &Default) const
 Read value into Obj; or use Default & return false if null.
template<typename T >
as (const T &Default) const
 Return value as object of given type, or Default if null.
template<typename T >
as () const
 Return value as object of given type, or throw exception if null.
bool is_null () const throw ()
size_type size () const throw ()

Arithmetic operators

const_tuple_iterator operator+ (difference_type) const
const_tuple_iterator operator- (difference_type) const
difference_type operator- (const_tuple_iterator) const
const_tuple_iterator operator+ (difference_type, const_tuple_iterator)

Additional Inherited Members

- Protected Member Functions inherited from pqxx::field
const resulthome () const throw ()
size_t idx () const throw ()
tuple_size_type col () const throw ()
- Protected Attributes inherited from pqxx::field
tuple_size_type m_col

Detailed Description

Iterator for fields in a tuple. Use as tuple::const_iterator.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::const_tuple_iterator::const_tuple_iterator ( const tuple T,
tuple::size_type  C 
) throw ()
pqxx::const_tuple_iterator::const_tuple_iterator ( const field F) throw ()

Member Function Documentation

bool pqxx::const_tuple_iterator::operator!= ( const const_tuple_iterator i) const
reference pqxx::const_tuple_iterator::operator* ( ) const
const_tuple_iterator pqxx::const_tuple_iterator::operator+ ( difference_type  o) const
pqxx::const_tuple_iterator pqxx::const_tuple_iterator::operator++ ( int  )
const_tuple_iterator& pqxx::const_tuple_iterator::operator++ ( )
const_tuple_iterator& pqxx::const_tuple_iterator::operator+= ( difference_type  i)
const_tuple_iterator pqxx::const_tuple_iterator::operator- ( difference_type  o) const
const_tuple_iterator::difference_type pqxx::const_tuple_iterator::operator- ( const_tuple_iterator  i) const

References pqxx::field::num().

pqxx::const_tuple_iterator pqxx::const_tuple_iterator::operator-- ( int  )
const_tuple_iterator& pqxx::const_tuple_iterator::operator-- ( )
const_tuple_iterator& pqxx::const_tuple_iterator::operator-= ( difference_type  i)
pointer pqxx::const_tuple_iterator::operator-> ( ) const
bool pqxx::const_tuple_iterator::operator< ( const const_tuple_iterator i) const
bool pqxx::const_tuple_iterator::operator<= ( const const_tuple_iterator i) const
bool pqxx::const_tuple_iterator::operator== ( const const_tuple_iterator i) const
bool pqxx::const_tuple_iterator::operator> ( const const_tuple_iterator i) const
bool pqxx::const_tuple_iterator::operator>= ( const const_tuple_iterator i) const

Friends And Related Function Documentation


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00028.js000066400000000000000000000034131224474465600207200ustar00rootroot00000000000000var a00028 = [ [ "difference_type", "a00028.html#adf1e8d933ff2f633c68a10261bdec228", null ], [ "reference", "a00028.html#a5c99036c804619585245e453cd3788b2", null ], [ "size_type", "a00028.html#a9829e1f6f8ba5f28ddbae08cddf183d6", null ], [ "const_tuple_iterator", "a00028.html#adbd6662e08d026f79b1df56fe5d3d8e4", null ], [ "const_tuple_iterator", "a00028.html#ab14a27f87b7d570b8340b484869a131e", null ], [ "operator!=", "a00028.html#a9403d1f1aaf668c2434a2db8eeca0375", null ], [ "operator*", "a00028.html#ad809f99f770cd093a241718327b08fad", null ], [ "operator+", "a00028.html#a433482a1750504705e650fa75eb37b66", null ], [ "operator++", "a00028.html#a39885713e209d972d4a02a33af90487e", null ], [ "operator++", "a00028.html#ad69f1affcdcd3ba6e25f8544e53db4c9", null ], [ "operator+=", "a00028.html#a71cc0a0b9010eb6d971631e32724922f", null ], [ "operator-", "a00028.html#a947f588862432793167ace50bb0157c1", null ], [ "operator-", "a00028.html#aa6ecbe2f97164809e39b5d40c6a79c05", null ], [ "operator--", "a00028.html#a03722072d600f9bb3c64f8d1040ab263", null ], [ "operator--", "a00028.html#a0cfc38e184025a70632c77cf9ddab854", null ], [ "operator-=", "a00028.html#a0a3867bded7fc4181f57d516ef72f15f", null ], [ "operator->", "a00028.html#a0a3aac40eb8627fc04b11e26c5a9311e", null ], [ "operator<", "a00028.html#a0d40e819e0f26072ee3cb0bc8c680242", null ], [ "operator<=", "a00028.html#a11fc7f6bebd2ea49e39a32ee263646f7", null ], [ "operator==", "a00028.html#ada9be67072933135310c77b27e0f3540", null ], [ "operator>", "a00028.html#a9597eed7de8833d1663e13f293723e76", null ], [ "operator>=", "a00028.html#a97a72d87b07205861e619b356dbf6a13", null ], [ "operator+", "a00028.html#af4effac1b54014c657d45b40baa24094", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00028.png000066400000000000000000000017221224474465600210710ustar00rootroot00000000000000‰PNG  IHDR͈s÷Ÿ„PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2aIDATxíÛrê0 E—·;ýÿO>¹ûš ¥ 1ÙĨЬÉâ•cFDIDN#I6å4’dSï¥ A!ý(n’ôk½•¦ Ü<Íôê—àæìƒ,îù×<^ÛÈ2Íî|-a©ºÊÛj(I÷èîÜáféé-#IºEB3>¦(°z¹À–¤[ôºsÓvÏ;7'=­,¬Oéigÿ-’ô9$õ5$ý¥œF’lÊi$ɦ&šcEoÐ7À0Šæû{$œ¡h&˜pÆ¢ñž`UN`SN`SN`SN`SN`SN`SN`SN`SN`SN`SN`SNðS…Â0" "§°)§°©WÒ$Ïͽ‰~ ? Ï ÍiÜ7ÓL‹ÉÜÌ÷A¾ËÜå[n³-lkëên°èXßLÏ,æi"Ÿ8Õk,N t®ü ¿Ê:ª ‹š;ÎgÎõoMáwUVm¥5—4—³}½†&•ÓÍü©i¶¹½v_LÓVQŸæ¼ÒŠ7^÷´,'½J¸ÔÏÎM§ ´%vznÖýh¥½ˆæ¬§íû”=-¯´¬ï¥rÖÓò>xx\ÍóY€S=ViÏô~€V¯ûw{=Írª‹ÆZ»h-žÕÿ–€O‘ÓØ”ÓØÔü÷Bƒà úFCÑ|}„3Í3ÎX4#É3`Sž›òÜØ”çÀ¦<76å¹°)Ï €MynlÊs`Sž›òÜØ”çÀ¦Þ•›cFDIDN#I6å4’dS7ÐIzVÍý‰þYû4§;\Ñ…eyú>ù#aŸo¹Í¶°;I&›v?ËJæéðºYn>³gR`i›´C3[Ь]÷ R{å· åW ®±<¬<•uTûl,*?Ù*7µëd”¼·¡–4]“\4MŒ]šËÙ_ѤÚÈiæÏ‘ýôë0ßf.h:•Ÿ”ÈhÚ*êÓ4•V¼½ê]vÔYnj‹ÜO§ÒšìÜtº@·~Ús“{?¾ú”oþásó ÍYOÛ*{Z^iU=îe²}go¥íi;ÇeOË[çáa5ÏgëJ»ãD’žÒ»ÞB³Ñü}JÒµÚGêÇŸp:jn$éãå4’dSN#I65ÑÄã(úïtRâˆåZIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00029.html000066400000000000000000000150671224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::conversion_error Class Reference
pqxx::conversion_error Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::conversion_error:
pqxx::pqxx_exception

Public Member Functions

 conversion_error (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::conversion_error::conversion_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00029.js000066400000000000000000000001431224474465600207160ustar00rootroot00000000000000var a00029 = [ [ "conversion_error", "a00029.html#aa26b38ec0b49d925597fb0924d34e5a2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00029.png000066400000000000000000000011301224474465600210630ustar00rootroot00000000000000‰PNG  IHDRŽPø½ePLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2çIDATxíír„ E—™}ÿG®¢hD£ÛºL'¯`ÒCøØ¿äœs?"KR/ Iò8’äéÓ8©<’t¨/àH’§')•Ã{é˜$îñ»NlkÌØL#Æ~ù2¶3œ)[¨¤Ýã¹ÍÜ7fÓ$É>ÆvV6¼¾ŸqWÇd›í͘Ò÷áŒ-Îd»³_ ·)ÈjÞé78fsmås÷ÊY›‹½s]çèÔ47OÖ|Û‹urC\¸%ÉÓsñ¯Á)Ûµ½C$™ç“8’t¡?áHÒ78’ä)p$ÉÓ€“sÎÝàzô£¾p®xúÂhzâé 'N€¯Àð8žÀSàx Oà)p<€§Àð8žÀÓ?ÅI)¥~DèEà)p<½çÏ9{­ÎÐ)½ñè׎çx',ͳ¨ÆÍê°‘m–9…¯† N ˜&Ø?¶92Úm¤YŸö:m–5h­RÕà,q{_ƒÓ~Ô[8óèév¯ÿäÕü ýgSòkœ]ÌYu–öÇ샭ìÌù(ïγÕqNV͹=Yg=f±ÚÈæd­áͬÍ2ܽÄîé38e o. €õZ€ï+p<€§ñÒK)¥^ôµØ0Ø^…ŒIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00030.html000066400000000000000000000562611224474465600212520ustar00rootroot00000000000000 libpqxx: pqxx::cursor_base Class Reference

Common definitions for cursor types. More...

#include <cursor.hxx>

Inheritance diagram for pqxx::cursor_base:
pqxx::internal::sql_cursor

Public Types

enum  accesspolicy { forward_only, random_access }
 Cursor access-pattern policy. More...
enum  updatepolicy { read_only, update }
 Cursor update policy. More...
enum  ownershippolicy { owned, loose }
 Cursor destruction policy. More...
typedef result::size_type size_type
typedef result::difference_type difference_type

Public Member Functions

const std::string & name () const throw ()
 Name of underlying SQL cursor.

Static Public Member Functions

Special movement distances
static difference_type all () throw ()
 Special value: read until end.
static difference_type next () throw ()
 Special value: read one row only.
static difference_type prior () throw ()
 Special value: read backwards, one row only.
static difference_type backward_all () throw ()
 Special value: read backwards from current position back to origin.

Protected Member Functions

 cursor_base (connection_base &, const std::string &Name, bool embellish_name=true)

Protected Attributes

const std::string m_name

Detailed Description

Common definitions for cursor types.

In C++ terms, fetches are always done in pre-increment or pre-decrement fashion–i.e. the result does not include the row the cursor is on at the beginning of the fetch, and the cursor ends up being positioned on the last row in the result.

There are singular positions akin to end() at both the beginning and the end of the cursor's range of movement, although these fit in so naturally with the semantics that one rarely notices them. The cursor begins at the first of these, but any fetch in the forward direction will move the cursor off this position and onto the first row before returning anything.

Member Typedef Documentation

Member Enumeration Documentation

Cursor access-pattern policy.

Allowing a cursor to move forward only can result in better performance, so use this access policy whenever possible.

Enumerator:
forward_only 

Cursor can move forward only.

random_access 

Cursor can move back and forth.

Cursor destruction policy.

The normal thing to do is to make a cursor object the owner of the SQL cursor it represents. There may be cases, however, where a cursor needs to persist beyond the end of the current transaction (and thus also beyond the lifetime of the cursor object that created it!), where it can be "adopted" into a new cursor object. See the basic_cursor documentation for an explanation of cursor adoption.

If a cursor is created with "loose" ownership policy, the object representing the underlying SQL cursor will not take the latter with it when its own lifetime ends, nor will its originating transaction.

Warning
Use this feature with care and moderation. Only one cursor object should be responsible for any one underlying SQL cursor at any given time.
Don't "leak" cursors! As long as any "loose" cursor exists, any attempts to deactivate or reactivate the connection, implicitly or explicitly, are quietly ignored.
Enumerator:
owned 

Destroy SQL cursor when cursor object is closed at end of transaction.

loose 

Leave SQL cursor in existence after close of object and transaction.

Cursor update policy.

Warning
Not all PostgreSQL versions support updatable cursors.
Enumerator:
read_only 

Cursor can be used to read data but not to write.

update 

Cursor can be used to update data as well as read it.

Constructor & Destructor Documentation

pqxx::cursor_base::cursor_base ( connection_base context,
const std::string &  Name,
bool  embellish_name = true 
)
protected

References cursor_base().

Referenced by cursor_base().

Member Function Documentation

cursor_base::difference_type pqxx::cursor_base::all ( ) throw ()
static

Special value: read until end.

Returns
Maximum value for result::difference_type, so the cursor will attempt to read the largest possible result set.

Referenced by pqxx::internal::obtain_stateless_cursor_size().

cursor_base::difference_type pqxx::cursor_base::backward_all ( ) throw ()
static

Special value: read backwards from current position back to origin.

Returns
Minimum value for result::difference_type

Referenced by pqxx::stateless_cursor< up, op >::stateless_cursor().

const std::string& pqxx::cursor_base::name ( ) const throw ()

Name of underlying SQL cursor.

Returns
Name of SQL cursor, which may differ from original given name.
Warning
Don't use this to access the SQL cursor directly without going through the provided wrapper classes!

Referenced by pqxx::internal::sql_cursor::sql_cursor().

static difference_type pqxx::cursor_base::next ( ) throw ()
static

Special value: read one row only.

Returns
Unsurprisingly, 1
static difference_type pqxx::cursor_base::prior ( ) throw ()
static

Special value: read backwards, one row only.

Returns
Unsurprisingly, -1

Member Data Documentation

const std::string pqxx::cursor_base::m_name
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00030.js000066400000000000000000000030741224474465600207140ustar00rootroot00000000000000var a00030 = [ [ "difference_type", "a00030.html#a746c725327e1dfd598708bfeb8834992", null ], [ "size_type", "a00030.html#a732bb16c01dc3266d424267252d4f1b0", null ], [ "accesspolicy", "a00030.html#a591ac7d2302288890c04e6159eb6d30e", [ [ "forward_only", "a00030.html#a591ac7d2302288890c04e6159eb6d30eaf440221f717464c87f043899cc117cbf", null ], [ "random_access", "a00030.html#a591ac7d2302288890c04e6159eb6d30ea7f6c1ed7719885433353a78946b2c5f3", null ] ] ], [ "ownershippolicy", "a00030.html#a8d5f8214ede2ab27dd588defc2847330", [ [ "owned", "a00030.html#a8d5f8214ede2ab27dd588defc2847330a3ace6a7a5ca4ec3b486f2f35fd2420b0", null ], [ "loose", "a00030.html#a8d5f8214ede2ab27dd588defc2847330a4c37408c49492bfe9f012812226dd1fd", null ] ] ], [ "updatepolicy", "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212", [ [ "read_only", "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212a8122c0c4a5eb9c9dbf27ab40a2686eb0", null ], [ "update", "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212a12fa229ee3e760f1ca86d66304554b63", null ] ] ], [ "cursor_base", "a00030.html#a92ebe0bfff015fc1d85ab30d1ac97ef4", null ], [ "all", "a00030.html#a56b530ba6b18f3fcdb5b93a0087922c9", null ], [ "backward_all", "a00030.html#ae1e1a28e596a78fa8ed8c4eeccbe6369", null ], [ "name", "a00030.html#ab46d430e0ecfa545ff3764f867654caf", null ], [ "next", "a00030.html#a2a10af042c1ece1f5faf55479ada0319", null ], [ "prior", "a00030.html#aed642c9d80cddf181853d36c6e8ccb93", null ], [ "m_name", "a00030.html#a947b286d508fad4a1823f8b13a5ccef3", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00030.png000066400000000000000000000011731224474465600210620ustar00rootroot00000000000000‰PNG  IHDR–PÌn|yPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2 IDATxíërë —™¼ÿ#_’ &jê“Ò©:^ßb#ÀýKJ)Í `6B ÀKhxùŒÖ—Çø}ZKÓÖ¶~D7vˆõë²?î,çGÜ=°„Zì@ÃHkg?ö1!Õ‡¹Øhó¦IE¢Ã’ô¨Çµ¿ÓNL]±ã›:Õý¶h¸TkohmÿVa÷€¯VUûS­zÏ~¡­@çÚê,y³PŒÈ‰Ö¥këd'>r–æjËNì¤j7,@ËI|÷»ðþ¯Ö¶¬EèòûªðS„€—Ðð²~èRJi6®â0sjÝnSzÍ©µXÍè5©VìD?¡à%´¼„€—ÐðZ^B ÀKhx -/¡à%´¼„€—? •sÎqË9çk KÒl„–$y -IòâÕJ;I:Ðmö¤–¯Wë³ZIi뾜Ÿ7&årÝÒó´½1ýÖ‹)ê3›Õ*Q;[®Òð .ZÛÀ÷¸$uû°S½URï°Z%ªôoÞªU¥7+Õj’JŒ™¸gIêélû2½©µþÓï³[O¢C˾ҪŠÛ¯Ö!½¹4]ÆZMýO×ÖÙ’LâQëÕÚ²5jíÄ㲬vb5‰6x¸®vœº Õ$¾ÿ‘¤ÞÊö­m˜ $ICf¯–$ÍChI’—Ð’$/‹VÎ9OÇ?“ùˆ±ÿ;4IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00031.html000066400000000000000000000251201224474465600212410ustar00rootroot00000000000000 libpqxx: pqxx::data_exception Class Reference
pqxx::data_exception Class Reference

Error in data provided to SQL statement. More...

#include <except.hxx>

Inheritance diagram for pqxx::data_exception:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 data_exception (const std::string &err)
 data_exception (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Error in data provided to SQL statement.

Constructor & Destructor Documentation

pqxx::data_exception::data_exception ( const std::string &  err)
explicit
pqxx::data_exception::data_exception ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00031.js000066400000000000000000000002621224474465600207110ustar00rootroot00000000000000var a00031 = [ [ "data_exception", "a00031.html#a0e28cd5da6e6cd6fba5ade32b353e51a", null ], [ "data_exception", "a00031.html#a987ace354d0497c66d468ce18dc48487", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00031.png000066400000000000000000000016421224474465600210640ustar00rootroot00000000000000‰PNG  IHDRÀzð«PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT21IDATxíᮃ …O‰ïÿÈW° ¨Óm]nºp)àGiÝ_„‚©HÒPNàß%XH²ÖW Hr§B ”8g®KG­;1/ÏùK›ç,ͺbéÇ'5Ö¬ĹîÊȬNX «FH]ÔXãƒvF®¯˜³aKãÍšÜ[ –_K°ŽÝ"Ø»ùĬ޽ ï\qB .º‰Çæ -7'qÐõÁ Øóʇ¹"¸Œõoá sOÌ$9ÒÉü§1ÚtH’d­䉮¤‰œÀ A!X iS™L“5‚9Á `Œ`Oà¹àNàNàTq'p'p'øo!„`*’4”8Á{DJ/’|E êw~„@Ò)çºt¶wI|JuqêåaóIöt l¼0²+YÍ€ê“äHW| 7Ön¨üÞCú"Áìì>Áj É¡^$¨Þ£Ínåòù_ƒ}$v r\¾í¹ œ±°å°›$tíîg;IË ü¿Ñ ~ˆ „,4€©Ì ¦ÉÁœ`0F°'ð\p'p'pª888ü7‚B0IÊ œàmB’wõËB‰;Ïuéè·mVM yÖܬ• Éâë&Ž‹Þ|éEåª ÉŽ|ß‘ÞSï³öVk‡ }_Ôm‚tÌ–`ù}„@»]Ïèù ´ ÔMw"ñ$ÞãƒA.ä£çB©š"ÉJÇ·p)ß} ÞF#pœq$9Ò/û€$¿!'p‚DB–€GšÀTæÓd`N0#Øx.888UœÀ œÀ œÀ þˆˆ© `('p‚W ¶™7¨ç%ýUß$€½ Á܉½%?sG/Ly»ä¯ªôW%MÞLk³î—ó^µëq2½’ÞQ§è¹º@½UãƒvJ®µ¹¾Ñ½9°·cîAüŒªžþ´·jîËÕŠáö¡Y-Úm|F î»‰—â ­¸} r¡8½ÄrÝ×r¡Ê¥ñ-ÜÏvèl·‡ù/ú0œè2˜È œ ˆDD õ¸O%ºRIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00032.html000066400000000000000000001101471224474465600212460ustar00rootroot00000000000000 libpqxx: pqxx::dbtransaction Class Reference

#include <dbtransaction.hxx>

Inheritance diagram for pqxx::dbtransaction:
pqxx::transaction_base pqxx::internal::namedclass pqxx::basic_robusttransaction pqxx::basic_transaction pqxx::subtransaction pqxx::robusttransaction< ISOLATIONLEVEL > pqxx::transaction< ISOLATIONLEVEL, READWRITE >

Public Member Functions

virtual ~dbtransaction ()
- Public Member Functions inherited from pqxx::transaction_base
virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Protected Member Functions

 dbtransaction (connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)
 dbtransaction (connection_base &, bool direct=true, readwrite_policy rw=read_write)
void start_backend_transaction ()
 Start a transaction on the backend and set desired isolation level.
virtual void do_begin ()
 Sensible default implemented here: begin backend transaction.
virtual result do_exec (const char Query[])
 Sensible default implemented here: perform query.
virtual void do_commit ()=0
 To be implemented by derived class: commit backend transaction.
virtual void do_abort ()
 Sensible default implemented here: abort backend transaction.
- Protected Member Functions inherited from pqxx::transaction_base
 transaction_base (connection_base &c, bool direct=true)
 Create a transaction (to be called by implementation classes only)
void Begin ()
 Begin transaction (to be called by implementing class)
void End () throw ()
 End transaction. To be called by implementing class' destructor.
result DirectExec (const char C[], int Retries=0)
 Execute query on connection directly.
void reactivation_avoidance_clear () throw ()
 Forget about any reactivation-blocking resources we tried to allocate.

Static Protected Member Functions

static std::string fullname (const std::string &ttype, const std::string &isolation)

Additional Inherited Members

- Public Types inherited from pqxx::transaction_base
typedef isolation_traits
< read_committed
isolation_tag
 If nothing else is known, our isolation level is at least read_committed.
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Constructor & Destructor Documentation

pqxx::dbtransaction::~dbtransaction ( )
virtual
pqxx::dbtransaction::dbtransaction ( connection_base C,
const std::string &  IsolationString,
readwrite_policy  rw = read_write 
)
protected
pqxx::dbtransaction::dbtransaction ( connection_base C,
bool  direct = true,
readwrite_policy  rw = read_write 
)
explicitprotected

Member Function Documentation

void pqxx::dbtransaction::do_abort ( )
protectedvirtual

Sensible default implemented here: abort backend transaction.

Default implementation does two things:

  1. Clears the "connection reactivation avoidance counter"
  2. Executes a ROLLBACK statement

Implements pqxx::transaction_base.

References pqxx::internal::sql_rollback_work.

void pqxx::dbtransaction::do_begin ( )
protectedvirtual

Sensible default implemented here: begin backend transaction.

Implements pqxx::transaction_base.

virtual void pqxx::dbtransaction::do_commit ( )
protectedpure virtual

To be implemented by derived class: commit backend transaction.

Implements pqxx::transaction_base.

pqxx::result pqxx::dbtransaction::do_exec ( const char  Query[])
protectedvirtual

Sensible default implemented here: perform query.

Implements pqxx::transaction_base.

string pqxx::dbtransaction::fullname ( const std::string &  ttype,
const std::string &  isolation 
)
staticprotected
void pqxx::dbtransaction::start_backend_transaction ( )
protected

Start a transaction on the backend and set desired isolation level.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00032.js000066400000000000000000000013241224474465600207120ustar00rootroot00000000000000var a00032 = [ [ "~dbtransaction", "a00032.html#ace1dc32cc5ab0d51481518e659675b79", null ], [ "dbtransaction", "a00032.html#a49d5c0050ec02eba8440b1bdb20a1539", null ], [ "dbtransaction", "a00032.html#a12e833c152ed73fabe7c4c30020140e2", null ], [ "do_abort", "a00032.html#a38c5eb7ae19ad150f89e951261873aba", null ], [ "do_begin", "a00032.html#a0b4da4b562a51ec0f03a9abf75acd14c", null ], [ "do_commit", "a00032.html#ae434c2ec625a55ec8c6c4f57d1cb0a54", null ], [ "do_exec", "a00032.html#a9b3e988901d4bec05d414543314a945b", null ], [ "fullname", "a00032.html#a4e35ec39c80f088ebe239b15a16488de", null ], [ "start_backend_transaction", "a00032.html#a601f599d9c5cca86ce84a77bdac941db", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00032.png000066400000000000000000000076061224474465600210730ustar00rootroot00000000000000‰PNG  IHDRÂø<¯ÉPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÝëVâ\ÐMe-ßÿ‘?äÇ1į¶¹éé¢ÿBÁ¸éôÓã>†‚‚ueÿÓí×·PP°ž&² †‚-j"›`(Øž©‰\¶  `5S¹lÛCÁºÞ#üÓ Ø]Žw[÷¾ìŸ{}Îî§>G# ëÚGxÅYö¸Húž³ßû™¿¿†‚•='™»Ýaû¾s˜‡dgå~{¼°{?¿ÿuœ¹û—ûÞ×ïœ×Ÿîß“z<Þo>>çýþëùÃéç$ VöÝ~Hæa6¾Çë¸sJîõüõø”Àù}·ë/÷¿'ôý‘û¬_/ ®ïs>9~Î,†‚‚õ|{‡Ÿfè9г™xLø5pÇY{ž¹³Ù{ºý¼þpÃ}²/Çççܯ»7ÁPð }‡ïuJÚyFž‚|Iølf¾ÿןïÛOäÃL¾ûF¸ž>ÏÞ˲묽®ûø¾M0ü"Ó3fÔuÆî#uJê1‰ç„ŸfîlÖžGíå¾›õóo„»ç#||ÎuÝéy³ç|ëv‚‚‚ÕLϘQçay˜”‡Ùx˜‘ÇD]fæi–^£;›Íç$üF¸&v<Æ×}ÿ n„¡`]ïþößÞsrßwÞ“|HöM²Ž Ïß{D/³ó°ÝŸßÿ›%ñxÃûóæÉ?}3ž{zÎuÝ!ØûûŸ“à4ÂP°®}„¿¿ÃÉ:ü„­¾m„¡`eÏèðÃÌ=?i®¿…‚‚•}w‡¿Gøt¼û¥ n„¡àüÖ„5ÁPð»5‘M0lÏÔD.ÛNPP°š©‰\¶m„¡`]ïn"la(Xש§ÓÏåt?;†‚‚‚{oPPP°%0lÍÛ[3 ÓCAÁÖìÜ CAÁ¶4ÂPP°A 0lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# LÓ4Õ4MÓWAAÁj¦$©$ùšF ÖÕ'É0¬«N’a(XW#œ$ 4ÂP°®F8Ih„¡`]«Fx—$ÿd¿òO‹ÿý!Iòma(X×v"œ$4ÂPð¿ôÜï²;$lÿû²sMÝîýhå´7_}¾z^ôþ€Ë¹óºû÷øxs’ÁÍ0lK# ÔCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPP°90lN# ›ÓCAÁæ4ÂPPðÈn·ÛÕn·Û}¬¦ ´pP°®v",ÐÂAÁºÚ‰°@ ëj'Â-¬« ´pP°®êÄýŸrúkþýºÞ?©†‚um?°‚F ÖõS¸³;¼Õþ÷egþöïçÏ«v‡_‡ãê»[f›÷_‡7ëàéa(X×Eø8c±³óèuvü£N»—+³×íæÃ:x¾F ÖõsSø>lçß.Ïþ°Û³7çæ)¾¿ žª†‚u½v„wûŸëáù®Ù´m„¡àÿj•_‚wy÷ÇþÍ#¹†‚ÿ«‹ð5¶ó|~ûÓd¾®záGqm„¡àÿêç¦ð%¹·>Gï´w8}Jò1î‡ ç5—s§o‚ãþù †‚ÿŸ‹ð/kþF ÖÕÃ0¬«†a(XW;há `]íDX …ƒ‚uµa ÖÕN„Z8(XW;há `]»ÝnW»Ýn÷UPPPpï ¶¤†‚‚­y{k†¡ `ca((Øš}‚›a((Ø–F 6¨†‚‚Íi„¡ `sa((ØœF 6§†‚‚Íi„¡ `sa((ØœF 6§†‚‚Íi„¡`ooooõöööVoooo«‚¯jé`LkcZCX¤¥ƒ1­!Œi a‘–Æ´†0¦5„EZ:Ó˜Öié`LkcZCX¤¥ƒ1­!Œi a‘–Æ´†0¦5„EZ:Ó˜Öié`LkcZCX¤¥ƒ1­!Œi a‘–Æ´†0¦5„EZ:Ó˜Öié`LkcZCX¤¥ƒ1­!Œi a‘–Æ´†0æµk8MÓô²Þ¦iš^Uk8MÓ4¦5œ¦icJ’J’¯™·_’T’|Mk˜$cá$Y¤í—$cZÃ$Ó'É"m¿$Ó&ɘF8Iiû%ɘÖ0IÆ4ÂI²HÛ/IÆ´†I2æ'#¼K’;Î}vÃ_ïIr}}iq’|Å‹´ß?UõEJ–$7^9§2¼jé^&ÂIòGßá$yŽŽp’Üx‘’%Éßá$ùißá]v‡±ÿ}Ù™}´ëÙëŃãñuÕùÔé†ëºÃ…õ«î~º~}ƒóº$ù?Õ~ßPÕW)Y’ÜøéRË›~;.yÙÒ=)ÂÇyø8ÙåÃë²—]n^ó/°ÓªÏnx´êfmv¹¾fë’ä[üX„¿¡ª/R²$¹ñãþ¤–>ü«–îYSøþCœÏ/Ÿv{?èÍ÷àýæCwÞ_¾}æ£B'É·ø¹)<^Õ)Y’Üøù)üi-ÿÐ}/WºU#¼Ûÿœ¯|!Â77œž=ûz¼¼ßìûïÿá¿VõEJ–$7^,—ê=ªÁ‹•î"|ù@—òáÃÝ]ÿ,ÂwEúÓå_=…VõEJ–$7VðÇZ>j»W-Ý“"|-Êü îüI®—³ËÍkþaçåš=/ÙÍ^ƒþ¨ü¿ ÂßPÕ)Y’ÜøñRË›~{©nK’Ǿy _êr[ ó‡;Ÿ=ž¹æxzÖm§SóçŸvzöìA×ÇÜ<ü¼xö´­Náñª¾HÉ’äÆÏOá¿Öò¦ßNK^µtÏŠð£Ý$ù~.¿·ª?áßWË—‰ðþ»ëý'I6b ~õª6ÂI2¦S8IéN’1p’ŒùÖ'ÉÿÇO·_’ü6­a’Œi„“d‘¶_’Œi “dL#œ$‹´ý’dLk˜$cá$Y¤í—$cZÃ$Ó'É"m¿$Ó&ɘ}„§išjš¦é‹fí7MÓTÓ4M_ÔNÓ4×õ‹µ†P°‚¶Œi ¡àç½½µÿ`Dk+hûÁ˜Ö ~Þ¾ûÚ0 5„‚´ý`Lk«hóÁ˜Ö VÐöƒ1­!¬ ícZC(XAÛÆ´†P°‚¶Œi ¡`m?ÓBÁ Ú~0¦5„‚´ý`Lk+hûÁ˜Ö VÐöƒ1­!¬ ícZC(XAÛÆ´†P°‚¶Œi ¡`m?ÓBÁ Ú~0¦5„‚´ý`Lk+hûÁ˜Ö VÐöƒ1­!¬ ícZC(XAÛÆ´†P°‚¶Œi ¡`m?ÓBÁ Ú~0¦5„‚´ý`Lk+hûÁ˜Ö VÐöƒ1­!üfÓ4M/ëmš¦éUµ†Ó4Mc `À”$•$_3p’T’|M# £Ú~I²@#œ$caÕöK’á$Óè¶_’,Ð'ɘFFµý’dF8IÆ4Â0ê»Úo—$wöçN’>[ü~q·ÿ9œv®w?׃ëšëãOkfçoN$É¿ør„·\ŠÓéËõë³æ>¹,¾þ×Û’\_0Œz¥'Évî•ëÎñàÜ•ל÷æ+ôóKE8IþèçKqwßõ]îã;ÿÛn$ɽFFýµýÞ¿?ßµ×ÝrýÊÿOÞ|¥ß¯ºü¾nÎãvÝãïƒkþ¹oçkæ­usÏmóFøïÕÚt)þáó•F~Üß#|ü8´Uv¹¯ŸÌþ'?_u³6»\_³u—¿™"úöÚ~ßÔ·b“$7DøïÕÚj)Føö†›¿û³ÏJÛèO¦ð}3Ý6÷ÝWïíæö¿ôÁåv÷˜ù›ÍÚø«};{öq¸çÛùMŽ'nûö³?šÂ­ÖvKq:ÿð†Ù{ÿÍ_ÿˆó©»Ò6Â0ê9¾ô×õ¿òÒ×~¼i—}{“¢»î¿ëÛK‹<ìÛcoÝžSÇýyôü5ÄË#¼ÅRÜ}ÝÆô>Â7öÑãΧ†Qÿáû¯ð¿Fø®ÿtùk£çqO~˜:ßÓ·ƒSøcµ¶[ŠºýÃgo÷ñ}E¸S¾Íß#|mÄùPyÔ•ó¥Énözô=ú°ogÿÝóž¸ÝyØ·÷;úv~ß]£}à‡þ{µ¶ZŠÏ#<ÅŸGxVÚFF}2…/½xÛ”óÖ:öë|éyáé¶ËªÓ¥ësŽ‹O8ß8oõ».Ú_ libpqxx: pqxx::internal::deref_ptr< T > Struct Template Reference
pqxx::internal::deref_ptr< T > Struct Template Reference

#include <util.hxx>

Public Member Functions

operator() (T *i) const

Member Function Documentation

template<typename T >
T pqxx::internal::deref_ptr< T >::operator() ( T *  i) const

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00033.js000066400000000000000000000001351224474465600207120ustar00rootroot00000000000000var a00033 = [ [ "operator()", "a00033.html#a9709f1dbe1bc7599e96dd16b22e776bd", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00034.html000066400000000000000000000117151224474465600212510ustar00rootroot00000000000000 libpqxx: pqxx::internal::dereference< ITER > Struct Template Reference
pqxx::internal::dereference< ITER > Struct Template Reference

Functor: dereference iterator. More...

#include <util.hxx>

Public Member Functions

ITER::value_type operator() (ITER i) const

Detailed Description

template<typename ITER>
struct pqxx::internal::dereference< ITER >

Functor: dereference iterator.

Member Function Documentation

template<typename ITER >
ITER::value_type pqxx::internal::dereference< ITER >::operator() ( ITER  i) const

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00034.js000066400000000000000000000001351224474465600207130ustar00rootroot00000000000000var a00034 = [ [ "operator()", "a00034.html#a4eb51db87ff14a4edf9787b5117ddd24", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00035.html000066400000000000000000000265201224474465600212520ustar00rootroot00000000000000 libpqxx: pqxx::disk_full Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::disk_full:
pqxx::insufficient_resources pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 disk_full (const std::string &err)
 disk_full (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::insufficient_resources
 insufficient_resources (const std::string &err)
 insufficient_resources (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::disk_full::disk_full ( const std::string &  err)
explicit
pqxx::disk_full::disk_full ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00035.js000066400000000000000000000002501224474465600207120ustar00rootroot00000000000000var a00035 = [ [ "disk_full", "a00035.html#ab76e2e34539d0dec43ab1479a4847a86", null ], [ "disk_full", "a00035.html#ad5b1a57e3e37bb6df5d7605f14e4c9be", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00035.png000066400000000000000000000025261224474465600210720ustar00rootroot00000000000000‰PNG  IHDR¨øO]qPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2åIDATxíív« ‡áœ¼ÿ#_51¢Ñ|´›6Ün£ˆÓ…¥©µÖ ª~>)ªIŠªFò«¢e*ªùmQÕ§¸'Z,ÓTÃõZi¦Ð=>Ï!ïó˜ñv~c¬OOM›ê.wEÏß™¦´xSŽº›x­š›[Ѷ4mª{Üèv¢ùúL÷Üqn»´oÞÙùT÷x§èøÛŠžÛÞ)z»¶º› .Í7m6á^2Ýï^þ‚ùö`~'¢i=à›YIÂkÛ·–þΉ÷ [õˆWÇ¿GtJ˜»g⇈ª> XTõcHQÕHRT5’A´ÖZ; œ@ô"z:ubÚ‹èàÙ‡i7¢™õ±¤(@$) IŠD’¢‘¤(@$) IŠD’¢‘¤(@$) IŠDò·Ek­µ¨ªŸOŠªF’¢ª‘¼E´”km*ªßå¢kµß-—˜ ×keQ*ÓÓåz ê™ña‰·ê³|MôúýQUËM™Ù44uÕWøbDÛï·A]-öžùç‰+¼/zîP}‰ï‹®tÚn‹KùV4Cöèm2íŠÎ©õÓKõMhÇ?an¸äÜÒ¡ú"_^úØSRõ>)ªÉ[þ׫F“¢ª‘¤¨j$ƒh­µv@8'€èEôtêÄ´ÑÁ³ÓnD3ëbIQ€HR ’ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’ˆäo‹ÖZkPU?ŸU$EU#y›hQ ä?-–I`¸^+­ÔÒÛŠ–yÔp;_šÕgxQtúÔù[Kë0Ö&æËªAõ^è¬rÑYî\;÷îˆn^Ú¡¢— mEÇßoжkÝŽØ‹èõþS¢Í.ÜI¦{ôG#zõs ïgýõ²9,TñúÒ?uNFŸ¢o’è¥#Hõˆÿ4¢ª¿DŠªF’¢ª‘ ¢µÖÚáœz ÑÓ©Ó^DÏ>L»ͬˆ%E"IQ€HR ’ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’¿-Zk­=@Uý|RT5’UäYÑ¢ºC:–î›Goª¾À7#:Z<0‰¢2M9†g®4Ÿ×vœ)Óè©ol¿v\jçp·Ñ^æë2Ù¶¿¶=E·¥h[šÛºe®-Oí>i‡mg¹iZÞo"ºýHóçlg=½¸Ý޾¥™fýòë¢íÒˆŽ¿CÑsçÑ,×iÚaÇ¢«µÙŠÞYúmí ¢±ßFtUÛÝ£Gɤ¥-ö胥_¿³‘½·G²~;k3n‹›¬ovÑœ¬ŸOâuÓQÖ‡Ÿ|ªqü„è”M`U_¦¿ˆª~2)ªIŠªF2ˆÖZk„sè^DO§NL{<û0íF4³ –ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’ˆ$E"IQ€Hþ¶h)¥ôàóIQ€HR ’7ˆ^ç\O>¤î΀ǼGt·Þ>¼_t?½0žks¥u8ŸwããÔ±Šîز4¾[ôú•«RU)ДuPt ÓEªÝz7M×§Š^–þ3DÛE¾éþí¥oöâN2ÝîÑfþf~1ë—ßdýæPmsàY¾²ô»‡9À;ù Ña“Œ?€¯óßFàWHQ€HR ’ñÜ.¥”Ïçä†fäÓ†ÞIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00036.html000066400000000000000000000230651224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::errorhandler Class Reference
pqxx::errorhandler Class Reference

Base class for error-handler callbacks. More...

#include <errorhandler.hxx>

Inheritance diagram for pqxx::errorhandler:
pqxx::quiet_errorhandler

Public Member Functions

 errorhandler (connection_base &)
virtual ~errorhandler ()
virtual bool operator() (const char msg[])=0 throw ()
 Define in subclass: receive an error or warning message from the database.

Friends

class internal::gate::errorhandler_connection_base

Detailed Description

Base class for error-handler callbacks.

To receive errors and warnings from a connection, subclass this with your own error-handler functor, and instantiate it for the connection. Destroying the handler un-registers it.

A connection can have multiple error handlers at the same time. When the database connection emits an error or warning message, it passes the message to each error handler, starting with the most recently registered one and progressing towards the oldest one. However an error handler may also instruct the connection not to pass the message to further handlers by returning "false."

Constructor & Destructor Documentation

pqxx::errorhandler::errorhandler ( connection_base conn)
explicit

References errorhandler().

Referenced by errorhandler().

pqxx::errorhandler::~errorhandler ( )
virtual

Member Function Documentation

virtual bool pqxx::errorhandler::operator() ( const char  msg[]) throw ()
pure virtual

Define in subclass: receive an error or warning message from the database.

Returns
Whether the same error message should also be passed to the remaining, older errorhandlers.

Implemented in pqxx::quiet_errorhandler.

Friends And Related Function Documentation

friend class internal::gate::errorhandler_connection_base
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00036.js000066400000000000000000000005531224474465600207210ustar00rootroot00000000000000var a00036 = [ [ "errorhandler", "a00036.html#a4627d71dc5156998ab1a8705fe5db974", null ], [ "~errorhandler", "a00036.html#a102761e1ec70d1f2d339d250bcdc799c", null ], [ "operator()", "a00036.html#a31238a2ce8999c76725a6d045dcc942f", null ], [ "internal::gate::errorhandler_connection_base", "a00036.html#a08b329d18887eeb882ff0c80b8ae74ba", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00036.png000066400000000000000000000011671224474465600210730ustar00rootroot00000000000000‰PNG  IHDR”PÈ›¬DPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÛ®ã E©ÿÿÉ“ åVH}NZ‰™qÕ4o–0N_ !„ÕDXK`‘CXô¨©å°,÷wAm#²¿4ž?êõö·É3ÿ¼”’²ßj§Ó Îè5œÇjßä_ææ’›ò‹ÓK.@¯ ÚÞ¸qÉÆýCh,ò­›Ðê×PÇ¿Á¨sÎ+T ÐËÕT­9ËWP³[“ ÐËt¦ÝR¾ÁÝ.ߤûúÊ—2P•/-Îõ  ×eùÞm3À7äPý?ÈwäP­ B‹ àCz¬¦¡©V„Ú˜Ö£ZÊ»À&‡°È¡,r(‹ À"‡°È¡,r(‹ À"‡°È¡,r(‹þu¨cüŒ1Æø%i-9”$YäP’dѯ Âà—$M5¶±›;õe¨ p„·kþQÛíãÇSò {ü¸ä )á˜P‚gÞÓót(KUf)­:㇙‚FߪÂ+›qú³ libpqxx: pqxx::internal::Escaper< IT > Class Template Reference
pqxx::internal::Escaper< IT > Class Template Reference

#include <tablewriter.hxx>

Public Member Functions

 Escaper (const std::string &null)
std::string operator() (IT i) const

Constructor & Destructor Documentation

template<typename IT >
pqxx::internal::Escaper< IT >::Escaper ( const std::string &  null)
explicit

Member Function Documentation

template<typename IT >
std::string pqxx::internal::Escaper< IT >::operator() ( IT  i) const

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00037.js000066400000000000000000000002471224474465600207220ustar00rootroot00000000000000var a00037 = [ [ "Escaper", "a00037.html#ae038cf7f50b925680be254201b2cdeaa", null ], [ "operator()", "a00037.html#aa93a0d1009d7900066cdb3893b4a25b2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00038.html000066400000000000000000000206761224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::failure Class Reference

Run-time failure encountered by libpqxx, similar to std::runtime_error. More...

#include <except.hxx>

Inheritance diagram for pqxx::failure:
pqxx::pqxx_exception pqxx::broken_connection pqxx::in_doubt_error pqxx::sql_error pqxx::too_many_connections pqxx::data_exception pqxx::feature_not_supported pqxx::insufficient_privilege pqxx::insufficient_resources pqxx::integrity_constraint_violation pqxx::invalid_cursor_name pqxx::invalid_cursor_state pqxx::invalid_sql_statement_name pqxx::plpgsql_error pqxx::syntax_error

Public Member Functions

 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Run-time failure encountered by libpqxx, similar to std::runtime_error.

Constructor & Destructor Documentation

pqxx::failure::failure ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00038.js000066400000000000000000000001321224474465600207140ustar00rootroot00000000000000var a00038 = [ [ "failure", "a00038.html#a0e7e8831fed026375c499ee03f501f50", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00038.png000066400000000000000000000174721224474465600211030ustar00rootroot00000000000000‰PNG  IHDRN¸tÂ]PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÉIDATxíÝév¢J…Ñía-ßÿ‘oâ™*Ñ{ÒlE&C¨¯ë/¼ iš¦W0%ÉkhNPð(Í †4'((Òœ  `Hs‚‚‚!«Êi³[’ä'š<ÊÚrJ’jNPð(ßÉi“ÍnÀ¿½žVf|²ûýóqúy?óþ¶?ã}}÷i¶-I¾¨9AÁ£|+§} »ŸM®–{»gsÏbóìm“Ì—Ù¶$ùšæò½Ùér¸_¿²û¸c¿í°ý✥%É×4'(x”¿Ìéýç2§ý¶æOíÇ9-FÿWvÏ&¤óæ«Iª9AÁúVNç?Ÿ{Žcþ“ÝçÎŽoË©¬9AÁÓúÞìtÊdÙË1ƒ;»Ï9§¥yr‡Êvo‡ÌÛš<‰ïåtkõ«»“äžïŸ$Wš<Êäô6Ù¼ÿ$É=Í žZg'((òœ’dÅšð’ä5¼ü]ÁËèÀK’kNð,:ð’dÅš<‹¼$Y±æÏ¢/IV¬9Á³}D›$Yº±)I¾çí"ß½Î?x7«‡ ¿rïIÎË#rúý»H²XšS’\û‡9%ÉwüåÀkNIòsÿÛœ6Ùìþºo¯§•Ù_ü´u7ŸìÖËñÃ~ÿñðã5fûÎ>¿½¿Ü½H’ÜðÓ÷é^ßÄâw›r¸…Å­ö.7$É×üZNŸÜælïüü¥»H²Xþ¿9íëØý!³ÉÕrŠg>²fÃì°ýüßÞìÀÅ%.öÝ80I>ðãœ>¹Ã7±¸ÛË›XÜêáŒó_úŸáŸäôùmÎöþò]$Y,ÿãÙérÔ,þ–›$ÎÿëÍþü磯¯yõ6/êú"IrËÏg§Ïîðú&>ùí/þ(Ù$ IòE¿8;}ú {ÿ.’,–æôݜ޾•Óù„—Èi;O“ÓaºÌé—î"ÉbiN‡¿óyœßÍiþ÷þÞì´8ä!9ݼßÎN§÷Õåt}›{ù.’,–ÿoNç¿üü´Óßy6ÚÎì^ ŸÄÅÛŸåôÉÞ¸‰Ù]?]ŽÎŸ[EN_¹Íýüþ]$Y,ÿãÙéôÇ_>…ãßöTöÏé8ÎæÎÏôÆÇÕžÃwë"IrÃÏg§Oîðú&–¿ïìï°ß´¸Õ‹¿Îg§os¶÷Ö¼‹$‹åœÓ­Õ$Y›Ÿç´æ;üÅœ¾x›ñGhN#ç·ÿÒÞ’äßù×9}í&~ûV“Ó¿~`Í©³S’ü¹ÎNð,ÆQ’¬Æ¯ ¼$Y—¿+xxI²bÍ žE^’¬Xs‚gÑ—$+ÖœàYtà%ÉŠ5'xÓ4M¯¢w5MÓô à¶P°z}V°j}Dðú¬`ͶÛ>#x}V°j}Dðú¬`ÍÞžPŸ<>+Xµ>"x}V°r}@ðú¬`Õúˆà9ôYÁªõÁs賂Uë#‚çÐg«ÖGÏ¡Ï V­žCŸ¬Z<‡>+Xµ>"x}V°j}Dðú¬`Õúˆà9ôYÁªõÁs賂Uë#‚çÐg«ÖGÏ¡Ï V­žCŸ¬Z<‡>+Xµ>"x}V°j}Dðú¬`Õúˆà9ôYÁªõÁs賂Uë#‚çÐg«ÖGÏ¡Ï V­žCŸ¬Z<‡>+Xµ>"x}V°j}Dðú¬`Õúˆà9ôYÁMÓ4ý{Ûiš¦ FüuNÓ4M¯Â”$¯¡9Á°?Ï)I^Cs‚jNI2¬9A5§$Öœ šS’ kNPÍ)I†ý4§M’ü{o_óojN0ìÙs:˜ŒÒï¸$‹eý9%É5'öÏ)I~ènN›lvW~{=­œ¿móþi÷rz;v8h¿ùpöÑñ¨ù™§C—;}ÃnßÅIrCs‚a«Îéãq¹ß¾ ‹áyØtœ†®‡áí—$_r?§ý×î¾!›Ü^fo³»9%µ?ùÆA‹3‡ÜºêrÛbC’\hN0lÝ9}>./‡ÏÍ‘w=Ô6É|™_*I¾äƒÙéòº‹iánNóáþÁA7¾âêíòO²Ü•$š [ùìôÙ¸¼}·rÚŸqoÞ¶Iò‰—ÓÛtyõßÄWr:Ÿw'§ûps‚a¯ÓlôíÖNsÛþÓ"§#õßæ´øš¯åt™À—sº<äÖ7Ý¹ÅæöÛíöO%ÉW}>.¯¦š‹Ùéò?ø«ÑøOr:_zþ_ÀñâÃ9ÝìèÖÛmIr©9Á°uÏNŸËOr: ÅýÛr¢û—³Óé·]þÚÇ{™Ýϲ”ó${þ•/~«Å™—á-ö®0?p>·'™-Í †­;§Çå|ÄìØ¯-FÞq@^ Ãû#.I¾äƒœn­&ÉÏüÊE’äÍ †­<§4¤~åj¿•Ó[Íï?IrÓñ¿J’Í †½`N_y«Ê)I>ðsSs‚_ÐÙ)I~änNIòlš [uNI²^Í ª9%ɰæÕœ’dXs‚jNI2¬9A5§$ö–Ó4MÓ‹€‚žÓ4MÓ‹€‚zPNPPðbš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁ¿Îiš¦éU@A=*§$y Í ª9%ɰæÕœ’dXs‚jNI2¬9A5§$Öœ ž1§Í&É|¹üœ$w|ãÐ['Ü;½9A=aN×Cº9AÁz¬%§Íaþy{=­œ‡òf÷iÿº{ÙmÛŸ{Úyyµ‹=ûëìZ»ÿ8;ëð5Ir©9A­2§ÝøÞw‘Mn,ç ®6ÎÖ/¯v|;M4³Í§ï»q±Ù·4'(øÌzf§Ë‘¾ȳœ®²¸Üy«¼Ùö[{¯/v±5I.5'¨gÍéýçð~]ÀaçÇ9í/ù¥œNßÒœ àSÛívû§’ä†Å >ÕrÉË™éÎìt7΋]_n^º9AÁµÕÌNç„æSÓq(ßœTŽÓØuR÷rZœwüÊ›mξ¥9AÁgV“Ó±ŸÙÊr¦š…ö¾õÄ)£Ã΋úö¹Íz:}Éé+Ï_x xíÙ¡Ir¥9A­3§[«IòϾçÇ_ל ^7§·)åý'InnoNPð[:;5'(¶–œ’äÉ4'¨æ”$ÚTsJ’aÍ ª9%ɰæÕœ’dXs‚zhNÓ4M/ êA9AAÁ‹iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCþ:§iš¦Wõ¨œ’ä54'¨æ”$ÚTsJ’aÍ ª9%ɰæÕœ’dXs‚zÖœ6IrÃæmÇ›óî«oŸ¹8áÞœ䶿õb³Ó{ŸÄð…Všüܪrz›av£ú}ª9®ÌFún™íØÛìŽ>Ì/»•ÅÚ~ê:ÅrºÀîß1ÅÅÙÇ™nvV’\iNPëÍé4²÷#z“\.›d¾ÌÞnÔ1?~ùó7®w:*IîiNP+ž.S8¾žg§Y·sº:p™ÓÒœæ—M’›šÔóç´ßúaNï?Ÿçôf>'-ÎÙJ’ÛšÔ"§ív»ýKIrϢŤq™Ó­iäjvºÚždse1AÝ<'InhNPëΠͧ¦ãÀ^t<î*§s7g§å ç—åÙ‹r“䆿µÞœŽýÌV®gªÓq“ÍnÇÅÚñðÅWÜÈiñìS’ÜÔœ VœÓ­Õ$ù5_¼îWkNPÿǜަš÷Ÿ¯\÷4q%ÉšTg§$¹ï=»$ùDs‚ZmNIò<šTsJ’aÍ ª9%ɰæÕœ’dXs‚jNI2¬9A=4§iš¦õ œ  àÅ4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Ó4MÓ«€‚zTNIòšTsJ’aÍ ª9%ɰæÕœ’dXs‚jNI2¬9A=cN›$¹aó¶ãÍy÷Õ÷ÎL’!Í ê…f§÷V>é¥9AÁ?·šœÞf˜ÝÀŸjŽ+³Þ'¡ù޽Íîèݾ÷í§‡µýÔ5Ÿ¹Îޝç‹]$WšÔ:sÚG±ÏÙäÖ²IæËìm¹å¸vþ´üŽlr^W¹Ú´Óœ ÖÓ~èîFk6¹µÌ?̶]ï¸ÄÅQ³Ó®®~uöµåu›ËÃf§Ë1z|=ÏN×£zîfN×Wžo›]z±û^N‹Ã/~‹æ…ùò 9½ÿ$›,\N/·s:LhÇݧ+]åô¶zâüðæ÷m·Ûퟺ1è¯ã¸š’l–N§~œÓÇÛÇ9]…Ûœ à¶GÍNça:ŸšŽÃûÞ¨þ,§«a¿¸Â‡9¦¯æ?𨜎ýÌV®gªCAçâæMÌö1ÑÃa‹zŽ/§}Çï8]ä"§ùö‡¾wqÝæ…ùò°œ–Ã8I¾àòØïœ›$¿ª9A=gNW³ÑyÆyÿI’8»9A=éìt5ê:75'(Ì–å”$OnjNPÍ)IMÍ ç¥9%É÷½ÕÔœ šS’ y¯©9A5§$±«©9A=4§iš¦õ œ  àÅ4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Ó4MÓ«€‚zTNIòšTsJ’aÍ ª9%ɰæÕœ’dXs‚jNI2¬9A=iN›$¹ámûa×½#’ä÷5'¨›Î5'(xŒ5å´ÉfÄÛëieÉnÚm:9~Ú˜çtÚuð~Ðᚇ‹ž>ÛùÐÙ‘IrSs‚ZmNû¼ù›äÆrZ[¾÷Îæ©óó+϶\}íñ«OI}ØSs‚Zïìt1®/†ýU%9ÍFÿyïÂå§Å¦Ë8›|ÕSæôæ°ózÚ¹›ÓþRätqµ÷Í ¾d»ÝnÿT’ܱÈiÑÉíœÎÇ)§‹+Ü«øê{“ä–æµÚÙi>3œ§¦ã¸ž7szÙ$çe™ÓlãâÈoäÔÙ ¾dU9û™­\ÏT³ÄÞ«;îÝ5Oót©Ó9‡×E£ó)lvµãç$¹§9A­7§[«I²JÍ ê…sz›QÞ’äSß96I.5'¨ÎNI2¬9A­5§$y"Í ª9%ɰæÕœ’dXs‚jNI2¬9A5§$Öœ šÓ4MÓ‹€‚zPNPPðbš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁ¿Îiš¦éU@A=*§$y Í ª9%ɰæÕœ’dXs‚jNI2¬9A5§$Öœ ž6§M’Üð¶ý°ëÞIò™ó¹_»Js‚z¹Ùé»!$ɵæ?µ®œ6Ùì†òÛëie6¼w³ÐnÓÉñÓþÃ<„Ó®ƒ÷ƒ×<\tÖÏnçõK’ÜÕœ VœÓ>ŒýÈß$7–ÓÚòí¼w6ܘ_y¶ežéÕõ>›¤šÔšg§Å¨žMP³a1Ú¯:9_*ÉæÂå§Ù±—×kNPðUOšÓ›ÃÎëiçnNûKÝÈi¶ãt½ýZ’ÜÓœ 9m·Ûí_J’»9-:¹Óùø/åtq…‹o^Ì}Ÿ¤Ôœ °XV6;Û˜OMDZ=oæô²IÎË2§ÙÆe(9]yÕf’\iNP+ÎéØÏlåz¦š%ö^Ýqïî¬yš§KÎ9¼.=íØµ¼¿Þ¹ç$¹£9A­9§[«I²BÍ ê¥sz›UÞ’äSß96I–šTg§$Öœ Ö›S’<æÕœ’dXs‚jNI2¬9A5§$Öœ šS’ kNPÍiš¦éE@A=('((x1Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `Hs‚‚‚!Í †4'((Òœ  `È_ç4MÓô*  •S’¼†æÕœ’dXs‚jNI2¬9A5§$Öœ šS’ kNPO‘Ó&InxÛ~ØuûˆË­çÏ÷®øõ’Ì–æõÔ³Ógy4'(ø{Ëi“Ínü¾½žVfcz7 í6?í?ÌGÿùJ—[w']¼ì:œrø|Úwñ»Ý:¼9AÁ…æ´£»qœMn-§µåÛyï<½ó•®¶Î?;5²ü¢ËßíÖáÍ .Ÿ×ŽýÌ>ÌZ9&y~YÖ™$_Ôœ ž-§[«7¶Ý;ð¥$ɧšÔkçt˜«–G¼ÍAï?IòkšÔ‹ÏN—Ùtv‚‚mý9%ÉMÍ ª9%É ©9Aá¼4§$ù¾·ššTsJ’!ï55'¨æ”$#v55'¨‡æ4MÓô"  ”¼˜æCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0¤9AAÁæCš iNPP0ä¯sš¦izPPÊ)I^Cs‚jNI2¬9A5§$Öœ šS’ kNPÍ)I†5'¨×Ïi“$ÿZs‚jNI2¬9A=YN›lvy¼½žVæÉì>ìÙœ_–qí¶íŽ:¾Ì6$Éw4'¨gËiŸÅnðg“»Ëላ ‹šŽŽ/‹ IòÍ êéf§Ë`ã¿vqÐìÌY)³i,Ùd)I¾¥9A½VN‡¹fÑÆ¾£Ó$t>ò°­9AÁ¯Ún·Û?•$ß³¨e¿rž€fG,sZ®Í'²æÏî'³Ó9¡ùÔ4kã~N‹#—õ4'(xZ?ÉéØÏle6S>.Ùx>~VæyÃáRG$É5'(x”åtk5I~”D’üTs‚‚Gùg9}XÚþ'I~Qs‚‚GùW9ýùÜÔœ àq~S’¬ÐÔœ àQ^&§©9AÁüJNo55'(x”É齦æò9íjjNPð(Ó4M¯â?š\}EÁiIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00039.html000066400000000000000000000252731224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::feature_not_supported Class Reference
pqxx::feature_not_supported Class Reference

Database feature not supported in current setup. More...

#include <except.hxx>

Inheritance diagram for pqxx::feature_not_supported:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 feature_not_supported (const std::string &err)
 feature_not_supported (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Database feature not supported in current setup.

Constructor & Destructor Documentation

pqxx::feature_not_supported::feature_not_supported ( const std::string &  err)
explicit
pqxx::feature_not_supported::feature_not_supported ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00039.js000066400000000000000000000003001224474465600207120ustar00rootroot00000000000000var a00039 = [ [ "feature_not_supported", "a00039.html#a499c62eac013b090a96ea3b402f48f0c", null ], [ "feature_not_supported", "a00039.html#a72654b9a8eff8c728eae1d5fae9a0890", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00039.png000066400000000000000000000021701224474465600210710ustar00rootroot00000000000000‰PNG  IHDRªÀ£ÇŒPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíër«0 ןgòþ|¸‰ÒÔ§ê°`l/BVÿ’sÎm@–¤UIò&T%ɛ益ᤠ|]U’®qªš”†‡uç¹ax2Üß—°õ×2§¿Œ¿èÛÃ铤:çªãJÃC•´;ކMÌVÝæ’${˜>Iªò$ªÛG•ó•á20öMý›ßTÞB’ª|TµÿÛªŽ}ŸUÝá'Ã&K÷.¸^ª&kÛê|xy‡ry’«ïEõ`‹—%Þ¬ÓvœûÞL€“ ødX’ޏ;ÿSªÃÖ9¯‘¿EU’žà®*I¿‡P•$oBU’¼éTsι üy´A;ªG3®í¨v¦­¸6¤ÀŸPð&T¼ UoBÀ›Pð&T¼ UoBÀ›Pð&T¼ Uoþ¼jÎ9·Y’Z T%É›P•$o>£šÒÜIz›¨®å¾«š¦¸uç¹±H¥án:Ïéo–˜KÒe^T zY)íŽÂ¦Ã´%é¯FÕØÀ®>yÍý7ªvß¹®:HÒ=TWBvXIËñ^D}ru¿­ªªe“ý|TÞþ%JÇ´û–IºËë à\5%éœP•$o>òU’ü UIò&T%É›N5眛ÀŸ@´£úx4ãÚŽjgÚŠkCªQü UoBÀ›Pð&T¼ UoBÀ›Pð&T¼ UoBÀ›PðæÏ«æœs%©BU’¼ UIòæsªI’<ùU“Ò Ðç†ÕZF­j*³ºËx2’t‰»ªÃbãjJ:>¬Eß(§U‡$]âvT‹Ì$´^pl£ÕíͽñU·Uíÿ¾«j¿¸Q‹ê|ý9U“•mõ$W8ª ó¼̧Mᤧ¼—ê¦{Uý¬ê°î$I:âÿª$}‹P•$oBU’¼éTsι üy´A;ªG3®í¨v¦­¸6¤ÀŸPð&T¼ UoBÀ›Pð&T¼ UoBÀ›Pð&T¼ Uoþ¼jJ)µ  BÀ›Pðæ²j·sÜxÅÛÑXÿ`º»ªºŸõ=Õ®1´úòUfÚp7žÇK©s#S‡ýXë©«31MZÍoͯ–rº4†ßŽk’¨Ë »NÓÞ>­\æ™îy½ÊÃÌ*û¨nŸ²ÊO£º[r;X{«Õ·Üî¶é½«:~™ò6OŸÏU7 p¦:¯r®ºú®fÖ#zªzìX‰êvÝJ®î·Õa®Ú(]K“ õ\Ý­r¹˜ðš 0Î2U`[æ´Ø$’ÙÖG ¼Èax£ ¼À~e€CœU‡Í°ûÇvÐÿ]U€Ë¼ª ð» UoBÀ›¾þ¦”R üΧgº?˜#IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00040.html000066400000000000000000000764741224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::field Class Reference

Reference to a field in a result set. More...

#include <field.hxx>

Inheritance diagram for pqxx::field:
pqxx::const_tuple_iterator pqxx::const_reverse_tuple_iterator

Public Types

typedef size_t size_type

Public Member Functions

 field (const tuple &T, tuple_size_type C) throw ()
 Constructor.
template<>
bool to (const char *&Obj) const
 Specialization: to(const char *&).
Comparison
bool operator== (const field &) const
 Byte-by-byte comparison of two fields (all nulls are considered equal)
bool operator!= (const field &rhs) const
 Byte-by-byte comparison (all nulls are considered equal)
Column information
const char * name () const
 Column name.
oid type () const
 Column type.
oid table () const
 What table did this column come from?
tuple_size_type num () const
tuple_size_type table_column () const
 What column number in its originating table did this column come from?
Content access
const char * c_str () const
 Read as plain C string.
template<typename T >
bool to (T &Obj) const
 Read value into Obj; or leave Obj untouched and return false if null.
template<typename T >
bool operator>> (T &Obj) const
 Read value into Obj; or leave Obj untouched and return false if null.
template<typename T >
bool to (T &Obj, const T &Default) const
 Read value into Obj; or use Default & return false if null.
template<typename T >
as (const T &Default) const
 Return value as object of given type, or Default if null.
template<typename T >
as () const
 Return value as object of given type, or throw exception if null.
bool is_null () const throw ()
size_type size () const throw ()

Protected Member Functions

const resulthome () const throw ()
size_t idx () const throw ()
tuple_size_type col () const throw ()

Protected Attributes

tuple_size_type m_col

Detailed Description

Reference to a field in a result set.

A field represents one entry in a tuple. It represents an actual value in the result set, and can be converted to various types.

Member Typedef Documentation

typedef size_t pqxx::field::size_type

Constructor & Destructor Documentation

pqxx::field::field ( const tuple T,
tuple_size_type  C 
) throw ()

Constructor.

Create field as reference to a field in a result set.

Parameters
TTuple that this field is part of.
CColumn number of this field.

Member Function Documentation

template<typename T >
T pqxx::field::as ( const T &  Default) const

Return value as object of given type, or Default if null.

Note that unless the function is instantiated with an explicit template argument, the Default value's type also determines the result type.

template<typename T >
T pqxx::field::as ( ) const

Return value as object of given type, or throw exception if null.

const char * pqxx::field::c_str ( ) const

Read as plain C string.

Since the field's data is stored internally in the form of a zero-terminated C string, this is the fastest way to read it. Use the to() or as() functions to convert the string to other types such as int, or to C++ strings.

Referenced by pqxx::binarystring::binarystring(), pqxx::from_string(), pqxx::operator<<(), operator==(), and pqxx::to_string().

tuple_size_type pqxx::field::col ( ) const throw ()
protected
const result* pqxx::field::home ( ) const throw ()
protected
size_t pqxx::field::idx ( ) const throw ()
protected
bool pqxx::field::is_null ( ) const throw ()

Referenced by operator==().

const char * pqxx::field::name ( ) const

Column name.

tuple_size_type pqxx::field::num ( ) const
bool pqxx::field::operator!= ( const field rhs) const

Byte-by-byte comparison (all nulls are considered equal)

Warning
See operator==() for important information about this operator
bool pqxx::field::operator== ( const field rhs) const

Byte-by-byte comparison of two fields (all nulls are considered equal)

Warning
null handling is still open to discussion and change!

Handling of null values differs from that in SQL where a comparison involving a null value yields null, so nulls are never considered equal to one another or even to themselves.

Null handling also probably differs from the closest equivalent in C++, which is the NaN (Not-a-Number) value, a singularity comparable to SQL's null. This is because the builtin == operator demands that a == a.

The usefulness of this operator is questionable. No interpretation whatsoever is imposed on the data; 0 and 0.0 are considered different, as are null vs. the empty string, or even different (but possibly equivalent and equally valid) encodings of the same Unicode character etc.

References c_str(), is_null(), and size().

template<typename T >
bool pqxx::field::operator>> ( T &  Obj) const

Read value into Obj; or leave Obj untouched and return false if null.

pqxx::oid pqxx::field::table ( ) const

What table did this column come from?

pqxx::tuple::size_type pqxx::field::table_column ( ) const

What column number in its originating table did this column come from?

template<typename T >
bool pqxx::field::to ( T &  Obj) const

Read value into Obj; or leave Obj untouched and return false if null.

References pqxx::from_string().

template<typename T >
bool pqxx::field::to ( T &  Obj,
const T &  Default 
) const

Read value into Obj; or use Default & return false if null.

template<>
bool pqxx::field::to ( const char *&  Obj) const

Specialization: to(const char *&).

The buffer has the same lifetime as the data in this result (i.e. of this result object, or the last remaining one copied from it etc.), so take care not to use it after the last result object referring to this query result is destroyed.

pqxx::oid pqxx::field::type ( ) const

Column type.

Member Data Documentation

tuple_size_type pqxx::field::m_col
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00040.js000066400000000000000000000031031224474465600207060ustar00rootroot00000000000000var a00040 = [ [ "size_type", "a00040.html#a862c8028550be182c0104b48b3cf8399", null ], [ "field", "a00040.html#ad46579d33a9105fecb94340d11a87b1d", null ], [ "as", "a00040.html#acf630db7dbdd828c56596b658c1f5b0a", null ], [ "as", "a00040.html#a2f9b005cdf98de2a1e7754744c75fbb7", null ], [ "c_str", "a00040.html#a97781b0028cbfd2dca1106943a27afae", null ], [ "col", "a00040.html#ac4149686f6311d9fc74529f3646d9cfd", null ], [ "home", "a00040.html#a3c3c5212055fb098039b104c520b98f7", null ], [ "idx", "a00040.html#a61903bbc795990ac21d2aaefd34626f4", null ], [ "is_null", "a00040.html#ad0670dd5c8c32c3486a66c8c6199246d", null ], [ "name", "a00040.html#ad969ff9b3f6f128713b867560ee06e12", null ], [ "num", "a00040.html#a812714c00006721cdf895980fa8154fb", null ], [ "operator!=", "a00040.html#a07d5dacdf1abec9c1117d1bcaa4cfdc9", null ], [ "operator==", "a00040.html#a7b7e65ff720f3b00b070c5608f9ac986", null ], [ "operator>>", "a00040.html#ad79f68cfa43c8ce7a13af3525be3da43", null ], [ "size", "a00040.html#ad8d3b3ef9308b577d178086e4b295ca5", null ], [ "table", "a00040.html#adee313912a0d712eba34548454455988", null ], [ "table_column", "a00040.html#a36b61c5c5aa0550c3b7472225fc64f77", null ], [ "to", "a00040.html#a11b508641e461a25fdc6b78fb7a36acf", null ], [ "to", "a00040.html#a0a194db2c97f08148c9bbef548b24cf8", null ], [ "to", "a00040.html#ab0fec98c5f61d8c572abbd13303419a9", null ], [ "type", "a00040.html#a61b82f53f82924bc10d8c1b15dfca153", null ], [ "m_col", "a00040.html#a5b5ee7fe78262f0d60efb6b9a12c8da7", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00040.png000066400000000000000000000017271224474465600210700ustar00rootroot00000000000000‰PNG  IHDR͈s÷Ÿ„PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2fIDATxíé’ò8 E¯»xÿGþÈî5E3 -<¢r‰‘Ù'’Å_Ba‘ÓØ”ÓØÔgi²¦³Ž®\ÿ£4ùRæižÑæpS¶A²ïé×4žëÈ2ͲÝéš(®ü¶8\£«ßM¶Ý$=­é}p‰þ„fú|MV`åt† p‰î;7uø¾sÓéiya}KOëý·|@NÐÖX4)§°)§°©éo.„ÀôFCÑ<#á Eó„g,ïiVå46å46å46å46å46å46å46å46å46å46å46å4¿UŒ1Þ¯GŒ1Þ/¢$ "§‘$›rI²©;iBctb¨lmOIêÉ MwßÓ…9âó{¤«„Í:ÝRŸub[f7‡YûüúàñÌì~R«$uõÍRsP5®ô¤ôÊë¨t¨<Ð4pj•¤¾^ÉM¹›,î:*¼êJ«NiN­’ÔÖ=4G9ÐLŸ’fµmµ{3M]Emš~¥eo¼ìiINZ•&I§úݹitºÄºçf9ЯVÚM4½ž¶­“÷´´Ò’¾wô^OKûàqqO­’ÔÕk•öNï—¤Z„¤Žî¥™OuÖX˵‡$½«ÿ[n$é[ä4’dSN#I6õ¤‰1ÆQðý £¡h~~FŠæ 3ÎX4#É3`Sž›òÜØ”çÀ¦<76å¹°)Ï €MynlÊs`Sž›òÜØ”çÀ¦>•›cFDIDN#I6å4’dSÐIzWÕÃ-C{…†Õ>Mw…3š 0O?¿÷AúHجÓ-õY'¶ ‡Ëª-Î<“DÚ£®žkÌä™ccÇ2Ç •5£Y2º¬¤úJoAJ¯cs•ç¾Á"R^GeÌÊ£ˆÓ°¹)CNGôz«9MÓ%Õ MµÇ&Í©õ?ѵ‘ÒLŸ=ûǯÝ}µœÐ4<Š8G"_ ©«¨MSUZööŠwÙlP½Ü”iœF¥U4ɹitfýÔç&¾µw¿ù—ÏÍ‹4½ž¶=”÷´´ÒŠzÜÊdýNÞJÝÓ6ŽÓž–¶Î=ÂâžZËJ»âD’ÞÒ«^B3Ñô}JÒ¹êGÊÇß:jn$éëå4’dSN#I6õ¤‰1ÆQô§þQBì} ‘IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00041.html000066400000000000000000000446441224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::field_streambuf< CHAR, TRAITS > Class Template Reference
pqxx::field_streambuf< CHAR, TRAITS > Class Template Reference

#include <field.hxx>

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef streamoff off_type
typedef streampos pos_type
typedef std::ios::openmode openmode
typedef std::ios::seekdir seekdir

Public Member Functions

 field_streambuf (const field &F)
virtual int sync ()

Protected Member Functions

virtual pos_type seekoff (off_type, seekdir, openmode)
virtual pos_type seekpos (pos_type, openmode)
virtual int_type overflow (int_type)
virtual int_type underflow ()

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::field_streambuf< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::field_streambuf< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef streamoff pqxx::field_streambuf< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef std::ios::openmode pqxx::field_streambuf< CHAR, TRAITS >::openmode
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef streampos pqxx::field_streambuf< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef std::ios::seekdir pqxx::field_streambuf< CHAR, TRAITS >::seekdir
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::field_streambuf< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::field_streambuf< CHAR, TRAITS >::field_streambuf ( const field F)
explicit

Member Function Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int_type pqxx::field_streambuf< CHAR, TRAITS >::overflow ( int_type  )
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual pos_type pqxx::field_streambuf< CHAR, TRAITS >::seekoff ( off_type  ,
seekdir  ,
openmode   
)
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual pos_type pqxx::field_streambuf< CHAR, TRAITS >::seekpos ( pos_type  ,
openmode   
)
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int pqxx::field_streambuf< CHAR, TRAITS >::sync ( )
virtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int_type pqxx::field_streambuf< CHAR, TRAITS >::underflow ( )
protectedvirtual

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00041.js000066400000000000000000000017441224474465600207200ustar00rootroot00000000000000var a00041 = [ [ "char_type", "a00041.html#ab1b72785be292cde0fa9ac2cf2b3f6a4", null ], [ "int_type", "a00041.html#a55e0069841487074956aa376a6e1d72c", null ], [ "off_type", "a00041.html#a594d90685e6d986b1f2200792bd74b03", null ], [ "openmode", "a00041.html#a292655415eeb298c9b09ccb6ed8de959", null ], [ "pos_type", "a00041.html#a40a3219faec0d4870a24060bf66c1673", null ], [ "seekdir", "a00041.html#a4c3e5f527f44cdcd210968493bd0ea0a", null ], [ "traits_type", "a00041.html#a434a97e522097934a05be09ddddcf86a", null ], [ "field_streambuf", "a00041.html#a4faf4881aca250fd2ce0eb6a520149c4", null ], [ "overflow", "a00041.html#aa10890370d62085bde7c01e4e7ddcd92", null ], [ "seekoff", "a00041.html#a11be4abe1a7a982fa05d2ca80630c62c", null ], [ "seekpos", "a00041.html#a8c7796f89ed8ea72203359ef1aeaa042", null ], [ "sync", "a00041.html#ae94ab8fb0c94bf4b100f85f80ff8a2b4", null ], [ "underflow", "a00041.html#ac96fb117de93933fd4dd667cbe88a0b6", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00042.html000066400000000000000000000267431224474465600212570ustar00rootroot00000000000000 libpqxx: pqxx::foreign_key_violation Class Reference
pqxx::foreign_key_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::foreign_key_violation:
pqxx::integrity_constraint_violation pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 foreign_key_violation (const std::string &err)
 foreign_key_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::integrity_constraint_violation
 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::foreign_key_violation::foreign_key_violation ( const std::string &  err)
explicit
pqxx::foreign_key_violation::foreign_key_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00042.js000066400000000000000000000003001224474465600207040ustar00rootroot00000000000000var a00042 = [ [ "foreign_key_violation", "a00042.html#a6e1d093886e976b8e028d94daba4c16e", null ], [ "foreign_key_violation", "a00042.html#a63de30ac68704846bbe21c078d23be53", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00042.png000066400000000000000000000030301224474465600210570ustar00rootroot00000000000000‰PNG  IHDRÌø—ù{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2§IDATxíéÒ« ›C•ïÿÈ×]PÜbÌš”m”MÚñ/1ÆX DIª—‘$‹¸Œ$YĘLèIú{2’ô!÷d‚Bÿ¸ö<_$S8©îî§WßýOmº¿¡GwÝß%e’t‘›2Ã\úÇ*hsìU'ï=+Nþ‚”I™$]ãndÖ›ÎWª§Š¡l,_õ)xJÒ5~+ÓýÖ2CÙÿ–Ù®£“ê$Kñ&@¿“I6E)W/–ÓßÉžy;2;éjšÄÃl6&޹ìõevðE8©–¤=ž}`~)ÓoòãoÆß‘‘¤þƒŒ$Æe$É".#IiebŒ±~@P 5É4ME65É´.õØT%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄeîcŒµ@”¤:pI²ˆËH’E~$Â|Õ’ô}~#“OߺLß}{ž/–i‡þn<ÏÁèn–¸IÒç|Kfžc§#…Í1±*H®%é_‹L:Ç48ÙÂ*ÙýM™v5•e† IzÈ2Ù”Ój-Ç—£òÒžÙ&€¢Ì”,.³l–„¨Óœ Æ<±THÒc¾¸ÌÞþŠHÒ1.#I9UÉHÒÿÇe$É".#IiebŒ±~@P 5É4ME65É´.õØT%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄeîcŒµ@”¤:pI²ˆËH’E~($éU\&›aè'Ùžç‹tâKm*¦VíßpJ $é3ËôÓ棠ý#gwÕ3²IúŒç‘™¦;N9ŸÒp5ÔdÖ7WâË2ãË_Ët?ë2éºJ[”"3ÿ[’IvE!œìs‘ÙÉfS@޳Ù|Z%AIºÏ7–Ù¥ïÈû_™Ëôÿaú•¤=<2’d—‘$‹¸Œ$Y¤•‰1ÆJø @-Ô$Ó4ÙÔ$ÓºÔcS•Œg3›¸ €E\À".`—°ˆËXÄe,â2q‹¸ €E\À".`—¸GŒ1ÖQ’êÀe$É".#I¹* W«úr…$mYµ=½Tµ÷°û‘Ùó™Kƒœ½ÏD&(ômÚó|‘ôë_FWæÓÐvèÚWNwËC§fc«yÜa~б.}™ñ‚¹Ñòô´xî³È û¶ *éMR¶­(LgÕ*é¶}Ó{ç*w™u‹éœ.Óõ˜)E™íÈiY2tV½'“5_Íâc™î'e¬_mYf æT=´‘–ázÖIó«2Û©m"#)äÌ]eŽƒz,S\f%™doì%€½=s ³yh¾dÆÐ}$³—ÍŠn•Ír±½l–.³iÞCfZ¯ï\f•Íú ®Š Ëì Œ;}%é«<‘ÙD"ÙÔÉC’nð ÷£Èlžù_ã’ÈHÒ_Çe$É".#IiebŒ±~@P 5É4ME65É´.õØT%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄeîBµ@¨—°ˆËXä‘L›>Vì xþ ¥Evuy†Odnö¼Ó¼¤pÌ¡L[Ù×v |ºXÆïòútÆKÆKÿì'²o«»«éã1—Ã%™áý˜ ÇÂr?÷˜ ÓG¥ó.Èì\M7Ç‹î$2둲}€ÙDÒÏa½$³so@€Œ¯Êt¿S™¬Ñ&jù‚{M&x72Û)–ÙöÁ™â2{"“ì€m @‰dÏ’ìÒ0{ð4ð‹2{Ù, ÑœÍV™hcŒ 5²lÖ?x/dœ.³Ï¾)z<øX”xG&{ƒý–ß|–lpøé¸ÌK‘9á q9‘øK¸ €E\À"ÝW)„êànz£’ŸIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00043.html000066400000000000000000000545301224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::icursor_iterator Class Reference
pqxx::icursor_iterator Class Reference

Approximate istream_iterator for icursorstream. More...

#include <cursor.hxx>

Public Types

typedef icursorstream istream_type
typedef istream_type::size_type size_type
typedef
istream_type::difference_type 
difference_type

Public Member Functions

 icursor_iterator () throw ()
 icursor_iterator (istream_type &) throw ()
 icursor_iterator (const icursor_iterator &) throw ()
 ~icursor_iterator () throw ()
const resultoperator* () const
const resultoperator-> () const
icursor_iteratoroperator++ ()
icursor_iterator operator++ (int)
icursor_iteratoroperator+= (difference_type)
icursor_iteratoroperator= (const icursor_iterator &) throw ()
bool operator== (const icursor_iterator &rhs) const
bool operator!= (const icursor_iterator &rhs) const throw ()
bool operator< (const icursor_iterator &rhs) const
bool operator> (const icursor_iterator &rhs) const
bool operator<= (const icursor_iterator &rhs) const
bool operator>= (const icursor_iterator &rhs) const

Friends

class internal::gate::icursor_iterator_icursorstream

Detailed Description

Approximate istream_iterator for icursorstream.

Intended as an implementation of an input_iterator (as defined by the C++ Standard Library), this class supports only two basic operations: reading the current element, and moving forward. In addition to the minimal guarantees for istream_iterators, this class supports multiple successive reads of the same position (the current result set is cached in the iterator) even after copying and even after new data have been read from the stream. This appears to be a requirement for input_iterators. Comparisons are also supported in the general case.

The iterator does not care about its own position, however. Moving an iterator forward moves the underlying stream forward and reads the data from the new stream position, regardless of the iterator's old position in the stream.

The stream's stride defines the granularity for all iterator movement or access operations, i.e. "ici += 1" advances the stream by one stride's worth of tuples, and "*ici++" reads one stride's worth of tuples from the stream.

Warning
Do not read from the underlying stream or its cursor, move its read position, or change its stride, between the time the first icursor_iterator on it is created and the time its last icursor_iterator is destroyed.
Manipulating these iterators within the context of a single cursor stream is not thread-safe. Creating a new iterator, copying one, or destroying one affects the stream as a whole.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::icursor_iterator::icursor_iterator ( ) throw ()
pqxx::icursor_iterator::icursor_iterator ( istream_type s) throw ()
explicit
pqxx::icursor_iterator::icursor_iterator ( const icursor_iterator rhs) throw ()
pqxx::icursor_iterator::~icursor_iterator ( ) throw ()

Member Function Documentation

bool pqxx::icursor_iterator::operator!= ( const icursor_iterator rhs) const throw ()
const result& pqxx::icursor_iterator::operator* ( ) const
icursor_iterator & pqxx::icursor_iterator::operator++ ( )
icursor_iterator pqxx::icursor_iterator::operator++ ( int  )
icursor_iterator & pqxx::icursor_iterator::operator+= ( difference_type  n)
const result* pqxx::icursor_iterator::operator-> ( ) const
bool pqxx::icursor_iterator::operator< ( const icursor_iterator rhs) const
bool pqxx::icursor_iterator::operator<= ( const icursor_iterator rhs) const
icursor_iterator & pqxx::icursor_iterator::operator= ( const icursor_iterator rhs) throw ()
bool pqxx::icursor_iterator::operator== ( const icursor_iterator rhs) const

References pqxx::result::empty().

bool pqxx::icursor_iterator::operator> ( const icursor_iterator rhs) const
bool pqxx::icursor_iterator::operator>= ( const icursor_iterator rhs) const

Friends And Related Function Documentation

friend class internal::gate::icursor_iterator_icursorstream
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00043.js000066400000000000000000000031231224474465600207130ustar00rootroot00000000000000var a00043 = [ [ "difference_type", "a00043.html#acf5bea0afb3ae6a669bd40cd659a5921", null ], [ "istream_type", "a00043.html#a4d6d50111eed016d1ce28bbdbbf96862", null ], [ "size_type", "a00043.html#af82ad1f395b1ccef2f48e7a04e315ae2", null ], [ "icursor_iterator", "a00043.html#a14f91c8c6898670b29965c34d6166674", null ], [ "icursor_iterator", "a00043.html#a059b39f4623c26af73cc865f3f8488ca", null ], [ "icursor_iterator", "a00043.html#a3faa6d72b2c16f3b36a27804c561bfcc", null ], [ "~icursor_iterator", "a00043.html#a260a8e31d364d7c8427741d0788c305e", null ], [ "operator!=", "a00043.html#ad0cda8bc84e80e331d2fcc973788d99a", null ], [ "operator*", "a00043.html#a7c416cd5efae357cce5f6dccf6d6fb58", null ], [ "operator++", "a00043.html#ada9ee12818185a1ccd04c912601d9f6d", null ], [ "operator++", "a00043.html#aed4a6029b7e88f2adef1c0c3508605aa", null ], [ "operator+=", "a00043.html#ae1f77541718ff048a67353dc07c87013", null ], [ "operator->", "a00043.html#af2c977a93c27c468244f43733f7238c6", null ], [ "operator<", "a00043.html#a595590e9f129925a1b447617b8d3b82a", null ], [ "operator<=", "a00043.html#a6afd533edcdf0e9f9667fdde547de63a", null ], [ "operator=", "a00043.html#a56c2d0b9aa14557cdf45555ea8a543f3", null ], [ "operator==", "a00043.html#a8b87babe29cf2797a624b2c8fa10d05f", null ], [ "operator>", "a00043.html#a0844bc4574d839c13d9ae6f2316a7286", null ], [ "operator>=", "a00043.html#a0abd27b596021390729199ddcb5a4baf", null ], [ "internal::gate::icursor_iterator_icursorstream", "a00043.html#a50ae5821478a2398f50c8cf2c42a0343", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00044.html000066400000000000000000000543311224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::icursorstream Class Reference
pqxx::icursorstream Class Reference

Simple read-only cursor represented as a stream of results. More...

#include <cursor.hxx>

Public Types

typedef cursor_base::size_type size_type
typedef
cursor_base::difference_type 
difference_type

Public Member Functions

 icursorstream (transaction_base &context, const std::string &query, const std::string &basename, difference_type sstride=1)
 Set up a read-only, forward-only cursor.
 icursorstream (transaction_base &context, const field &cname, difference_type sstride=1, cursor_base::ownershippolicy op=cursor_base::owned)
 Adopt existing SQL cursor. Use with care.
 operator bool () const throw ()
icursorstreamget (result &res)
 Read new value into given result object; same as operator >>
icursorstreamoperator>> (result &res)
 Read new value into given result object; same as get(result &)
icursorstreamignore (std::streamsize n=1)
 Move given number of rows forward (ignoring stride) without reading data.
void set_stride (difference_type stride)
 Change stride, i.e. the number of rows to fetch per read operation.
difference_type stride () const throw ()

Friends

class internal::gate::icursorstream_icursor_iterator

Detailed Description

Simple read-only cursor represented as a stream of results.

SQL cursors can be tricky, especially in C++ since the two languages seem to have been designed on different planets. An SQL cursor has two singular positions akin to end() on either side of the underlying result set.

These cultural differences are hidden from view somewhat by libpqxx, which tries to make SQL cursors behave more like familiar C++ entities such as iterators, sequences, streams, and containers.

Data is fetched from the cursor as a sequence of result objects. Each of these will contain the number of rows defined as the stream's stride, except of course the last block of data which may contain fewer rows.

This class can create or adopt cursors that live outside any backend transaction, which your backend version may not support.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::icursorstream::icursorstream ( transaction_base context,
const std::string &  query,
const std::string &  basename,
difference_type  sstride = 1 
)

Set up a read-only, forward-only cursor.

Roughly equivalent to a C++ Standard Library istream, this cursor type supports only two operations: reading a block of rows while moving forward, and moving forward without reading any data.

Parameters
contextTransaction context that this cursor will be active in
querySQL query whose results this cursor shall iterate
basenameSuggested name for the SQL cursor; a unique code will be appended by the library to ensure its uniqueness
sstrideNumber of rows to fetch per read operation; must be a positive number

References set_stride().

pqxx::icursorstream::icursorstream ( transaction_base context,
const field cname,
difference_type  sstride = 1,
cursor_base::ownershippolicy  op = cursor_base::owned 
)

Adopt existing SQL cursor. Use with care.

Forms a cursor stream around an existing SQL cursor, as returned by e.g. a server-side function. The SQL cursor will be cleaned up by the stream's destructor as if it had been created by the stream; cleaning it up by hand or adopting the same cursor twice is an error.

Passing the name of the cursor as a string is not allowed, both to avoid confusion with the other constructor and to discourage unnecessary use of adopted cursors.

Warning
It is technically possible to adopt a "WITH HOLD" cursor, i.e. a cursor that stays alive outside its creating transaction. However, any cursor stream (including the underlying SQL cursor, naturally) must be destroyed before its transaction context object is destroyed. Therefore the only way to use SQL's WITH HOLD feature is to adopt the cursor, but defer doing so until after entering the transaction context that will eventually destroy it.
Parameters
contextTransaction context that this cursor will be active in.
cnameResult field containing the name of the SQL cursor to adopt.
sstrideNumber of rows to fetch per read operation; must be a positive number.
opOwnership policy. Determines whether the cursor underlying this stream will be destroyed when the stream is closed.

References set_stride().

Member Function Documentation

icursorstream& pqxx::icursorstream::get ( result res)

Read new value into given result object; same as operator >>

The result set may continue any number of rows from zero to the chosen stride, inclusive. An empty result will only be returned if there are no more rows to retrieve.

Returns
Reference to this very stream, to facilitate "chained" invocations ("C.get(r1).get(r2);")
icursorstream & pqxx::icursorstream::ignore ( std::streamsize  n = 1)

Move given number of rows forward (ignoring stride) without reading data.

Returns
Reference to this very stream, to facilitate "chained" invocations ("C.ignore(2).get(r).ignore(4);")
pqxx::icursorstream::operator bool ( ) const throw ()
icursorstream& pqxx::icursorstream::operator>> ( result res)

Read new value into given result object; same as get(result &)

The result set may continue any number of rows from zero to the chosen stride, inclusive. An empty result will only be returned if there are no more rows to retrieve.

Returns
Reference to this very stream, to facilitate "chained" invocations ("C >> r1 >> r2;")
void pqxx::icursorstream::set_stride ( difference_type  stride)

Change stride, i.e. the number of rows to fetch per read operation.

Parameters
strideMust be a positive number

References pqxx::to_string().

Referenced by icursorstream().

difference_type pqxx::icursorstream::stride ( ) const throw ()

Friends And Related Function Documentation

friend class internal::gate::icursorstream_icursor_iterator
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00044.js000066400000000000000000000016011224474465600207130ustar00rootroot00000000000000var a00044 = [ [ "difference_type", "a00044.html#a79c9e623be28567215d88087cd7e80d0", null ], [ "size_type", "a00044.html#a6f29a9a658eeb39c09075bfc655c5d90", null ], [ "icursorstream", "a00044.html#a9d23e2f3cdac465efb354e0ab689304c", null ], [ "icursorstream", "a00044.html#a24212e9d6d97c744f5c4eed30d8d92a2", null ], [ "get", "a00044.html#a0602dd0f6ed2641bbb98ad584bcf60e7", null ], [ "ignore", "a00044.html#a777b5c8fe3f9e0160cea11ba00be5a27", null ], [ "operator bool", "a00044.html#a462bf00fed476b503116f1c769deeb2f", null ], [ "operator>>", "a00044.html#a7ac105c3e882661d8f1220ccf9164c27", null ], [ "set_stride", "a00044.html#a255914b05d1f935922338eeebcb10144", null ], [ "stride", "a00044.html#a89f9c7dc295e4befa9bdbd2bfedbe800", null ], [ "internal::gate::icursorstream_icursor_iterator", "a00044.html#a81bc68e9ddb56368929d58e0820e72f0", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00045.html000066400000000000000000000175631224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::in_doubt_error Class Reference
pqxx::in_doubt_error Class Reference

"Help, I don't know whether transaction was committed successfully!" More...

#include <except.hxx>

Inheritance diagram for pqxx::in_doubt_error:
pqxx::failure pqxx::pqxx_exception

Public Member Functions

 in_doubt_error (const std::string &)
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

"Help, I don't know whether transaction was committed successfully!"

Exception that might be thrown in rare cases where the connection to the database is lost while finishing a database transaction, and there's no way of telling whether it was actually executed by the backend. In this case the database is left in an indeterminate (but consistent) state, and only manual inspection will tell which is the case.

Constructor & Destructor Documentation

pqxx::in_doubt_error::in_doubt_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00045.js000066400000000000000000000001411224474465600207120ustar00rootroot00000000000000var a00045 = [ [ "in_doubt_error", "a00045.html#a378d91b2f08324db0725a7c89f6dedcf", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00045.png000066400000000000000000000013241224474465600210660ustar00rootroot00000000000000‰PNG  IHDRˆ÷qxªPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2cIDATxíݲƒ „7ËŒïÿÈG@0"øSÛ¦s&0‰ú‚½E!˜ $ åNð]I$·ú*IîT „’bæ¾NÔ}'îx]LJ|Gœ§+ekòR,…»6r«nÌjR7ekrÐF”þŠ»8²m±7÷tàÞJ-A¶½D°Oó‰[-{5ïRqB 6ºW‰Çî­ 'uÐÍÁ ØËÏÂRÁÕÖß…ƒ“{â&É‘N⟤jÓ%I’[}˜€$Ot•€$MäN°„‚¥à‘&0•9Á4Y#˜ÌÆö~œÀ œÀ œ€jNàNàNàÿ „L…@’†r'xH¥F’wô˜`ûÎȲʹ¯“õ]’®–¾¦!+^¬"Éž.ÔGRv­¨1¨9IŽt%úÁ: ›¼÷¾H0'»O$9ÔM‚Í{´›Âµ]^ÿý:ØWb— ÔåÛvapT2"[1,»:Hò@×váõÓN’Çrÿot‚"!KÀ#M`*s‚i²F0'˜Œì ü,888ÕœÀ œÀ œÀ þˆˆ© `('p‚[ݰq1ÜYÕ³¼—`ž¥i< e¢6ÅQ?$ÉOt«!ÙT?7õ=¹S†† …äz- i1¨¡«¤dÎõ«¡ÍAû(¦]ýøÝд5äãé»ûNþãÔñŒ@í÷¨ë ×à£]œ…M>ÔaØœ…Z¾µäÚ³P»íÊš]8úúÀ'tŸ ü«ÀX×¢~-`!'p‚ò1Ô*|59è`ŒIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00046.html000066400000000000000000000247131224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::insufficient_privilege Class Reference
pqxx::insufficient_privilege Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::insufficient_privilege:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 insufficient_privilege (const std::string &err)
 insufficient_privilege (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::insufficient_privilege::insufficient_privilege ( const std::string &  err)
explicit
pqxx::insufficient_privilege::insufficient_privilege ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00046.js000066400000000000000000000003021224474465600207120ustar00rootroot00000000000000var a00046 = [ [ "insufficient_privilege", "a00046.html#a5cce5dbd2519b461a7c8064528999097", null ], [ "insufficient_privilege", "a00046.html#a288de88661b6c5094151d90975bb0531", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00046.png000066400000000000000000000021551224474465600210720ustar00rootroot00000000000000‰PNG  IHDR À´å˜EPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2üIDATxíë’« ›ª¼ÿ#oèà%jÆìRggËV„Þ!É9ç–!KR»„ $yAIòðk‚i¸$é=¿)(I§ &¥aˆî>̰'Íý{ Qÿ,}úÇøE_ÞL$m8džRÒæ:j6ñ©ªÍ#Iö2u’´æ8‚ëÊýJsië¦úÕ7;î’´æ[‚ýßZp¬û†àv OšMЖêM }‚f“í%ÉûæÅ¼Zâ7'ÖI³$q³ÿÂC"ži JÒ  JR„ $yAIòÐ æœsÃ<Ê  eZ|½7l]°ókÛ°yÁÈb!à!<„ €‡ð‚BÀCxA!à!<„ €‡¿'˜sÎ-C–¤v AIò‚’äáqÁ”æÒpI’‡§k¥ßLSŒºû\XTÒð6Ýç Žô/K|%é ÷çy{E)m®ÂªÂ”%é*DÐÎkƒX-êžq;‚ÝJî Ž ’tŸ`¥a›•´\GϽ·I²+XRæ§–ø ‹M({õR1åÒÒ I7øh‰Ÿ;å$é=!(Iÿ-–¤' AIò‚’ä¡Ì9ç†x”@Ë´.øz5nغ`ç×¶aó‚‘Å>BÀCxA!à!<„ €‡ð‚BÀCxAO0çœ[†,Ií‚’ä!%ÉÃW“$=Ä$˜”†‰»û\°2K«L¥W÷o¦B’θ!8L1Ρ¤ãËÎÝ—Ê­ª¤3îD°(Lõ4cilÝ\¿\Þ NAZ ö¿!h×ÔöØ‹àüü¶ Ùe;Ir²$‚Y\÷>‹çÛ*ù%é÷–øÒ9÷ä)ø5Á!9.%’tÄAIúBP’<„ $yèsιaåÐ2­ ¾^¶.Øùµmؼ`d1€ð‚BÀCxA!à!<„ €‡ð‚BÀÃßL)¥–!´KxAWzuYÖ³4o:îY}ðNÁÁþã“.ŒI°+ ¥>¥`¾þOÓ02SCǵ4L¥1¼óôóã¬Sïêë²ËW‹àÜwì“`}%°—yìÌgûÛíPMEb¹êiLàªÅ2ƒ—»Ý)ó„û‚›Žµ`Í ö#A»Ä‚Ã/Ô©à4w‰[õÍøv,XýckÁ7K¼.Ý<øf% ${íÁ`ýÁr»¸²x½ML¿U@6YlvKÅ[Á Y|ëä¸ÍÅqën?!8lùêç`—íÁßZ͹þÈOÀw A!à¡? libpqxx: pqxx::insufficient_resources Class Reference
pqxx::insufficient_resources Class Reference

Resource shortage on the server. More...

#include <except.hxx>

Inheritance diagram for pqxx::insufficient_resources:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception pqxx::disk_full pqxx::out_of_memory

Public Member Functions

 insufficient_resources (const std::string &err)
 insufficient_resources (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Resource shortage on the server.

Constructor & Destructor Documentation

pqxx::insufficient_resources::insufficient_resources ( const std::string &  err)
explicit
pqxx::insufficient_resources::insufficient_resources ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00047.js000066400000000000000000000003021224474465600207130ustar00rootroot00000000000000var a00047 = [ [ "insufficient_resources", "a00047.html#ab9c012d8591a9699677c8e3d2bfdf02a", null ], [ "insufficient_resources", "a00047.html#af88552eb661d1bc459308d2ff8576840", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00047.png000066400000000000000000000036431224474465600210760ustar00rootroot00000000000000‰PNG  IHDRZøš,ÞPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT22IDATxí벪:›N•ïÿÈGQ$ numçlY~TrC3NþÔÐZk{`g4ÕÏ'jUKˆZÕ¢Vµ„¨U-!jUŸf‹êc¢VõižöúëÔãËÏ×J'äÁð©=…åé:Í9]Îwœêc«ëSÝä—©=›%8xSî w1¹èî.ƒö¥ëSÝâ·EíúÕ§ó3ÃÓÀ¹ïÒ¿ºgúêQÛ«=kµç¾¨íßùöÿ`¸ Ô¹û&x¿Um—L·¶±?ÏΧ˃\û]Q{U¶t7)¹3Üe„K³×1~IçË5-«nóûÂmõÙaÕ{¼:?j»­ªßÏT—Dm¢àçÜW«ú1D­j Q«ZBÔª–µª%ìRmk­í€À ¼›¨¨àpˆ[€¢ ‚£Ù¸x?Q PDÄ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µãÑZk{`g4ÕÏ'jUKˆZÕ¢Vµ„¨U-!jÇc®µ±¨þ-Q{ñy·¥ú#¾Díp‰ËãùZ™%cër¾î™ScŽiÕgùµWc'¹:Ü”‰UGWW}…¯‰ÚÞX¸‹°å:jUïóŒÚãÿ~[íy@õ%¾QíB`?ìà\þ*b¿4×Þnc›j§M- Aõ>ÇPŒ.Õvá{’>u\v»y@õE¾(!ÜVUëˆZÕ¢Vµ„/Q«úµª%D­j Q«ZBÔª–°Kµ­µ¶€ðn¢ ‚Ã!n ˆZ€ ŽfãàýD-@ PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔŽGk­í€ÑT?Ÿ¨U-!jUKˆZÕ¢Vµ„¨½ƒê‰Ú¨ý¡ÚÁaTv<_+½Æy´W;L³Ž—ó©ëP}†_¯v”s¶ãàýÒ[;ÕF¦Ó¢Cõ~ÔNò.—‚εóè†Úu㥜ñåj/¹V{:¢Võ,Ôö Ÿ±µ×kÔªnÐçÚmìA®ZÕ;MF—j§`½ŽöÞ¦Ï0Ÿ–_Dõ!ßn«ª+^²¦ú¨í“ÀùP}Q›¨ý¡ZÕDÔª–µª%D­j Q«ZÂ.Õ¶ÖÚÀ»‰Z€ ‡¸( j*8š[€÷µED,@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q;Ã0 {`gìdÍQ PBÔ”µ%D-@ ¿Wí½Y§ûÈ<|3ñMN¾.jO7?x@Ô#o¬Bpªtot Î~àÌ0ÎÇNý×KíÒ}DÏÓy~Øz¼›¶sµgA×ÿ÷ë2@_ºË²gªÍ­>{ôÓÖO¹éšïßuÔ®µt!³öpOíÍÄ•ÚõìÛ§l,ç{Ôö áŽÚÓqWíyðÞSæ?Q7í7©]üc×jÿÖµ;Q{'¾×Q{³>€=±‘kïmc0ôåQ®}–÷¬ôþ®\{5ºT»öÐÍ[ÅÛ¬gño_àòËõ[/sÒÎÂ'¿EÔ¬·¤.x^&jJرZ€O&jJˆZ€¢ „¨(a—j‡av@àÞMÔTp8Ä-@Q PÁÑlܼŸ¨("bJˆZ€¢ „¨(!jJˆZ€¢ „¨(!jJˆÚÃápØ{`Áµ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ Q PBÔ”µ%D-@ %+n­µwsh­µ7³Ã7ÕϧW«úùD­j Q«ZBÔª–µª%¨Ær­÷#}ÿrHõ¼_ííæõ©þ-5j·—ß5>Rí[ž®v¸|ÚãùZéWuê?7ÇEŸzæÎ µWwùýq漂óÒúŽë §[–í±cz–ê/«½z¹JtQíÊ2T«Õ>\Ýê²XX¿ÔñÛtsWíé—Þªv¹º.4VÃç¾EöúÔ>»º‡jo¿Æ¢½@uƒ2µ—„°{µ§C‡®¬ÞCu“¿R»øÁÛEþƒ„ðôê^‰Ú(¾äÝ÷ªí¿çíFq›k7Þàÿɵ۫[n—Þ­öÞ<§EBXìÏÓ…Qûhuý:·×Å®ÕÎC«GÌo¤ºÅOÂmUµ˜§Âÿ¹º®vÜ šê‹T¨½]ØkKýó¼D­êÏxð¯ªUý'<¥VõcˆZÕ¢Vµ„¨U-!jUK8ªm­µЩm­µð\L¬= ñJ±IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00048.html000066400000000000000000000260261224474465600212570ustar00rootroot00000000000000 libpqxx: pqxx::integrity_constraint_violation Class Reference
pqxx::integrity_constraint_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::integrity_constraint_violation:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception pqxx::check_violation pqxx::foreign_key_violation pqxx::not_null_violation pqxx::restrict_violation pqxx::unique_violation

Public Member Functions

 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::integrity_constraint_violation::integrity_constraint_violation ( const std::string &  err)
explicit
pqxx::integrity_constraint_violation::integrity_constraint_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00048.js000066400000000000000000000003221224474465600207160ustar00rootroot00000000000000var a00048 = [ [ "integrity_constraint_violation", "a00048.html#a9fa871a08c23b2722a42fa545cecd2ab", null ], [ "integrity_constraint_violation", "a00048.html#a505ae8d71add1a4c19e69f5cf96cea9d", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00048.png000066400000000000000000000066611224474465600211020ustar00rootroot00000000000000‰PNG  IHDR$øûÇ|PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2 @IDATxíÝmRòH@ÑÃC•û_ò¼ŠhZñ°®•ƒ! 1mÒ—¿¸ûý~ÿW@ 8ƒýÌÌßP$ 8—"@`Q$ ,ŠE‘€@ °¸ªHì–™™ï(œËµEbf曊çò•Hìf÷0ÿ½>­l¦ö»ïßÿ[?n{xsüuøÄýúûͶ™™O*œË—"q˜ãÓyvójyk÷SDfv›eûk7³]6Ûff>§H@ p._ŠÄ«‰}|ýÌîãŽÃ¶Çí/>s¢33ŸS$ 8—ߌÄýÏËH¶ ®Ê·#±ÌéÏì~êÂvóæW‘€@àj|)Ïóø~õ°áy&°û¹Ç_› ìf¶K‘€@àõ¥H§ýfå8ã–7v?Gæqî/!ylÇïÇx6áㆇqxìÊÌÌÏ ÎåL‘8µ:3ó›ŠçR$ ,ŠÅY"13óÿ+œK‘€@ °(EÀ¢H@ Xì÷ûý_@àfÜA H‘€@ ð–»»*@°]ŠÁ²ükD•€@ Ø,EÀ %À¢H@ X ‹"@`Q$ ,ŠE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€@ °(EÀ¢H@ pSöûýþ¯€@ pû™™¿¡H@ p.EÀ¢H@ X ‹"@`ñk‘ØÍÌ\T‘€@à\ŠÅÏ"±›ÝÃäÿ÷ú´² ÂóÞm$vÇ£þý:¼l6ÌÌ|O‘€@à\~‰‡i~˜ç³›·—íü¿_{p|Y6ÌÌ|O‘€@à\~‰ƒã¯‡I¾™ê‡µÃÞ‘xùæg(œÍE#qX‰ûŸ"À;c$+o7G¼ŠÄöw‘€@à ý0Ïa¸_=lX2pÜû"OM(\¡FâX…ÍÊaóã´Ú»-À1(Ï/k[ff¾¡H@ p.?ĩՙ™~8ÿgf>T$ 8—_ŒÄîð33sEsùÅHÌÌ\R‘€@à\~‰™™«Q$ 8—"@`Q$ ,ŠE‘€@ °Øï÷û¿À͸ƒ@ "@à-wwU`» ‚eù׈*@°YŠJE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€@à¦ìv»Ý_@à þÐÌ*œK‘€@ °(EÀ¢H@ X|nf=uúø[¿2E_ûÎÙOízë Îå«3ëÍã‰Oä£N ÎçqfíìÖþ½>­læÝ×÷ý¦ÝÓËáØÃGvß=ŸúxØãQOç=œäá¤û¶g¾®‡í›ƒžÿúvóÓgŠçrŒÄaB>ÌA;§–í›Í¶×;NLóGm>öêì¯>ýÆÚzÞ"À9m&Ø:óޝÇݧæêÖÉH¼>óvÛæÔËî·"±þâ*ŠgôHÜÿ°³xžºïùpÒ§™ýt¦W‘ø·ú:/ÛË—sj*¿žòk$–¼úèû‘X‹±œóÃH¼ÊQ‘€@à2Žìyò=|×¾ñŸæÝ[sõ£H¼šÌËÞÄa½H@ ðxš`OmX#ñjR.ÙÎôÍt=†çñ°¥ Ç—§}Ç¿ñt’‘Øžàpøãß]Î[$ 8£×ì+síå±ÿë<-œË÷#±ù_¿ü?ð ?øt‘€@à\¾‰ûùŒÍò?ÏÒ"À¹ü¡™U$ 8—"@`Q$ ,ŠE‘€@ °Øív»¿À͸ƒ@ "@à-wwU`» ‚eù׈*@°YŠJE‘€@ °(EÀ¢H@ X ‹"@`Q$ ,ŠE‘€À¯º»»»ËÝÝÝ]îîîîrwwwwðWüÍo§F·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁUëÁmhTpŠ\µF·¡QÁ7í÷ûýåÝí÷ûýÅ5ªý~¿ÿ©Fµßï÷ßóGGµŸ™ù¶·hfæohT33·á¯Žª[43sÅÕÌÌm(33W­ofæ64ª™™ÛP$ff®Z£š™¹ EbfæªõàÍÌ܆F53s.‰ÝÌÌK§6>o[ÖN~~fæCç¹E»Oà½íçæe¼wÆõj×9oدL§ã•ºð‹<„—Õ§.ìÌ3ëÿŒÄûƒš™ù¢³Ü¢/^ÁWÿÞ0¯'ç¼a¿‰OÝ®s<„¿2ª™™Ï:ËÌúR$vß²ÿ^ŸV¶~÷ðþyçæ×òÌm6<í=¬Ý¿l7ŸþVŸ™9ås·èýQ<þåã¶Çk:^âá²·Wõzçæ—¼nÓrºÙþ|Õ½aß™N>Ï·ëa×á ›O ÷á·"ñáýz¼Ðõ9\.ù²3ëk‘xzxŽÓev³,û¶ïž†xj(o¬­gš™ù”OFâS£8Þöêª6wëíHüh˜_Ä|u^~ìHœí†}+ïìÄí:5¬K>„ߋħÕÓ{äff»|-ë¼ßTïi÷룞ÿïåù[ùU`ff>å“‘øx»™yá­«z®þ§îØ7†ùõH|j€ïÌšOEâ‡7ì[‘x`/s}bÃeÇôÝH|ñ~Ö.ùÈÍÌv¹`$îNGâÕÅ_Zy=‘Ø^Ø›‘X:ï0¯ ¸a‹Äá²Ûß‹ÄEÂÿ!ã½äÌú~$–¿{*/6~0{–µß‹ÄéQ¼ôúÿþz(æÏ"ñæ‰Þ°GâõÀ^«~5?~‰Oܯ53³Y.2³¾‰ç¿µíÝó 9q'Ÿ¹Ãúÿ‰Oâ¥ã'N?ŠÏ.×{–a~=_½M/·?Ÿàr7ì[‘x`'n×;ýÈCø½H|x¿6ÝÓ:ù4^ff}-ÇË߬lò÷8Æ'Çc^|'o‡²Ýû0ðÃèOhfæ]ŸŒÄû£Ø\ôvýpU¯ÿÁÇÿúá/.÷,Ãüz$>àæ¿žbËâR7ì[‘øèùÛÞºãàÞîEÂïEâÃiõrz±™f—œY_ŒÄ©Õ™™ëðÙHü`}âÿ—oDâºoÓ"qíûf$¾>¬_ÿ¯Fâ_Åîff.â‘Xò{z,Çï²sóÒ‘xçr/xÃþ·H\ô!ü¿"qÙ™õ«‘˜™¹¤ GâþVÌ̼í:¦ÓõáþŸ‘˜™¹˜ÿ+33—ó¥HÌÌ\³oÝ¢™™«Ö¨ffnÃ_U·hfæŠ5ª™™ÛP$ff®ZÞÌÌmhT33·¡HÌÌ\µF53sŠÄÌÌUëÁ›™¹ jfæ6ü‹Ä~¿ßÿ›[´ßï÷D£Úï÷ûÛð7GõòàUŠâç½IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00049.html000066400000000000000000000154041224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::internal_error Class Reference
pqxx::internal_error Class Reference

Internal error in libpqxx library. More...

#include <except.hxx>

Inheritance diagram for pqxx::internal_error:
pqxx::pqxx_exception

Public Member Functions

 internal_error (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Internal error in libpqxx library.

Constructor & Destructor Documentation

pqxx::internal_error::internal_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00049.js000066400000000000000000000001411224474465600207160ustar00rootroot00000000000000var a00049 = [ [ "internal_error", "a00049.html#a4514fd8ae629c3e2524b1a8257abeb29", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00049.png000066400000000000000000000010321224474465600210660ustar00rootroot00000000000000‰PNG  IHDRP æèPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2©IDATxíánà „χÔ÷äÁmºÖÓäŠ Áôa›ô/BÁT$i('p‚ïHj$Ùê«$yÒA ”ä³=µn1Çå±/>±Ë+â{)[G7H¾žÚlZ°1«NHÝ”­‹AïQžÏL—‰lÛíÝšܯÄ_Om·Îa^L«cWó) •èQ%^OW´Ò-ê`ƒI±—•oÞ…½‚Û8 7w1M’3-üß%HÕ¦K’$[}˜€$z–€$MäN°„‚¥à-=ÀTæ‡5‚9Á`Œ`OàwÁ œÀ œÀ ¨æNàNàNðßDDLC9¼JP=/×¼x¤{1øÁ6H£xGË‹ÚrëóD¼Äù‘7¨î±ÓVŸý¡ C‚ä˜=!5=Èj¬¥«Ñ(>Å©Æ1hvRa¨18(M úNÔ}‚ôAí6Îéi?ø÷ šxcÐm<ÌÂÑ?G ò=«Ä‹,Ìëà…LîB_Í]h²Ð©AÝ–ë,Ü»ÔpS!(ü°Ô‹|]Nàå#$"b¨n‡nÈÎ|+IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00050.html000066400000000000000000000246441224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::invalid_cursor_name Class Reference
pqxx::invalid_cursor_name Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::invalid_cursor_name:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 invalid_cursor_name (const std::string &err)
 invalid_cursor_name (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::invalid_cursor_name::invalid_cursor_name ( const std::string &  err)
explicit
pqxx::invalid_cursor_name::invalid_cursor_name ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00050.js000066400000000000000000000002741224474465600207150ustar00rootroot00000000000000var a00050 = [ [ "invalid_cursor_name", "a00050.html#aaa48cdbce346a4c8e593a3dbe8d06fcd", null ], [ "invalid_cursor_name", "a00050.html#aa73214eba77d9c6cd048ea04f3f20c28", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00050.png000066400000000000000000000021301224474465600210560ustar00rootroot00000000000000‰PNG  IHDR¡À['ó{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2çIDATxíë’« ›*ßÿ‘¢(â5³áìΖ­aÿcŒMC”¤†qCI²á†’dã{†!]’tÎW %é’CàÆèïs¡÷¢yxÏAž¹Ïð¿Êé­¨“¤ džãi,m®£æ"B«êâ¤ò*ê$©æ$†õù~§97ŒuS}õÍŽ¼$Õ|Ìpø« Ǻn—ñ¢¹ÛR½ ¥Ñ°Øh{™rÞ¼¨çÇÅ>|+†ÉšG6æò”asÝ{«|rr]4KÒ/öÚ0eÃáÙÖ‚¡$]ð”¡$5J’ 7”$½aŒ1¶ À£tMÓ¼a×µ®Ø¼a/ظbû†žËVÜÀ†ØpCn`à l¸!€ 7°á†6ÜÀ†ØpCÑ0Æ›†(I ㆒dà %ÉÆó†!Ì¥tI’…Ç ×N_1 S”úû\X\Bz›îsG†—%Â’t‡7 ç‰G)l®LUQ”%é.ïİœ¸ ãj]÷”2ìsßpl¤Û We³‚–ëíøÙ÷á6Sv sÞüØ*ärÌÁ=WL µ4HÒ ¼·ÊÏv’tŽJ’çÿ/KÒ“¸¡$ÙpCI²ÑÆcË libpqxx: pqxx::invalid_cursor_state Class Reference
pqxx::invalid_cursor_state Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::invalid_cursor_state:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 invalid_cursor_state (const std::string &err)
 invalid_cursor_state (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::invalid_cursor_state::invalid_cursor_state ( const std::string &  err)
explicit
pqxx::invalid_cursor_state::invalid_cursor_state ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00051.js000066400000000000000000000002761224474465600207200ustar00rootroot00000000000000var a00051 = [ [ "invalid_cursor_state", "a00051.html#a39081c92939fa3cca69441719eae3415", null ], [ "invalid_cursor_state", "a00051.html#a98b63bef3455bdde8a791fbb49ca97f0", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00051.png000066400000000000000000000021371224474465600210660ustar00rootroot00000000000000‰PNG  IHDRÀ)è‘ÍPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2îIDATxíë’« ›*ßÿ‘¢(xÏÄd9»³e#Bg`Ü¿Äc³%©QÜN’l¸$Ùø)».I:ãí$é‚» Þï˹RÌyÑ=<çà ÷d7ü­íƶÇí¶[wÑ]„kiÞ„ð »â`íeÅy÷¢oçîåØ$ežõÍœ²in{}gO¾LÝ’tÄK㟵K'ÿàÛõóv’tÁv’Ôn'I6ÜN’lôv1ÆØ*Ò4KÓv]ײ^Óv½\ÃzmÛyÎXq;n`Ãíl¸€ ·°áv6ÜÀ†ÛØp;n`Ãílü-»cl¢$5ŠÛI’ ·“$OÛ…0×Ò%Iv¶«}¾n¦èôå\Y»ƒœÍ!;ÏÙ¹X¥º$ðÊÎÞúž=øµû]ʆ»_ I:âwÄN’¾ÛI’ ·“$½]Œ1¶ ÀƒtÍÒ´]×µ¬×´]/×°^Ûvž³VÜÀ†ÛØp;n`Ãíl¸€ ·°áv6ÜÀ†ÛØp;Ë.„š…Ð(n`Ãílܵ;Õ·O]ïüÊåÝz–wcw4/À}.íúJª ߘ\)F§¥¦™ü4>”óÎ]àiÎiÒB'un‹•ݸÎ8Q€k®Õ·¥·øýˈr梥:ëùŠíMY†¯<_ë—·V½ë§bìz>»]~%ý£¹k·:Õ?Òå¤ä]˜·vß®Zvßn½³v«¶i_ïìÙ¹;ÊŠ‡úלœ»2bûv·ÏÝAÎn4•”='9›ËÙꟼìì”qí½œ½þò|—'íÒq.vàˆ{cÿ“Ø4‡ÛØp;Ã÷/„å–_Ìã9qIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00052.html000066400000000000000000000247771224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::invalid_sql_statement_name Class Reference
pqxx::invalid_sql_statement_name Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::invalid_sql_statement_name:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 invalid_sql_statement_name (const std::string &err)
 invalid_sql_statement_name (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::invalid_sql_statement_name::invalid_sql_statement_name ( const std::string &  err)
explicit
pqxx::invalid_sql_statement_name::invalid_sql_statement_name ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00052.js000066400000000000000000000003121224474465600207100ustar00rootroot00000000000000var a00052 = [ [ "invalid_sql_statement_name", "a00052.html#a733530a1cdef5f0c73c57ff4d46b3ae3", null ], [ "invalid_sql_statement_name", "a00052.html#ab6cdfc77425f86d8f15af9726e079824", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00052.png000066400000000000000000000022441224474465600210660ustar00rootroot00000000000000‰PNG  IHDRÆÀhìrPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT23IDATxíÛ²« ›EUþÿ“7³žÑš”­ÜÔiÉ+1Æxˆ’tw\C’¬à’dKa8$ékŒiHÒ_øB#( /êιP¼üCw_OŸ»¿¦1ýe¼£/µ¢M’öðÆÅðB­Ž­îâ[/š‹KÊ£h“¤|5õkÒyOwêÛ¦öꞆ¡$íàBþWkŒmÿOc½j>t07¯&å bñ·¶øûîÙ/]>ìófc#¥×ÌTSjÈm'.ª7þC·$mqàã2a¿ÿ¸ƒ†$}àR I²ŠkH’\C’¬ÐiÄãí8›Àýy†ÆëõghtOðxˆ†g*;¸€\À ®`×°‚kXÁ5¬àVp +¸€\À ®`רEŒ1Þ¢$Ý×$+¸†$Yá ri8$éÇ\ ± Ü®F˜¾wwÎ…9à0Ô¦sž‘¾2Ï•$ý‘Ÿhäèz)¬ŽDÕP”%é¿™2ºrB˨åu7ní´5ÆI:ÂÏ5Á–Ý š_ÎÄ{c½Å›iÃÛZT™ª˜–^05L™`î¤cüjQú¯ Iïq§iHÒÆ5$É ®!IVè4bŒñöœÍ àþ¶0„×s¡ yî-5BÕ]ÆSÑ Ià˜ÆÈ‰‚¶2¾4N‹Iúg#:» f,½ ºrdÝ©1}ðZ£ÿÙÕ(WQ9¢5ùjC£Xý-þaošL•&á}¦Ê§*ÁIÒ—^T»þNþ׸RcØÚG’ª$má³!IVp I²‚kH’:c¼=gó¸?ÏÐx½áñ Îâ ÑðL`×°‚kXÁ5¬àVp +¸€\À ®`×°‚kXÁ5¬à»!„ûC¸;®`×°Â^­Q]ûÔÕQ·ÎõïýæûOa]­Ñ†RŸ‚S¡xÖðÕ‡¦Lª•ò­ó“êÖá¦ê4Žšn™ê¹¯Š­5|©1ö ÷h¹´¼Ì½‹…–Ÿ´j-+iXŽmù¢:¶Öðj6ª¡ù«–{ ¾yÏb5ä·j]i¬ë•Fû•‡4Ò-ÝŒnh”‹¯Ùšï¬ž1×ÛíáÛ‹øÚõ—\îÈòIuërQÕY†ÒüÄ«à6öÆÖO;kùèã{cç¢Ú¾/S­ïšVyÊDßdªœƒÊlT<¾Ì…e¦š»‹€š™êo `›ß= à ¿Ô¶\±¸æ}¹lØÅþ[Ÿ6÷Å5¬àVèÿ†Báîü¿–xšÑ!¿PIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00053.html000066400000000000000000000456021224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::prepare::invocation Class Reference
pqxx::prepare::invocation Class Reference

Helper class for passing parameters to, and executing, prepared statements. More...

#include <prepared_statement.hxx>

Public Member Functions

 invocation (transaction_base &, const std::string &statement)
result exec () const
 Execute!
bool exists () const
 Has a statement of this name been defined?
invocationoperator() ()
 Pass null parameter.
template<typename T >
invocationoperator() (const T &v)
 Pass parameter value.
invocationoperator() (const binarystring &v)
 Pass binary parameter value for a BYTEA field.
template<typename T >
invocationoperator() (const T &v, bool nonnull)
 Pass parameter value.
invocationoperator() (const binarystring &v, bool nonnull)
 Pass binary parameter value for a BYTEA field.
template<typename T >
invocationoperator() (T *v, bool nonnull=true)
 Pass C-style parameter string, or null if pointer is null.
invocationoperator() (const char *v, bool nonnull=true)
 Pass C-style string parameter, or null if pointer is null.

Detailed Description

Helper class for passing parameters to, and executing, prepared statements.

Constructor & Destructor Documentation

pqxx::prepare::invocation::invocation ( transaction_base home,
const std::string &  statement 
)

Member Function Documentation

pqxx::result pqxx::prepare::invocation::exec ( ) const
bool pqxx::prepare::invocation::exists ( ) const

Has a statement of this name been defined?

invocation& pqxx::prepare::invocation::operator() ( )

Pass null parameter.

template<typename T >
invocation& pqxx::prepare::invocation::operator() ( const T &  v)

Pass parameter value.

Parameters
vparameter value; will be represented as a string internally.
invocation& pqxx::prepare::invocation::operator() ( const binarystring v)

Pass binary parameter value for a BYTEA field.

Parameters
vbinary string; will be passed on directly in binary form.
template<typename T >
invocation& pqxx::prepare::invocation::operator() ( const T &  v,
bool  nonnull 
)

Pass parameter value.

Parameters
vparameter value (will be represented as a string internally).
nonnullreplaces value with null if set to false.
invocation& pqxx::prepare::invocation::operator() ( const binarystring v,
bool  nonnull 
)

Pass binary parameter value for a BYTEA field.

Parameters
vbinary string; will be passed on directly in binary form.
nonnulldetermines whether to pass a real value, or NULL.
template<typename T >
invocation& pqxx::prepare::invocation::operator() ( T *  v,
bool  nonnull = true 
)

Pass C-style parameter string, or null if pointer is null.

This version is for passing C-style strings; it's a template, so any pointer type that to_string accepts will do.

Warning
Be very careful with the special constant NULL! Since NULL in C++ is an int, not a pointer, a value of NULL would cause the wrong version of this template to be invoked. To all intents and purposes it would look like you were trying to pass a regular zero as an integer value, instead of a null string. This is not a problem with pointer variables that may happen to be NULL, since in that case the value's type is not subject to any confusion. So if you know at compile time that you want to pass a null value, use the zero-argument version of this operator; if you don't want to do that, at least add a second argument of false to make clear that you want a null, not a zero.
Parameters
vparameter value (will be represented as a C++ string internally)
nonnullreplaces value with null if set to false
invocation& pqxx::prepare::invocation::operator() ( const char *  v,
bool  nonnull = true 
)

Pass C-style string parameter, or null if pointer is null.

This duplicates the pointer-to-template-argument-type version of the operator, but helps compilers with less advanced template implementations disambiguate calls where C-style strings are passed.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00053.js000066400000000000000000000014101224474465600207110ustar00rootroot00000000000000var a00053 = [ [ "invocation", "a00053.html#a7f15ffe53fbbeeafc0f4bc13c2981646", null ], [ "exec", "a00053.html#af937364fbb9bf4cead8c646220a4507d", null ], [ "exists", "a00053.html#a06644bfe2c67479f5bcae0174cf8ae05", null ], [ "operator()", "a00053.html#a10e6e640885617f52bf43d9e59477424", null ], [ "operator()", "a00053.html#a38c217d6210b26006af97dc23a4c014e", null ], [ "operator()", "a00053.html#a8b4028561c5a19ec67b262310e948468", null ], [ "operator()", "a00053.html#a7d1afea38e1c822c02560331b82d8dfe", null ], [ "operator()", "a00053.html#a3aa04b5e67edcadea056c78ebd712e5f", null ], [ "operator()", "a00053.html#afe3111c309189f822255744df4fa8bff", null ], [ "operator()", "a00053.html#ac0b4fbda217ac490ed72c923d02cdef3", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00054.html000066400000000000000000000226151224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::isolation_traits< LEVEL > Struct Template Reference
pqxx::isolation_traits< LEVEL > Struct Template Reference

Traits class to describe an isolation level; primarly for libpqxx's own use. More...

#include <isolation.hxx>

Public Member Functions

template<>
const char * name () throw()
template<>
const char * name () throw()
template<>
const char * name () throw()

Static Public Member Functions

static isolation_level level () throw ()
static const char * name () throw ()

Detailed Description

template<isolation_level LEVEL>
struct pqxx::isolation_traits< LEVEL >

Traits class to describe an isolation level; primarly for libpqxx's own use.

Member Function Documentation

template<isolation_level LEVEL>
static isolation_level pqxx::isolation_traits< LEVEL >::level ( ) throw ()
static
template<isolation_level LEVEL>
static const char* pqxx::isolation_traits< LEVEL >::name ( ) throw ()
static
template<>
const char * pqxx::isolation_traits< read_committed >::name ( ) throw()
template<>
const char * pqxx::isolation_traits< repeatable_read >::name ( ) throw()
template<>
const char * pqxx::isolation_traits< serializable >::name ( ) throw()

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00054.js000066400000000000000000000005641224474465600207230ustar00rootroot00000000000000var a00054 = [ [ "level", "a00054.html#a7257515292c662b6247844ddbbd5d37d", null ], [ "name", "a00054.html#aa70d28518dfd8e0021c76e50e19da150", null ], [ "name", "a00054.html#aa614c41bb7460c52684cbcc058a96ec3", null ], [ "name", "a00054.html#a5ea14e6598a2e7ac7b0ad7e1a9610873", null ], [ "name", "a00054.html#ab448a03b23a8e86e12cb21f495d941fc", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00055.html000066400000000000000000000372431224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::items< T, CONT > Class Template Reference
pqxx::items< T, CONT > Class Template Reference

Container of items with easy contents initialization and string rendering. More...

#include <util.hxx>

Public Member Functions

 items ()
 Create empty items list.
 items (const T &t)
 Create items list with one element.
 items (const T &t1, const T &t2)
 items (const T &t1, const T &t2, const T &t3)
 items (const T &t1, const T &t2, const T &t3, const T &t4)
 items (const T &t1, const T &t2, const T &t3, const T &t4, const T &t5)
 items (const CONT &c)
 Copy container.
itemsoperator() (const T &t)
 Add element to items list.

Detailed Description

template<typename T = std::string, typename CONT = std::vector<T>>
class pqxx::items< T, CONT >

Container of items with easy contents initialization and string rendering.

Designed as a wrapper around an arbitrary container type, this class lets you easily create a container object and provide its contents in the same line. Regular addition methods such as push_back() will also still work, but you can now write things like

items<int> numbers; numbers(1)(2)(3)(4);

Up to five elements may be specified directly as constructor arguments, e.g.

items<int> numbers(1,2,3,4);

One thing that cannot be done with this simple class is create const objects with nontrivial contents. This is because the function invocation operator (which is being used to add items) modifies the container rather than creating a new one. This was done to keep performance within reasonable bounds.

Warning
This class may see substantial change in its interface before it stabilizes. Do not count on it remaining the way it is.

Constructor & Destructor Documentation

template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( )

Create empty items list.

template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const T &  t)
explicit

Create items list with one element.

template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const T &  t1,
const T &  t2 
)
template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const T &  t1,
const T &  t2,
const T &  t3 
)
template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const T &  t1,
const T &  t2,
const T &  t3,
const T &  t4 
)
template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const T &  t1,
const T &  t2,
const T &  t3,
const T &  t4,
const T &  t5 
)
template<typename T = std::string, typename CONT = std::vector<T>>
pqxx::items< T, CONT >::items ( const CONT &  c)

Copy container.

Member Function Documentation

template<typename T = std::string, typename CONT = std::vector<T>>
items& pqxx::items< T, CONT >::operator() ( const T &  t)

Add element to items list.


The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00055.js000066400000000000000000000011251224474465600207160ustar00rootroot00000000000000var a00055 = [ [ "items", "a00055.html#a374e1532420a3b60b28dfc27dba994a7", null ], [ "items", "a00055.html#aa9f1a5f279471ed644ab9ca78bdd78a3", null ], [ "items", "a00055.html#acb295ee3294961c1dac99df59de64da9", null ], [ "items", "a00055.html#a1c4dad14844c77b90175e6ab0bc4a72b", null ], [ "items", "a00055.html#a675386230923a7ceb4380cf880d05604", null ], [ "items", "a00055.html#a806ffda069bc7790b213dbede7119051", null ], [ "items", "a00055.html#a31b6a81ea8deee77375d25bce93099e2", null ], [ "operator()", "a00055.html#a936efe3dfed125e4e61f3a76d460183a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00056.html000066400000000000000000000673131224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::largeobject Class Reference

Identity of a large object. More...

#include <largeobject.hxx>

Inheritance diagram for pqxx::largeobject:
pqxx::largeobjectaccess

Public Types

typedef long size_type

Public Member Functions

 largeobject () throw ()
 Refer to a nonexistent large object (similar to what a null pointer does)
 largeobject (dbtransaction &T)
 Create new large object.
 largeobject (oid O) throw ()
 Wrap object with given oid.
 largeobject (dbtransaction &T, const std::string &File)
 Import large object from a local file.
 largeobject (const largeobjectaccess &O) throw ()
 Take identity of an opened large object.
oid id () const throw ()
 Object identifier.
void to_file (dbtransaction &T, const std::string &File) const
 Export large object's contents to a local file.
void remove (dbtransaction &T) const
 Delete large object from database.
Identity comparisons

These operators compare the object identifiers of large objects. This has nothing to do with the objects' actual contents; use them only for keeping track of containers of references to large objects and such.

bool operator== (const largeobject &other) const
 Compare object identities.
bool operator!= (const largeobject &other) const
 Compare object identities.
bool operator<= (const largeobject &other) const
 Compare object identities.
bool operator>= (const largeobject &other) const
 Compare object identities.
bool operator< (const largeobject &other) const
 Compare object identities.
bool operator> (const largeobject &other) const
 Compare object identities.

Protected Member Functions

std::string Reason (int err) const

Static Protected Member Functions

static internal::pq::PGconn
*PQXX_PURE 
RawConnection (const dbtransaction &T)

Detailed Description

Identity of a large object.

This class encapsulates the identity of a large object. To access the contents of the object, create a largeobjectaccess, a largeobject_streambuf, or an ilostream, an olostream or a lostream around the largeobject.

A largeobject must be accessed only from within a backend transaction, but the object's identity remains valid as long as the object exists.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::largeobject::largeobject ( ) throw ()

Refer to a nonexistent large object (similar to what a null pointer does)

pqxx::largeobject::largeobject ( dbtransaction T)
explicit

Create new large object.

Parameters
TBackend transaction in which the object is to be created

References pqxx::oid_none, RawConnection(), and Reason().

pqxx::largeobject::largeobject ( oid  O) throw ()
explicit

Wrap object with given oid.

Convert combination of a transaction and object identifier into a large object identity. Does not affect the database.

Parameters
OObject identifier for the given object
pqxx::largeobject::largeobject ( dbtransaction T,
const std::string &  File 
)

Import large object from a local file.

Creates a large object containing the data found in the given file.

Parameters
TBackend transaction in which the large object is to be created
FileA filename on the client program's filesystem

References pqxx::oid_none, RawConnection(), and Reason().

pqxx::largeobject::largeobject ( const largeobjectaccess O) throw ()

Take identity of an opened large object.

Copy identity of already opened large object. Note that this may be done as an implicit conversion.

Parameters
OAlready opened large object to copy identity from

Member Function Documentation

oid pqxx::largeobject::id ( ) const throw ()

Object identifier.

The number returned by this function identifies the large object in the database we're connected to (or oid_none is returned if we refer to the null object).

bool pqxx::largeobject::operator!= ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
bool pqxx::largeobject::operator< ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
bool pqxx::largeobject::operator<= ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
bool pqxx::largeobject::operator== ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
bool pqxx::largeobject::operator> ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
bool pqxx::largeobject::operator>= ( const largeobject other) const

Compare object identities.

Warning
Only valid between large objects in the same database.
pqxx::internal::pq::PGconn * pqxx::largeobject::RawConnection ( const dbtransaction T)
staticprotected

References pqxx::transaction_base::conn().

Referenced by largeobject().

string pqxx::largeobject::Reason ( int  err) const
protected
void pqxx::largeobject::remove ( dbtransaction T) const

Delete large object from database.

Unlike its low-level equivalent cunlink, this will throw an exception if deletion fails.

Parameters
TTransaction in which the object is to be deleted

References pqxx::to_string().

void pqxx::largeobject::to_file ( dbtransaction T,
const std::string &  File 
) const

Export large object's contents to a local file.

Writes the data stored in the large object to the given file.

Parameters
TTransaction in which the object is to be accessed
FileA filename on the client's filesystem

References pqxx::to_string().

Referenced by pqxx::largeobjectaccess::to_file().


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00056.js000066400000000000000000000024371224474465600207260ustar00rootroot00000000000000var a00056 = [ [ "size_type", "a00056.html#a546f724f294272c84c85ab4b4b415419", null ], [ "largeobject", "a00056.html#a2d076b22c335557dbe91f4793c315e7d", null ], [ "largeobject", "a00056.html#ae3a035076692d93ef07ab636e47fcc81", null ], [ "largeobject", "a00056.html#af8257cb8d3c162acc233ae0fe9cef218", null ], [ "largeobject", "a00056.html#a05267c2dfb94149e4f518c55fccf3748", null ], [ "largeobject", "a00056.html#a8f0314b6756e5f246b1ea349820df64d", null ], [ "id", "a00056.html#ad84747d2fa7a02950b790ea2c1808309", null ], [ "operator!=", "a00056.html#abea8ecd17b1ca3db757bb0b148c20295", null ], [ "operator<", "a00056.html#a41efa409c912f937c51e31dc812f7a2e", null ], [ "operator<=", "a00056.html#a8467e3f29ce1f3748fd62737cfe63316", null ], [ "operator==", "a00056.html#ad70e9d5356545289573e63f6272a7e52", null ], [ "operator>", "a00056.html#aa7d92ad25a5d4584dc8ff34041103ef2", null ], [ "operator>=", "a00056.html#a72405b8ff94fd3f44fe786f5001409a0", null ], [ "RawConnection", "a00056.html#a0357da0b565480de02030bf018a99e5a", null ], [ "Reason", "a00056.html#a70fe02eba0ce7e8d83db9bc3340260af", null ], [ "remove", "a00056.html#a7976bf34f68473dd51809bf25682aa03", null ], [ "to_file", "a00056.html#ad97df88e75558320c89ea4f39c35afe2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00056.png000066400000000000000000000011611224474465600210670ustar00rootroot00000000000000‰PNG  IHDR’PÅ…ÜPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÙ’«0 D›üÿ7‹¼ f|o©ŠƒˆðÒiËæ•Bè @O¸$ —`ñ¤OzÆ6MÓƒ¾¿$  àª¤ñåüv:*ÒC6ܧc$ O””šCìYçã3@ñ¤©ór-sBh®8]j–R)ÔM³°áR=zº×u’±J-Jš?¥¤%ÕJZówI*V ½@Eé]éÒÁ¼PKÛåÝ8ô|-íì¸l’wáŸÚqùúÅe.܉3èÚ1Pp£¤ä@ÍI:8ÿN}!þ³Ï.À¸$‹>%…BWÜà  /ú“ôzu§©?I£¢Þ4u(  ;Ü# w ÀÂ]°p—,Ü% w ÀÂ]°p—,Ü% w ÀÂ]°p—,îsi†¡/$©'\’$Y¸$I²øTR$ƒØ¦iúIßg%IRÁUIAaî:ÞßÙpS )5†©Y–šCìYç×ÛnXï…¤©ßr-sJ¡¹ât©YJ¥P7]C“h^ÇߥKõè™ð¢N2¦ÈæXC“X“ëTg$>×’–T+iÍ}+IiÀ½…ˇ­½,®þƒÛ.5ölº”?5 —ÕÒvy7=_K;;.ó]ø§vÜ"5ö=µãNŸ#7C’TpQRrC’jþHRò\’*¾Uô/v%é—pI’dѧ¤a†®øÒn'ñIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00057.html000066400000000000000000000615061224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::largeobject_streambuf< CHAR, TRAITS > Class Template Reference
pqxx::largeobject_streambuf< CHAR, TRAITS > Class Template Reference

Streambuf to use large objects in standard I/O streams. More...

#include <largeobject.hxx>

Public Types

typedef CHAR char_type
typedef TRAITS traits_type
typedef traits_type::int_type int_type
typedef streamoff off_type
typedef streampos pos_type
typedef largeobjectaccess::openmode openmode
typedef largeobjectaccess::seekdir seekdir

Public Member Functions

 largeobject_streambuf (dbtransaction &T, largeobject O, openmode mode=std::ios::in|std::ios::out, size_type BufSize=512)
 largeobject_streambuf (dbtransaction &T, oid O, openmode mode=std::ios::in|std::ios::out, size_type BufSize=512)
virtual ~largeobject_streambuf () throw ()
void process_notice (const std::string &s)
 For use by large object stream classes.
virtual int sync ()

Protected Member Functions

virtual pos_type seekoff (off_type offset, seekdir dir, openmode)
virtual pos_type seekpos (pos_type pos, openmode)
virtual int_type overflow (int_type ch=EoF())
virtual int_type underflow ()

Detailed Description

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
class pqxx::largeobject_streambuf< CHAR, TRAITS >

Streambuf to use large objects in standard I/O streams.

The standard streambuf classes provide uniform access to data storage such as files or string buffers, so they can be accessed using standard input or output streams. This streambuf implementation provides similar access to large objects, so they can be read and written using the same stream classes.

Warning
This class may not work properly in compiler environments that don't fully support Standard-compliant streambufs, such as g++ 2.95 or older.

Member Typedef Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef CHAR pqxx::largeobject_streambuf< CHAR, TRAITS >::char_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef traits_type::int_type pqxx::largeobject_streambuf< CHAR, TRAITS >::int_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef streamoff pqxx::largeobject_streambuf< CHAR, TRAITS >::off_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef largeobjectaccess::openmode pqxx::largeobject_streambuf< CHAR, TRAITS >::openmode
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef streampos pqxx::largeobject_streambuf< CHAR, TRAITS >::pos_type
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef largeobjectaccess::seekdir pqxx::largeobject_streambuf< CHAR, TRAITS >::seekdir
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
typedef TRAITS pqxx::largeobject_streambuf< CHAR, TRAITS >::traits_type

Constructor & Destructor Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::largeobject_streambuf< CHAR, TRAITS >::largeobject_streambuf ( dbtransaction T,
largeobject  O,
openmode  mode = std::ios::in | std::ios::out,
size_type  BufSize = 512 
)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
pqxx::largeobject_streambuf< CHAR, TRAITS >::largeobject_streambuf ( dbtransaction T,
oid  O,
openmode  mode = std::ios::in | std::ios::out,
size_type  BufSize = 512 
)
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual pqxx::largeobject_streambuf< CHAR, TRAITS >::~largeobject_streambuf ( ) throw ()
virtual

Member Function Documentation

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int_type pqxx::largeobject_streambuf< CHAR, TRAITS >::overflow ( int_type  ch = EoF())
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
void pqxx::largeobject_streambuf< CHAR, TRAITS >::process_notice ( const std::string &  s)

For use by large object stream classes.

template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual pos_type pqxx::largeobject_streambuf< CHAR, TRAITS >::seekoff ( off_type  offset,
seekdir  dir,
openmode   
)
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual pos_type pqxx::largeobject_streambuf< CHAR, TRAITS >::seekpos ( pos_type  pos,
openmode   
)
protectedvirtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int pqxx::largeobject_streambuf< CHAR, TRAITS >::sync ( )
virtual
template<typename CHAR = char, typename TRAITS = std::char_traits<CHAR>>
virtual int_type pqxx::largeobject_streambuf< CHAR, TRAITS >::underflow ( )
protectedvirtual

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00057.js000066400000000000000000000023541224474465600207250ustar00rootroot00000000000000var a00057 = [ [ "char_type", "a00057.html#ad2ab29818af1ce91be638affa38398e6", null ], [ "int_type", "a00057.html#abef9904baeab33e0a03b595c06993a46", null ], [ "off_type", "a00057.html#a8bde7bf4689040a1b2176547d0e422a8", null ], [ "openmode", "a00057.html#aa5e6a54ca2e756775d0fd025a5d804c3", null ], [ "pos_type", "a00057.html#ab6ebcd93944dd5daf158fe4f278273f9", null ], [ "seekdir", "a00057.html#a21db56eb011dadccf79d3a7b4b930162", null ], [ "traits_type", "a00057.html#a34194e8889862f6d05617de316caa69a", null ], [ "largeobject_streambuf", "a00057.html#a861824ef8ee2abff9c36e9f01282752f", null ], [ "largeobject_streambuf", "a00057.html#a88bd4f870abd57d1ceeac65295e3138b", null ], [ "~largeobject_streambuf", "a00057.html#ae2f637254f3e65276bdcf3ddc17fad73", null ], [ "overflow", "a00057.html#a4f43f50130c87e488d0d754816815db0", null ], [ "process_notice", "a00057.html#a553f2541bf0ecd55111057ff6de98252", null ], [ "seekoff", "a00057.html#a55637c6a2fe0266ebbea046d0fda8276", null ], [ "seekpos", "a00057.html#a0e8942a1a6e76067bf4c2a07320550ab", null ], [ "sync", "a00057.html#a1f2be3c1026e59be027445a60b46a416", null ], [ "underflow", "a00057.html#ad2e5df2bff74fcc60e7d68a083426189", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00058.html000066400000000000000000001360241224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::largeobjectaccess Class Reference
pqxx::largeobjectaccess Class Reference

Accessor for large object's contents. More...

#include <largeobject.hxx>

Inheritance diagram for pqxx::largeobjectaccess:
pqxx::largeobject

Public Types

typedef long off_type
typedef size_type pos_type
typedef std::ios::openmode openmode
 Open mode: in, out (can be combined with the "or" operator)
typedef std::ios::seekdir seekdir
 Seek direction: beg, cur, end.
typedef long size_type

Public Member Functions

 largeobjectaccess (dbtransaction &T, openmode mode=std::ios::in|std::ios::out)
 Create new large object and open it.
 largeobjectaccess (dbtransaction &T, oid O, openmode mode=std::ios::in|std::ios::out)
 Open large object with given oid.
 largeobjectaccess (dbtransaction &T, largeobject O, openmode mode=std::ios::in|std::ios::out)
 Open given large object.
 largeobjectaccess (dbtransaction &T, const std::string &File, openmode mode=std::ios::in|std::ios::out)
 Import large object from a local file and open it.
 ~largeobjectaccess () throw ()
void to_file (const std::string &File) const
 Export large object's contents to a local file.
High-level access to object contents
void write (const char Buf[], size_type Len)
 Write data to large object.
void write (const std::string &Buf)
 Write string to large object.
size_type read (char Buf[], size_type Len)
 Read data from large object.
size_type seek (size_type dest, seekdir dir)
 Seek in large object's data stream.
size_type tell () const
 Report current position in large object's data stream.
Low-level access to object contents

These functions provide a more "C-like" access interface, returning special values instead of throwing exceptions on error. These functions are generally best avoided in favour of the high-level access functions, which behave more like C++ functions should.

pos_type cseek (off_type dest, seekdir dir) throw ()
 Seek in large object's data stream.
off_type cwrite (const char Buf[], size_type Len) throw ()
 Write to large object's data stream.
off_type cread (char Buf[], size_type Len) throw ()
 Read from large object's data stream.
pos_type ctell () const throw ()
 Report current position in large object's data stream.
Error/warning output
void process_notice (const std::string &) throw ()
 Issue message to transaction's notice processor.

Additional Inherited Members

- Private Types inherited from pqxx::largeobject
typedef long size_type
- Private Member Functions inherited from pqxx::largeobject
 largeobject () throw ()
 Refer to a nonexistent large object (similar to what a null pointer does)
 largeobject (dbtransaction &T)
 Create new large object.
 largeobject (oid O) throw ()
 Wrap object with given oid.
 largeobject (dbtransaction &T, const std::string &File)
 Import large object from a local file.
 largeobject (const largeobjectaccess &O) throw ()
 Take identity of an opened large object.
oid id () const throw ()
 Object identifier.
void to_file (dbtransaction &T, const std::string &File) const
 Export large object's contents to a local file.
void remove (dbtransaction &T) const
 Delete large object from database.
bool operator== (const largeobject &other) const
 Compare object identities.
bool operator!= (const largeobject &other) const
 Compare object identities.
bool operator<= (const largeobject &other) const
 Compare object identities.
bool operator>= (const largeobject &other) const
 Compare object identities.
bool operator< (const largeobject &other) const
 Compare object identities.
bool operator> (const largeobject &other) const
 Compare object identities.
std::string Reason (int err) const

Detailed Description

Accessor for large object's contents.

Member Typedef Documentation

typedef std::ios::openmode pqxx::largeobjectaccess::openmode

Open mode: in, out (can be combined with the "or" operator)

According to the C++ standard, these should be in std::ios_base. We take them from std::ios instead, which should be safe because it inherits the same definition, to accommodate gcc 2.95 & 2.96.

typedef std::ios::seekdir pqxx::largeobjectaccess::seekdir

Seek direction: beg, cur, end.

According to the C++ standard, these should be in std::ios_base. We take them from std::ios instead, which should be safe because it inherits the same definition, to accommodate gcc 2.95 & 2.96.

Constructor & Destructor Documentation

pqxx::largeobjectaccess::largeobjectaccess ( dbtransaction T,
openmode  mode = std::ios::in | std::ios::out 
)
explicit

Create new large object and open it.

Parameters
TBackend transaction in which the object is to be created
modeAccess mode, defaults to ios_base::in | ios_base::out

References largeobjectaccess().

Referenced by largeobjectaccess().

pqxx::largeobjectaccess::largeobjectaccess ( dbtransaction T,
oid  O,
openmode  mode = std::ios::in | std::ios::out 
)

Open large object with given oid.

Convert combination of a transaction and object identifier into a large object identity. Does not affect the database.

Parameters
TTransaction in which the object is to be accessed
OObject identifier for the given object
modeAccess mode, defaults to ios_base::in | ios_base::out

References largeobjectaccess().

pqxx::largeobjectaccess::largeobjectaccess ( dbtransaction T,
largeobject  O,
openmode  mode = std::ios::in | std::ios::out 
)

Open given large object.

Open a large object with the given identity for reading and/or writing

Parameters
TTransaction in which the object is to be accessed
OIdentity for the large object to be accessed
modeAccess mode, defaults to ios_base::in | ios_base::out

References largeobjectaccess().

pqxx::largeobjectaccess::largeobjectaccess ( dbtransaction T,
const std::string &  File,
openmode  mode = std::ios::in | std::ios::out 
)

Import large object from a local file and open it.

Creates a large object containing the data found in the given file.

Parameters
TBackend transaction in which the large object is to be created
FileA filename on the client program's filesystem
modeAccess mode, defaults to ios_base::in | ios_base::out

References largeobjectaccess().

pqxx::largeobjectaccess::~largeobjectaccess ( ) throw ()

Member Function Documentation

pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cread ( char  Buf[],
size_type  Len 
) throw ()

Read from large object's data stream.

Does not throw exception in case of error; inspect return value and errno instead.

Parameters
BufArea where incoming bytes should be stored
LenNumber of bytes to read
Returns
Number of bytes actually read, or -1 if an error occurred.
pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cseek ( off_type  dest,
seekdir  dir 
) throw ()

Seek in large object's data stream.

Does not throw exception in case of error; inspect return value and errno instead.

Parameters
destOffset to go to
dirOrigin to which dest is relative: ios_base::beg (from beginning of the object), ios_base::cur (from current access position), or ios_base;:end (from end of object)
Returns
New position in large object, or -1 if an error occurred.
pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::ctell ( ) const throw ()

Report current position in large object's data stream.

Does not throw exception in case of error; inspect return value and errno instead.

Returns
Current position in large object, of -1 if an error occurred.
pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cwrite ( const char  Buf[],
size_type  Len 
) throw ()

Write to large object's data stream.

Does not throw exception in case of error; inspect return value and errno instead.

Parameters
BufData to write
LenNumber of bytes to write
Returns
Number of bytes actually written, or -1 if an error occurred.
void pqxx::largeobjectaccess::process_notice ( const std::string &  s) throw ()

Issue message to transaction's notice processor.

pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::read ( char  Buf[],
size_type  Len 
)

Read data from large object.

Throws an exception if an error occurs while reading.

Parameters
BufLocation to store the read data in
LenNumber of bytes to try and read
Returns
Number of bytes read, which may be less than the number requested if the end of the large object is reached

References pqxx::to_string().

pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::seek ( size_type  dest,
seekdir  dir 
)

Seek in large object's data stream.

Throws an exception if an error occurs.

Returns
The new position in the large object
pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::tell ( ) const

Report current position in large object's data stream.

Throws an exception if an error occurs.

Returns
The current position in the large object
void pqxx::largeobjectaccess::to_file ( const std::string &  File) const

Export large object's contents to a local file.

Writes the data stored in the large object to the given file.

Parameters
FileA filename on the client's filesystem

References pqxx::largeobject::to_file().

void pqxx::largeobjectaccess::write ( const char  Buf[],
size_type  Len 
)

Write data to large object.

If not all bytes could be written, an exception is thrown.

Parameters
BufData to write
LenNumber of bytes from Buf to write

References pqxx::to_string().

void pqxx::largeobjectaccess::write ( const std::string &  Buf)

Write string to large object.

If not all bytes could be written, an exception is thrown.

Parameters
BufData to write; no terminating zero is written

References write().

Referenced by write().


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00058.js000066400000000000000000000031151224474465600207220ustar00rootroot00000000000000var a00058 = [ [ "off_type", "a00058.html#acb1cfe19cef8d7b46ecddaa5f2231e9a", null ], [ "openmode", "a00058.html#a56b79eb0d4019b7bfd63a914a530f2ca", null ], [ "pos_type", "a00058.html#aea8ca1d1275b9a68f8b991ef253e9067", null ], [ "seekdir", "a00058.html#adaa7a89a1902ba3f13be9c7ed6c1fa0b", null ], [ "size_type", "a00058.html#a546f724f294272c84c85ab4b4b415419", null ], [ "largeobjectaccess", "a00058.html#a6a83ff716d73bdf627d8ad29405b297d", null ], [ "largeobjectaccess", "a00058.html#af58cb0a2bfe6da7b3d17a572fd4ae573", null ], [ "largeobjectaccess", "a00058.html#abe93b38428b31cc1a533381f055fb3b8", null ], [ "largeobjectaccess", "a00058.html#aa93b5a0de67a09ab92514670ebcca638", null ], [ "~largeobjectaccess", "a00058.html#ac984b12f6980c477bfd3d895576635a6", null ], [ "cread", "a00058.html#a2552356fe475dc48fb5f3badb39cccc6", null ], [ "cseek", "a00058.html#afa13d389b11eac8063ade1febb7a4e2c", null ], [ "ctell", "a00058.html#aef7bc42d2a46bbb09c19c802616fa559", null ], [ "cwrite", "a00058.html#a0e047fa337f4df3838e983ca922fa7a5", null ], [ "process_notice", "a00058.html#afb99c68925c9dad182c41036ead832ae", null ], [ "read", "a00058.html#aac375f66e0a9fb817e4e59a1e73f6ba7", null ], [ "seek", "a00058.html#ae74922e23584d6410cf37f89f10c1a53", null ], [ "tell", "a00058.html#af81ac99156f3a319e8c021ac2e12da42", null ], [ "to_file", "a00058.html#a4adb675b5aed487e66d986fde3d54b4c", null ], [ "write", "a00058.html#ad04b47cf5b016f02e855f5e9c0bbccae", null ], [ "write", "a00058.html#aaaad87ca613bccb90e5a8c61a45d83ef", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00058.png000066400000000000000000000011621224474465600210720ustar00rootroot00000000000000‰PNG  IHDR’PÅ…ÜPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíÙ’«0 D›üÿ7‹¼ f|o©Ê9Š—¦½ðÊ0 C_0HRO¸$I²pI’dñ¤ I±MÓô ï/I’¤‚«’‚ÂÜu|¾+ÙpS )5†©Y–šCìYçc]’Ž%M—²Ì)…¦ÄéR³”J¡nšIÚÀp©==ë}’±J-JW –´¤ZIkþ.IÅ ¤¿ƒ¤ŠÒ»Ò¥ƒ#xa/moïÆ¡ç÷ÒΉË&yoüS'._IE1îÄtí’¤‚%%7$©æ$ÜgýoŸ]Iz—$I}J†aè €{xôE’^¯î4õ'iTÔ›¦%t‡{`á.X¸K»`á.X¸K»`á.X¸Kî€Å}.…B_zÂ%X¸$‹O%}Ò*¶išž|é$\•4VæÚt-¤J6ܧ+#u‰·GJÍ!ö¬óëc7¬ÏBÒÔo)Ëœš§KÍR*…ºéšDówü]ºTž /öIÆÁÅ)4‰5™Oõ¹¤ù²/%-©VÒš/úV’Ò€{ —[{Y.\ý‚Û.5ölº”ך…ËöÒöönz~/휸lÌ÷Æ?u⩱ï©wú¹é(¸()¹PóG’’ç_3ÿáÏ.À/á’,ú”B]ñS×ÓÚø¿IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00059.html000066400000000000000000000222471224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::internal::namedclass Class Reference
pqxx::internal::namedclass Class Reference

#include <util.hxx>

Inheritance diagram for pqxx::internal::namedclass:
pqxx::internal::transactionfocus pqxx::transaction_base pqxx::pipeline pqxx::subtransaction pqxx::tablestream pqxx::dbtransaction pqxx::nontransaction pqxx::tablereader pqxx::tablewriter pqxx::basic_robusttransaction pqxx::basic_transaction pqxx::subtransaction pqxx::robusttransaction< ISOLATIONLEVEL > pqxx::transaction< ISOLATIONLEVEL, READWRITE >

Public Member Functions

 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Constructor & Destructor Documentation

pqxx::internal::namedclass::namedclass ( const std::string &  Classname,
const std::string &  Name = "" 
)

Member Function Documentation

const std::string& pqxx::internal::namedclass::classname ( ) const throw ()
string pqxx::internal::namedclass::description ( ) const
const std::string& pqxx::internal::namedclass::name ( ) const throw ()

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00059.js000066400000000000000000000004761224474465600207320ustar00rootroot00000000000000var a00059 = [ [ "namedclass", "a00059.html#ad703d52d9d96025bf08d9da26f6829be", null ], [ "classname", "a00059.html#a9c216366ea21f1c9cd03b39410185cbb", null ], [ "description", "a00059.html#ab63de628429e771251ab8a2688ad407d", null ], [ "name", "a00059.html#a79dcce75176eef9d2d80fdc2ec2827a7", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00059.png000066400000000000000000000157131224474465600211020ustar00rootroot00000000000000‰PNG  IHDR0ø'¤t)PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ZIDATxíÝáVâJàÊ9¼ÿ#ß]EI^•ÁȆÚåSœL‚Ö™îþ ÿ¨Ãáp¨Ãápø.((((((Ø™Î=¸Aƒƒ‚‚‚‚‚=ê܃48(((((Ø£Î=¸Aƒƒ‚‚‚‚‚=ê܃48(((((Ø£Î=¸Aƒƒ‚‚‚‚‚=ú¹wþÌÿýôoüj_|"ÜËo?éwçÞÿ~ú7~µóÖÍþžß  îïGæÞÁáå¹¾¾¿™}ÖŸï¯ï_^Vf÷ýýöþ«­—_îÿùåS7×ß¿Â}ýÐc¡     à×üÈÜû;¤O¯·ñ~`ñšÿpšòóU³×rùÏ#ßžºÜ°|ââà¾~æ©PPPPPPð{~dîGöÛ8ûúvùb¼/œ÷Ìw^^Ü9ûvåö›ë?ö`((((((ø%?2÷V£üå3^¿Î§ùiìÿýw¾çÕËÒû Ë‹;g¶Øwù¹p7?ôX((((((ø5?2÷f3üààüz¿|Þñ¶zZY^¼ò8ç×êêbßê+ÜÓÏ< ~Ï̽Ãy¨ÿ}ûºpþ¬õð_›}{ÿ×÷,¾öÄÅ>¸¯Ÿy*üž™{‡—þ2Èßß¼.¯‡ú‹ÓÅ™¿7:8¿®-¿ßù²vúé¼oñÑp_?ôX((((((ø5?2÷fÝí\ÝíOíGæÞì¡»«»ýà    à©ýÈÜ›=t·su·<µÎ=¸Aƒƒ‚‚‚‚‚=ê܃48(((((Ø£Î=¸Aƒƒ‚‚‚‚‚=ê܃48(((((Ø£Î=¸Aƒƒ‚‚‚‚‚=:‡:‡ï‚‚‚‚‚‚‚‚m¡       ŽPPPPPPPðôŽÇ#<»ãñOîø÷<·ãßPPPPPPPðìŽPPPPPPPPG(((((((¨#Ô êu„‚‚‚‚‚‚‚:BAAAAAAA¡       ŽPPPPPPPPG(((((x ÇãñXÇãñXÇãñXÇãñXÇãñø”   0{µ@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBÁo™¦izXÇiš¦Gÿºiš¦‡Õ~¿eJ’J’ïi@AÁ.´&É ÚaÿZ IrƒìBûa’Ü ýö¯’$7h@AÁ.´&É ÚaÿZ IrƒìBûa’Ü ýö¯’$7h@AÁ.´&É Úaÿ6*ÕwI²ò~ñw%9¿þì¼Ü|øúýIr‹ìÂFý0I. v½ï>$Iî¦ýöoóùßóü~ñ[¥“$ [ÔL  vaó~x[ßúŸ[4¿$Yi?„ý»Wrx9©¾¾¿™Þ?ß_/Þ¿¼¬Ìîûûí}ûË®—»N닇ξýýò²c¶ïô~ýà×Å$¹‡ì½úa’\úÿ.9Öõ.?ãòæ$ù!퇰÷*׳þzØsȵ×ü‡÷é}^Í!‹×Û¥‹{Ï{sÈùµÜw¹k¶3IFµ@  `îÕ“äÒç]r ë]|F9¿îÖø’äŠöCØ¿{Èê<¿œÎׯo——3{í¼gþ¸Ë{—këG.¿-w-$CZ PP° ÷ê‡Iréó.9Ðõ.ò¾¹#Iî®ýöï^òy)œwþþ›ã/Kï7¼Ÿðóúë®åÚ¥3{ðy×ìI2ª»p¯~˜$—>ï’]oõ·&ûöþn/I.µÂþÝ«@g÷ý8¿ÒÅé~[]ÍõÕþ+—¯í½V:«;ç¥8«¬$¹]  vá^ý0I.}Þ%ºÞµÏ˜Ýœ$?¨ýöï^r8ÿ¿o_Î'uqºIV–å²°¸÷KkWv­ª3I´@  `îÕ“äÒç]r ë]|F9¿îÖø’äŠöCØ¿{ÈáíìÏÞ¼.¯O÷¬ZæþÞ8Ûü6Úß×O»Îk§§¼¾ûá\Aç’|ÿ½Þ$£Z PP° ÷ê‡Iré³.9Ôõ.>ã´Ö“䇴ÂþÝ«@fçñ§f’ü¾ì½úa’\Úq—l?„ý»W츒äR  vá^ý0I.ýd—<¼þK’ßÐ~ûw¯ùÉRH’‡Ó‚‚]¸W?L’K;î’퇰?[ I²S-((Ø…öÃ$¹Aû!ì_ $InЂ‚]h?L’´Âþµ@’ä-((Ø…öÃ$¹Aû!ì_ $InЂ‚]h?L’´Âþµ@’ä-((Ø…öÃ$¹Aû!ìß4MSMÓ4}üë¦išjš¦é»  à7¡   à µBAÁJ  žUû!,­(((xNí‡PP°Ò‚‚‚gÕ~Kê£O©ý VZ PPPð¬Ú¡ àBË žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµBAÁJ  žUû!¬´@   àYµÂNÇcÇcÇ㯂‚‚+ŽÇ㱎Çãq|W£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ4C¸I£ƒ1ÍÆ4C((øH+Æ l‘Òì§k«‹zŽÓÆúƒ4/›í¬QŸ7~°–$ÛûÕãwu:}xú.NÕç±níÖ~ãô]$¹¨ôy²ëÓºñ©œe{¶U¥|¹Cÿ­æñ:öÕ=ÇiãF=Kóœàß·¯ ç¿z~ù²sÿÆqK²xm~ü> l‘×"¦«Ãïóµ$ùa[gø½0—§ïZR¦˜$™e{¶U¥|¡Fþ¡Vóûj:ã´q£ž¥ùßìÍëò)—ŸÏïN¡¯Žçë¥$ÙÜæÇïÿ›]=§÷6¾þæôra±óuëÛÎsžÛUñÖ~ùô‚yù¿:l—ÉÎ~[O’mÌ2„‚=ÛªR¾Ðpþ¡Vóx{ÙWÞ†Ûƒç8mܨçi^{{emãþ›$_²ýñ{øH’ä[¶ÎpaÎ2„‚=ÛªRv×pÚ±“dÌ´q£þršçµGͺÇ/IÆláÜe{¶U¥ì®á´c'ɘiãFýå4Ïkšu_’ŒÙ:Ã=†9Ë öl«JÙ]ÃiÇN’1ÓÆ:Ivâ׆]’ìD3L’1³ ¡`ÏZ)Irƒv›$35º$¹E_’Œi†I2f–!ìY+%InÐn“$c¦F—$·èñK’1Í0IÆÌ2„‚=k¥$É Úm’dÌÔè’ä=~I2¦&ɘY†P°g­”$¹A»M’Œ™]’Ü¢Ç/IÆ4Ã$3Ë ö¬•’$7h·I’1“iš¦š¦iú®Ùñ›¦iªiš¦oj†Ó4Mc à9LÓ4Õ4MÓw5Ãiš¦1PPP°v„‚‚‚+Z)PPPðdÚ¡ à#­(((x.Çcû \×J‚‚‚'Ó6i¥@AAÁsùÓÛ¡ àªV <™¶A((øH+ žN› |¤•O¦m >ÒJ‚‚‚'Ó6i¥@AAÁ“i„‚‚´R   àÉ´ BAÁGZ)PPPðdÚ¡ à#­(((x2mƒPPð‘V <™¶A((øH+ žLÛ |¤•O¦m >ÒJ‚‚‚»:Ç:ÇPp³ãñx¬ãñx¬ãñxü5PPP˜½Z 0¦˜fcš!Œi†PP°Ò1ÍÆ4CÓ aL3„‚‚•Œi†0¦˜fcš!¬´@`L3„1ÍÆ4CÓ ¡ `¥cš!Œi†0¦˜f+-Ó aL3„1ÍÆ4C((XiÀ˜fcš!Œi†0¦BAÁJ Æ4CÓ aL3„1Í VZ 0¦˜fcš!Œi†PP°Ò1ÍÆ4CÓ aL3„‚‚•Œi†0¦˜fcš!¬´@`L3„1ÍÆ4CÓ ¡ `¥cš!Œi†0¦˜f+-Ó aL3„1ÍÆ4C((XiÀ˜fcš!Œi†0¦BÁo™¦izXÇiš¦GÕ §išÆ4Ãiš¦1Ípš¦iL3œ¦i»6%I%É÷Ì›L’T’|O3L’1Í0IÆ4Ã$3Ë v¨’$7h“I’1Í0IÆ4Ã$Ó “dÌ,C(Ø¡H’Ü M&IÆ4Ã$Ó “dL3L’1³ ¡`‡Z Irƒ6™$Ó “dL3L’1Í0IÆÌ2„‚j$É Úd’dL3L’1Í0IÆ4Ã$3Ë vè¡ ä°~w^H’+>Ý$?â›Ì—cü³þ{þV†×þâÿMჾžÜÆü çðK©>HdI²ðÀµüåNøÛE=Ë vè¡ ä˓$÷ôÀMæ;1þ^€¿•á·ÿâfá·Zx’üŒ9‡_ú$²$YxàZþr'ü튞e;´mrx9Ͼ¾¿™Åߟ^¾¼m|ñ¶çýâùÛņ$ÙÆo6™›c|ÿá5®¿—g©nÞk~&ÃÿOgvù|qvŒÎ»®…xºáÏ…Sžë]뇟®Ÿ?àm_’ÜÃVçð©>JdI²°u-’åâ¼½nyØè®e;´í°; ­—sC®¿N—— o+ó=‹ÅÍ*ã—šÌ]bœ7¢« 'Év~&ÃÏÒY&´NaùÏnø ê˃ºÞ—$w±Õ9¼GªY’,l]Ë_ªß+§ï£»–!ìжÃnu´_ŽòlNÞ­ÉÂzϺÛ'ÉOÛºÉÜ'Æ‹L/ÀËð é,𽹨u­/ÏÝåi\=üj[O’»ØêÞ#Õ‰,I¶®å/ÕïÕÓ÷pÑ]Ë vhÛa÷•®óçßbœ½.¼_»Ü3Û$ÙºÉÜ'ÆE7¹’p’lçg2üâh{?K×FÛ*¢Ehë^¼ˆúýóÞÖ~º…ouï‘êƒD–$ [×ò'Y¾§w-ƒ‹îZ†P°CÛ»Å1^̯ÙY_~{»8;ú—¥ô¶š$ÙºÉÜ'Æ¿Û_nù á$ÙÎÏdøy:ËVºº¾€ÿ{Ãå®kGóG[øVçð©>HdI²°u-’å%üÑ]Ë vhÛaw8WÇß·¯ ‹‘õvÐet½ZÎÛ6¬‹_k2wŽqâïøc~–κ£.S¸œmóç%‡ÙëƒCù•µ$¹‹­Îá=R}È’daëZþRý¾·‡:mIrÝ,C(Ø¡m‡Ýá­4fo^—gò÷§Óõ³jz¯¯×;^¾.6$É6¶n2wŒqþæmïöþX†Ÿ¥ó¾úvˆÍfÛiiþ¼·§ž={Ðù1‹‡¿mž=í¾Iouï‘êƒD–$ [×ò'Y.ÎÛ[ ?ht×2„‚ÚvØÍ›G’üön2{Œñg2ÜÑ!K’Olu÷œêÖµ¼Ç,gBÁm;ìvT)[7™=Æø3ޤsxý—$ÿˆ­ÎážSݺ–wÔ¯e;´í°ÛQ¥lÝdöãÏd¸Çvœ$×mu÷œêÖµ¼Ç,gBÁm>ì’d¶n2I²7Í0IÆ4Ã$Ó “dÌ,C(Ø¡H’Ü M&IÆ4Ã$Ó “dL3L’1³ ¡`‡Z Irƒ6™$Ó “dL3L’1Í0IÆÌ2„‚j$É Úd’dL3L’1Í0IÆ4Ã$3Ë v¨’$7h“I’1Í0IÆ4Ã$Ó “dÌ,C(Ø¡iš¦š¦iú®f8MÓ4¦NÓ4i†Ó4Mcšá4MÓ((((x6G(¸Y3„‚‚‚‚‚Ýè°ƒ1Í öâxì´ƒÍ v£ÃÆ4C(((((Ø‹?³®Ó4C(((((Ø;Ó ¡    `G:ê`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í v£ÃÆ4C(((((Ø;Ó ¡    `7:ì`L3„‚‚‚‚‚Ýè°ƒ1Í ¾cš¦éa§išU3œ¦igJ’J’ï™ »f˜$7˜e¢Ã.In0vÍ0In0Ë D‡]’Ü`6ìša’Ü`–!<ˆ»$¹ÁlØ5Ã$¹Á,C(((((xvIrƒÙ°k†IrƒY†PPPPPð î5ìI²ògíÚr’\úlóß‹‡?ÿ^8½9ßñúãë¿óç=çÇŸöÌÖ Iò³a÷µ ÿå(NËï×ÏÏš?úä}óù—8ß–äüšeâkÃ.Iþßµ ÷­!üÙ燽M¦ó›×Þfàåž·wóW¦ç7~×Õ°ûZ†ÿr«ûΟ²øŒ“Åæó—$Y™eâ‡ÝŸ©ðÚðgo.fÓáeñ´ãÝë…—k—»Þ¿ž¿ýýòzã|ß•)yþüù»˜’ó=óA¶¸g9j¿>ÑWÃî”áÿ§õOG±zÔùS^NWæŸ}ÿ8ÙY†PPPPPð NÃ.I.½Î¸×!—CÖ¯·ë§ ³¹ñù®ÅÞr~Íö½ÏÓ·iô>Ÿ®ÌÍÙµñ)y1¤“da6ìN~’Ö¿Å•G­oXüÞËÍç/W¢eâ4ì’äÒj޽6ÿY÷ŸËoËråò•y¶zÌüÃfCó»Sröì—Güý7ÿíO Ë)9ÿ;“dm6ìN~’Ö¿Åiýê ³Ï|ý?Û|þ%Þ–VÑÎ2„‚‚‚‚‚qvIré“8ׯÛìç—™±ž~‹áteJ.föjÖ®¦äû@º:%_'ÙyéýQç™¶¸°škIra6ìN~’Ö?Åü÷ŸÊù“þ>áõ)‹Í‹Ç®£eâ4ì’äÒrfÍ'ÙÅY~[O½._̳վ弽>cë~Sr1¢“de6ìN~’Ö¿ÅÅ£–¿øìã.?wñØu´³ ¡    àAœ†]’\úÛÙO¯×&úzeη&‡ÙëÊ”¼6¯NÉÙp™O å›«SrýæÚ”œß·k³ñœ$W̆Ý)ÃOÒúW£˜?jy}þ{¬>iymñ¸Y´³ ¡    àAœ†]’\:¼Í¼Ù›×åÅz}{Þú¶ñtÛû®Ó¥ós^7Ÿðvã|°®fÖŸ‹o³óý çù·Pï{Þ‡ÛióéûlÏ.$ɗ̆Ý)ÃOÒú£xû෻߯¯ôþ[-6/>ÿZ´³ ¡    àAœ†]’\šõø¯OÒ$y³awÊp‡iýðß1Ë ÄiØ%É¥ŽÀ$¹‹Ù°;e¸¿´~úϘeâ4ì’äÒþF`’ÜÇlØ2lZIò³ ¡    àAœ†]’T’|ÕlØ5Ã$¹Á,C(((((xvIrƒÙ°k†IrƒY†PPPPPð :ì’ä³a× “ä³ ¡    àAtØ%É fî&É fBAAAAÁƒè°K’̆]3L’Ì2„‚‚‚‚‚1MÓTÓ4MßÕ §išÆ@Áíþx¤Ô^XCIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00060.html000066400000000000000000000666621224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::nontransaction Class Reference
pqxx::nontransaction Class Reference

#include <nontransaction.hxx>

Inheritance diagram for pqxx::nontransaction:
pqxx::transaction_base pqxx::internal::namedclass

Public Member Functions

 nontransaction (connection_base &C, const std::string &Name=std::string())
 Constructor.
virtual ~nontransaction ()
- Public Member Functions inherited from pqxx::transaction_base
virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Additional Inherited Members

- Public Types inherited from pqxx::transaction_base
typedef isolation_traits
< read_committed
isolation_tag
 If nothing else is known, our isolation level is at least read_committed.
- Protected Member Functions inherited from pqxx::transaction_base
 transaction_base (connection_base &c, bool direct=true)
 Create a transaction (to be called by implementation classes only)
void Begin ()
 Begin transaction (to be called by implementing class)
void End () throw ()
 End transaction. To be called by implementing class' destructor.
virtual void do_begin ()=0
 To be implemented by derived implementation class: start transaction.
virtual result do_exec (const char Query[])=0
 To be implemented by derived implementation class: perform query.
virtual void do_commit ()=0
 To be implemented by derived implementation class: commit transaction.
virtual void do_abort ()=0
 To be implemented by derived implementation class: abort transaction.
result DirectExec (const char C[], int Retries=0)
 Execute query on connection directly.
void reactivation_avoidance_clear () throw ()
 Forget about any reactivation-blocking resources we tried to allocate.
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Constructor & Destructor Documentation

pqxx::nontransaction::nontransaction ( connection_base C,
const std::string &  Name = std::string() 
)
explicit

Constructor.

Create a "dummy" transaction.

Parameters
CConnection that this "transaction" will operate on.
NameOptional name for the transaction, beginning with a letter and containing only letters and digits.
pqxx::nontransaction::~nontransaction ( )
virtual

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00060.js000066400000000000000000000002631224474465600207140ustar00rootroot00000000000000var a00060 = [ [ "nontransaction", "a00060.html#a8ed8b2f6aa96cef8508c84ee5369b390", null ], [ "~nontransaction", "a00060.html#a0069617cbc84ba559bdcdfdf3cd97f3b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00060.png000066400000000000000000000020431224474465600210620ustar00rootroot00000000000000‰PNG  IHDRˆÊãÌPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2²IDATxíërë y&ïÿȇ;—ÆQ“:U&Ÿ1DˆEHä/”ÏV?µ»H¿¼Kü¬Ø:œ¹¼.œllëÂUºçÆ¡÷ÃWváþâÃO¸´Ët/í(z½³‰üÄ-]ØÅ¥‡dŸù%ÎÉ“ÚcˆCq8ŽÇG‰T4îóR“†«}-tžßû±É+~òÄ>žüŽM֪͋æÅ·ôÌÇTœöñѯÎõ¼Ù¾ÏÏVõû¼±Nï}}¥Ô—fçm'-7RDëêþ·užÎ¥Ý&g•ê¹AW›z :7ÔNÓgG—†T‚ëaµ©2SCNvûuû}7"““iì¸Ã· ÕEƼÉ^ovç¯ÊéÉRõÕ®ßwuç5åG‚Ž«bÊ‘{ûc?Ù¬ÊÝÑWitn§ï»”·­šTx[µ©ã(4_-º–øSáä²›êUYÏs²«ÕZn}ß©KöúþùéVÝw}°Ïm»ïLG?·Ìÿï÷Ý’ý¾[2‚ý¾[2‚‘®äÞV?-×è¼Q€eµ4Ýã±2ÞÒtna¼µé¼f¬r:›œÀ&§°Éélr:›œÀ&§°Éélr:›œÀ&§°éoÑmÛ¶-+6‘Eåt""69ˆˆM/Ó‘[Š–WÆw|–NDäLvº !OŽÏþ2†Ô‹¿Ô7mÝ~mFÉAkvû5Ž“ŸÐ•Éþ%ÈÉ·™T 2¾ss°;¬!AÆ÷Ó³Øí½¶§þYgÖ¼ðó ñÑI·/]<µj?œ—èŠ}™œÞ_¤›â>;Þ¯zäsºÃd™¾_çݱ*.èžçÝL÷¼»¨Ù^*ýdËà|²ªœçšc·³¿_³–»MDäúYºœùljˆœê·ÅNDd9ˆˆMN'"bS¤Û¶m[UoÔ`Y-M÷x¬Œ·4]„[om:¯Y«œÀ&§°Éélr:›œÀ&§°Éélr:›œÀ&§°Éélú[t!„°¬‹Êélr:›ÞIwßS´¼eüßèžêŠ.ŽçÒ•Ó^”Û1ššÒËïÙŸí3UÓ.²Ù`§KºüìŠÀáÛßö½³Q5Ö›ƒÀ^×±Û;hϳŸ§FgÖ´ðèœìõºüÔ»ýH?D7ÅsºÃª‡@~›N¥ØiUܦ{žw–Ø]Ôìä¸Wݜޥ&'«Êy®YÓɾ|¼UN`Ó;ÿÉÞ+§°ÉélJ—m!,ªc 1|;_ÀÒIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00061.html000066400000000000000000000266741224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::not_null_violation Class Reference
pqxx::not_null_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::not_null_violation:
pqxx::integrity_constraint_violation pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 not_null_violation (const std::string &err)
 not_null_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::integrity_constraint_violation
 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::not_null_violation::not_null_violation ( const std::string &  err)
explicit
pqxx::not_null_violation::not_null_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00061.js000066400000000000000000000002721224474465600207150ustar00rootroot00000000000000var a00061 = [ [ "not_null_violation", "a00061.html#a43eceacf51e6bb47d6bb90517a574c2a", null ], [ "not_null_violation", "a00061.html#a5372bb4e822109abf338516fa6b0733e", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00061.png000066400000000000000000000027271224474465600210740ustar00rootroot00000000000000‰PNG  IHDRÌø—ù{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2fIDATxíëÒ«*›E•ïÿÈÇ x‰‰‰ßlΤlƒ€0-8þ%Æ[(Imà2’d—‘$‹“ ã!IŸ`OF’>ä=™ 0Nן—B‹æá:=úá?õþ¦;†òx•ÕIÒEÞ”™b§UÐæ8jΞ{Qý)?²:IºÆ»+SO–ÎWšSÃT7×W÷ìxJÒ5ž•~µÌT÷×2Û}ô¢9[Œµz³@ÏÉd/Å^8o^-Óß‹wæ×+s®R7³Ùœ8–ºŸo³“/‹fI:âÞæI™ñ%?ÿfü;2’ô‚?‘$øŒ$YÄe$É"½LŒ16Àt­Ð’L×5dÓ’LïÒŽMS2žÍlâ2q‹¸ €E\À".`—°ˆËXÄe,â2q‹¸ €E\à=bŒ±ˆ’Ô.#IqI²ÈC2!,¥ñ¤ïóŒL¾u™0?ûþ¼Ö°Ãx5Ÿ—Å™.Öu“¤Ïù–Ìã #…Í‘¨*²²$Ýãk+“ǘ/N±±öìþM™~7íËL ’t“_È!çÍ Z/¯ÊÞ™mØ•IéÀâ6;ÈfÙ š©bÎkƒ$Ýæ‹Ûì×_I:Çe$©¤)Iú{\F’,â2’d‘^&Æà:€VhI¦ë²iI¦wiǦ)Ïf6q‹¸ €E\À".`—°ˆËXÄe,â2q‹¸ €E\À".ð1ÆØ DIj—‘$‹¸Œ$YäA™ I?ÅeŠÃd^ yàkk.R¯þo:e’ô·eÆp¦xt|äq¥‘t**$é3î¯L w¹ i*M­;2õÅÍøc™ùá×2ÃϺL¾¯ò{+³ü[’ÉÞŠðâ1·2Ù,-Èy6[NU”¤÷ùÆ6»ôùýWæa™ñÅ¿™~%é_I²ˆËH’E\F’,ÒËÄc#<@Ð -Ét]C6-Éô.íØ4%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄeÞ#Æ[(Imà2’d—‘$‹\• ;¥ª}¿A’¶T}OFßk:šìý•9Œù†Ì¥A^=ÏL&(Œ}úóRÈîÆP–ÓÔwºulLW뤩ÛÜkwdtnËG_#ž—`é´ÎžW/÷¬2Óc_íùEV·mØ §ê•ݶ}s÷A©·Z™ºG:çÛ´3gWf;r^— ]4ÉÝ«(>–~RPAýh÷eæÅLÍËH™iÖQgݯÊlCÛ¬Œ¤P²Üz.s¾¨ç2»ÛlO&{7ŽÀÑ;s"³™´Üg2óÒ}$s”Ív_¸*›•bGÙ,ßf)î)3Õû»”©²Ù`U½³Í¾ðÁxç^Iú*wd6+‘½ÔÙC’ÞàÆÝ·Vf3矮K&#Iÿ:.#IqI²H/cŒð@+´$Óu Ù´$Ó»´cÓ”Œg3›¸ €E\À".`—°ˆËXÄe,â2q‹¸ €E\À".`—xBh@¸ €E\À"?‘9²¯ß4­E飨þ\æ\ à:Weú~cÇ!—§B6íZ;<•³ú™Bf­›oXJ郑ª×áN¸,³Ä2Í 8ÖPˈëú=™ƒRº¸¾é®¯L=A:ï5ןˬ{±¬6/3O]E=í³'eŠù¾)³»Í~ “½» à•LööIëOd޲Y1qJ@õŠYc#Se³q†ªà5ïl³›_€ßò#™áEÎ>7›îð¿\ó¸ €E\À"Ã*„Úà?9¢Ù PIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00062.html000066400000000000000000000260451224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::notification_receiver Class Reference
pqxx::notification_receiver Class Reference

#include <notification.hxx>

Inheritance diagram for pqxx::notification_receiver:
pqxx::internal::notify_listener_forwarder

Public Member Functions

 notification_receiver (connection_base &c, const std::string &channel)
 Register the receiver with a connection.
virtual ~notification_receiver ()
const std::string & channel () const
 The channel that this receiver listens on.
virtual void operator() (const std::string &payload, int backend_pid)=0
 Overridable: action to invoke when notification arrives.

Protected Member Functions

connection_baseconn () const throw ()

Constructor & Destructor Documentation

pqxx::notification_receiver::notification_receiver ( connection_base c,
const std::string &  channel 
)

Register the receiver with a connection.

Parameters
cConnnection to operate on.
channelName of the notification to listen for.
pqxx::notification_receiver::~notification_receiver ( )
virtual

Member Function Documentation

const std::string& pqxx::notification_receiver::channel ( ) const

The channel that this receiver listens on.

connection_base& pqxx::notification_receiver::conn ( ) const throw ()
protected
virtual void pqxx::notification_receiver::operator() ( const std::string &  payload,
int  backend_pid 
)
pure virtual

Overridable: action to invoke when notification arrives.

Parameters
payloadOn PostgreSQL 9.0 or later, an optional string that may have been passed to the NOTIFY command.
backend_pidProcess ID of the database backend process that served our connection when the notification arrived. The actual process ID behind the connection may have changed by the time this method is called.

Implemented in pqxx::internal::notify_listener_forwarder.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00062.js000066400000000000000000000006371224474465600207230ustar00rootroot00000000000000var a00062 = [ [ "notification_receiver", "a00062.html#af1f7329b7989d05272f6ac354fa1ac3e", null ], [ "~notification_receiver", "a00062.html#ae4ed572d3a137b331d363bae82f4ce9b", null ], [ "channel", "a00062.html#a8c675af7630284e6b919a8523595d1d7", null ], [ "conn", "a00062.html#a972d65eb33a24b044e9d5c2cb342cd14", null ], [ "operator()", "a00062.html#ab1956501c582e41377bc54b4db377ded", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00062.png000066400000000000000000000014421224474465600210660ustar00rootroot00000000000000‰PNG  IHDRéPË,¢lPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2±IDATxíí²« E›™¾ÿ#_? Œ-öLíäœnkCYã_Bá"Ü@ƒ / R€¾ôEÒiâyn¯é=‡ÚõÇD¿Kz”ß/ÎÑ9ÒÉ{qŸë”nLâ›u.ÚRÌõ6ÙŠ¡dKQ6#ë½ù­AÆ~&ù“¤ëjK*vŸ|G`û¸_æGy–óÖøA%0@£ÎÖ´N±XîNýîó.'1AǤ­ºšt:w-¤Ù-Åd?3|i‘q#鋃]×Ôýz’~ÒØ>NÝŽôÑsúòôV›•/_¯éAï-RO½2™ëÞ»ÛÞ»#=ê½ùÕUî0À[?½?|%|¬ÿ†té2§^'4j З)@_¤}i~‹‡ p¹·ÐmH» Þ†t½ ê}HGïèMƒ / R€¾4HúÒ èKƒ / R€¾4HúÒ èKƒ / R€¾4HúÒ øžbŒñj=bŒñj%餒ԗ©$õ¥VÒàÜIR¥ƒÁÉ<„zøi?ovjòr';_ÓIÝAkiahä|Mžû5]ó Yv6…|Y,&n©Ú¶”1Ï—ÙJëÕÚÌ[N¹¬‘*ºz'sš¬ÌhA؇o¤ëªÙ1HõÇþ0Z“㬠íã’Öe¬=±v†Ä“arFù«75­«×(²V 9OÝ ÒÚÛwWjm‹îŠðÏHç¿Ý§|GZfž·}›·üÕFºÏ¨÷I‹äüšV ×G¤æ©³^qì*‡¤ë¿‚T«wŸÓ£Žôâôþ…Ô+zÛéU<ÏisïuûŶ æô:ι]åóO¯é½6¶&-̲Y¢î½Îé=ûÖ’¤Óúîì’äërÒTg¿¤÷:ë/Iµ®&ýUE ©$u­A*I}iJR_šHcŒñúÉ›0o²NIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00063.html000066400000000000000000000233541224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::notify_listener Class Reference
pqxx::notify_listener Class Reference

Obsolete notification receiver. More...

#include <notify-listen.hxx>

Public Member Functions

 notify_listener (connection_base &c, const std::string &n)
virtual ~notify_listener () throw ()
const std::string & name () const
virtual void operator() (int be_pid)=0

Protected Member Functions

connection_baseConn () const throw ()
connection_baseconn () const throw ()

Detailed Description

Obsolete notification receiver.

Deprecated:
Use notification_receiver instead.

Constructor & Destructor Documentation

pqxx::notify_listener::notify_listener ( connection_base c,
const std::string &  n 
)
pqxx::notify_listener::~notify_listener ( ) throw ()
virtual

Member Function Documentation

connection_base& pqxx::notify_listener::Conn ( ) const throw ()
protected
connection_base& pqxx::notify_listener::conn ( ) const throw ()
protected
const std::string& pqxx::notify_listener::name ( ) const
virtual void pqxx::notify_listener::operator() ( int  be_pid)
pure virtual

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00063.js000066400000000000000000000007271224474465600207240ustar00rootroot00000000000000var a00063 = [ [ "notify_listener", "a00063.html#a8a6592b38ed1c547266c05e1f3daadce", null ], [ "~notify_listener", "a00063.html#ac4593cefb4b75ef4373b2aa44d4bd061", null ], [ "Conn", "a00063.html#a183d105d5bd011d45843526004bc0f40", null ], [ "conn", "a00063.html#a9b6ca1f8939f82c391fecb7082364ec7", null ], [ "name", "a00063.html#a61fecb70ec917b3403dff4228b69a61a", null ], [ "operator()", "a00063.html#a0f8b3a6f5183bc9466fba30bd760af85", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00064.html000066400000000000000000000253241224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::internal::notify_listener_forwarder Class Reference
pqxx::internal::notify_listener_forwarder Class Reference

Internal helper class to support old-style, payloadless notifications. More...

#include <notify-listen.hxx>

Inheritance diagram for pqxx::internal::notify_listener_forwarder:
pqxx::notification_receiver

Public Member Functions

 notify_listener_forwarder (connection_base &c, const std::string &channel_name, notify_listener *wrappee)
virtual void operator() (const std::string &, int backend_pid)
 Overridable: action to invoke when notification arrives.
- Public Member Functions inherited from pqxx::notification_receiver
 notification_receiver (connection_base &c, const std::string &channel)
 Register the receiver with a connection.
virtual ~notification_receiver ()
const std::string & channel () const
 The channel that this receiver listens on.

Additional Inherited Members

- Protected Member Functions inherited from pqxx::notification_receiver
connection_baseconn () const throw ()

Detailed Description

Internal helper class to support old-style, payloadless notifications.

Constructor & Destructor Documentation

pqxx::internal::notify_listener_forwarder::notify_listener_forwarder ( connection_base c,
const std::string &  channel_name,
notify_listener wrappee 
)

Member Function Documentation

void pqxx::internal::notify_listener_forwarder::operator() ( const std::string &  payload,
int  backend_pid 
)
virtual

Overridable: action to invoke when notification arrives.

Parameters
payloadOn PostgreSQL 9.0 or later, an optional string that may have been passed to the NOTIFY command.
backend_pidProcess ID of the database backend process that served our connection when the notification arrived. The actual process ID behind the connection may have changed by the time this method is called.

Implements pqxx::notification_receiver.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00064.js000066400000000000000000000002711224474465600207170ustar00rootroot00000000000000var a00064 = [ [ "notify_listener_forwarder", "a00064.html#ade491702e92e9e98b540c57d53b896db", null ], [ "operator()", "a00064.html#aa09aa1f99cc15c8f9ffb8ff5478ecd01", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00064.png000066400000000000000000000014511224474465600210700ustar00rootroot00000000000000‰PNG  IHDRéPË,¢lPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¸IDATxíÛrë EÛ3ýÿO>¾„‹dœ˜t’žZvâ€Z‹W–eY†‹$  I*I}i’JR_ú iØ›BØ¿$åö’¤ûj÷”ÛgI¯âûeÐ’Ô¬6Ò5={[žâCxîÝ’¶'óxŒ}f(öE¯<‰µÎv‡SÑß²e¤Çj{( :µô¤ Üª_Å{–ÓÖÔ,°$ÝTkN}ˆf¹g8þ%=Çm')œ®I%鮾Mºž»;¤É,ú$»bøk¤&⛤O¶ÏiõëAúNa{ÿ=­V¤·ÞÓ§§×mVúøxN/j¯ =ÖÊØíkïî\ÖÞéUíMW—ÝaIz©öÓû‡W¢$½­ÿ†t¯2M׆$5hæT’úÒ$•¤¾4I%©/­¤Ë²,#àëúBÃþüŒ‚: é :ê8¤³öô¦I З&)@_š¤}i’ô¥I З&)@_š¤}i’ô¥I З&)@_š¤}i’|N!„0„h’ô¥I Зî’f«§öƒk÷6²Ö? hþ×óæ‹àµ*fí9}“´:Xö܉ãv¬ÏHׇýi»wâCá²ïþÖµ]LÇÇáœÍ÷¬óæîã2;ýùˆ¹.æµSÉx §î8™hG8»gÒcÕdÀ·òGaÙU1&[•ÔXßòÄ–3Dž‘"J_ƽȩ_̯a¢&€Qå­k õÖusxåEÏÆý=Òíï´Åq#_‘ÚÈÓ¶çyí¯{¤çˆ¼{ÔWÏ©[ØS\‘ÚèzÅU—XÿðòîÕ÷ôª"=9½¿!­%ýÞé%@Mæ=½]{«õ"oCqz+Æ©\šôÕOoQ{K_Ojº3r±„¯½•ÓÛzk4ë³³ÔõuÒ˜G½x­V{¯o“þUF]èV“ /MR€¾´’†ÂúDF1_ sºhIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00065.html000066400000000000000000000174501224474465600212570ustar00rootroot00000000000000 libpqxx: std::numeric_limits< T > Struct Template Reference
std::numeric_limits< T > Struct Template Reference

Work around lacking "limits" header. More...

#include <compiler-internal.hxx>

Public Member Functions

template<>
long max () throw()
template<>
long min () throw()

Static Public Member Functions

static T max () throw ()
static T min () throw ()

Detailed Description

template<typename T>
struct std::numeric_limits< T >

Work around lacking "limits" header.

Member Function Documentation

template<typename T >
static T std::numeric_limits< T >::max ( ) throw ()
static
template<>
long std::numeric_limits< long >::max ( ) throw()
template<typename T >
static T std::numeric_limits< T >::min ( ) throw ()
static
template<>
long std::numeric_limits< long >::min ( ) throw()

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00065.js000066400000000000000000000004501224474465600207170ustar00rootroot00000000000000var a00065 = [ [ "max", "a00065.html#ae5fc707d9d6ebbac808a5fb6e26690f8", null ], [ "max", "a00065.html#af71385909ae48a64f6e88d19f940bcd1", null ], [ "min", "a00065.html#a672ff8f843f277b741fef22594a1d78f", null ], [ "min", "a00065.html#a9387cf870c1b7d0f6ced0db05614e494", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00066.html000066400000000000000000000266041224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::out_of_memory Class Reference
pqxx::out_of_memory Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::out_of_memory:
pqxx::insufficient_resources pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 out_of_memory (const std::string &err)
 out_of_memory (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::insufficient_resources
 insufficient_resources (const std::string &err)
 insufficient_resources (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::out_of_memory::out_of_memory ( const std::string &  err)
explicit
pqxx::out_of_memory::out_of_memory ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00066.js000066400000000000000000000002601224474465600207170ustar00rootroot00000000000000var a00066 = [ [ "out_of_memory", "a00066.html#ad9880e47615592429d5cb9e3fda467f3", null ], [ "out_of_memory", "a00066.html#a8e8d47b4cc8de8c9ebf4abcd39bee40b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00066.png000066400000000000000000000026051224474465600210740ustar00rootroot00000000000000‰PNG  IHDR¨øO]qPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíë’ò*›¦Ê÷ä“DcHL¼¬ã®œo¬tB¡üK­µöUõûIQÕHRT5’?-Ó¥ú˜¿U}Š{¢Å2 5ܯ…føÍãû²ñ9÷çoŒåé­©SÝå®èyžiH‹7×Qs¯Uuó(Ú^Mê÷#ºh¾?Ó<7œë.õ›ïìüÕ=>):~¶¢çºOŠÞ®íƒæ&ˆKõM`cD›M¸—L÷›—_0?ìÑw"zÖóofý% ¯uo-ýïA³ê¯öÿŒè”0wÏÄ/U}@°¨ê×¢ª‘¤¨j$ƒh­µv@8'€èEôtêÄ´ÑÁ³ÓnD3ëbIQ€HR ’ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’ˆäß­µÖ ª~?)ªIŠªFòÑR®¥éR}—Oˆ®ÕþR´\b6ܯ…E©Lo—û5¨gÆ—%ÞªÏò3Ñëü£ª–›kfSÑ”U_á‡mçoƒºZì=óïVx_ôÜ úï‹®tÚf‹ËõV4Cöèm2íŠÎ©õÛKõMhÇŸ0W\rniP}‘/}ì)©zŸUä#ÿõªÑ¤¨j$)ªÉ Zk­Î  z=:1íEtðìôÑÌz€XR ’ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’ˆ$E"ù·Ek­µ¨ªßOŠªF’¢ª‘|L´¨ò?-–I`¸_ ­ÔÒÚŠ–¹×ð8ßš ÕgxQtšê<—Åã«uKómU¡ú ¯FtV¹è¬§;—έ;¢Û——vG¨è%h[Ññó—¢íZ·=ö"z}þ–h³ w’éÁýÕˆdýÈûY½m ÕG¼¾ôO“ѧèGE§$zéR=âQÕ?"EU#IQÕHÑZkí€pN=ЋèéÔ‰i/¢ƒg¦ÝˆfÖÄ’¢‘¤(@$) IŠD’¢‘¤(@$) IŠD’¢‘¤(@$) É¿-Zk­=@Uý~RT5’UäYÑ¢ºC–曎GßT}7#:Z<0‰¢2 9†g.4ÓŒkΔ©÷Ô6Ö_.¥s¸Ûh/ó}lÛÞt[‰ž§»®dÑíU´½šÇºf.-oí>i»mG¹©Z¾ßDt;Iós¶£‰Þt܈n{ßŽÒ ³þòë¢íÒˆŽŸCÑsãÑ(×aÚnÇ¢«µÙŠÞYúmé ¢±ßFtUÚÝ£Gɤ¥½íÑK¿þÎFöÞ=Èúí¨M¿M,n²¾ÙEKpv²~>‰×UGY~ò©Æñ¢Sb4U}™þ"ªúͤ¨j$)ªÉ Zk­Î  z=:1íEtðìôÑÌz€XR ’ˆ$E"IQ€HR ’ˆ$E"IQ€HR ’ˆ$E"ù·EK)¥(ßOŠD’¢‘„‰Þ3$*@Ÿ ^©{¢CÛÔ8žas¡5·óëØag*¯*ÆN—.ÝWïSÅ<ÀwEÏÃM³Rع6%”«ŠË/múnÞç™~,º6i‚º×|Oôö·­ÞWìðË¢Ó!…åj¹·­Ÿ] þNDw"|Ù¯?m#q›LÍ:F,ý;¢GY?O±4¯÷Äõ4ØŠ.M›!h–þ3‡"À-¿%:eÊêïè¶àˆûý¾'¢¦û ø$) IŠD2žå¥”òýüa0†¸´^·ÝIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00067.html000066400000000000000000000262301224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::internal::parameterized_invocation Class Reference
pqxx::internal::parameterized_invocation Class Reference

#include <transaction_base.hxx>

Public Member Functions

 parameterized_invocation (connection_base &, const std::string &query)
parameterized_invocationoperator() ()
parameterized_invocationoperator() (const binarystring &v)
template<typename T >
parameterized_invocationoperator() (const T &v)
parameterized_invocationoperator() (const binarystring &v, bool nonnull)
template<typename T >
parameterized_invocationoperator() (const T &v, bool nonnull)
result exec ()

Constructor & Destructor Documentation

pqxx::internal::parameterized_invocation::parameterized_invocation ( connection_base c,
const std::string &  query 
)

Member Function Documentation

pqxx::result pqxx::internal::parameterized_invocation::exec ( )
parameterized_invocation& pqxx::internal::parameterized_invocation::operator() ( )
parameterized_invocation& pqxx::internal::parameterized_invocation::operator() ( const binarystring v)
template<typename T >
parameterized_invocation& pqxx::internal::parameterized_invocation::operator() ( const T &  v)
parameterized_invocation& pqxx::internal::parameterized_invocation::operator() ( const binarystring v,
bool  nonnull 
)
template<typename T >
parameterized_invocation& pqxx::internal::parameterized_invocation::operator() ( const T &  v,
bool  nonnull 
)

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00067.js000066400000000000000000000010631224474465600207220ustar00rootroot00000000000000var a00067 = [ [ "parameterized_invocation", "a00067.html#a5fa125c4885b76bd9c250e1d0692ad13", null ], [ "exec", "a00067.html#abc61b203c68554dc43ccead818683b4a", null ], [ "operator()", "a00067.html#a96dd05cc41a36dcca337bd3971d354ab", null ], [ "operator()", "a00067.html#a88c8820f7c620e208795db4edcb178df", null ], [ "operator()", "a00067.html#ae8ef9f87245ddad0e4319357e82db670", null ], [ "operator()", "a00067.html#a030eb77fb420df1890741417fbbb6213", null ], [ "operator()", "a00067.html#a6fd084905f68c744bd791c601168103d", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00068.html000066400000000000000000000625611224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::pipeline Class Reference
pqxx::pipeline Class Reference

Processes several queries in FIFO manner, optimized for high throughput. More...

#include <pipeline.hxx>

Inheritance diagram for pqxx::pipeline:
pqxx::internal::transactionfocus pqxx::internal::namedclass

Classes

struct  getquery
class  Query

Public Types

typedef long query_id

Public Member Functions

 pipeline (transaction_base &, const std::string &Name=std::string())
 ~pipeline () throw ()
query_id insert (const std::string &)
 Add query to the pipeline.
void complete ()
 Wait for all ongoing or pending operations to complete.
void flush ()
 Forget all ongoing or pending operations and retrieved results.
void cancel ()
 Cancel ongoing query, if any.
bool is_finished (query_id) const
 Is result for given query available?
result retrieve (query_id qid)
 Retrieve result for given query.
std::pair< query_id, resultretrieve ()
 Retrieve oldest unretrieved result (possibly wait for one)
bool empty () const throw ()
int retain (int retain_max=2)
 Set maximum number of queries to retain before issuing them to the backend.
void resume ()
 Resume retained query emission (harmless when not needed)
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Additional Inherited Members

- Protected Member Functions inherited from pqxx::internal::transactionfocus
void register_me ()
void unregister_me () throw ()
void reg_pending_error (const std::string &) throw ()
bool registered () const throw ()
- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_Trans

Detailed Description

Processes several queries in FIFO manner, optimized for high throughput.

Use a pipeline if you want to execute queries without always sitting still while they execute. Result retrieval is decoupled from execution request; queries "go in at the front" and results "come out the back." Actually results may be retrieved in any order, if you want.

Feel free to pump as many queries into the pipeline as possible, even if they were generated after looking at a result from the same pipeline. To get the best possible throughput, try to make insertion of queries run as far ahead of results retrieval as possible; issue each query as early as possible and retrieve their results as late as possible, so the pipeline has as many ongoing queries as possible at any given time. In other words, keep it busy!

One warning: if any of the queries you insert leads to a syntactic error, the error may be returned as if it were generated by an older query. Future versions may try to work around this if working in a nontransaction.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::pipeline::pipeline ( transaction_base t,
const std::string &  Name = std::string() 
)
explicit
pqxx::pipeline::~pipeline ( ) throw ()

Member Function Documentation

void pqxx::pipeline::cancel ( )

Cancel ongoing query, if any.

May cancel any or all of the queries that have been inserted at this point whose results have not yet been retrieved. If the pipeline lives in a backend transaction, that transaction may be left in a nonfunctional state in which it can only be aborted.

Therefore, either use this function in a nontransaction, or abort the transaction after calling it.

void pqxx::pipeline::complete ( )

Wait for all ongoing or pending operations to complete.

Detaches from the transaction when done.

bool pqxx::pipeline::empty ( ) const throw ()
void pqxx::pipeline::flush ( )

Forget all ongoing or pending operations and retrieved results.

Queries already sent to the backend may still be completed, depending on implementation and timing.

Any error state (unless caused by an internal error) will also be cleared. This is mostly useful in a nontransaction, since a backend transaction is aborted automatically when an error occurs.

Detaches from the transaction when done.

pipeline::query_id pqxx::pipeline::insert ( const std::string &  q)

Add query to the pipeline.

Queries are accumulated in the pipeline and sent to the backend in a concatenated format, separated by semicolons. The queries you insert must not use this construct themselves, or the pipeline will get hopelessly confused!

Returns
Identifier for this query, unique only within this pipeline
bool pqxx::pipeline::is_finished ( pipeline::query_id  q) const

Is result for given query available?

References pqxx::to_string().

void pqxx::pipeline::resume ( )

Resume retained query emission (harmless when not needed)

int pqxx::pipeline::retain ( int  retain_max = 2)

Set maximum number of queries to retain before issuing them to the backend.

The pipeline will perform better if multiple queries are issued at once, but retaining queries until the results are needed (as opposed to issuing them to the backend immediately) may negate any performance benefits the pipeline can offer.

Recommended practice is to set this value no higher than the number of queries you intend to insert at a time.

Parameters
retain_maxA nonnegative "retention capacity;" passing zero will cause queries to be issued immediately
Returns
Old retention capacity

References pqxx::to_string().

result pqxx::pipeline::retrieve ( query_id  qid)

Retrieve result for given query.

If the query failed for whatever reason, this will throw an exception. The function will block if the query has not finished yet.

Warning
If results are retrieved out-of-order, i.e. in a different order than the one in which their queries were inserted, errors may "propagate" to subsequent queries.

References retrieve().

Referenced by retrieve().

pair< pipeline::query_id, result > pqxx::pipeline::retrieve ( )

Retrieve oldest unretrieved result (possibly wait for one)

Returns
The query's identifier and its result set

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00068.js000066400000000000000000000017251224474465600207300ustar00rootroot00000000000000var a00068 = [ [ "query_id", "a00068.html#ab53d0c0294ef3c3c7147be2ab55bab0e", null ], [ "pipeline", "a00068.html#a41ad44c7f13ad198db938c84e25473a9", null ], [ "~pipeline", "a00068.html#ab265dd1ed168022f92a207dd62bad5d1", null ], [ "cancel", "a00068.html#ab375b0b4e02c7f1a48602c4186fbbbd7", null ], [ "complete", "a00068.html#a7808218284e98bb5dffaf110defd1b33", null ], [ "empty", "a00068.html#a5f5fe658349dcd9aed9c19faccf23ea4", null ], [ "flush", "a00068.html#a33a890c64efc37d76f3c649f145ff950", null ], [ "insert", "a00068.html#a839abbb0e60ac35e941a632027b4f917", null ], [ "is_finished", "a00068.html#a3d89c57d7619430a3847595d8fb902bc", null ], [ "resume", "a00068.html#a153e247a4f449ce8069379c4567738e9", null ], [ "retain", "a00068.html#af94a53d0eecb7485cb135155f912ce8e", null ], [ "retrieve", "a00068.html#a19c508710d0025993e41512f23de56be", null ], [ "retrieve", "a00068.html#a9edc9c6e50f25790c3707495ab9779dd", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00068.png000066400000000000000000000021101224474465600210650ustar00rootroot00000000000000‰PNG  IHDR¸ˆc—ÑXPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2×IDATxíí²« Eq¦ïÿÈo±G{Û´ÌÄq .bHÿÂ~léH·¿¿âµÆU¹wð¹ý¸­É½±­šï~3Ε{uîç®Ï[çq9"øëëv×Öwcž~%ηÃé<ÎOàG'þ ÓÅùr^ü³·ûŸ=¿>ªÄÿžüS|2ÇørfŠö8Oˆ¯ö0ï|ý©öÈóÐãk<ºÈözŸÞÛÆõþ%>pN?k½/qõ=Ù^î/öñ”¯<4ëÏu¾CàoÀ›1ŵu›ò6¬¿çlê«ðžÕÛ¼ÇïÕƒûßv]M~‘ꨌñ³—}VÖµ›kžó}“×êw|ïß}¼æ3Ôg“§²® ^óšÞ_ã:ÿ6Ã|ÙÜ쟜ÿ½/M÷ë¼§|íùlöI]WW‡c¹4üÇ<4û¤Þ7Ëšû]ìã© ¤}T¾WîÍ÷û4Öa·€Ø(&ûw7—õ–¾‘ê«óKýdïSûx³¯öUíñ¬wûôÿ÷OúøKÿÛªã¼/0®Ê}ÒÇç}|‰|Ïúø£ß÷ç–ŽÔf~ÿàcz¬¨UÁEÉW÷Ük’/ n]@W )ДhÊÀ4eàš2pM8€¦ @S )ДhÊÀFmÛ¶­(6‘õdà""š2pM]w“+‘AåáS/©§÷<:»?ãïgüà"".Dp—VéËE3EÌK0¹ò-M\Š{ôŠQÉÞMÚ á'z4~ézœx7À÷OÃÄÉìloÊ,Õ*Nº3?:ÄV_qRÏÞïèÕxö'è*í;j¨Ö.ýÝì£ïÉb†Ã¯‡c„OÕ1‚W{ýÒï-ðY©´!Ýœg¼›í˜‘a]õ|ïOJ¥©å³Íù¤T®ÿ]ãSðq]ë*ÓýSWÕ”Jçœ_Qì}©4 §ï*®ë*ÕmV*·{°ˆÈ—dà""šºÿ—/"ò2pM¸ˆˆ¦<ø¶mÛ‚ø˜+jUðÇcQòUÁ=÷šäË‚[WЕhÊÀ4eàš2pM8€¦ @S )ДhÊÀ4eàš2p€QÎ9·¢pëÉÀ4eàšú0øaroxÏ µ3þ¶·½ îcdh¨ù¢KÖ˜àü¼Àm½ž":¸áœ\Íž¾ü þ#ãO“ôáñà8±Ü–xü›žÚnë=àÑyÆOl·õ–ŸmÎç5þÕR9é*]ß8í*Ißè*Ï{s_ío–íù»àß”hÊÀ4þœsn=ý˜9“i#IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00069.html000066400000000000000000000256661224474465600212730ustar00rootroot00000000000000 libpqxx: pqxx::plpgsql_error Class Reference
pqxx::plpgsql_error Class Reference

PL/pgSQL error. More...

#include <except.hxx>

Inheritance diagram for pqxx::plpgsql_error:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception pqxx::plpgsql_no_data_found pqxx::plpgsql_raise pqxx::plpgsql_too_many_rows

Public Member Functions

 plpgsql_error (const std::string &err)
 plpgsql_error (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

PL/pgSQL error.

Exceptions derived from this class are errors from PL/pgSQL procedures.

Constructor & Destructor Documentation

pqxx::plpgsql_error::plpgsql_error ( const std::string &  err)
explicit
pqxx::plpgsql_error::plpgsql_error ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00069.js000066400000000000000000000002601224474465600207220ustar00rootroot00000000000000var a00069 = [ [ "plpgsql_error", "a00069.html#abb0f0e6d4eaebe63d7409c244ffa9b06", null ], [ "plpgsql_error", "a00069.html#a346ab5182768a7a9b25c03e45890c601", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00069.png000066400000000000000000000047351224474465600211050ustar00rootroot00000000000000‰PNG  IHDR'øy¶<PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2 lIDATxíÝír¢J†Ñå¦Êû¿äcÔökGí3¤ÞŒKPx¦ù kµ,˲*0ÕRUµ"éæK'ÐI'ÐI'ÐI'Ðù¿;Ù|>ªª“N`¾ “ªª‡¥˜ï›N6µù¼’ÏÇ…áê~³y÷þ0aì^ûì^öŸØ-¾ÖUUÝ•N`¾ï:Ù_æÏ+Z›ºzÜÛ<Ìg«‡—MÕøÖUUÝ“N`¾oç“Ëëxx~dóaÃ~Ý×ú‹ÏÜH¨ªêžt󽹓Ýße'ûuéVã™N®o,ßl¦Óê«i%À?î»NN—rœ-ó›Í§€/ç“O:Uøv>9^ÿó×÷ÎæáÆóõvlé+Ÿ¯;ÒþåÐH:Î÷ëÅG7WUÝóìþéþ7ïéäczØýUUÝ“N`52Ÿ@@ç›Nªªþ)éæK'ÐI'ÐI'ÐI'ÐY–eYø¶pG:€Æv›P à¾tL Ü•N  —J  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “N  “NàïX–eY˜j©ªZ‘tó¥è¤è¤è¤輫“Íæ¸ôù¨ªz…t󽩓ó2Ò ¬ÚO;Ù|ÍÏÇ…S›Ïw_ÏÇ)eo÷æ4ÛTU=#À|?îäxùw¥Tm®+†åªªg¥˜ïçóÉxùÇ)åìNs+œt+óÎN>n/·;Ùo¨ªzZ:ù^ÒÉY ãæÚÔéñë¹$ÀÿãÇœ '“á~sÕÉç¹ïÀúü|>9æqÞÉ0±ì :¬øÜq¸!UUýD:ù~sß¹^¬ªz¯tó¥è¤èü´“ªªÿC:ùÒ tÒ tÒ tÒ t–eYVþ„-Ü‘N  ±Ý&¸/@@ã#“„w¥è¥è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤è¤ø;–eYV¦ZªªV$À|é:é:é:é:oìdSUõjéæK'Ðy¶“Mm>¯ÿÇóqalâ´uìdsØëãeÿ4¬¨ªzX:ùžîäóJï/umêþcL`·ôéðt¶¢ªêaéæ{~>9”ðUÃùÕÞ/í·ÞèäòÍó·¦t󽸓¯)㲓Ý_:µúU'ãfÜãÖ|r|M'°6OwrjcœL†[sß¿âùùä˜Çy'‡iä¸uŒàÐÔéé<¯ªªÇ¤˜ï'÷ëŪª Ï'PUõ­t󽵓Yc÷WUõ*éæË|g;©ªú?¥˜/@@'@@'@@'@@gY–eU àOØB@ÀéÛmB€ûÒ 4>2I(pW:€^*€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:€N:¿c³ÙlV¦ZÛyO'0_:€N:€N:€N:€ÎëÎ{ûM/û™tó¥èU[ÛyO'0_:€N:€N:€N:€Îf³Ù¬ ü [¸#@@c»M(p_:€ÆG& îJ'ÐK%ÐI'ÐI'ÐI'ÐI'ÐI'ÐI'ÐI'ÐI'ÐI'0Év»ÝÆv»ÝN«²âÿ”:L’“ ³¥˜$C‡Ir²a¶t“dè0IN6Ì–N`’ &ÉɆÙÒ L’¡Ã$9Ù0[:I2t˜$'fK'0I†“ädÃlé&ÉÐá²,Ë;l—eYÞ!C_–e¹ã}C_ªªVd<ÙUU+²ê¡çdWUM‘Nªª&I'UU³¥“ªªIÒIUÕ$餪j¶§;ÙTUÝÓn¼ÜåzçMóùã¦÷œìÖ[Uãã§CppϨªê1ÿR'}õ?ÓIUÕsþF'›¯ÿÏÏÇ…á׿Ö~w<í¶{3Žù°zýñ»o9>7·í÷ºú¥ì—ÖþÍ0ÆYUuÛõÐ_9¸ñ„žh?æá¿õö‘à°ÃØÉ~—ýÖMÕå£_:¿˜Ã–óà‡qÜÚç¯éäúÃù|rêù˜?r˜ìÆO»¼¸Åœ_³ÃÊý—ì—.æôÓžÃ4û‹ùä…‡uãùNM)·æ“Wžó1·ó1Ÿî;‡9^ŸýÓûÛ÷ëÅëîíøðü[Uõc?¹ïü#‡uû¾óÿ î‰ÿ¢“«éö«ØÝ_U ›+Þ\UããÝ<~XUUOù}'O î»AfGŽì7óÉå×ÿ‘ùä}‡õ‚ùä…ƒ{ê£C'UU+ðl'UUÿˆU='»ªjŠtRU5I:©ªš-TUM’Nªª&I'UU³}t²,˲&ÃÉ^–eY“ý?4~ÚþJ»IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00070.html000066400000000000000000000266671224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::plpgsql_no_data_found Class Reference
pqxx::plpgsql_no_data_found Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::plpgsql_no_data_found:
pqxx::plpgsql_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 plpgsql_no_data_found (const std::string &err)
 plpgsql_no_data_found (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::plpgsql_error
 plpgsql_error (const std::string &err)
 plpgsql_error (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::plpgsql_no_data_found::plpgsql_no_data_found ( const std::string &  err)
explicit
pqxx::plpgsql_no_data_found::plpgsql_no_data_found ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00070.js000066400000000000000000000003001224474465600207050ustar00rootroot00000000000000var a00070 = [ [ "plpgsql_no_data_found", "a00070.html#ab6013cc52171417e60008c1efebd4257", null ], [ "plpgsql_no_data_found", "a00070.html#a97cfb947332b3e275e3437b5284de8ff", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00070.png000066400000000000000000000025601224474465600210670ustar00rootroot00000000000000‰PNG  IHDR­ø©2–5PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÿIDATxíÛ’« Û¦*ÿÿÉÇKT4&1—Ù]Ne+Bg„É+¥”Ò ÕFH[ÕÒV5†ß¶íÆSõ ÀVõ$Ol;»q¼þºª9ž4Ïsð†ûÜg¸Mo åñ©ªS½Ã3Ûi²q\;oÎ{ÍUä6ÕÕ­Óú¬êTyÛýhóõLóÜ0Õ]ëwïüÕc‚m‡co;Õ…ÛÞ~ê'ÍU8×ê›ѶZ˜G»ìqóú3æÛ“uûqlïlúy–sÂuw.uŸ¯„™ñI³ê=^íh;î¤Ç¹óÙª>!ÂVõ‘¶ª1¤­j ½m)¥´@€fhÊöriI·)Û^¶!ݶl3'D‘¶1¤-@ i CÚĶ1¤-@ i CÚĶ1¤-@ i CÚG)¥4EµÒV5†´U!ʶë–Òxª~NíÖï×m»kôúëRX½ºñéz]Â;1<¬‘W=ÏÛ¶‹Äà«ÝÍ9³«¨Êª¯ñ~lk‰:¼›o¤ÿGmû~l;5¨¾ÈWl7Nu³ëùa\¿µnowÙ¡í¼ç~e%ÜÉ U‡ß1W\7ãÚ ú2Ÿ¬„ogSÕǤ­j Aÿ¼ª¤­j i«Co[J)­À š²½\ZÒmʶ—mH·-ÛÌ Q¤-@ i CÚĶ1¤-@ i CÚĶ1¤-@ i CÚĶÃQJ)Í@Qm„´U!mUc´íT¿ËÿmÛÙýu)ÔfkkmÛͽúÛt©*TOò²í8ß4¡÷ÏZd(Ì—M…êI^íìsuÚÎ9•¦ÖÛýë‹å˶×ðím‡ã×mëO_÷8ŠírÿQÛjeì²'ëöçc{''Ì!}œ–Ë.•¨žà•p*ŸdÛ`Ûqw½š¥TïñÇVõ÷H[ÕÒV5†Þ¶”RZ € @34e{¹´¤Û”m/Ûn[¶™¢H[€Ò †´ˆ!mbH[€Ò †´ˆ!mbH[€Ò †´ˆ!m‡£”Rš¢Úi«CÚªÆð=ÛNõUÏñÿÙvvãlýu)T×ÚžºãÚmx¨l»ùíé…m…êNÙŽãNÛys>.-òk”—ŸríVý6Õûœ‹í<ï,²{mÞu¬Zl÷gK í²@¶¶Ãñc¶õ'~b»}k·ßâl«x´ËÞ[·q±½“fŸ÷rÂrÙþxÕ{œ] òæíWÞwüR¶±½ù®S çý¥ú&!±Ý[ýhlUÿi«CÚªÆÐÛ–RJ+ph†¦l/—–t›²íeÒmË6s@i CÚĶ1¤-@ i CÚĶ1¤-@ i CÚĶ1¤ípt]×5@#¤-@ i ˶;ŸiírÛ¹ßñ‡\›þŽí™¡Û¾0–†œ6ª1®µ=uǵÛðP«ÌÕµÃòÆ0ÊrYÓþz=œic;6çX×Áæ|\ª‡Ü ¶æµ~}kìµív¦]l÷7+éfŽê6?õ>Щ_|l{3ʧ¶Ë9o;þƒV¥mëOüÄvûÖ ÛVÂÛj‘í²×ÖíÛóëv×ótN˜G~-',Ÿú8'LƒL¥:I­‘Ú.¶£•ð ó&ÊMÇŸøO|Ûvû« ´ç½ÊÓÍÀz¾Ûý ?[€?OÚĶ1 iºëº®þÈû‹‰;3¼:IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00071.html000066400000000000000000000270721224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::plpgsql_raise Class Reference
pqxx::plpgsql_raise Class Reference

Exception raised in PL/pgSQL procedure. More...

#include <except.hxx>

Inheritance diagram for pqxx::plpgsql_raise:
pqxx::plpgsql_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 plpgsql_raise (const std::string &err)
 plpgsql_raise (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::plpgsql_error
 plpgsql_error (const std::string &err)
 plpgsql_error (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Exception raised in PL/pgSQL procedure.

Constructor & Destructor Documentation

pqxx::plpgsql_raise::plpgsql_raise ( const std::string &  err)
explicit
pqxx::plpgsql_raise::plpgsql_raise ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00071.js000066400000000000000000000002601224474465600207130ustar00rootroot00000000000000var a00071 = [ [ "plpgsql_raise", "a00071.html#acb8177c2b8060623f46fadfb82c621f8", null ], [ "plpgsql_raise", "a00071.html#a7a51d15b2778ae1ec61f480482050690", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00071.png000066400000000000000000000021571224474465600210720ustar00rootroot00000000000000‰PNG  IHDRøüSukPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2þIDATxííÒ« „—ÍŒ÷ÉÇ/4 h­=Mçí°ÈGÀ‡Ø¿03 Œ$%|— Í…$K}•€$ÚÓl3Ö[í»˜žúùÓ3ÛLeÅÔž{n¬"X6˜m™x(½iwÂbØ=é‹«|P[äú•é<±Œ­ãÕšÜG ¦_M°Œ½EptóÅ´;ö>|pÅ»èV$žOïhùqMt‚=¯|˜ kocí[8ÉÜ‹i’ìéÂþ)Ám>$I²Ô& É ½J@’!V3³HÀ# ªp‚aˆF'‚â ” "D ®ˆ@"Dð×ÌÌB#É@‰@Ÿ!HikÍ…$ïè1AùÎÿBÖSŽõÖØß•æÞZonX4uv‘dK/lO d:”¬jÀµI²§W|à7ön(üÞBú"Áèì6Á2A’]Ý$(Þã§™¸——Ï?Ž‘Ø$Èqù±[èä‚sÆÄ–Ö€Ý'HòD¯ÝÂûÙN’çþEðCff‘€G TáÃN0#Ä(D ˆ@\D ˆà¯˜™… F’>FHò]ý2Abšwë­áß¶Ïz‚”­ÆÇR¹’<è„`ÞcÙ„‰ýâ7ŸZ³rU äAg>ÈïXßSî³´–ÙAÝé_ÔÛë1k‚é÷_¼Û½EËÛó1»éF$^ÄÁg|ÐÉ…|ôó\ت*…H²Ðù-¼”ï¾#˜#°Ÿq$ÙÓ/û€$¿!ˆ`%03‹<Ò¡ '†h„p‚ !ž@¹ ˆ@"àŠD ˆ@ÀÌ,T0’ ”Dð.A"ÉžN'I²Ö¯$¦y‡±Þn×ut”7ÜͦŽ#Hyõ² è̶‹1å¼µíÞØðV3ÇÛóAÞ+o^ØïÓ•¡›mÔò¢>B°]NI0ýx÷^”«ª˜¼Gàn´‰ïÅÁ=tr!¿ã½\تò@½[8É룇kÃÛ_ƒ§Ÿ.É1H’—zèƒúM}@’ß–D°˜™E i€P… C4B8ÁŒO \D pE"D ‚¿FRJ¡B€@‰@oœ.iOö—|‹ÚªÆîÜŸ²47Ü®ëè(o¸›M·ßÜ™2~Ù!•Œ5Á¼ù² ‡rÞÚ€ÊÝP”ákºeÎ Õteèf lÏÊèãÛå4æ¯3Zú¯ž;'(WUæ…z­H¼5ôKqÐÉ…¼üf.¬±_çÂy^—Ñ2¼ÿuyHÐðélÕI ­§>8úîHÿ"ø‚”RŠÔ?È+hP¾žIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00072.html000066400000000000000000000266671224474465600212670ustar00rootroot00000000000000 libpqxx: pqxx::plpgsql_too_many_rows Class Reference
pqxx::plpgsql_too_many_rows Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::plpgsql_too_many_rows:
pqxx::plpgsql_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 plpgsql_too_many_rows (const std::string &err)
 plpgsql_too_many_rows (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::plpgsql_error
 plpgsql_error (const std::string &err)
 plpgsql_error (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::plpgsql_too_many_rows::plpgsql_too_many_rows ( const std::string &  err)
explicit
pqxx::plpgsql_too_many_rows::plpgsql_too_many_rows ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00072.js000066400000000000000000000003001224474465600207070ustar00rootroot00000000000000var a00072 = [ [ "plpgsql_too_many_rows", "a00072.html#a8b2c0fa01d76add8d15f1024562521fe", null ], [ "plpgsql_too_many_rows", "a00072.html#a77fc4dece10e4aa3efffc7f4dcbeb81e", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00072.png000066400000000000000000000026021224474465600210660ustar00rootroot00000000000000‰PNG  IHDR±ø” ÷SPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíí²£*Û¦*ïÿÈרh419™ÝÃÝIÙŠ€ÒŒ0ùK)¥4Eµ!ÒX5–4Våïwã¡z_a¬z™—ÆÝøÎþ¼ªq^4÷s‡ëÜg¸LO åñ®ªS=åµñ4àøn;޳æ*‚›êêÒi}Tuªg\ˆñþóùJóÜ0ÕÝëwÏLFõŒpãá·7žêþˆñãgÑ\…u­~õ—«…z´óž7¯S™//ÖñWb|’ æ‘~˜+î;v©ûΪx’9_4«žñnÿ`ãqw=Ï­¿ÌXõQƪ¿Š4V%UcéK)¥%B¸4EsÆ·[kÊÍ÷Â)·gœ¹ š4ˆ%bIc€XÒ –4ˆ%bIc€XÒ –4ˆ%bIc€XÒxý•RJSPT"UcIcÕX⌻n)‡ê73Þ:þ ãîÅþ¼V·n¼»Ÿ—0O 7ëP}‡/"ƒ³vÇÌ®¢*«¾ËOb\‹ÔaÞ¬ƒ£)übãþãO ªoó%ãWÝlçzü8¾ß[Ç;ïÐxÞ‡mUœäŠ*ØÃ\æŠû]T?àg«âûÙVõ9i¬KØ¿´ji¬K«ÆÒ—RJK„phŠæŒo·Ö”›3î…SnÏ8s@4i KĒƱ¤1@,i KĒƱ¤1@,i KĒƱ¤ñú+¥”¦ ¨6D«Æ’ƪ±„wªßæ_0îìF“þ¼j»µµ6îæ^ýe:Uª—ùÀxsÔÎó£–J#óiS¡z™Ob<;ݽ¶ãN¥©õÀxóþÂùºñ=Œ{ãá÷+ŒëeP÷8ŠñrýãÆÕJ=Øy/Öñ߉ñI®˜CûãjŒç±g™Íû׿]ǪõÀxsmá„/‹ek<üþ¨qý¹_oŸÚíÁXãjEí¼ÏÖqlŒOrÅìôY®XNÛ¨žs}U<É«_|ßñkÙ8ÊøáOŸ÷œêÇÅxoöÇc¬ú[HcÕXÒX5–Þ¸”RZ „@S4g|»µ¦Üœq/ܘr{Æ™+¢Ic€XÒ –4ˆ%bIc€XÒ –4ˆ%bIc€XÒ –4ˆ%×_×u]SÐ4DĒƱ¼iü´óÚ…†ûÂXòÝ\¨Æ¾×öÔ×nÃÍâ9$Íé´\ªÑªêõ­õ$§^ã;ÖÆå5«ñÔajë`Žð o<ü±ñn¯ûiÔ5AÖï£ú´Óc¼ùbüæßnä?*À·Ic€XÒ –áÿ ëº®!þ2$Ž«íg­|IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00073.html000066400000000000000000000464521224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::internal::PQAlloc< T, DELETER > Class Template Reference
pqxx::internal::PQAlloc< T, DELETER > Class Template Reference

Reference-counted smart pointer to libpq-allocated object. More...

#include <util.hxx>

Public Types

typedef T content_type

Public Member Functions

 PQAlloc () throw ()
 PQAlloc (const PQAlloc &rhs) throw ()
 ~PQAlloc () throw ()
PQAllocoperator= (const PQAlloc &rhs) throw ()
 PQAlloc (T *obj) throw ()
 Assume ownership of a pointer.
void swap (PQAlloc &rhs) throw ()
 operator bool () const throw ()
 Is this pointer non-null?
bool operator! () const throw ()
 Is this pointer null?
T * operator-> () const throw (std::logic_error)
 Dereference pointer.
T & operator* () const throw (std::logic_error)
 Dereference pointer.
T * get () const throw ()
 Obtain underlying pointer.
void reset () throw ()

Detailed Description

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
class pqxx::internal::PQAlloc< T, DELETER >

Reference-counted smart pointer to libpq-allocated object.

Keep track of a libpq-allocated object, and free it once all references to it have died.

The memory is freed with PQfreemem() by default. This matters on Windows, where apparently under some circumstances, memory allocated by a DLL must be freed by the same DLL.

Warning
Copying, swapping, and destroying PQAlloc objects that refer to the same underlying libpq-allocated block is not thread-safe. If you wish to pass reference-counted objects around between threads, make sure that each of these operations is protected against concurrency with similar operations on the same object–or other copies of the same object.

Member Typedef Documentation

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
typedef T pqxx::internal::PQAlloc< T, DELETER >::content_type

Constructor & Destructor Documentation

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
pqxx::internal::PQAlloc< T, DELETER >::PQAlloc ( ) throw ()
template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
pqxx::internal::PQAlloc< T, DELETER >::PQAlloc ( const PQAlloc< T, DELETER > &  rhs) throw ()
template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
pqxx::internal::PQAlloc< T, DELETER >::~PQAlloc ( ) throw ()
template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
pqxx::internal::PQAlloc< T, DELETER >::PQAlloc ( T *  obj) throw ()
explicit

Assume ownership of a pointer.

Warning
Don't to this more than once for a given object!

Member Function Documentation

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
T* pqxx::internal::PQAlloc< T, DELETER >::get ( ) const throw ()

Obtain underlying pointer.

Ownership of the pointer's memory remains with the PQAlloc object

Referenced by pqxx::connection_base::esc_raw(), pqxx::escape_binary(), and pqxx::connection_base::quote_name().

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
pqxx::internal::PQAlloc< T, DELETER >::operator bool ( ) const throw ()

Is this pointer non-null?

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
bool pqxx::internal::PQAlloc< T, DELETER >::operator! ( ) const throw ()

Is this pointer null?

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
T& pqxx::internal::PQAlloc< T, DELETER >::operator* ( ) const throw (std::logic_error)

Dereference pointer.

Throws a logic_error if the pointer is null.

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
T* pqxx::internal::PQAlloc< T, DELETER >::operator-> ( ) const throw (std::logic_error)

Dereference pointer.

Throws a logic_error if the pointer is null.

Referenced by pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >::operator*().

template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
PQAlloc& pqxx::internal::PQAlloc< T, DELETER >::operator= ( const PQAlloc< T, DELETER > &  rhs) throw ()
template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
void pqxx::internal::PQAlloc< T, DELETER >::reset ( ) throw ()
template<typename T, void(*)(T *) DELETER = freepqmem_templated<T>>
void pqxx::internal::PQAlloc< T, DELETER >::swap ( PQAlloc< T, DELETER > &  rhs) throw ()

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00073.js000066400000000000000000000017361224474465600207260ustar00rootroot00000000000000var a00073 = [ [ "content_type", "a00073.html#a7fe52ebd1d2533f298caa5ffc975be66", null ], [ "PQAlloc", "a00073.html#adf8536b0ab651d81247809a673f3bf42", null ], [ "PQAlloc", "a00073.html#a402105c20c0fba99659dbea44fbd36b2", null ], [ "~PQAlloc", "a00073.html#a8aded9ce9cf12f720f193ed303367bd1", null ], [ "PQAlloc", "a00073.html#a43caacd4030a3dd949e9e44352c859dd", null ], [ "get", "a00073.html#ac8d570bb46f0831c42a5b3fc0f803040", null ], [ "operator bool", "a00073.html#a4550cd53958a269ac8c2e4e7a02d2f02", null ], [ "operator!", "a00073.html#af32cad9f63309273527e4007a7d892ef", null ], [ "operator*", "a00073.html#afaa858977fa3c7df8f6497afdf4f2803", null ], [ "operator->", "a00073.html#a362f5103b150fb3913adb8923c7b1dbe", null ], [ "operator=", "a00073.html#a93b56fd3623e58c1aa6ceaaff54bbe11", null ], [ "reset", "a00073.html#a7bb9fd9d80b38ddbed8128b33806900d", null ], [ "swap", "a00073.html#a681827ee20603fab0019324494e78455", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00074.html000066400000000000000000000276601224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::pqxx_exception Class Reference
pqxx::pqxx_exception Class Reference

Mixin base class to identify libpqxx-specific exception types. More...

#include <except.hxx>

Inheritance diagram for pqxx::pqxx_exception:
pqxx::argument_error pqxx::conversion_error pqxx::failure pqxx::internal_error pqxx::range_error pqxx::usage_error pqxx::broken_connection pqxx::in_doubt_error pqxx::sql_error pqxx::too_many_connections pqxx::data_exception pqxx::feature_not_supported pqxx::insufficient_privilege pqxx::insufficient_resources pqxx::integrity_constraint_violation pqxx::invalid_cursor_name pqxx::invalid_cursor_state pqxx::invalid_sql_statement_name pqxx::plpgsql_error pqxx::syntax_error

Public Member Functions

virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Mixin base class to identify libpqxx-specific exception types.

If you wish to catch all exception types specific to libpqxx for some reason, catch this type. All of libpqxx's exception classes are derived from it through multiple-inheritance (they also fit into the standard library's exception hierarchy in more fitting places).

This class is not derived from std::exception, since that could easily lead to exception classes with multiple std::exception base-class objects. As Bart Samwel points out, "catch" is subject to some nasty fineprint in such cases.

Constructor & Destructor Documentation

pqxx::pqxx_exception::~pqxx_exception ( ) throw ()
pure virtual

Support run-time polymorphism, and keep this class abstract.

Member Function Documentation

virtual const PQXX_CONST std::exception& pqxx::pqxx_exception::base ( ) const throw ()
pure virtual

Return std::exception base-class object.

Use this to get at the exception's what() function, or to downcast to a more specific type using dynamic_cast.

Casting directly from pqxx_exception to a specific exception type is not likely to work since pqxx_exception is not (and could not safely be) derived from std::exception.

For example, to test dynamically whether an exception is an sql_error:

try
{
// ...
}
catch (const pqxx::pqxx_exception &e)
{
std::cerr << e.base().what() << std::endl;
const pqxx::sql_error *s=dynamic_cast<const pqxx::sql_error*>(&e.base());
if (s) std::cerr << "Query was: " << s->query() << std::endl;
}

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00074.js000066400000000000000000000002511224474465600207160ustar00rootroot00000000000000var a00074 = [ [ "~pqxx_exception", "a00074.html#a9386d73e8176de81de9b1fe38afa6952", null ], [ "base", "a00074.html#a27f927cf3a5f478abc29337d02767144", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00074.png000066400000000000000000000242721224474465600210770ustar00rootroot00000000000000‰PNG  IHDRú¸ÚäcÃPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2(IIDATxíÝqwñHÆÑëÉ9¾ÿGÞ¶Šݶ¨×ÈÓu‰dfM~ï¿PPó¿Íf³yPPPPpÁ õ¢éƒ‚‚‚¯4}PPP°M¬@Ó+ÐôAAAÁ lÌ.ñÍá÷÷oÛû}oö/»3Þ·?ÞÍöÁ5}PPPð•_¥oW®HÙ8{|uxöQ‹Ý³— óÇlüLÓ_ùUúÎrµþÉáýݾÏý'ç\¨"üLÓ_ydúÞÿNÓ·Û×ôAAAÁŸº:}‹Rýäð¡vóݳ—¦ þ̯Òw¬ÓûænÇñß>6qÿ2Ë܆ù£éƒ‚‚‚»úUúö1›mì;öñøâð1ŸE[äñ³ˆ/ŸIüÜ×ôAAAÁü.}ÿ{Ú7‡á+w©VÓ_y@ú6»?øJÓêéƒo4}PPPð§^¨M|¥éƒ‚‚‚hú   `š>(((X¦ V`³Ùl^ü3[((((xmM¼¾í¶íƒ‚‚‚—×ôAAAÁë{+_Û¯®éƒ‚‚‚Uhø   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(xUÛív[Ûív[Ûív[Ûív[Ûív{¼Š×üç½³‚1tV0†¦žZgcè¬` M<µÎ ÆÐYÁš>xjŒ¡³‚14}ðÔ:+Cgchúà©uV0†Î ÆÐôÁSë¬` Œ¡éƒ§ÖYÁ:+CÓO­³‚1tV0†¦žZgcè¬` M<µÎ ÆÐYÁš>xjŒ¡³‚14}ðÔ:+Cgchúà©uV0†Î ÆÐôÁSë¬` ŒáA³š¦iú{Ûiš¦?×YMÓ4ݪ³š¦iºNg5MÓt«ÍjJ’×0ÿ‰’ä5tVI2†Î*IÆÐô%ÉS묒d U’Œ¡éK’§ÖY%É:«$CÓ—$O­³J’1tVI2†¦/IžZg•$c謒d ÿ4}›$¹£ûÝ{6ÿjV›ÃDÞ6þjR8«ãWþß/ÿ'3kú’d M_’<µÏjù£ ˜¾~ù¦/I~¤é{[-›óö|ؘ/¢ÍþýÛËû˜Ý¡—ÏíÏ!»ó?‡ŸŸº;ÿ¸#I~â×?ÑO'4ûÒû)Nv¾sµûÌíÞ ïÿ'ý9ƒýŒŽ¿áâ«'Émn˜Õ7¿Úîÿòþ»Îþ_‡ï§tÏÅw—ßêÛyüvó¡Ç9Ü}Fw˜Õ÷¿×ç ·Üfõ›ôî…CØ6Éüq˜Ãgö7ÐǤï1<ŸþìÄeC’äÿü>}?šÐù—¾0Ù #ï4·»§ï‡¿â?ëUË,I–nIß·Xü(Ç/öÞsñÝ'}ÿ?µ“{j9Û¿™Ñ=Ò÷Ó»lùæïgõ›ô¥àìcg7Î¥ií¾pZ6ÉB’üÈïÓ÷ÿúÜ:ÿÒËB|Ž;?vŸ¹Ý=}?št69>²I’ä6·¤ïÛ ,–]6ÉÂß,¾û¤ï›;lùãüÙ’K2Üš¾ïÜéïñ˜YÝ1}›·¿oÒ·r>ÛÙ©Ù$ Iò#Iߛݿ4óoü¿ëðƹý‹ô~¦Óz|Î%Inó¨ô¯Éãäîºø—¾³{h6Ï»Ïèaé;˜Oîogumú·ÆY•¿JßסŸý´ÿ&}—'ôeúÎÆüß?V·ÌíOÓ÷¿¿â…ô%É]Ü+}'°øþfõ‹ïþé;ŸÚÓX ¹óŒî¾¯Üãgõ›ô¿÷¼Ý–×>ï³—ÿÙbLß&t´K_ò›ôÝ2·»§ïÇ¿âlàÝówKú¾À2}_þs|×ÅwŸôýÿÔ.Oã󤿙Ñ=Ò÷ýïuázÀ¬~“¾ý—žmÌRþ1³ý¢Úm~¾Ì¦5¿‹v§þïYVe±#I~â÷éûÁ„N¿ô៨ù7>_޼ËÜîž¾ÿŸôáÎþ/Ìæ>ûÍ’äj·¤ïÛ Ìÿñ=þ¿žÿH»)ÝsñÝ'}ß-Èųøu?Ìýftô}{—í_f yĬ~•¾K›IrÑn’$ù™+Ò÷ï¾l’üÈýÓ÷ “¾)}Oû«Ýž¾k¦ö×ÿnNßUßôïgõ7é;ü•$_{Ëöû_’ÜÁs¥ï^skú’Ì÷šÀ}ß?JßâFûƒý›ô=fV“¾÷ï›$õ\éK’{hú’ÌOü«=>}¸ÑŸ¾ÇÌê.·S’ü{÷ŽD’ü{U’Œ¡³J’14}IòÔ:«$Cg•$chú’ä©uVI2†Î*IÆÐô%ÉS묒d U’Œ¡éK’§ÖY%É:«$Ã[ú¦iš^Äì'š¦izÕ4MÓ:«iš¦1@A}þm¡   àµ5}PPPðú¶Û¶ ^^Ó¯ï­|m¼º¦ V¡áƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `a»Ýnk»Ýn×zÍÛ©³‚‚‚‚…FÆÐôAAÁM CÓ7i$` Mܤ‘€14}PPp“FÆÐôAAÁM CÓ7i$` Mܤ‘€14}PPp“FÆÐôAAÁM CÓ7i$` Mܤ‘€14}PPp“FÆÐôAAÁM CÓ/mš¦éïm§išþ\g5MÓt«GÏ fJ’×0D’¼†—Ÿ(øWž8}IòŒDÓ—$×kú à_ùövÚdóq'¼=6fwÇaïûžÍÇöûÆÇ¸Ý›Ýñýðý5fÇŽ>¾¼?}y‘$¹àÚH|;ÃóI,¾ÛlÈçSý<ºÜ‘$?s·ô}3ÍÙÑù¼Ó,’,Mü+ß§oW²EŸM·ÐÍ+0KÂçþCFe<^úp±åËÙÀ$ùW§ï›^˜Äb¶§“XLõ³îÇ?ªøŸ¤ïûiÎŽÞyI¦ þ•ïÓwv‡/Öý&ɉÏ1‹óf£Ï¯yö2¯ßùE’ä’«Ó÷í Ï'ñÍ·?ùŸ’M²$?t¿ô}ÿCîÞI¦ þ•¿Kßû߯Òw<á%Ò·›Î0éÛmŸ¥ïN³H²x4}Pð¯ü.}‡ Vþ&ɉݭ³¬ÜOÒw:䟤ïâ ¯JßüõéÒw>Í“£wžE’ţ郂åûôï’÷ÍÝŽÙ=1+ÃñæúªZßUcñò°ô}3à “˜Ízÿî´$‹F(øWn»’äiÜ-Iò4^~VPPð0D’<±¦ H’'ÖôAAÁ½4IòÄš>((¸—F"IžXÓ÷2MÓô*:«iš¦1@AÁËÚBÁÓëo7éícèo·Øn{?Áú[AAÁMz;Áú[AAÁ-Þî¦ÞO0€þVPPp“ÞN0†þVPPp£ÞL0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPPp“ÞN0†þVPðÒ¦išþÞvš¦éÏAÁ-¾iš¦W˜’ä5táÁÍž¾$y ]0Š.<¨¦/InÔ£èƒjú’äF]0Š.<¨¦/InÔ£èƒjú’äF]0ŠëÞ&IþÞÛÇü⓺ðàf£§ï¸b®X¥¿[qI®@ų§/I~¨ n¶öô%É•ºa_,¼M6«àíù°q\›÷wO‡—ÃiŸƒv»?ÏÞÛšŸy²¸Üá>ŽŒH’ ºðàfO¾ÿ_—»ý‹ºXžŸ»>ϸ° /¯¸$ù‘®@ÅWéÛ-‘ÕM.?f/³•wÈßîä ƒgî‡\ºêrßbG’œèƒ›=wú¾_—§ËçâÊ;_j›dþ˜_*I~¤+FñUúÎÖÅþyørúæiúŸA>âìåtù.%ɉ.<¸Ùs§ïÛuy²ú.¥owÆWËð«e›$ßè „QüUú6o§ÿüþ$}Çó¾Hßük$™=ºðàf¯¾ÙêûØÚþ|·Hß…•ÚôÁ«ûIúKâgé;ÍÕÓw:äÒ'}±»ðàfÛívûPIòS߯ËåŠ9[žËeui56}°_¥ï¸ æÿ´îÂÍ黨¼K/_ìK’S]xp³-<Ð+0IÎý`]~“¾Ï¥¸{™Ý$óGÓ/í«ôí×Ôlcþ/í|í-«¶_2ïgÏb-Î<äâØçæ?¿I’œèƒ›=wúþ]ÎWÌnÄnk±òö òd~½â’äGºa_¦ïÒf’\ç.I’ÿÑ…7{òôýÑ’ºËÕºa÷IßÛ¿’ïIrÑþŸ×ÿ”$·èƒ›½`ú~°òš>X•û¤/IþÇßå® îêÓ—$ßhú`U~µð’äyuáÁÍž:}Iò¼ºa]xPM_’ܨ+FÑ…Õô%ɺa]xPM_’ܨ+FÑ…Õô%ɺaÓ4M¯ nñðôMÓ4½(((Æ£ÓÖôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬À£Ó7MÓô*   `O_’¼†¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,M_’\¥éƒ‚‚±4}Ir•¦ Æ2Jú6›$óÇéû$ùÂ/†^:á«Ó›>((Ë é;ÏOÓ?÷,éÛd󑘷çÃÆ1;›w»çÝËûÓǾݹ‡ƒ§W;9²»ÎÎç ÅØÝÛÙYŸ“$§š>((ËÓ¤ï£E»†e“ c±ÎvζO¯¶Ù'q¾ûðy.6û”¦ ^ÃÓ¤oÙµÜÌ¢3KßYÂN^ªälÿ¥£ç;Ù›$§š>((ËHé{ÿû|=¯ÕçÁÿOßî’?JßáSš>((xÛívûPIrÁ"@‡²ª3KÐqäI­¾éÉ¡¥ïìs“d¡éƒ‚‚±lá¦$¹`sÌÝûænÇ1;'Qš ¾˜¿¯Ò·8oÿ‘;:û”¦ ^ÃÓ¤oßºÙÆn÷±^‡(¾ïýŒ×!yŸOJ¹Kã¬}‡9|äñ±Ý]{64IÎ4}PP0–çIߥÍ$ù3ŸŸsõÇ5}PP0–×Jßf÷—$ ÷7}PP°.¯•¾$ù±¦ ÖåYÒ—$ƒiú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,Oß4MÓ‹€‚‚‚a<:}PPPPð`M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ <:}Ó4M¯ †ñðô%Ékhú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,#¥o“$lÞ¼9>xùÌÅ _]((xuO•¾M6z{>l̪ôöº8°³ùýqì}ÿáÀçÖÇ‘ÝI‹øøoŸÍÅÙ|—$5}PP0–çJß¡B»úl’ÓÇ&™?f/J6¿üˆù ×;ŒJ’¯4}PP0–çJß2`áÙ=ïÏF|•¾³Ëô-}‘¾ùe“䢦 Æ2fúv{ÿ7}ïß§ïͬ~Ësvï’䲦 ƲÝn·•$_Y´ì3G³nÍ2·HäÅô]ñéûâœ$¹ éƒ‚‚±lá¦$ùÊæ˜»÷ÍÝŽc„µÛ;Kß1cË—ÅGºZž½¨l’\ÐôAAÁXž+}ûÖÍ6v»Oê4·,Ù.™'[ûዸ¾Ypgï’䢦 Æòdé»´™$wóÃëþdXÓcYKú6»¿Ÿ\÷}HÓ¯g-éûÍuß™$ßhú  `,O•¾$GÓciú’ä*MŒ¥éK’«4}PP0–¦/I®ÒôAAÁXš¾$¹JÓcyxú¦iš^ ãÑ郂‚‚‚kú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ VàÑ雦izPPP0Œ‡§/I^CÓciú’ä*MŒ¥éK’«4}PP0–¦/I®ÒôAAÁXš¾$¹JÓc%}›$¹`óvàÍñðÙÀ¯ÎL’›4}PP0–QÒ—$¼wí›¶5}PPPÏ•¾M6‘z{>lÌÂõöº8°³ùýqì}ÿáÀçÖÇ‘ÝIûÏ8ìØ?/vz|6,IÎ4}PP0–çIß.`íÉ&—›dþ˜½,÷ì·Žï–Ÿ‘MŽÅUÎv-ÏO2{4}PP0–çIß29ÁÙ=ïÏF|•¾³'é;}~•Ùeþ·{M g¼ôíöþoúÞÿ¾LßîàWW9\f>,IÎ5}PP0–ív»}¨$¹dQ¡ÝƼ[³@-y1}gW\~ÆÙ%/¥oqR’œiú  `,[x )I.Ùs÷¾¹Ûq Ï¢Sûqgé;örùr’¾EYûújIr¦éƒ‚‚±((KÓ—$¿ö^¾¦ ÆÒô%Éo}”¯éƒ‚‚±<<}Ó4M/ †ñèôAAAAÁƒ5}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ðèôMÓ4½ (((ÆÃÓ—$¯¡éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,M_’\¥éƒ‚‚±$çNÆþÏÕ/úêÚ>((Ës¦ïËjýà@’œ¸æ"ßշ郂‚Ñü£ôm²ù(ÊÛóacV™·×ÝÍái7vwêÇÁý»c¢öÃ>G®»»ÈÇE?ͯ~ìÛÇþÙ ã§ÏwÎiú  `,ÿ*}»Ì|”%›\zÌßÌö¸¯“Q³Óή~vö[Ëë6}PP0ž•¾³NíŸ÷‡/hîbúί<ß7»ôâðWé[ ?ùM g„ô½ÿ%›,ƒôéÛ]ôЫÕÎÒ÷¶yÍùð¦ F·Ýn·u!Pç![¦oqÊÙ©ÿŸ¾e×ü6}g‘mú  `d[x é34Ǥ¼oîvSôU¾KßY¢Wøßôí¶›>((x]ÿ*}ûÖÍ6ö-[¦fQÇy¿fÚçôsØ¢tû§Ã±ýg.r’¾ùvÃ??wqݦ †óÏÒ·LN’üÀéØßœ›$wÕôAAÁXÆIßû¸“±o7»¿$¹Â g7}PP0–qÒ÷^©$³Çµ¹K’;hú  `,ÿ(}I2¸©éƒ‚‚±4}Ir…©éƒ‚‚Á4}Iò{oåkú  `,M_’üÚ{ùš>((KÓ—$¿õQ¾¦ ÆòðôMÓ4½(((Æ£ÓÖôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬À£Ó7MÓô*   `O_’¼†¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,M_’\¥éƒ‚‚±4}Ir•¦ Æ2Pú6IrÁÛþÏC_H’ûkú  `,¥/I.9¯éƒ‚‚‚Ëž)}›l>âõö|ؘííõóÀÁþÝîÍ<}‡CŸÞ}^óó¢‡ÁÇO;L’‹š>((ËS¥o]¥6É…Çakùr((x!ÛívûPIò…EúM»œ¾ãø¥ïä _÷ìs“ä’¦ Ʋ…š’ä ›cvÞ7w;Ž š÷íð´IŽeúf;#‘¾ÿÍ_Ócyªôí[7ÛØí>ËÑ®Iï…Üý8kžÑÃ¥ç|>/z:+áüjû÷Iò•¦ Æò\é»´™$O©éƒ‚‚±¼Xú6»¿$ùÖoÆ&É©¦ ÆòbéK’Giú  `,Ï”¾$HÓciú’ä*MŒ¥éK’«4}PP0–¦/I®ÒôAAÁXš¾$¹JÓcyxú¦iš^ ãÑ郂‚‚‚kú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ V éƒ‚‚‚hú   `š>(((X¦ VàÑ雦izPPP0Œ‡§/I^CÓciú’ä*MŒ¥éK’«4}PP0–¦/I®ÒôAAÁXš¾$¹JÓc*}›$¹àmÿ硯F$ÉwŽçþì*MŒe¨ô%É%¿V’œkú  àµ=Wú6Ù|dçíù°1KÑÛëçƒý»Ý›y´‡>½ú¼æçEg­û8xþ”$_jú  `,O–¾]Äv•Ú$‡­åËñè1“³ó+ÏöÌ“zv½yG“äTÓcy²ô-‹öÑž³D”é¬iÇK%Ùœ8}7{z½¦ ^Ë é{óyðýðÓ·»Ô…ôÍ®·ÛJ’¯4}PP0–ív»}¨$ùÒ"}‹¦]NßqüÒwr…“Ož5÷ôh’œiú  `,[x )I¾´9vì}s·ãØ¡yßO›äøX¦o¶sµ“ôÖó¬£Ir¦éƒ‚‚±Ÿ==øèîîzÇö&Éš>((˳¥ïÒf’<¡¦ ÆòréÛìþ’ä[¿›$KMŒååÒ—$ÑôAAÁXž+}I2Œ¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆòðôMÓ4½(((Æ£ÓÖôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬À£Ó7MÓô*   `O_’¼†¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,M_’\¥éƒ‚‚±4}Ir•¦ Æò´éÛ$Éoû?]qº÷øþ«+þ|@’٣郂‚±lÌúóöúyà`ÿn÷f^ªã•N÷~œtò´õyÊçûñ“ïvixÓCú‡éÛõä£9ÙäÒã°µ|9gòx¥³½ó7ûa‡ž-?èô»]ÞôAAÁþaú–EûHÊYÎN‚sZ³Ù¥öû.í=Kßùû“ô]þȦ F6@úö=Û¼ý]ŽÐî¼ÓôÍöÎ<¹Æñýåô]ÞôAAÁ¶Ûíö¡.§oÑ´Ëé;Ž?OßòJ§{g.vß_LßéG.®ÝôAAÁ`¶ð@Ó1/Ç¢¼oîvó2ïÛái“‹Rö]Ú{9‚‹÷?NßqPÓcù‡éÛ·n¶±Û}Vš]nÞ ¹?ºŒÜìJg{? »;r¨ììòû÷˘vÎ>ò8¼éƒ‚‚!ýËô]ÚL’ÜïJIòÿš>((ËÐéÛìþNÒw¾7I~äW§6}PP0–¡Ó—$K÷»R’ü¿¦ ÆòïÒ—$Ckú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,Oß4MÓ‹€‚‚‚a<:}PPPPð`M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ <:}Ó4M¯ †ñðô%Ékhú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,¯’¾M’|å&ÉUš>((KÓ—$Wiú  `,ÏŸ¾M6éz{>lÌrö¹÷Í|àqØû›Yú6û³w',w$ÉÏ5}PP0–Ò÷©]¥²ÉÙãÿ·%܇òÓþi±#I~®éƒ‚‚± ¾ýËG¢f¡:>8;z!}§o~_¾¦ ó²éÛ9Kßû_Ó«´Ýn·•$¿²(Ú!r‡T}™¾åY³Ñ‡×¦ Ve 4%ɯl޹{ßÜí˜ElvøÂÖÇ›eú¥kú  `UHß¾u³Ýîϸ}¼?ní[7{3ëÚ>ŸÇ§eI“䇚>((Ëé»´yaßW¯¨Z’|«éƒ‚‚±¼^úÞ_ÎÒ·Ùý%ÉÝ4}PP0–×Kß{æ’÷ ^Ó£zþô%É3šš>((KÓ—$W˜š>((LÓ—$¿÷V¾¦ ÆÒô%ɯ½—¯éƒ‚‚±4}Iò[åkú  `,Oß4MÓ‹€‚‚‚a<:}PPPPð`M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ 4}PPP°M¬@Ó+ÐôAAAÁ <:}Ó4M¯ †ñðô%Ékhú  `,M_’\¥éƒ‚‚±4}Ir•¦ ÆÒô%ÉUš>((KÓ—$Wiú  `,¯™¾M’üµ¦ ÆÒô%ÉUš>((ËéÛdó‘²·çÃÆT’ü΢l»Ï·ËËô-·Žã¯Mü™)I~gsÌÝûænÇ¢c_§o1rYº¦ þÌ5éÛ·n¶±ïÚG·váš÷죖Çñ³Šw|^êdD’üPÓ_¹*}—6“dáª|%ɵš>(((øÊŸ¥ï«¸ûK’;jú   à+•¾{w-I¾ÑôAAAÁW®H_’<¡©éƒ‚‚‚¯¼Lú¦¦ ¾ô*é{+_Ó_y‘ô½—¯éƒ‚‚‚¯¼Fú>Ê×ôAAAÁW¦iš^¼žÿU.\Y¦ i³IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00075.html000066400000000000000000000171631224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::prepare::internal::prepared_def Struct Reference
pqxx::prepare::internal::prepared_def Struct Reference

Internal representation of a prepared statement definition. More...

#include <prepared_statement.hxx>

Public Member Functions

 prepared_def ()
 prepared_def (const std::string &)

Public Attributes

std::string definition
 Text of prepared query.
bool registered
 Has this prepared statement been prepared in the current session?

Detailed Description

Internal representation of a prepared statement definition.

Constructor & Destructor Documentation

pqxx::prepare::internal::prepared_def::prepared_def ( )
pqxx::prepare::internal::prepared_def::prepared_def ( const std::string &  def)
explicit

Member Data Documentation

std::string pqxx::prepare::internal::prepared_def::definition

Text of prepared query.

bool pqxx::prepare::internal::prepared_def::registered

Has this prepared statement been prepared in the current session?


The documentation for this struct was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00075.js000066400000000000000000000005101224474465600207150ustar00rootroot00000000000000var a00075 = [ [ "prepared_def", "a00075.html#a3a8a05c0e9db9aa9423b99a62fc2b442", null ], [ "prepared_def", "a00075.html#a52a320e063625faf69d1104d7dbfc13a", null ], [ "definition", "a00075.html#a7b418648fe35168c261073cae42da08e", null ], [ "registered", "a00075.html#a11ef3d1042c1711d30b6e376f4b77dc5", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00076.html000066400000000000000000000173531224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::quiet_errorhandler Class Reference
pqxx::quiet_errorhandler Class Reference

An error handler that suppresses any previously registered error handlers. More...

#include <errorhandler.hxx>

Inheritance diagram for pqxx::quiet_errorhandler:
pqxx::errorhandler

Public Member Functions

 quiet_errorhandler (connection_base &conn)
virtual bool operator() (const char[]) throw ()
 Define in subclass: receive an error or warning message from the database.
- Public Member Functions inherited from pqxx::errorhandler
 errorhandler (connection_base &)
virtual ~errorhandler ()

Detailed Description

An error handler that suppresses any previously registered error handlers.

Constructor & Destructor Documentation

pqxx::quiet_errorhandler::quiet_errorhandler ( connection_base conn)

Member Function Documentation

virtual bool pqxx::quiet_errorhandler::operator() ( const char  msg[]) throw ()
virtual

Define in subclass: receive an error or warning message from the database.

Returns
Whether the same error message should also be passed to the remaining, older errorhandlers.

Implements pqxx::errorhandler.


The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00076.js000066400000000000000000000002621224474465600207220ustar00rootroot00000000000000var a00076 = [ [ "quiet_errorhandler", "a00076.html#ae440e24603c46ebdc8b981e22a54aacb", null ], [ "operator()", "a00076.html#a3870c438f09580a1b5414e0cdc687faf", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00076.png000066400000000000000000000011631224474465600210730ustar00rootroot00000000000000‰PNG  IHDR”PÈ›¬DPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíí’Û E×3yÿG®¿‚€€£Æ›mµ³Û`]Ÿ‘ù˲,Ëlb‘¤¹P’äQ@I’G_J’ÔÓº0\ûk¡’Ò¿Žù¦ü^z>ïÚ›°íR:e¬$µCû×”Ôù?ýíÝŸ À£€ð( < ( À£€ð( < ( À£€ð( <úסRJi6‘æR@xP}e!ÎàákëBgíf¦¾ µÞìwÛ!ñ¼)íöÃc{:}¶Óäì¼Ë†Ç`æy8ا 3ƒ1¨c}7#Ñû/¡ libpqxx: pqxx::range_error Class Reference

Something is out of range, similar to std::out_of_range. More...

#include <except.hxx>

Inheritance diagram for pqxx::range_error:
pqxx::pqxx_exception

Public Member Functions

 range_error (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Something is out of range, similar to std::out_of_range.

Constructor & Destructor Documentation

pqxx::range_error::range_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00077.js000066400000000000000000000001361224474465600207230ustar00rootroot00000000000000var a00077 = [ [ "range_error", "a00077.html#afe1f00814531af326e7fb11757f978e9", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00077.png000066400000000000000000000010301224474465600210650ustar00rootroot00000000000000‰PNG  IHDRP æèPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2§IDATxí벫 …W3}ÿGÞ‚"á"¸kwsæL:Y‚!”Ïô/BÁT$i('p‚ïH2’¬õU’ìt%Ål׳£æ-†ã}~ÈØæ˜Øì3b?Ý)_C°ÿAŠ¥°³«aõ„•[5BjS¾&mD¾Þλïð7sp%ˆ¿–`÷½EЧy1¬»¸»T,ÔF*q>\Ðr³¨ƒa.Š=Ï|xŽ >}ã]˜œÜÅ0I^iÿ” U›.I’¬õÇ$¹Ð]’4‘8ÁAB–€Gz€©Ì ^/ks‚ ÀÁžÀÏ‚88PæNàNàN𿈈˜ †r'p‚ ‚Í‘<ñœæNrë ñסû‹¥~Í”ð2g¸ e1î°c6ÅòøPB³óüß^ W˜He±3*&wULÕ´íM·é珞iª·!ß=%¨òß=\ß Sj(6­ƒq%–žÔÁ;9¸8 z‘ý‹¦ŠkrôœÛ»Ðw`¦/•T¹Íß|¸§Oäàw+¨Ì¿ NðψˆXêÈßYJ×OÈIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00078.html000066400000000000000000000151571224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::internal::reactivation_avoidance_counter Class Reference
pqxx::internal::reactivation_avoidance_counter Class Reference

#include <connection_base.hxx>

Public Member Functions

 reactivation_avoidance_counter ()
void add (int n) throw ()
void clear () throw ()
int get () const throw ()

Constructor & Destructor Documentation

pqxx::internal::reactivation_avoidance_counter::reactivation_avoidance_counter ( )

Member Function Documentation

void pqxx::internal::reactivation_avoidance_counter::add ( int  n) throw ()
void pqxx::internal::reactivation_avoidance_counter::clear ( ) throw ()
int pqxx::internal::reactivation_avoidance_counter::get ( ) const throw ()

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00078.js000066400000000000000000000005051224474465600207240ustar00rootroot00000000000000var a00078 = [ [ "reactivation_avoidance_counter", "a00078.html#a87bd978d6269ea43fdcdf2f2eb278ef5", null ], [ "add", "a00078.html#a4f2bdaaec1119d4a66efe42faa17a0dd", null ], [ "clear", "a00078.html#a1560ca3d205af226866a1e388dc505f2", null ], [ "get", "a00078.html#a1cc2be7fd873ff9c6fa91e3efb3293dd", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00079.html000066400000000000000000000151011224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::internal::reactivation_avoidance_exemption Class Reference
pqxx::internal::reactivation_avoidance_exemption Class Reference

Scoped exemption to reactivation avoidance. More...

#include <connection_base.hxx>

Public Member Functions

 reactivation_avoidance_exemption (connection_base &C)
 ~reactivation_avoidance_exemption ()
void close_connection () throw ()

Detailed Description

Scoped exemption to reactivation avoidance.

Constructor & Destructor Documentation

pqxx::internal::reactivation_avoidance_exemption::reactivation_avoidance_exemption ( connection_base C)
explicit
pqxx::internal::reactivation_avoidance_exemption::~reactivation_avoidance_exemption ( )

Member Function Documentation

void pqxx::internal::reactivation_avoidance_exemption::close_connection ( ) throw ()

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00079.js000066400000000000000000000004521224474465600207260ustar00rootroot00000000000000var a00079 = [ [ "reactivation_avoidance_exemption", "a00079.html#ae0b6ca7a0a7d33b88a0e0a3fb61ac240", null ], [ "~reactivation_avoidance_exemption", "a00079.html#a3669e53c578ba7935d5b7bdaad0d5e0b", null ], [ "close_connection", "a00079.html#a8397728c755c1a8b4ade039406a4155c", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00080.html000066400000000000000000000165211224474465600212520ustar00rootroot00000000000000 libpqxx: pqxx::internal::refcount Class Reference
pqxx::internal::refcount Class Reference

#include <util.hxx>

Public Member Functions

 refcount ()
 ~refcount ()
void makeref (refcount &) throw ()
 Create additional reference based on existing refcount object.
bool loseref () throw ()
 Drop this reference; return whether we were the last reference.

Detailed Description

Helper class used in reference counting (doubly-linked circular list) Reference-counted smart-pointer for libpq-allocated resources.

Constructor & Destructor Documentation

pqxx::internal::refcount::refcount ( )
pqxx::internal::refcount::~refcount ( )

Member Function Documentation

bool pqxx::internal::refcount::loseref ( ) throw ()

Drop this reference; return whether we were the last reference.

void pqxx::internal::refcount::makeref ( refcount rhs) throw ()

Create additional reference based on existing refcount object.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00080.js000066400000000000000000000004731224474465600207210ustar00rootroot00000000000000var a00080 = [ [ "refcount", "a00080.html#a02b194d1c4db0d3dd7d97351443bb7bd", null ], [ "~refcount", "a00080.html#a603b442ad845f46a19fa92970990a03e", null ], [ "loseref", "a00080.html#ad096a060aac9424435026f17b04d3772", null ], [ "makeref", "a00080.html#a7cf6cdeea44ec32c1c8b9d02f4c2f83c", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00081.html000066400000000000000000000266741224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::restrict_violation Class Reference
pqxx::restrict_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::restrict_violation:
pqxx::integrity_constraint_violation pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 restrict_violation (const std::string &err)
 restrict_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::integrity_constraint_violation
 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::restrict_violation::restrict_violation ( const std::string &  err)
explicit
pqxx::restrict_violation::restrict_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00081.js000066400000000000000000000002721224474465600207170ustar00rootroot00000000000000var a00081 = [ [ "restrict_violation", "a00081.html#a595aad1240047206570109fb06936695", null ], [ "restrict_violation", "a00081.html#a3c6a6fa4c970502389cded0863f83122", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00081.png000066400000000000000000000027501224474465600210720ustar00rootroot00000000000000‰PNG  IHDRÌø—ù{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2wIDATxííÒ« —‡™Þÿ%¿PD´µ¶6/'×" °ã_bŒ±ˆ’Ô.#IqI²ˆ1™0’ôöd$éMÎÉ…aºî<²%Ï=2ëå[— Ó³ïÎsaYv®¦óœ‘þb‰›$½Ï§dæ5ö:R؉¢"+KÒ5>™|ypV«f÷7eºÝT—$é"ßY-9oVÐr|8*_zg¶  *“ÒÅm¶“Ͳõš©bÊKƒ$]æƒÛìÛ_I:Æe$iMS2’ô{\F’,â2’d‘N&Æà­Ð’ÌãÑMK2K;6MÉx6°‰ËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe,â2q€sÄc+%© \F’,â2’d‘e‚$}—Y­0 ‹ìÎs!_øÒšË„Ô«ûOY…$½Çe™a9ãz´äëìKé´ª¤÷¸™´ÜiÉë%¥±µ"S^\܉_–™~)Óÿ¬Ëäû*ïQ‹ÌüoI&{+* àÉ;c.2;Ù,ä8›Í§" JÒy>±Í^úŽ|ÿ+s³Ìðâ_L¿’´‡GF’,â2’d—‘$‹t21ÆØ7ðh…–d†lZ’é\Ú±iJƳ€M\À".`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËœ#Æ[(Imà2’d—‘$‹¼**¥¢½Þ I[о£×šö&;™Ý5_yigÏ3“ CŸî<²û†‡ÑW…ù4öoÓÕ2iê6õšÇÚòÑ—O!˜;-³çÕó=‹ÌxãÐWAµ#¿Èê¶ •å½²Û6£oîÞ)­Ç-"SöHç|›–cæTe¶#çuÙЫæ=™U÷boËô?)hEùhë2S0Só<ÒFf܆媳î¯Êl—¶‰Œ¤°f¾õXæ8¨Ç2ÕmV“ÉÞ½°÷ÎÈl&]ïÇ#™)toÉìe³ê Wd³µØ^6Ë·YZ÷˜™Êý½–)²Ù°À¢º²Í>ðÁ8s¯$}”+2›Hd/uöÁ¤\¸ûRd6sþ4.™Œ$ýu\F’,â2’d‘N&Æà­Ð’ÌãÑMK2K;6MÉx6°‰ËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe,â2q€s„B+ÚÀe,â2ù¦Ly™a3W­©+½¹¦;dŽjµÎpB¦ë:ôíÓy*äsCõÉ~jŠ}e_3^Œé®)cíªS^½ÜpÈ™qòa>å‘Ú ,GvÓzû¬:ÖJéâ̦;™r–t^µ/‹ÞT<‘Y^˜uõÏdú_ª?’I»¯Üp?‘YMºŽÌ*'‘©n³oÉdïL=Ô×S}g¦òïdö²Y>gî™e„”›Š]YÉfÃàE5À+œÜf—?_ãn™!Cœøt¼ÌÿÛ¸ €E\À"ý7*„Úàõ¢Ñ˜«ƒKIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00082.html000066400000000000000000001671201224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::result Class Reference

Result set containing data returned by a query or command. More...

#include <result.hxx>

Inheritance diagram for pqxx::result:
pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >

Public Types

typedef unsigned long size_type
typedef signed long difference_type
typedef pqxx::tuple reference
typedef const_result_iterator const_iterator
typedef const_iterator pointer
typedef const_iterator iterator
typedef
const_reverse_result_iterator 
const_reverse_iterator
typedef const_reverse_iterator reverse_iterator
typedef pqxx::tuple tuple
 For backward compatibility only.
typedef pqxx::field field
 For backward compatibility only.

Public Member Functions

 result () throw ()
 result (const result &rhs) throw ()
resultoperator= (const result &rhs) throw ()
const_reverse_iterator rbegin () const
const_reverse_iterator rend () const
const_iterator begin () const throw ()
const_iterator end () const throw ()
reference front () const throw ()
reference back () const throw ()
size_type PQXX_PURE size () const throw ()
bool PQXX_PURE empty () const throw ()
size_type capacity () const throw ()
void swap (result &) throw ()
const tuple operator[] (size_type i) const throw ()
const tuple at (size_type) const throw (range_error)
void clear () throw ()
const std::string &PQXX_PURE query () const throw ()
 Query that produced this result, if available (empty string otherwise)
oid PQXX_PURE inserted_oid () const
 If command was INSERT of 1 row, return oid of inserted row.
size_type PQXX_PURE affected_rows () const
 If command was INSERT, UPDATE, or DELETE: number of affected rows.
Comparisons
bool operator== (const result &) const throw ()
bool operator!= (const result &rhs) const throw ()
Column information
tuple::size_type PQXX_PURE columns () const throw ()
 Number of columns in result.
tuple::size_type column_number (const char ColName[]) const
 Number of given column (throws exception if it doesn't exist)
tuple::size_type column_number (const std::string &Name) const
 Number of given column (throws exception if it doesn't exist)
const char * column_name (tuple::size_type Number) const
 Name of column with this number (throws exception if it doesn't exist)
oid column_type (tuple::size_type ColNum) const
 Type of given column.
oid column_type (int ColNum) const
 Type of given column.
oid column_type (const std::string &ColName) const
 Type of given column.
oid column_type (const char ColName[]) const
 Type of given column.
oid column_table (tuple::size_type ColNum) const
 What table did this column come from?
oid column_table (int ColNum) const
 What table did this column come from?
oid column_table (const std::string &ColName) const
 What table did this column come from?
tuple::size_type table_column (tuple::size_type ColNum) const
 What column in its table did this column come from?
tuple::size_type table_column (int ColNum) const
 What column in its table did this column come from?
tuple::size_type table_column (const std::string &ColName) const
 What column in its table did this column come from?

Friends

class pqxx::field
class pqxx::internal::gate::result_creation
class pqxx::internal::gate::result_connection
class pqxx::internal::gate::result_sql_cursor

Additional Inherited Members

- Private Types inherited from pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >
typedef const internal::result_data content_type
- Private Member Functions inherited from pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >
 PQAlloc () throw ()
 PQAlloc (const PQAlloc &rhs) throw ()
 PQAlloc (const internal::result_data *obj) throw ()
 Assume ownership of a pointer.
 ~PQAlloc () throw ()
PQAllocoperator= (const PQAlloc &rhs) throw ()
void swap (PQAlloc &rhs) throw ()
 operator bool () const throw ()
 Is this pointer non-null?
bool operator! () const throw ()
 Is this pointer null?
const internal::result_data * operator-> () const throw (std::logic_error)
 Dereference pointer.
const internal::result_data & operator* () const throw (std::logic_error)
 Dereference pointer.
const internal::result_data * get () const throw ()
 Obtain underlying pointer.
void reset () throw ()

Detailed Description

Result set containing data returned by a query or command.

This behaves as a container (as defined by the C++ standard library) and provides random access const iterators to iterate over its tuples. A tuple can also be accessed by indexing a result R by the tuple's zero-based number:

for (result::size_type i=0; i < R.size(); ++i) Process(R[i]);

Result sets in libpqxx are lightweight, reference-counted wrapper objects (following the Proxy design pattern) that are small and cheap to copy. Think of a result object as a "smart pointer" to an underlying result set.

Warning
The result set that a result object points to is not thread-safe. If you copy a result object, it still refers to the same underlying result set. So never copy, destroy, query, or otherwise access a result while another thread may be copying, destroying, querying, or otherwise accessing the same result set–even if it is doing so through a different result object!

Member Typedef Documentation

typedef signed long pqxx::result::difference_type

For backward compatibility only.

Deprecated:
Use pqxx::field instead.
typedef unsigned long pqxx::result::size_type

For backward compatibility only.

Deprecated:
Use pqxx::tuple instead.

Constructor & Destructor Documentation

pqxx::result::result ( ) throw ()
pqxx::result::result ( const result rhs) throw ()

Member Function Documentation

pqxx::result::size_type pqxx::result::affected_rows ( ) const

If command was INSERT, UPDATE, or DELETE: number of affected rows.

Returns
Number of affected rows if last command was INSERT, UPDATE, or DELETE; zero for all other commands.

Referenced by pqxx::internal::sql_cursor::move().

const pqxx::tuple pqxx::result::at ( size_type  i) const throw (range_error)
reference pqxx::result::back ( ) const throw ()
pqxx::result::const_iterator pqxx::result::begin ( ) const throw ()
size_type pqxx::result::capacity ( ) const throw ()
void pqxx::result::clear ( ) throw ()
const char * pqxx::result::column_name ( tuple::size_type  Number) const

Name of column with this number (throws exception if it doesn't exist)

References pqxx::to_string().

pqxx::tuple::size_type pqxx::result::column_number ( const char  ColName[]) const

Number of given column (throws exception if it doesn't exist)

Referenced by pqxx::tuple::column_number().

tuple::size_type pqxx::result::column_number ( const std::string &  Name) const

Number of given column (throws exception if it doesn't exist)

References column_number().

Referenced by column_number().

pqxx::oid pqxx::result::column_table ( tuple::size_type  ColNum) const

What table did this column come from?

References pqxx::oid_none, and pqxx::to_string().

oid pqxx::result::column_table ( int  ColNum) const

What table did this column come from?

References column_table().

Referenced by column_table().

oid pqxx::result::column_table ( const std::string &  ColName) const

What table did this column come from?

References column_table().

Referenced by column_table().

pqxx::oid pqxx::result::column_type ( tuple::size_type  ColNum) const

Type of given column.

References pqxx::oid_none, and pqxx::to_string().

oid pqxx::result::column_type ( int  ColNum) const

Type of given column.

References column_type().

Referenced by column_type().

oid pqxx::result::column_type ( const std::string &  ColName) const

Type of given column.

References column_type().

Referenced by column_type().

oid pqxx::result::column_type ( const char  ColName[]) const

Type of given column.

References column_type().

Referenced by column_type().

pqxx::tuple::size_type pqxx::result::columns ( ) const throw ()

Number of columns in result.

bool pqxx::result::empty ( ) const throw ()
const_result_iterator pqxx::result::end ( ) const throw ()
reference pqxx::result::front ( ) const throw ()
pqxx::oid pqxx::result::inserted_oid ( ) const

If command was INSERT of 1 row, return oid of inserted row.

Returns
Identifier of inserted row if exactly one row was inserted, or oid_none otherwise.
bool pqxx::result::operator!= ( const result rhs) const throw ()
result& pqxx::result::operator= ( const result rhs) throw ()
bool pqxx::result::operator== ( const result rhs) const throw ()
const tuple pqxx::result::operator[] ( size_type  i) const throw ()
const string & pqxx::result::query ( ) const throw ()

Query that produced this result, if available (empty string otherwise)

pqxx::result::const_reverse_iterator pqxx::result::rbegin ( ) const
pqxx::result::const_reverse_iterator pqxx::result::rend ( ) const
pqxx::result::size_type pqxx::result::size ( ) const throw ()
void pqxx::result::swap ( result rhs) throw ()
pqxx::tuple::size_type pqxx::result::table_column ( tuple::size_type  ColNum) const

What column in its table did this column come from?

References pqxx::to_string().

tuple::size_type pqxx::result::table_column ( int  ColNum) const

What column in its table did this column come from?

References table_column().

Referenced by table_column().

tuple::size_type pqxx::result::table_column ( const std::string &  ColName) const

What column in its table did this column come from?

References table_column().

Referenced by table_column().

Friends And Related Function Documentation

friend class pqxx::field
friend
friend class pqxx::internal::gate::result_connection
friend
friend class pqxx::internal::gate::result_creation
friend
friend class pqxx::internal::gate::result_sql_cursor
friend

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00082.js000066400000000000000000000073671224474465600207340ustar00rootroot00000000000000var a00082 = [ [ "const_iterator", "a00082.html#a231cf3451b578e1a77a0e3ba5c5332c0", null ], [ "const_reverse_iterator", "a00082.html#a4e8a0b23393257bb8438323af622ab0b", null ], [ "difference_type", "a00082.html#abec7f7f4d7ed030f38b2a123b632b818", null ], [ "field", "a00082.html#ab3bcc6d210c747335a9f86aef975dfa9", null ], [ "iterator", "a00082.html#afa18f18140865290a1e7a3461cc604f4", null ], [ "pointer", "a00082.html#a16732cbff5bf11cefd68471577344551", null ], [ "reference", "a00082.html#a1d2df6fa727dd62239d98a0af8267cd2", null ], [ "reverse_iterator", "a00082.html#a95891ed8c127338b022f98365cce1e91", null ], [ "size_type", "a00082.html#a9e02bbf1126802fd7fd64df989e03940", null ], [ "tuple", "a00082.html#ad928c2c47d1f6d890e4a97aa225ff9d5", null ], [ "result", "a00082.html#aad8b1fd5e42dbfc4a4d75c0a1b0c6ddb", null ], [ "result", "a00082.html#a1d7279ca68e1d4da8da2829bb34e3b80", null ], [ "affected_rows", "a00082.html#a5b614d6a33d0ce60282f6bf3cdf97409", null ], [ "at", "a00082.html#a78570b23f3d2daedf81429fe4ddddda1", null ], [ "back", "a00082.html#ab60d18b1e9d4666c28551da2ad0e37d5", null ], [ "begin", "a00082.html#a947c2ca5eff01d46475744c87eb00944", null ], [ "capacity", "a00082.html#a51879f289b45e502f320b34dbbe023ca", null ], [ "clear", "a00082.html#a77542a235a4ca711267e30d84492ce3b", null ], [ "column_name", "a00082.html#a21afe937e085a4b3346080c389a12fb7", null ], [ "column_number", "a00082.html#a38e72e44648e624333181233097e55ce", null ], [ "column_number", "a00082.html#afd40988f258ee059b0e76dac6480d8b3", null ], [ "column_table", "a00082.html#a7a70138c10119663c29f81853ed21969", null ], [ "column_table", "a00082.html#ac5027b980639d8d0304ab32fb3052d73", null ], [ "column_table", "a00082.html#a91a2dd4512530363cdf1240a0aeba46c", null ], [ "column_type", "a00082.html#a887f5867a4c241990ffb697097ddc2c9", null ], [ "column_type", "a00082.html#a8f7e6221f552199a88b3cfb787bd03c2", null ], [ "column_type", "a00082.html#af56d00ec20a26b2dfeb3a83b481cf243", null ], [ "column_type", "a00082.html#a33ab612efd39b727d6e1e151a6c354f6", null ], [ "columns", "a00082.html#a37086391f22470c7cdd386b12842f080", null ], [ "empty", "a00082.html#a7ee3d9e31a9f81b366cf04f1f73b5df2", null ], [ "end", "a00082.html#a629baba71ae365f79232780e6f8ac3a7", null ], [ "front", "a00082.html#a68dd2275bab0b4e254573ee664738904", null ], [ "inserted_oid", "a00082.html#a939ae251d3e8435a113157ec1443b90e", null ], [ "operator!=", "a00082.html#aced900b0f7d44652107e4df89df9023f", null ], [ "operator=", "a00082.html#a6e2e28a20a517c6c3f4e4c9407fbe288", null ], [ "operator==", "a00082.html#acddfe7ea1003815ef4e738bb6c84d221", null ], [ "operator[]", "a00082.html#a3aac4e676b132a3499e70bb83bcc4bec", null ], [ "query", "a00082.html#a1741df34f160c410d8d28dddc44e6015", null ], [ "rbegin", "a00082.html#a9bd216b98399da242314f47e6c512986", null ], [ "rend", "a00082.html#a89aa2801e77f463d3598dac7ee2ecd11", null ], [ "size", "a00082.html#a4dccf162cd4081bbe2824ba29d546e90", null ], [ "swap", "a00082.html#a2f3a766be0d57b86db847585ed1f2fc4", null ], [ "table_column", "a00082.html#a9c54931412fec6e7516cacff4fcdfcf3", null ], [ "table_column", "a00082.html#adadfb3831c89409ff3ff74a49b5b5bdd", null ], [ "table_column", "a00082.html#ad8ecab8bcc022fe5a489e2d2fded14bd", null ], [ "pqxx::field", "a00082.html#aea00d4ccd9783a65feb0c079c109c3e8", null ], [ "pqxx::internal::gate::result_connection", "a00082.html#a9fe15fed7d74b4ae0718cf9ae64427bf", null ], [ "pqxx::internal::gate::result_creation", "a00082.html#a137c5ab03f8e5975fe822571cfa796e4", null ], [ "pqxx::internal::gate::result_sql_cursor", "a00082.html#ad7ebaaac4647f20a915fd6aa735cd1e5", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00082.png000066400000000000000000000020021224474465600210610ustar00rootroot00000000000000‰PNG  IHDRáPu=XPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2‘IDATxíÛrã D­üÿ7¯Iˆ›³’•ÚZÆâ8º ¦éá•eY³,ËI2’+,I‘±Â’+,I‘±Â’™³ §Á•$5ä—éù—¯ª·ßǤÔF’†t±ü8òåióÊ%é>×¢}ÛÃ'ÞòÅów¿¹«ðÕh$iÈ[9»–Iú%î)üHÿšÿâ¢vÍúâÛ‘›-Ÿ’ݳž¥ÂÛƒÜýxºÑïóêMNî{5šuê<î±ùžý+ËåÈÊ‘« ŸŸ6/ _Òž‘æþW£í^gùQ+o¶Á˧JªZ«pjqµ;¼,ÁE‡$•-§úJ4ûs%­³µ¹ïp% ÝbW îËâ~/ÚBëÂÃm^«~ñJš"²ŸÃgî§Ԟ×¢iæî©;õÕçÝ$ ¦NRÙ”t´ßŒ6'ô=… ùŽ­¼ï¨V‹¢,ï_uÊ5yì:ªÕ;ÑÔó÷[­IlþxûâVŠ©÷Íc…ïG»ÞŒî§–Šáöì.šÁþ=åá¦÷Åhšzûºîmz+ M%Øö¥‡ïD;ðp¹³Ž.gëâ+…ÛUŽþùU²«Ñô'D}x^8‡/'áv•~'Úñ9œ…­îâ)6A],†æ_kGïác#•9Ü¿8þÕUº>xNG³åºZX~]íûâãmäñÆ:Ÿ„zêFæ¾ÚïF+©lU•ný'Ifò„XáµÊ JÉ?ÏÇßâ¸ÒË KÒg–$#IÁ°Â’+,I‘±Â’+,I‘y(¼,Ëb–eYbðQ|€ Xa€À|}Yb€¸Xa€À<¶Äa±ÂÀ̈ ` À|ØÃÀ̇= ` À|ØÃÀ̇= ` À|ØÃÀ̇= ` À|ØÃÀ̇= ` À|ØÃÀ̇= ` À|ØÃÀÌÇçy8¥”LJ)…`Bb…"c…"c…"c…"c…Ë\DL†¶ÂsñXÓ÷¢¿ùb°Xs*^m<»‡Ì@(ž2mmRÑö÷$ŽV\"¦‡+Ý WïE­0ÀDœRøù×Ui+ ðÿS)\•âÚÃùÎ LDyÎ íl»9Ý ÌÀcM»°µÂ‡][ñ³×Cf Í‘ ðÁXa€ÈXa€ÈDTÀXa€OÀ DÆ DÆ Dæ¡pJ)™”RŠÉæ_ "ódIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00083.html000066400000000000000000000754041224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::robusttransaction< ISOLATIONLEVEL > Class Template Reference
pqxx::robusttransaction< ISOLATIONLEVEL > Class Template Reference

Slightly slower, better-fortified version of transaction. More...

#include <robusttransaction.hxx>

Inheritance diagram for pqxx::robusttransaction< ISOLATIONLEVEL >:
pqxx::basic_robusttransaction pqxx::dbtransaction pqxx::transaction_base pqxx::internal::namedclass

Public Types

typedef isolation_traits
< ISOLATIONLEVEL > 
isolation_tag
- Public Types inherited from pqxx::basic_robusttransaction
typedef isolation_traits
< read_committed
isolation_tag
 Isolation level is read_committed by default.

Public Member Functions

 robusttransaction (connection_base &C, const std::string &Name=std::string())
 Constructor.
virtual ~robusttransaction () throw ()
- Public Member Functions inherited from pqxx::basic_robusttransaction
virtual ~basic_robusttransaction ()=0
- Public Member Functions inherited from pqxx::dbtransaction
virtual ~dbtransaction ()
- Public Member Functions inherited from pqxx::transaction_base
virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Additional Inherited Members

- Protected Member Functions inherited from pqxx::basic_robusttransaction
 basic_robusttransaction (connection_base &C, const std::string &IsolationLevel, const std::string &table_name=std::string())
- Static Protected Member Functions inherited from pqxx::dbtransaction
static std::string fullname (const std::string &ttype, const std::string &isolation)
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Detailed Description

template<isolation_level ISOLATIONLEVEL = read_committed>
class pqxx::robusttransaction< ISOLATIONLEVEL >

Slightly slower, better-fortified version of transaction.

robusttransaction is similar to transaction, but spends more effort (and performance!) to deal with the hopefully rare case that the connection to the backend is lost just as the current transaction is being committed. In this case, there is no way to determine whether the backend managed to commit the transaction before noticing the loss of connection.

In such cases, this class tries to reconnect to the database and figure out what happened. It will need to store and manage some information (pretty much a user-level transaction log) in the back-end for each and every transaction just on the off chance that this problem might occur. This service level was made optional since you may not want to pay this overhead where it is not necessary. Certainly the use of this class makes no sense for local connections, or for transactions that read the database but never modify it, or for noncritical database manipulations.

Besides being slower, it's theoretically possible that robusttransaction actually fails more instead of less often than a normal transaction. This is due to the added work and complexity. What robusttransaction tries to achieve is to be more deterministic, not more successful per se.

When a user first uses a robusttransaction in a database, the class will attempt to create a log table there to keep vital transaction-related state information in. This table, located in that same database, will be called pqxxlog_*user*, where user is the PostgreSQL username for that user. If the log table can not be created, the transaction fails immediately.

If the user does not have permission to create the log table, the database administrator may create one for him beforehand, and give ownership (or at least full insert/update rights) to the user. The table must contain two non-unique fields (which will never be null): "name" (of text type, varchar(256) by default) and "date" (of timestamp type). Older versions of robusttransaction also added a unique "id" field; this field is now obsolete and the log table's implicit oids are used instead. The log tables' names may be made configurable in a future version of libpqxx.

The transaction log table contains records describing unfinished transactions, i.e. ones that have been started but not, as far as the client knows, committed or aborted. This can mean any of the following:

  1. The transaction is in progress. Since backend transactions can't run for extended periods of time, this can only be the case if the log record's timestamp (compared to the server's clock) is not very old, provided of course that the server's system clock hasn't just made a radical jump.
  2. The client's connection to the server was lost, just when the client was committing the transaction, and the client so far has not been able to re-establish the connection to verify whether the transaction was actually completed or rolled back by the server. This is a serious (and luckily a rare) condition and requires manual inspection of the database to determine what happened. The robusttransaction will emit clear and specific warnings to this effect, and will identify the log record describing the transaction in question.
  3. The transaction was completed (either by commit or by rollback), but the client's connection was durably lost just as it tried to clean up the log record. Again, robusttransaction will emit a clear and specific warning to tell you about this and request that the record be deleted as soon as possible.
  4. The client has gone offline at any time while in one of the preceding states. This also requires manual intervention, but the client obviously is not able to issue a warning.

It is safe to drop a log table when it is not in use (ie., it is empty or all records in it represent states 2-4 above). Each robusttransaction will attempt to recreate the table at its next time of use.

Member Typedef Documentation

template<isolation_level ISOLATIONLEVEL = read_committed>
typedef isolation_traits<ISOLATIONLEVEL> pqxx::robusttransaction< ISOLATIONLEVEL >::isolation_tag

Constructor & Destructor Documentation

template<isolation_level ISOLATIONLEVEL = read_committed>
pqxx::robusttransaction< ISOLATIONLEVEL >::robusttransaction ( connection_base C,
const std::string &  Name = std::string() 
)
explicit

Constructor.

Creates robusttransaction of given name

Parameters
CConnection that this robusttransaction should live inside.
Nameoptional human-readable name for this transaction
template<isolation_level ISOLATIONLEVEL = read_committed>
virtual pqxx::robusttransaction< ISOLATIONLEVEL >::~robusttransaction ( ) throw ()
virtual

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00083.js000066400000000000000000000004111224474465600207140ustar00rootroot00000000000000var a00083 = [ [ "isolation_tag", "a00083.html#a8fb228809bd42b2936ada9f9573d30d6", null ], [ "robusttransaction", "a00083.html#ae28452f4e178b6c548f6294fee803632", null ], [ "~robusttransaction", "a00083.html#af1b175fd37479937c936f172803f40bb", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00083.png000066400000000000000000000037361224474465600211010ustar00rootroot00000000000000‰PNG  IHDR øÁäC$PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2mIDATxíí’« DmUÞÿ‘/åC'›d“ì&wÛ²q@8 3¡^Ëz­¯ô½Ö•/—ëe†q,ó1„V.,†ÐÊJãu?Ií=}e—n·“ž>ßBãGÈçUÜíŽq2Â'Ï3gØG™Î³ÊÏRÉs,“Üv0—‰Ü”›s{~TOÈÆ­ß¹87¯ökÿly†Tú·÷\¨ã”Ž­ý<îP_“UÊ"ËŽåÚùYܾ.¢µ÷÷u1c¿Ù¾õ/ ÎðÞúõÿlííý7S캳u'Ëb¶ÚÎöÙcÖÕvûV®ýÆX°îðê¼øáx5¿îÆZ¬n=Âvò|íhœ›†€86kÏÊdwüï÷Jräxˆhßù úŽ6XÛ†vXÕûMö#ÜÝx›1i󔚕 ¬5Ã>’Bû¤§€ÖaMg»ÇŽý1 à±§¿Ç2¶{`=•ÆDÏqn‹öƒ»nÙ`pïêðÓqX“Â(§@[ÒN‡Ø²Æz>&»5›Ô,õÀz GÜkˆâºé”K‰ 2®GwæÊ³JË=Vü]ÿWicIކ±•5ÃF-+ èe¦QcDz^[,ù›ïo €e³N'ã0 €ƒ2 ã0 €@fa‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2 ÓˆdïHcY–ÅZ/I²Êe¦!I‘LÃ4$)ÒÑH’t“²å%ãÛ‘¤ûõž4$)ÒçÐHJe²ùÙ*}éü–¿¬µÑzûºhm›ÝþÇÎ’ô¨žH£zxY’‚{3Ym”Ôï¹8Øþ¡¤~?ÍgžéûUlÏñóæ…v7 iöŸM#;ö°ÊæìwѨöµó¹þæ4&?ž²_åÁQ®Ó8t–¤gè5qãE/и7f7.ä”ZÛI©óIÒÍœSfßØÙ¿oN «’ô9ú %R>Ï$)”}ã54$éÓe¦!I‘LÃ4$)R¦±,ËbÕ à t°L`Öéd¦pP†a¦È,L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘Lãi,˲XëÅ"IV¹LÃ4$)’i˜†$Eú%©ÜkM’nPï#I/ÑgѤWê4’R™y~¶Ê¸šsûf•Ê£¼«]—¡8?ŠÅd'IÏÓKhÔ/+PRtoªŒÖjû2Üsq°“¤'ê5¾±Ÿ÷öŒ>^3·g*î&IÏÑûÐÈ'`xmGäÿ¢1¹ø4«<8ʧÒâCEƒ¸1º7>È7.ä”4[Néá°æŒÃIÒÍœS>餫’ôî2 Ó¤H¯ !IŸ)Ó0 IŠd¦!I‘2eY«^o €e³N'ã0 €ƒ2 ã0 €@fa‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2 ÓˆdïHcY–ÅZ/I²Êe¦!I‘LÃ4$)Òkh$IÚ)j»ÖáË>’ú}—±$…ú9’tQÏ !Iê›4’Rù~¶Ê0§ÞÚ?Õ÷nµ5­º]ùP¾­öƒ¯ßû6;IºKߥQ7®ÌCI‡»Õ”4Ýã&®V×:DV“­’ú=ØIÒ}ú¶oìÿ¾=ÇÏ“¿g8xñ8à۞njIÒ}z-êëíÜJcê°‡ýç¡í­hLŽÀš&{ýѺðùm|cQ½-n ë BÎE×ãÆûÆ…œ²ÍªÇûí$E9åZjècNÊnæœòó'å©™^’~_¿@ãýf'‘¤·}ã 4$é?”i˜†$E2 Ó¤H™Æ²,‹U/€7Ð À2 €Y§“q˜ÀA†q˜@ ³0 €H¦a‘LÃ4"™†iD2 Óˆd¦É4L ’i˜@$Ó0 €H¦a‘LÃ4"™†iD2w¤‘RJÖz‘¬ê¦aLÃ4"}‡FÔ#·Ý>Ð5ãóÇá·œ7ÿµ¾ŽI`¶éï6CûÔ0é·h\Ô6X¡2U¦)6[m´(]¥‘++æ^9Ì¡nÁjÑ41ß[µg/¶-íb´}Y—iŒ6ë¤v4ú\o¥QÇ(“%±¿·ï«Ak…4ܱÕdK¢ßƒ]ã6ms@£/êI4†Í˜@ÏSœìÆñŽÅø¾{Žû´¶y˜yRíï÷ÒÆâÆð“(n Ûð(6ë~‚Û‡³ßçñJnño q#Ž¢QDH0Þ1³+qc>×rJ@c_‰hŒýnŠrÊî ìLÛI©ÍªÅ³!§ôt3甃ãn'¼Œá„D4ºMƒ¹ïŽU­è÷œ®¾L?ÿ¹LÃ4"5^¦a‘LÃ4"e)¥dÕëµ'½KúRÐçIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00084.html000066400000000000000000000317541224474465600212630ustar00rootroot00000000000000 libpqxx: pqxx::internal::scoped_array< T > Class Template Reference
pqxx::internal::scoped_array< T > Class Template Reference

#include <util.hxx>

Public Types

typedef size_t size_type
typedef long difference_type

Public Member Functions

 scoped_array ()
 scoped_array (size_type n)
 scoped_array (T *t)
 ~scoped_array ()
T * get () const throw ()
T & operator* () const throw ()
template<typename INDEX >
T & operator[] (INDEX i) const throw ()
scoped_arrayoperator= (T *t) throw ()

Member Typedef Documentation

template<typename T>
typedef long pqxx::internal::scoped_array< T >::difference_type
template<typename T>
typedef size_t pqxx::internal::scoped_array< T >::size_type

Constructor & Destructor Documentation

template<typename T>
pqxx::internal::scoped_array< T >::scoped_array ( )
template<typename T>
pqxx::internal::scoped_array< T >::scoped_array ( size_type  n)
explicit
template<typename T>
pqxx::internal::scoped_array< T >::scoped_array ( T *  t)
explicit
template<typename T>
pqxx::internal::scoped_array< T >::~scoped_array ( )

Member Function Documentation

template<typename T>
T* pqxx::internal::scoped_array< T >::get ( ) const throw ()
template<typename T>
T& pqxx::internal::scoped_array< T >::operator* ( ) const throw ()
template<typename T>
scoped_array& pqxx::internal::scoped_array< T >::operator= ( T *  t) throw ()
template<typename T>
template<typename INDEX >
T& pqxx::internal::scoped_array< T >::operator[] ( INDEX  i) const throw ()

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00084.js000066400000000000000000000014261224474465600207240ustar00rootroot00000000000000var a00084 = [ [ "difference_type", "a00084.html#a2a9085342769fddc1cc5a8c6287b0892", null ], [ "size_type", "a00084.html#ac5ba5559e184842746b13c9545c0ac73", null ], [ "scoped_array", "a00084.html#a38e241073d5b8b235f1d9d35980a8639", null ], [ "scoped_array", "a00084.html#af0349dcca1c6261e641eebf127324a41", null ], [ "scoped_array", "a00084.html#ab139e833e327beb370470269e09e85a6", null ], [ "~scoped_array", "a00084.html#a92873171917fe692165825e4cc5d0b50", null ], [ "get", "a00084.html#af8afa32de4971796d6d15d73b7590b0a", null ], [ "operator*", "a00084.html#ac3891140f89ff6e3e43a818767431c23", null ], [ "operator=", "a00084.html#af0ac2a40f4e23eb28cde185d629a2678", null ], [ "operator[]", "a00084.html#aada7488a2fb51e6d81cdd86469f43ada", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00085.html000066400000000000000000000740241224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::internal::sql_cursor Class Reference
pqxx::internal::sql_cursor Class Reference

Cursor with SQL positioning semantics. More...

#include <cursor.hxx>

Inheritance diagram for pqxx::internal::sql_cursor:
pqxx::cursor_base

Public Member Functions

 sql_cursor (transaction_base &t, const std::string &query, const std::string &cname, cursor_base::accesspolicy ap, cursor_base::updatepolicy up, cursor_base::ownershippolicy op, bool hold)
 sql_cursor (transaction_base &t, const std::string &cname, cursor_base::ownershippolicy op)
 ~sql_cursor () throw ()
result fetch (difference_type rows, difference_type &displacement)
result fetch (difference_type rows)
difference_type move (difference_type rows, difference_type &displacement)
difference_type move (difference_type rows)
difference_type pos () const throw ()
 Current position, or -1 for unknown.
difference_type endpos () const throw ()
 End position, or -1 for unknown.
const resultempty_result () const throw ()
 Return zero-row result for this cursor.
void close () throw ()
- Public Member Functions inherited from pqxx::cursor_base
const std::string & name () const throw ()
 Name of underlying SQL cursor.

Additional Inherited Members

- Public Types inherited from pqxx::cursor_base
enum  accesspolicy { forward_only, random_access }
 Cursor access-pattern policy. More...
enum  updatepolicy { read_only, update }
 Cursor update policy. More...
enum  ownershippolicy { owned, loose }
 Cursor destruction policy. More...
typedef result::size_type size_type
typedef result::difference_type difference_type
- Static Public Member Functions inherited from pqxx::cursor_base
static difference_type all () throw ()
 Special value: read until end.
static difference_type next () throw ()
 Special value: read one row only.
static difference_type prior () throw ()
 Special value: read backwards, one row only.
static difference_type backward_all () throw ()
 Special value: read backwards from current position back to origin.
- Protected Member Functions inherited from pqxx::cursor_base
 cursor_base (connection_base &, const std::string &Name, bool embellish_name=true)
- Protected Attributes inherited from pqxx::cursor_base
const std::string m_name

Detailed Description

Cursor with SQL positioning semantics.

Thin wrapper around an SQL cursor, with SQL's ideas of positioning.

SQL cursors have pre-increment/pre-decrement semantics, with on either end of the result set a special position that does not repesent a row. This class models SQL cursors for the purpose of implementing more C++-like semantics on top.

Positions of actual rows are numbered starting at 1. Position 0 exists but does not refer to a row. There is a similar non-row position at the end of the result set.

Don't use this at home. You deserve better. Use the stateles_cursor instead.

Constructor & Destructor Documentation

pqxx::internal::sql_cursor::sql_cursor ( transaction_base t,
const std::string &  cname,
cursor_base::ownershippolicy  op 
)
pqxx::internal::sql_cursor::~sql_cursor ( ) throw ()

Member Function Documentation

void pqxx::internal::sql_cursor::close ( ) throw ()
const result& pqxx::internal::sql_cursor::empty_result ( ) const throw ()

Return zero-row result for this cursor.

Referenced by pqxx::internal::stateless_cursor_retrieve().

difference_type pqxx::internal::sql_cursor::endpos ( ) const throw ()

End position, or -1 for unknown.

Returns the final position, just after the last row in the result set. The starting position, just before the first row, counts as position zero.

End position is unknown until it is encountered during use.

Referenced by pqxx::internal::obtain_stateless_cursor_size().

result pqxx::internal::sql_cursor::fetch ( difference_type  rows,
difference_type displacement 
)
result pqxx::internal::sql_cursor::fetch ( difference_type  rows)

References fetch().

Referenced by fetch().

difference_type pqxx::internal::sql_cursor::move ( difference_type  rows)

References move().

Referenced by move().

difference_type pqxx::internal::sql_cursor::pos ( ) const throw ()

Current position, or -1 for unknown.

The starting position, just before the first row, counts as position zero.

Position may be unknown if (and only if) this cursor was adopted, and has never hit its starting position (position zero).

Referenced by pqxx::internal::stateless_cursor_retrieve().


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00085.js000066400000000000000000000014741224474465600207300ustar00rootroot00000000000000var a00085 = [ [ "sql_cursor", "a00085.html#a78ee80852828a1221357352ce77b9597", null ], [ "sql_cursor", "a00085.html#a4e8540e040830b7834749c51d1eb39c0", null ], [ "~sql_cursor", "a00085.html#a5957a76f8d79ad8eae5feee9722eff40", null ], [ "close", "a00085.html#a866cc9ec5bc766135e80a38901833e37", null ], [ "empty_result", "a00085.html#af02410eca37436cb84547357d0b5a38e", null ], [ "endpos", "a00085.html#a3ae9feae24d5eab6cf30867351cee54e", null ], [ "fetch", "a00085.html#ac356fb51140719a5703d8c5c6784ebb5", null ], [ "fetch", "a00085.html#a7c17e5396e312c2f3e0f66db3d0e4a90", null ], [ "move", "a00085.html#a2aefb76b1cea234cc687735a3f8bc51a", null ], [ "move", "a00085.html#a31a9e2e6f5276c06120111df47f9ac5f", null ], [ "pos", "a00085.html#a5a8ff4f51d2a249f1e772e0953452684", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00085.png000066400000000000000000000011651224474465600210750ustar00rootroot00000000000000‰PNG  IHDR–PÌn|yPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíë’« ›Ïª¼ÿ#/‰ d6›“ek§ŠV"ãØ`þ²,Ë2,’4¡%I^BK’¼|F+IÒWø}ZIiO·ÏŽ}DÚgÖã#î˜C«ûC’FZÛsŽvæÔºÝ¦ôšSkµšÑkR­Ø‰~B ÀKhx -/¡à%´¼„€—ÐðZ^B ÀKhx -/@+¥”æƒ0¡à%´¼xµrÔ0þrð…ÿzµ>«µvöÞöÉxtLÊõ| lß”ãpܜ÷“)ê™Íj娃=W8ƒ³Öþà{\‚‹fWI\5«•£òýÍ•ªZEzS°\­&‰!ǘ‰;KRNg{o•éE­ýï¡JÌn9‰-øL«(îuµªôæÔÜ2Öjêß][½%?˜ÄZëÙÚ²5jõvb½,‹XL¢ îć«}N]SØ×¿3^Êö­}˜ 0döjÌChx -/ÛÇ3¥”fãÊ¡ -ãL½ÐIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00086.html000066400000000000000000000300701224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::sql_error Class Reference

Exception class for failed queries. More...

#include <except.hxx>

Inheritance diagram for pqxx::sql_error:
pqxx::failure pqxx::pqxx_exception pqxx::data_exception pqxx::feature_not_supported pqxx::insufficient_privilege pqxx::insufficient_resources pqxx::integrity_constraint_violation pqxx::invalid_cursor_name pqxx::invalid_cursor_state pqxx::invalid_sql_statement_name pqxx::plpgsql_error pqxx::syntax_error

Public Member Functions

 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Exception class for failed queries.

Carries a copy of the failed query in addition to a regular error message

Constructor & Destructor Documentation

pqxx::sql_error::sql_error ( )
pqxx::sql_error::sql_error ( const std::string &  whatarg)
explicit
pqxx::sql_error::sql_error ( const std::string &  whatarg,
const std::string &  Q 
)
pqxx::sql_error::~sql_error ( ) throw ()
virtual

Member Function Documentation

const string &PQXX_CONST pqxx::sql_error::query ( ) const throw ()

The query whose execution triggered the exception.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00086.js000066400000000000000000000006111224474465600207210ustar00rootroot00000000000000var a00086 = [ [ "sql_error", "a00086.html#ad2f7fa865d0410824b39ac27dab99d92", null ], [ "sql_error", "a00086.html#affcbefe5ad9a1cae7073d170f85352d0", null ], [ "sql_error", "a00086.html#af3e94ddc4c6428d5a1d7763936a5b781", null ], [ "~sql_error", "a00086.html#a7db2ae4924fda2aec297cfa1c8363ec7", null ], [ "query", "a00086.html#ae9e8799eed6ff45bbb44e481821cbfa2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00086.png000066400000000000000000000130511224474465600210730ustar00rootroot00000000000000‰PNG  IHDR¢¸p =PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¸IDATxíÑ–ª¼‹b-ßÿ‘¢`8:ÎüœÞÎç¦ $!Ìî¢;·Œã8~ ȨúD‘ji¢Hµ4Q¤Zš(R-M©þÇ Ó¡úQ¤úó?Qt‹à0ñ|^M`Ÿ _îç4¹\ç9—Ëõ‰K{ºkúT_$Š®!¿S,íŽGÃMŽtÝÍeÐöhúT_#ŠöÂ:Ÿ_ž®}·þÕ3;öT_#Š~®èò[+ºöEÀÞV´­dO†›Ä¹wo’)Š:ÞÝ‹š™ãødøîn¾<Ù‹¢è,ZBß;˜Cû`¸©t·ÛVãÍÜ­^/˶¥ú*QÔl/vO†UñÝùª¢èmE礸üTEH”æ;ŠT Eª¥‰"ÕÒD‘ji¢Hµ4«hÇñCopU‰"€ÊœNqP˜(¨ÌÙPÔ%ŠŠA¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€7Çqü>Qõ3ˆ"ÕÒD‘ji¢Hµ4Q¤Zš(R}“aXZÓ¡úûD‘ê{ôR¢àüŠ¢á–'çóҸ˦»ÛyI¤+—›{Ž©¾O©>àäÛqºý1³êhÚª?#ŠTpÿMS·ÿ,öœEÀ—¦è\Ïö]TH©> SÔ‰h‡¼¿œAQ¤úí^Ô¤PSà6Ц)tÏø¥,ZÌôŠštºÈ›;¦‰MTý9Q¤ú€&Æ¿W·T¿E©> Šþ+¢ 4¿¢HõÿO©–&ŠTKEª¥‰"ÕÒ|¬¢qÇ ¼Á T%Š*s:Å@a¢ 2gCqP—((N”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠÞd†áSø@>èÿE¥‰"€ÒD@i¢ 4QðþûEÀˆ"€wøÙÿk`˜8Ÿ—F»è}´}Ñ0Ï:_®§¦à=¢`Í%´·ãpöŽ6ú—ÖÄ|ê:Þ#ŠÖÜ‚;_šDj¿Žî(Zßü0ÆQ°æ‰¢[¢¬]~Q𿨨­l팽,Z®Qð%¿·5)ÔHøj/Š"€§ü4‹3½¢9y–ÑöE³Îû©7 ðQ°¦;ÀCŽ_¬ù–¢s®\~ÿ Q°&YðóAÿ¯((M”&ŠJE¥ùXEÃ0 @xƒ@¨JTætŠ#€ÂD@eΆâ .QPœ(M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”æhEã8ŽŸÀ®Hõ3ˆ"ÕÒD‘ji¢Hµ4Q¤Zš(R}ΰÓR}‰ó#o<Eª¯óSEªoES‡)ŠçóÒh#{éŸ.—tXN÷ǧ®9]æ¦'¦•.íåùåeª/E7#·c æ ëã&aéX¥U;·½ ÚíRª/E]çÎçv¸ßU¶Ã·Ù[qÇžêkDÑëŠÎ…jžÕVºËÍFQ3÷ŸQt:NG¢ú*]ðº>L‰UuC{É”,èx{/jRhäK{Ñí‰ö¢(z«Ð-fzEK]›ËÛmêµÕTº[Ô[É7s«ç£èý½hÛTý!¿²Z½­èœ—Ÿê#¢àÉ"€oQZ‘j]¢Hµ4Q¤Zš(R-M©–æcã8~p´"€ð2QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@iŽV4Žãø)ÀáŠT?ƒ(R-M©–&ŠTKEª¥‰"µ9†Amõ½ê¾1uïGG‘z?¶aŠ"€ÿ‚GІ[žœÏKãžaº»ž¯—Ëiê»>» ®W[\×¹r›ÔͽÞ6OÝ^£ºæÏ)šbvµƒ;Ç=²›Î¦½^m¾, Ñt/ïÛY¬yKÝ«I½.8¢M¨×ƒ{6»šµÝ.¶êU]E[E× 4¢UToƒ_+Zº¯-oùÿ+:N§#QÝ¡ TWߺ,êfîgЗŠ»Ùɢݥ³µûtžG{Q›¯ºfÚß‹6o‰¢9x‹™^Q“N‹¼Kï-È‹š¶ÎµåoU0——,¯¼¿pù(®k7SU7üŽhÛTýÏhj™ê·‰"Õï2mò;•i·?ж$‹¾EEªÿQ¤Zš(R-M©–&ŠTKó±ŠÆq?€8Z@x™((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4G+ÇqüàpEªŸA©–&ŠTKEª¥‰"ÕÒD‘jÏ ºÃp8sÞLܲ{àÑâªûD‘êK\‚û$À/Ä?Š^Rt΄)R—”˜Mô¦o½¸2L³oy05ºÖ5ÅËÓ¿Yo÷ôœ‘ÍSªþ¦¢%Z×( º>mæ²ñv~ÿŠv`g½e–ê#þh­Ã;ŸÛc ù¾¢ÍÄ^QÏEí²ª»DÑWŠÚB÷@Ñå÷\ѵÜ-¹Ó=s½SÝç0E§Óét$ªèbÞ}ÜkE_ºuëŠ<£ºÃŸß‹ššƒµS˜ÚMcw/Ú(긟²½Xè3½¢õvÑÌ[%Žvµ°ÉÄ»öµ¢æÃhîTwù³{Ѷ©úk¼¸î+Ó¢Hõ÷˜6ÿ[z¨~ÁÓ Eÿ÷,zVáþ²"Õ‡(R-M©–&ŠTKEª¥ùXEã8ŽÀ­ ¼L”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš£ã8~ p¸"ÕÏ ŠTKEª¥‰"ÕÒD‘ji¢HmŽAu‡á¼™øèIÕEªO¹Äÿ‰ƒ(ø3a æ%%æFàK²´W†iö4vé_n­kеvï˜Ï÷ÅÖãÍ4Õ OÑ5ÐKÝt} ÚÍ¥ï™[÷»þÞn•MWÿ¼Ú0‹Öáí>á>xm&®­goWi–ùÒO}¡¨-t]~]­²,ÓNSÝr˜¢Óét:Õ=ºhu•h­è‹B·n=È¢ù¶Î¢uKm?½µûù^<»½éñ^ô¤ÐõϬ4e/Rí9§Îl¦W´Žg3oõýßÃÜU±UBô_@»Øj|]kÕîø“{ѳҢZ‡(Rý¦­ÿ‹tP}ƒ(R-ÍŸS¤úO1F‘jaÆ(R-ÌÙP©–åb(ŠT«2úXEã8ŽÀ­ ¼L”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš£ã8~ p¸"ÕÏ ŠTKEª¥‰"ÕÒD‘jiþ¶¢a§µßPݲšûÅê{C^–,úJÑWª+ÞYäÙWòñЇé~>/&Ó‡{é–ÓuîõÑip¾»‡ržv›µ¬{]dZô6Ö®~÷pK—eÒýím÷ò̧+º†cŠ€ƒ{G{Óômv‚¼šÕ<¶Y}óôƒV¿îŸÈ¢õÿ{>·å©–]EÛ•Û¾fénø‘¢núꯈ¢þ‹¿UªEmÛ[ù–xóð²ÒFѵ®]4ÓÿŠN§ÓéHv¹ ø&‹Ô¡gyôkE_'à׊v ÝßÉ¢fÏiR¨¯Fö¢/mBÙWįÝÒ,Šî…n1Ó+ÚÝžïs›8÷;ѵ,Ý/}¡›m\ÆæwÜ+l¯¨]à:ýöÞ¾fþ‰½¨/PªOYÏýγª¿J©Ý±Éš{f\·uÕo󃧣HµcÉÿk}¼"Õœ1ŠT 3F‘jaΆ¢Hµ,CQ¤Z•ÉÐÇ*ÇqüàhEàe¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€Ò­hÇñS8€Ã©~Q¤Zš(R-M©–&ŠTKEªƒêçþÛУª¿O©¾Ä]Lü”¯ SÏç¥Ñ~Ê–©ka¾»Þ´Š–¡—I·5o‹.“ïo»Omfªîò']ƒsæ ;ÇÒê/÷Ñ&Ÿî3Ú•›žÍkçW/š¾tô7³h«U(7‘_)Ú–¼>“Ö=ýk׫E‘ꊗÍeê\Š^W´ª‘[E«Õ.·5N§Ó‘¨> SÔÅ~_ѺÐ=Q´ZáÑ—±y¯ê}/jRhŽUëa9 z?öö¢6w¾­(…Nmi£¾šémÃvÛX¦}î¿U¿Y÷²TWè–ÝB×¾kž©ºË_Ý‹¶MÕ’D‘ê·™öø'_ÿ;sU×D‘jiþ¢"Õˆ(R-M©–&ŠTKEª¥ùXEã8ŽÀ­ ¼L”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš£ã8~ p¸"ÕÏ ŠTKEª¥‰"ÕÒD‘ji¢HuÅ ºÃ¹ÿ6ôh†ê3îϾ¶J©¾Èwƒ«º%Š^Q48Lá9Ÿ—F²)[¦®…ùîzÓwºq™t[ó¶hãdÜžTòG]ƒ}æ ;ÇÒê/÷Ñ&î3Ú•›ž®P®×{–L5‹ºH5‰Ôî9}7±ïŠUŸIëžnîz½(R]ó²¢¹LËÑëŠV5r•½sáœóñi¥;LÑét:‰êC:E]ì÷­ ÝE«VoÞ:Õ/È^ԤЯÖÃrô~ìíEmîì+Ê^ôB·˜émSå¶\f.ý·ê7ë^–ê Ý2°)t·/ãúî§uîïEÛ¦jA¢Hõ ¦}þi|®jO©–æo*Rýgˆ"ÕÒD‘ji¢Hµ4Q¤ZšU4Žãø!ÀÑŠÀËD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥9ZÑ8Žã§p‡+Rý ¢Hµ4Q¤Zš(R-M©–æÏ+Tw8÷߆ög¬{ï÷V|}‚ÚÉ"Õž…<Š~Â]Ñà0Åä|^Mœ¦l™ºæ»ëMÑûJëÞé¡Õé:ëöÈí~[ým{ÓÿŽ¢ëÿ{Šƒ{ÇÒê/÷Ñ®ø-+mzÛ›yÚ÷þEë¿moúÊ¢U–lh÷œ>0ë¨wjùà7½EÛû•¢ýWFÑEsÜÏUæA°Ú‚¸Û»<¹Zã~¿¯húÑŠN§ÓéHöu±ßW´Î€~woWZ÷ö…n½Lÿ§ì~>›?îîEM Íah=,§AïÇö¢ ݃é¨Ð-fzEÛˆÜv•IÀÜ¿-i×¾M¡»}×·\¿†fù¦D6Ò›B×þAóÇô—ö¢mSõüÞJª_EªO˜¶ïöÃ^öø¾Wõ%¾õh©~›dÀϸ+Rý§‰"ÕÒD‘ji¢Hµ4Q¤ZšU4Žãø!ÀÑŠÀËD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥9ZÑ8Žã§p‡+Rý ¢Hµ4Q¤Zš(R-M©–&ŠT_gP}Ä—ƒªoEª¯E¿Â÷ SˆÏç¥Ñ„ýÖ{¦xŸv¹i óÓ×úÕ׉¢{Pon±´;¾n-Æîù´ø»Mk„ª¾L­¢:_šDZ ¯&6£;ŠÖ7oÔÂ(ú¡¢¥þõŠ.¿MÑét:‰ê·è"ßV°'Šú§šÙË5Y°ág{Q“BK°ßÛ‹¢`—w Ýb¦W4K˜+W;ñ>írÓÄÖ|?õÆU_$ŠÖµéA·El=ñè«>%ŠÞU´)[×”š~ª¿F½EkÉ"€×ù¾"ÕŠŒQ¤Z˜1ŠT s6Eªe¹Š"ÕªL†>VÑ8Žã‡pG+/E¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”&ŠJE¥‰"€ÒD@i¢ 4QPš((M”æhEã8ŽŸÀ®Hõ3ˆ"ÕÒD‘ji¢Hµ4Q¤Zš(R}—Aõ¿&ŠTß%ŠÞä EƒÃòóyi´¦Û×)ÃýÔ ›ú¦Yó©éPýQÔÄõýI’ŽÛŒUGghf>uªß!ŠÖm$t1½¶V“š'›è7馃=ªß"Š^U´º®ÞM5l£hîû·N§Ó‘¨~Î@WÈú½¢G…n¹þ3ŠŽä‡{Q“BM¼+êfþ£…àHÞ*t‹™^ÑRÑ6©1Y½Ïo+]7µëPýQ´)OOBùV˜Uß%о©èK{ןê/EßStxE‘jmÆ(R-ÌEª…9Š"Õ²\ E‘jU&C«hÇñCø±çý,­pQIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00087.html000066400000000000000000000405631224474465600212640ustar00rootroot00000000000000 libpqxx: pqxx::stateless_cursor< up, op > Class Template Reference
pqxx::stateless_cursor< up, op > Class Template Reference

"Stateless cursor" class: easy API for retrieving parts of result sets More...

#include <cursor.hxx>

Public Types

typedef result::size_type size_type
typedef result::difference_type difference_type

Public Member Functions

 stateless_cursor (transaction_base &trans, const std::string &query, const std::string &cname, bool hold)
 Create cursor.
 stateless_cursor (transaction_base &trans, const std::string adopted_cursor)
 Adopt existing scrolling SQL cursor.
void close () throw ()
size_type size ()
 Number of rows in cursor's result set.
result retrieve (difference_type begin_pos, difference_type end_pos)
 Retrieve rows from begin_pos (inclusive) to end_pos (exclusive)
const std::string & name () const throw ()

Detailed Description

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
class pqxx::stateless_cursor< up, op >

"Stateless cursor" class: easy API for retrieving parts of result sets

This is a front-end for SQL cursors, but with a more C++-like API.

Actually, stateless_cursor feels entirely different from SQL cursors. You don't keep track of positions, fetches, and moves; you just say which rows you want. See the retrieve() member function.

Member Typedef Documentation

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
typedef result::difference_type pqxx::stateless_cursor< up, op >::difference_type
template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
typedef result::size_type pqxx::stateless_cursor< up, op >::size_type

Constructor & Destructor Documentation

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
pqxx::stateless_cursor< up, op >::stateless_cursor ( transaction_base trans,
const std::string &  query,
const std::string &  cname,
bool  hold 
)

Create cursor.

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
pqxx::stateless_cursor< up, op >::stateless_cursor ( transaction_base trans,
const std::string  adopted_cursor 
)

Adopt existing scrolling SQL cursor.

References pqxx::cursor_base::backward_all().

Member Function Documentation

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
void pqxx::stateless_cursor< up, op >::close ( ) throw ()
template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
const std::string& pqxx::stateless_cursor< up, op >::name ( ) const throw ()
template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
result pqxx::stateless_cursor< up, op >::retrieve ( difference_type  begin_pos,
difference_type  end_pos 
)

Retrieve rows from begin_pos (inclusive) to end_pos (exclusive)

Rows are numbered starting from 0 to size()-1.

Parameters
begin_posFirst row to retrieve. May be one row beyond the end of the result set, to avoid errors for empty result sets. Otherwise, must be a valid row number in the result set.
end_posRow up to which to fetch. Rows are returned ordered from begin_pos to end_pos, i.e. in ascending order if begin_pos < end_pos but in descending order if begin_pos > end_pos. The end_pos may be arbitrarily inside or outside the result set; only existing rows are included in the result.

References pqxx::internal::stateless_cursor_retrieve().

template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
size_type pqxx::stateless_cursor< up, op >::size ( )

Number of rows in cursor's result set.

Note
This function is not const; it may need to scroll to find the size of the result set.

References pqxx::internal::obtain_stateless_cursor_size().


The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00087.js000066400000000000000000000011651224474465600207270ustar00rootroot00000000000000var a00087 = [ [ "difference_type", "a00087.html#af9cfc40abd39a68880b0df6d618e41fb", null ], [ "size_type", "a00087.html#a85ee6b4652b659565fede97bb00b4232", null ], [ "stateless_cursor", "a00087.html#aa042b1c72b16911a4f2e1c73be3d8942", null ], [ "stateless_cursor", "a00087.html#a8231490bf29aa7686c4daa3b1fc97ed1", null ], [ "close", "a00087.html#a20a0b658655a3b10543abd35717dd633", null ], [ "name", "a00087.html#a9b99a8f9ef260f11a32b29e917bdacda", null ], [ "retrieve", "a00087.html#a97046479f709ae621473c48ed7a0932d", null ], [ "size", "a00087.html#ae278f24bab98d3946061934a48992067", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00088.html000066400000000000000000000076421224474465600212660ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< T > Struct Template Reference
pqxx::string_traits< T > Struct Template Reference

Traits class for use in string conversions. More...

#include <strconv.hxx>

Detailed Description

template<typename T>
struct pqxx::string_traits< T >

Traits class for use in string conversions.

Specialize this template for a type that you wish to add to_string and from_string support for.


The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00089.html000066400000000000000000000213111224474465600212540ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< char * > Struct Template Reference
pqxx::string_traits< char * > Struct Template Reference

String traits for non-const C-style string ("pointer to char") More...

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const char *t)
static const char * null ()
static std::string to_string (char *Obj)

Detailed Description

template<>
struct pqxx::string_traits< char * >

String traits for non-const C-style string ("pointer to char")

Member Function Documentation

static bool pqxx::string_traits< char * >::has_null ( )
static
static bool pqxx::string_traits< char * >::is_null ( const char *  t)
static
static const char* pqxx::string_traits< char * >::name ( )
static
static const char* pqxx::string_traits< char * >::null ( )
static
static std::string pqxx::string_traits< char * >::to_string ( char *  Obj)
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00089.js000066400000000000000000000005771224474465600207370ustar00rootroot00000000000000var a00089 = [ [ "has_null", "a00089.html#a552d464626e8e33a6f58089a2ad78cb0", null ], [ "is_null", "a00089.html#a5e81eb017d2ae5e0dc0aabf7e8c0d07d", null ], [ "name", "a00089.html#a7f786743db515467f7c88cb4eb4c3655", null ], [ "null", "a00089.html#a51d90ce760af54b3fb1fa08e3205f386", null ], [ "to_string", "a00089.html#a68b55550446061fd956d8777c97ffffb", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00090.html000066400000000000000000000217731224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< char[N]> Struct Template Reference
pqxx::string_traits< char[N]> Struct Template Reference

String traits for C-style string constant ("array of char") More...

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const char t[])
static const char * null ()
static std::string to_string (const char Obj[])

Detailed Description

template<size_t N>
struct pqxx::string_traits< char[N]>

String traits for C-style string constant ("array of char")

Member Function Documentation

template<size_t N>
static bool pqxx::string_traits< char[N]>::has_null ( )
static
template<size_t N>
static bool pqxx::string_traits< char[N]>::is_null ( const char  t[])
static
template<size_t N>
static const char* pqxx::string_traits< char[N]>::name ( )
static
template<size_t N>
static const char* pqxx::string_traits< char[N]>::null ( )
static
template<size_t N>
static std::string pqxx::string_traits< char[N]>::to_string ( const char  Obj[])
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00090.js000066400000000000000000000005771224474465600207270ustar00rootroot00000000000000var a00090 = [ [ "has_null", "a00090.html#a3eb1069f8c250f8d19f20ce53cb200a9", null ], [ "is_null", "a00090.html#adc93379fe5f2ddc78e1f8144c0f735ab", null ], [ "name", "a00090.html#a492de5b973073ced2b6df88ef2e2deb1", null ], [ "null", "a00090.html#a758dc122ae4ab3926b0110baa7146cc5", null ], [ "to_string", "a00090.html#af1b0d4263b555e6a90dbf6a2e2e7b73e", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00091.html000066400000000000000000000237751224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< const char * > Struct Template Reference
pqxx::string_traits< const char * > Struct Template Reference

String traits for C-style string ("pointer to const char") More...

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const char *t)
static const char * null ()
static void from_string (const char Str[], const char *&Obj)
static std::string to_string (const char *Obj)

Detailed Description

template<>
struct pqxx::string_traits< const char * >

String traits for C-style string ("pointer to const char")

Member Function Documentation

static void pqxx::string_traits< const char * >::from_string ( const char  Str[],
const char *&  Obj 
)
static
static bool pqxx::string_traits< const char * >::has_null ( )
static
static bool pqxx::string_traits< const char * >::is_null ( const char *  t)
static
static const char* pqxx::string_traits< const char * >::name ( )
static
static const char* pqxx::string_traits< const char * >::null ( )
static
static std::string pqxx::string_traits< const char * >::to_string ( const char *  Obj)
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00091.js000066400000000000000000000007151224474465600207220ustar00rootroot00000000000000var a00091 = [ [ "from_string", "a00091.html#aa2b58df8411416882fd615947f4b46c8", null ], [ "has_null", "a00091.html#ab0f7f0134b588e97fcaab7b97cb56e3c", null ], [ "is_null", "a00091.html#a3385572be2064f973ae3ac4096a1793a", null ], [ "name", "a00091.html#aace614dae201b284a833a71a0c22a085", null ], [ "null", "a00091.html#a5781caab7530905af3c4d03315af6622", null ], [ "to_string", "a00091.html#a256159442e5ffa53fd9e8e08efbb8f95", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00092.html000066400000000000000000000221761224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< const char[N]> Struct Template Reference
pqxx::string_traits< const char[N]> Struct Template Reference

String traits for "array of const char.". More...

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const char t[])
static const char * null ()
static std::string to_string (const char Obj[])

Detailed Description

template<size_t N>
struct pqxx::string_traits< const char[N]>

String traits for "array of const char.".

Visual Studio 2010 isn't happy without this redundant specialization. Other compilers shouldn't need it.

Member Function Documentation

template<size_t N>
static bool pqxx::string_traits< const char[N]>::has_null ( )
static
template<size_t N>
static bool pqxx::string_traits< const char[N]>::is_null ( const char  t[])
static
template<size_t N>
static const char* pqxx::string_traits< const char[N]>::name ( )
static
template<size_t N>
static const char* pqxx::string_traits< const char[N]>::null ( )
static
template<size_t N>
static std::string pqxx::string_traits< const char[N]>::to_string ( const char  Obj[])
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00092.js000066400000000000000000000005771224474465600207310ustar00rootroot00000000000000var a00092 = [ [ "has_null", "a00092.html#a8b325e1e90d1b21d2109616183beb35b", null ], [ "is_null", "a00092.html#ae1e26292a177f5ec0377ec0bc460f9dd", null ], [ "name", "a00092.html#a9c441bb5daeb31f13fafcec1ff436c60", null ], [ "null", "a00092.html#ac02a0a7baae6ed014d8f3932f7f61528", null ], [ "to_string", "a00092.html#a312f97129b9a90a8f46feb8a1eb9c463", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00093.html000066400000000000000000000212041224474465600212500ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< const std::string > Struct Template Reference
pqxx::string_traits< const std::string > Struct Template Reference

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const std::string &)
static const std::string null ()
static const std::string to_string (const std::string &Obj)

Member Function Documentation

static bool pqxx::string_traits< const std::string >::has_null ( )
static
static bool pqxx::string_traits< const std::string >::is_null ( const std::string &  )
static
static const char* pqxx::string_traits< const std::string >::name ( )
static
static const std::string pqxx::string_traits< const std::string >::null ( )
static
static const std::string pqxx::string_traits< const std::string >::to_string ( const std::string &  Obj)
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00093.js000066400000000000000000000005771224474465600207320ustar00rootroot00000000000000var a00093 = [ [ "has_null", "a00093.html#aa120743b3bd1bd2143f7b042112a1100", null ], [ "is_null", "a00093.html#afdab04a864d400d282546595c4447be3", null ], [ "name", "a00093.html#a8f32f29c6ff79aabb58e7daca55efdb1", null ], [ "null", "a00093.html#a2a8565fbc2819d0ae348df080d9d7d45", null ], [ "to_string", "a00093.html#aee488ad2b0284dc58feb87cf7d4ec0e2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00094.html000066400000000000000000000234651224474465600212640ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< std::string > Struct Template Reference
pqxx::string_traits< std::string > Struct Template Reference

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const std::string &)
static std::string null ()
static void from_string (const char Str[], std::string &Obj)
static std::string to_string (const std::string &Obj)

Member Function Documentation

static void pqxx::string_traits< std::string >::from_string ( const char  Str[],
std::string &  Obj 
)
static
static bool pqxx::string_traits< std::string >::has_null ( )
static
static bool pqxx::string_traits< std::string >::is_null ( const std::string &  )
static
static const char* pqxx::string_traits< std::string >::name ( )
static
static std::string pqxx::string_traits< std::string >::null ( )
static
static std::string pqxx::string_traits< std::string >::to_string ( const std::string &  Obj)
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00094.js000066400000000000000000000007151224474465600207250ustar00rootroot00000000000000var a00094 = [ [ "from_string", "a00094.html#a6465318808c87143b12749de6049f615", null ], [ "has_null", "a00094.html#a0c8b270690a4e950acfd0670c8705cb4", null ], [ "is_null", "a00094.html#a042390d6d2b08a908b78bc7741e8dc55", null ], [ "name", "a00094.html#a2b582fcdd58e83012f111d2c6daa4bb6", null ], [ "null", "a00094.html#ade264b724da3d0a7e05fe78cb3e4220f", null ], [ "to_string", "a00094.html#a766e009cf12622f50242fe6a6577280f", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00095.html000066400000000000000000000236331224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::string_traits< std::stringstream > Struct Template Reference
pqxx::string_traits< std::stringstream > Struct Template Reference

#include <strconv.hxx>

Static Public Member Functions

static const char * name ()
static bool has_null ()
static bool is_null (const std::stringstream &)
static std::stringstream null ()
static void from_string (const char Str[], std::stringstream &Obj)
static std::string to_string (const std::stringstream &Obj)

Member Function Documentation

static void pqxx::string_traits< std::stringstream >::from_string ( const char  Str[],
std::stringstream &  Obj 
)
static
static bool pqxx::string_traits< std::stringstream >::has_null ( )
static
static bool pqxx::string_traits< std::stringstream >::is_null ( const std::stringstream &  )
static
static const char* pqxx::string_traits< std::stringstream >::name ( )
static
static std::stringstream pqxx::string_traits< std::stringstream >::null ( )
static
static std::string pqxx::string_traits< std::stringstream >::to_string ( const std::stringstream &  Obj)
static

The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00095.js000066400000000000000000000007151224474465600207260ustar00rootroot00000000000000var a00095 = [ [ "from_string", "a00095.html#acde79ea60c125524dd0373798da9c246", null ], [ "has_null", "a00095.html#ad692793979ca664813f93e907b1b6508", null ], [ "is_null", "a00095.html#a628dc63f6f52e68ac01324cbe980019a", null ], [ "name", "a00095.html#affca0f8d647300fa83fadf6fbcbda597", null ], [ "null", "a00095.html#aeda8297c0d566194c18f6ab91adf6124", null ], [ "to_string", "a00095.html#a6a04f64b953a11ca660727a1586cbe8a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00096.html000066400000000000000000001043521224474465600212610ustar00rootroot00000000000000 libpqxx: pqxx::subtransaction Class Reference
pqxx::subtransaction Class Reference

"Transaction" nested within another transaction More...

#include <subtransaction.hxx>

Inheritance diagram for pqxx::subtransaction:
pqxx::internal::transactionfocus pqxx::dbtransaction pqxx::internal::namedclass pqxx::transaction_base pqxx::internal::namedclass

Public Member Functions

 subtransaction (dbtransaction &T, const std::string &Name=std::string())
 Nest a subtransaction nested in another transaction.
 subtransaction (subtransaction &T, const std::string &Name=std::string())
 Nest a subtransaction in another subtransaction.
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const
- Public Member Functions inherited from pqxx::dbtransaction
virtual ~dbtransaction ()
- Public Member Functions inherited from pqxx::transaction_base
virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.

Additional Inherited Members

- Public Types inherited from pqxx::transaction_base
typedef isolation_traits
< read_committed
isolation_tag
 If nothing else is known, our isolation level is at least read_committed.
- Protected Member Functions inherited from pqxx::internal::transactionfocus
void register_me ()
void unregister_me () throw ()
void reg_pending_error (const std::string &) throw ()
bool registered () const throw ()
- Protected Member Functions inherited from pqxx::dbtransaction
 dbtransaction (connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)
 dbtransaction (connection_base &, bool direct=true, readwrite_policy rw=read_write)
void start_backend_transaction ()
 Start a transaction on the backend and set desired isolation level.
virtual void do_begin ()
 Sensible default implemented here: begin backend transaction.
virtual result do_exec (const char Query[])
 Sensible default implemented here: perform query.
virtual void do_commit ()=0
 To be implemented by derived class: commit backend transaction.
virtual void do_abort ()
 Sensible default implemented here: abort backend transaction.
- Static Protected Member Functions inherited from pqxx::dbtransaction
static std::string fullname (const std::string &ttype, const std::string &isolation)
- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_Trans
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Detailed Description

"Transaction" nested within another transaction

A subtransaction can be executed inside a backend transaction, or inside another subtransaction. This can be useful when, for example, statements in a transaction may harmlessly fail and you don't want them to abort the entire transaction. Here's an example of how a temporary table may be dropped before re-creating it, without failing if the table did not exist:

void do_job(connection_base &C)
{
const string temptable = "fleetingtable";
// Since we're dealing with a temporary table here, disallow automatic
// recovery of the connection in case it breaks.
C.inhibit_reactivation(true);
work W(C, "do_job");
do_firstpart(W);
// Attempt to delete our temporary table if it already existed
try
{
subtransaction S(W, "droptemp");
S.exec("DROP TABLE " + temptable);
S.commit();
}
catch (const undefined_table &)
{
// Table did not exist. Which is what we were hoping to achieve anyway.
// Carry on without regrets.
}
// S may have gone into a failed state and been destroyed, but the
// upper-level transaction W is still fine. We can continue to use it.
W.exec("CREATE TEMP TABLE " + temptable + "(bar integer, splat varchar)");
do_lastpart(W);
}

(This is just an example. If you really wanted to do drop a table without an error if it doesn't exist, you'd use DROP TABLE IF EXISTS.)

There are no isolation levels inside a transaction. They are not needed because all actions within the same backend transaction are always performed sequentially anyway.

Constructor & Destructor Documentation

pqxx::subtransaction::subtransaction ( dbtransaction T,
const std::string &  Name = std::string() 
)
explicit

Nest a subtransaction nested in another transaction.

pqxx::subtransaction::subtransaction ( subtransaction T,
const std::string &  Name = std::string() 
)
explicit

Nest a subtransaction in another subtransaction.


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00096.js000066400000000000000000000002621224474465600207240ustar00rootroot00000000000000var a00096 = [ [ "subtransaction", "a00096.html#aae82c1f8ef12d5c780313a0528825372", null ], [ "subtransaction", "a00096.html#a3ade245fa2c0acff69af7f648a6983a6", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00096.png000066400000000000000000000044641224474465600211040ustar00rootroot00000000000000‰PNG  IHDRzÀ=XXPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÃIDATxíí¶«* E§Ë1úþ|‘¥[ë>ç¦xÒá¡ÉL ž¡9ý†é1sdÖá’ë[¿Êíbw|ï¾Ysdz’Ó¡NW¹š#³¡/¹–y}ÉÝzÛpuŽlß@Ù§ùi8ÎÏý°Rë„ùe<¬ÛàÕc6z+…Öê@Ìèuo­QÕ„[Úee·Çq²$õ•’gçY|WÌÅðÂj‰@zØÆK?‘«çµöyþêd iéçyå=Ûxîrÿ2úµPÄ÷jRçÚL’&•«mv‡whR¹N¾†ýÞ³”³[SåàV÷"P¡¯Ú4¯®ß)wwlIWU*Wµ®gýÙv¯ÿ®«yKµ| pÉöÑ<‹_}‹~¹×‘©r4üR5Êm,ùÄÌ‘Y‡K®oý*·‹Ýñ½ûöO¢_½Øº¹f|„~µ_'',’ôFË1Ûñ¬ät¨ÓU®æÈlèKn'‚e^c_Gr·Þ6\#Û7Ï™þÉ{õ˜mX5å ¥¶GzøÎÑ&KÒ{-è;9•rvÍéêÄ+‘iêñ¾èT8F²:/J¿ Lßîó—ÑWµþx̾A^ë[ô7k}ØøÞ³x®Äë¯~éíëtWF?¥L[îù¡Z8n* MùGªy¡ÉæÑ*ÎJãÍ¢UnÑ¢²KÏû…×ÁÛèO<Œã­—w÷/Iç*è׈ÇÅ4©wÕÌ¡ŒjRsmæ[M*Wkw´ª,ï¡¿æáŸØ¿$ªÊúýMÅ=x¿×®ê5Ÿ@³zçÓî¹³›rXàNÖŸyØÙÁ½ýKÒ©î¡¿=þôîÑ—ñR/ÛÐÿ®àÜAkÿ’tª>úæ;êg}Ã㘻Ȕ-l?Cÿ›‚sêa7ö/I§êÖúwÇìçúóZÙE¿?k~_ëßxØ=mnì_’NUe}ÞO»±îIRv]œÆxƒ”ÇÛ¶XŸ·NÁ (ïë·çGóá»íêû—¤S5§ÊXIújÝ+8ßä¡£—$9zI2QF/I#ésô’ôMrô’d"G/I&rô’d"G/I&ZÐÏó<¨ ý<Ïó€økz ­a=pôz½Fg?¬ŽÀB˾g?¬ŽÀH~̘ÈјÈјÈјÈјÈјÈјÈјÈјÈјèõz½€ `''`"G`"G`"G`"G`"G`"G`"G`"G`"G`"G`"G`"G`"G`"GðVÓ4M# `p ꃣ0‘£0‘£0‘£0‘£h•Ö»¾ìbycŽ Õôê_A?1E³åžꩱ›´šLñûéÏfbÕ„[´hì~Ô?ƒ~- o¯d‘{½Ñj,7;€ŸõïdýÏv¯–8ÍK·£û ß ÀÏrô½‚Ó2\ IÕÍ•ÆÑß@ßÔˆ]>GðNu­ï³õIÐÔúÞ·pRë=P]KªoÄ[ôÕyZŽàµüli‚ÿh N‰ãú¼u=P]uYø9z9zý+è¾LŽÀDŽÀDŽÀDŽÀD@?MÓ4 þªþø˜¯Â$5bIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00097.html000066400000000000000000000302641224474465600212620ustar00rootroot00000000000000 libpqxx: pqxx::syntax_error Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::syntax_error:
pqxx::sql_error pqxx::failure pqxx::pqxx_exception pqxx::undefined_column pqxx::undefined_function pqxx::undefined_table

Public Member Functions

 syntax_error (const std::string &err, int pos=-1)
 syntax_error (const std::string &err, const std::string &Q, int pos=-1)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Public Attributes

const int error_position
 Approximate position in string where error occurred, or -1 if unknown.

Constructor & Destructor Documentation

pqxx::syntax_error::syntax_error ( const std::string &  err,
int  pos = -1 
)
explicit
pqxx::syntax_error::syntax_error ( const std::string &  err,
const std::string &  Q,
int  pos = -1 
)

Member Data Documentation

const int pqxx::syntax_error::error_position

Approximate position in string where error occurred, or -1 if unknown.


The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00097.js000066400000000000000000000003771224474465600207340ustar00rootroot00000000000000var a00097 = [ [ "syntax_error", "a00097.html#afae8be4ad0815338687d765729f09fd4", null ], [ "syntax_error", "a00097.html#ac6344fdccdc0e166ff7fcbe53bcc27ef", null ], [ "error_position", "a00097.html#ae489a0cf604c668f9dbaa89a3df9dedd", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00097.png000066400000000000000000000042401224474465600210750ustar00rootroot00000000000000‰PNG  IHDRÙø—lPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2/IDATxíÝë–¢<FáÇb-ïÿ’?Ï‚§VÐn§¾×ɆLu6þÂw3 Ãð…@€Ù UU_GÌÂ2b:³Ð‘˜…ŽÄ,täÌ®v­ªê.1 Ëø³UUˆYXƵÙU­vk¿9ž:#?Lo¯E¹=c¶§ýÛþîj4VU“³°Œf÷bvjUWíÞô¨"'ãӪjÜFcU5n1 ˸U³—+<>3}œØÆ/î¹!½ªÆ-faï7»ý]šÝÅ,ü?˜½Þn˜•éyøªtc>Ëãïì¨"ËÿÃôYùñôÃw6fáܪٓ±©º£‘;Ó£íøp9¶~ا÷§Ó'¹ªjBÌÂ2nïÆ×Ýg§«ªîñ||ÌÂ2ÞfvS‚Û_UÕ=b~‹Ô,täÚlUÕ_³°Œ˜…ŽÄ,t$f¡#1 †aøB À7°†ÍˆYhÈzµÐ˜…†lÄF-´#f¡'ñ ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰Yø†a¾0›¡ªêëˆYXFÌBGb:³Ð‘˜…޼ÑìjuêíZUÕLb–ñ>³S—1 É fW‡ªÜO³ÃÕîêp<•ížíŹ¢«ª~ fa¯˜= Ûº­Z]µ#£~UÕÄ,,㥚 —ídÿ½¥:fáwy³Ùͦ{Ûì~¢ªêb–1×ìÄßxºVunsê5fa93¿³£‚íÂWfwÙá×y©fOB§fGÅ»u~ØŽ¶éªª'‰YXÆ‹»ñu·ªêíÄ,,#f¡#1 yÁlUÕ/³°Œ˜…ŽÄ,t$f¡#1 †aøB À7°†ÍˆYhÈzµÐ˜…†lÄF-´#f¡'ñ ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰YèHÌBGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰Yø†a¾0›¡ªêëˆYXFÌBGb:³Ð‘˜…޼×쪪ê Ä,,#f¡#O˜]Õjglsy7¶‹:FpEÌÂ2î›ÝÚy°r·".&b“¸"fawên¢bß»Ý9zY™×Ä,,c®ÙÓn<Ù”wí•ÙãXÌÂoñœÙÉn;˜š½·ŸÎ1 ¿ÁSßÙQÁŽ4Ý7;‰Ìn ¿Ïƒš= š=m»W…¸{Îñãíx:€+b–ñp7~b?ã fa Í>”¾ÿÁ«Ä,,c™ÙOˆYXÆw®aÌÂ2b:³Ð‘˜…ŽÄ,tdµZ­¾ð ¬!@3b²^G-ô#f¡!±Q íˆYèI¼BGb:³Ð‘˜…ŽÄ,t$f¡#1 ‰YèHÌBGbf°^¯×a½^¯g_È×—D„dá` 1 3H‚0ƒ,,!faIf…ƒ%Ä,Ì Â ²p°„˜…$A˜A–³0ƒ$3ÈÂÁbfaY8XBÌ þ_ Ã0¼‰õ0 ÛH‚Ã0 K0TU}ã…«ªú:þ³pUU/³UU3ˆÙªª%ÄlUÕ b¶ªj1[Uµ„%fW£îj|u3¤ªÎíÞø;îµô6!UUWl†oμÓìK™^õî$þ³wE}‡Ù'Ò{ù/øŒÙ—2}ÚìæmÙm_›cgtãö¼{ÏQ»ÓvlwÏCNoãhîP û{ŽýqÙ\/ÜGÓ;†\…m§s|`ö2gsN¯ªÎmlöøÔÓVUí0wŽ:gy17 ¹ü{®Ÿwøï&ûÞ ³¿‘Þí°Ë©ŸÌ~:Óë'Ü(ÝIÍ^ÞöXÍ“§ë­ãöÊMÃoÕì§Ó»ž¿‘ì3fi!¯Ö²ªÎm©ÙíïñàŸš})½?5ûZ¦Á‡Àª:·{f' þøU{°&3û‘ô>bö™Þü²UÕ¤ÝùÎÞþð_¾(?n"?|g'ŠÍþJzwÖí5³ŸÎôõïì)iBÇ[ϽÓÕ!÷‹?üüþ»Óàô /Ôì'ÓLÃn=èÇšýh¦‡7f÷ï"ðÁn|Ý­ªúnïÆ_“Þ»ñßgúq³»ûõUUõˆß2;3½?0ûj¦©ÙªªüK5[Uõ5F 7 Ãð}|}‚ÿh|ºq¶ß ¾IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00098.html000066400000000000000000000527551224474465600212740ustar00rootroot00000000000000 libpqxx: pqxx::tablereader Class Reference
pqxx::tablereader Class Reference

#include <tablereader.hxx>

Inheritance diagram for pqxx::tablereader:
pqxx::tablestream pqxx::internal::transactionfocus pqxx::internal::namedclass

Public Member Functions

 tablereader (transaction_base &, const std::string &Name, const std::string &Null=std::string())
template<typename ITER >
 tablereader (transaction_base &, const std::string &Name, ITER begincolumns, ITER endcolumns)
template<typename ITER >
 tablereader (transaction_base &, const std::string &Name, ITER begincolumns, ITER endcolumns, const std::string &Null)
 ~tablereader () throw ()
template<typename TUPLE >
tablereaderoperator>> (TUPLE &)
 operator bool () const throw ()
bool operator! () const throw ()
bool get_raw_line (std::string &Line)
template<typename TUPLE >
void tokenize (std::string, TUPLE &) const
virtual void complete ()
- Public Member Functions inherited from pqxx::tablestream
 tablestream (transaction_base &Trans, const std::string &Null=std::string())
virtual ~tablestream ()=0 throw ()
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Additional Inherited Members

- Protected Member Functions inherited from pqxx::tablestream
const std::string & NullStr () const
bool is_finished () const throw ()
void base_close ()
- Static Protected Member Functions inherited from pqxx::tablestream
template<typename ITER >
static std::string columnlist (ITER colbegin, ITER colend)
- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_Trans

Detailed Description

Deprecated:
Efficiently pull data directly out of a table.
Warning
This class does not work reliably with multibyte encodings. Using it with some multi-byte encodings may pose a security risk.

Constructor & Destructor Documentation

pqxx::tablereader::tablereader ( transaction_base T,
const std::string &  Name,
const std::string &  Null = std::string() 
)
template<typename ITER >
pqxx::tablereader::tablereader ( transaction_base T,
const std::string &  Name,
ITER  begincolumns,
ITER  endcolumns 
)
template<typename ITER >
pqxx::tablereader::tablereader ( transaction_base T,
const std::string &  Name,
ITER  begincolumns,
ITER  endcolumns,
const std::string &  Null 
)
pqxx::tablereader::~tablereader ( ) throw ()

Member Function Documentation

void pqxx::tablereader::complete ( )
virtual

Implements pqxx::tablestream.

bool pqxx::tablereader::get_raw_line ( std::string &  Line)
pqxx::tablereader::operator bool ( ) const throw ()
bool pqxx::tablereader::operator! ( ) const throw ()
template<typename TUPLE >
tablereader & pqxx::tablereader::operator>> ( TUPLE &  T)
template<typename TUPLE >
void pqxx::tablereader::tokenize ( std::string  Line,
TUPLE &  T 
) const

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00098.js000066400000000000000000000014271224474465600207320ustar00rootroot00000000000000var a00098 = [ [ "tablereader", "a00098.html#abdaa2d21ae6f3bbb52b8cb6c75870ff5", null ], [ "tablereader", "a00098.html#a07a03ef6630e8e5e0e8103b9b9bce6d5", null ], [ "tablereader", "a00098.html#ad233a53fdc5622adf57f353794a3c62f", null ], [ "~tablereader", "a00098.html#a84da29cd4c12724f74891631ade8f1d5", null ], [ "complete", "a00098.html#a4028c87ef2895f34a824f09970476e24", null ], [ "get_raw_line", "a00098.html#aa70c070397bcd38df197b05c33614100", null ], [ "operator bool", "a00098.html#a4010de33fe9ec72cbbc19c3dd81c8959", null ], [ "operator!", "a00098.html#aae84e7e743e090f9c29220f37074cf40", null ], [ "operator>>", "a00098.html#adbb71a08559825b55b801771b6161d56", null ], [ "tokenize", "a00098.html#a235d3894806c150e2db680ebe5c766d1", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00098.png000066400000000000000000000026001224474465600210740ustar00rootroot00000000000000‰PNG  IHDR¸À€œYYPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíí’¬* EÛª~ÿG¾€È—ö9:Ó“;ÔI·[$\ÄÿÂþÛʯtokµ«rïà rÇv[“{c[5Þ üá¸Pûñê½_¸?o›'ÜäÈà__w¸·¾ó$ð;ãb9¼œ'Ä b4]žïˆKlÓdŽöxÚãGÕqÉ?ÿ2¾˜óøÚO3e{ž'oö4ïõúK9Ÿì™'Ç!¡çÇDþrqØ[¿<·7ú×ñ‰+qÆY[¿ŽkÏ9ìµ³Ž—xM·þ#Ó{Hüx×–q}Þ–¸Më9»üª¼ïòíºŽç÷5‚Çs¿®.>éWò¨¶ùµ×}V×µ›[œ~׿w~îßëx‹gÊÏ.Nu]x‹ky~7ø÷q˜æ;ÌÝþ9â¿×¥Ëýz]ÇK¼öxvû¤­kÈÃ9]:þsº}Òúݲ®ýnÖñRÊ>ªïë¨ÝûÍû4çá°€\(.öïn®ë­u£ä×àWêÉ^§nÖñnß­«Öí»:>ìÓßøÝSÇ¿ôÝ6m¯ëøíªÜoêøíu_"ÞWu|6‚ïûs+¿Rf~àÇôXQ«‚¿^‹’¯ ¹×$_Ü« €­ÀR`)°”ƒXÊÁ,åà–rpK98€¥ÀR`)°”ƒÌÚ¶m[Ql’´ž\’,åà’d©»àáâJ’&Õ›ô’ÔŽèyvÿ<â?.IƒnŒ®à¡¬2žëE7EŽK2…zÊ–n\jª{öÊ£Š}˜´kÒ){t~åzžx7žÀ÷W–‡)èêè;u–fUÐp·Nc›¯‚Ú1ú½:Ï1âóC¦ÆÎš²uÿ0ûìûf1ÓÓ_O¿¾dÇ ÞìíM¾À¯R¥2¼Á눳#2­«½€“ï3ð‹TérùÝæüCªÜÿ{Ž_‚Ï{ì^U¹Ü?mU]ª ÎÇ#ª}L•®àŒU¥Á U¥¹]¥Êã,Iÿ“\’,õü“/I¿@.I–rpI²Tß¶m[P?¦ÀŠZüõZ”|UðȽ&ù²à^Ulåà–rpK98€¥ÀR`)°”ƒXÊÁ,åà–rpK98€¥`Ö¶mÛŠb“¤õäà’d)—$K}<ÌWÍpÝ—¤¯é_ ùÙñ\/:ÌÔ˧Ã1«yîÉZÅùñšž‚ïOÈOVÐõQnO†ÖŒÇ\y:Iº©ÇŸéŽó” n h} ³óã<¾ý|7t©SœgSðó#ÏI0mØs´ÔIº©oäøysÞÌñ󛳈ø›ªRwl^Qþ_T•º1ûªÒ½:Iº©/¤ÊÇK²$=–ƒK’¥>ûÉ—$#9¸$YÊÁ%ÉR|Û¶mAü˜^+jUð×kQòUÁ#÷šäË‚{U°•ƒXÊÁ,åà–rpK98€¥ÀR`)°”ƒXÊÁ,åà–rp€Y!„°¢ëÉÁ,åà–ú,x›«\ýuò/?ý_îÙ?•Ñã¢ÃL½|:³Ÿz³5'€[z ž¾;„ÓQn†ÃÒû Æ€;zñ™nx`KŽ “fŸþÀ }<އ ÉÓ]>À=}|Ȇë0v7ÇhO®Ï÷é7rü¼9ÿœãWÄCŽÜÖ§ªJÇ‘·íUUéËI©1'€[úBª|·|_`©Ï~òŒäà–rpK¥E!¬§ÿ-T]jÑ+ß™IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00099.html000066400000000000000000000421631224474465600212650ustar00rootroot00000000000000 libpqxx: pqxx::tablestream Class Reference

#include <tablestream.hxx>

Inheritance diagram for pqxx::tablestream:
pqxx::internal::transactionfocus pqxx::internal::namedclass pqxx::tablereader pqxx::tablewriter

Public Member Functions

 tablestream (transaction_base &Trans, const std::string &Null=std::string())
virtual ~tablestream ()=0 throw ()
virtual void complete ()=0
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Protected Member Functions

const std::string & NullStr () const
bool is_finished () const throw ()
void base_close ()
- Protected Member Functions inherited from pqxx::internal::transactionfocus
void register_me ()
void unregister_me () throw ()
void reg_pending_error (const std::string &) throw ()
bool registered () const throw ()

Static Protected Member Functions

template<typename ITER >
static std::string columnlist (ITER colbegin, ITER colend)

Additional Inherited Members

- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_Trans

Detailed Description

Deprecated:
Base class for obsolete tablereader/tablewriter classes.

Constructor & Destructor Documentation

pqxx::tablestream::tablestream ( transaction_base Trans,
const std::string &  Null = std::string() 
)
explicit

References tablestream().

Referenced by tablestream().

pqxx::tablestream::~tablestream ( ) throw ()
pure virtual

Member Function Documentation

void pqxx::tablestream::base_close ( )
protected
template<typename ITER >
std::string pqxx::tablestream::columnlist ( ITER  colbegin,
ITER  colend 
)
staticprotected
virtual void pqxx::tablestream::complete ( )
pure virtual

Implemented in pqxx::tablewriter, and pqxx::tablereader.

bool pqxx::tablestream::is_finished ( ) const throw ()
protected
const std::string& pqxx::tablestream::NullStr ( ) const
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00099.js000066400000000000000000000010521224474465600207250ustar00rootroot00000000000000var a00099 = [ [ "tablestream", "a00099.html#a5cfaacb3b52d957c8df94b91f3f1fe40", null ], [ "~tablestream", "a00099.html#a6d024cd5f02bb5c2a6eb00ca11bde772", null ], [ "base_close", "a00099.html#a8206b4b9b8dc8139e7b9be97d3c91d95", null ], [ "columnlist", "a00099.html#ae36c9e2bd18b6ed8a6c942ba616154b2", null ], [ "complete", "a00099.html#a0241100d03b034b8e7b59201a6a1b88f", null ], [ "is_finished", "a00099.html#a48f61b76226df70a8eaa334b6f53575a", null ], [ "NullStr", "a00099.html#afdac33bb17371652a6328b689d29a411", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00099.png000066400000000000000000000035611224474465600211040ustar00rootroot00000000000000‰PNG  IHDRzÀ=XXPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíív« E·‡µòþ|•(ÚÖ$·™hOëö#›qø ðÒüwšk€+ ñï\G€+p>óWQBó—PŸÎiþ µ>3篢þÁ‘åz<û:n8þÜõ9ÃÁ÷¸ˆúçso86CÀèG6çìr¨rp©ÇÓ·0Í@¥¾:Îýêú=çn7ƒ­éªJã_U-€ °Yþê[õ㾞™*G§¿¹•c.eÅ,3so^s}¹®r{Ûþn83igdkNOuºÊÕ23‹ú5·gƒk¿&¾žÉîyKsµŽ,ß@^göWÞ+,³i'§æœ½çtµâ­3ÓÔã¾èT3°Éj½X¯«‰ÙÛäüUÔ÷#Ë áÝxýÕW}Î+n®ÇÍL›ºÞ4—›g4?w~Η'ä^vvªÍEÔoF¶®¨û_û¯ ž‘U+Û~ÎÅ.A7²\mÖ:ýæ/£þóÌþx¸'4 õéœæ¯°Ì¦sæüUÔŸ°Ú\Bý|˜ÿJó§_€]nàÝX=@·›Ý`õŒæíàýX=@‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ|IJ)€““$é|X½$…`õ’‚ÕKRV/I!üõÃΙ$u”›ßFIZ·1r<üØÿ/fý/¨—¤†½/¤~˜3mÜ—“JBÎÍ©i(»ÜRõ›%øá´·ú­ú±†´êï Ušƒš`«øŽFýVÚ¶”tKï6ãX7€ƒüéZ¿]fÖúí×cõß“×ûñV}Y{óœäÿª¸”È¥­÷`«ø–*8xìV‚Õ„ðçÔ|V‚Õ„`õ!X=@—P? ÃpB À.7ðn¬ ‚ÛÍî°z€Fóvð~¬ ‹ÁêB°z€¬ «ÁêB°z€¬ «Áêö¸Ýn·“pFΟ”V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„`õ!X=@V‚Õ„ð«#H)¥ßâ–RJ¿ÄF$é|Ôê%é|X½$…`õ’‚ÕKRV/I!ü_õC¶6HÒ?HÒ¿§þð Æö§_ßê%©ç‘A¼Qý !ÿÚ¸/'Õ;NWy·f–˜rs=l$é/¨zåâþ²ÓíjLÎãêï/Pƒö·ùvÛ°´Ô1Mã,@’ŽðŠúgQ«ßŸ$æá¬ï_­ùÍõ ­ìJ:ú˜ú†$६v›=ýú¿¢~üþºÄ^¾Þ꼉©$é¿«þ‹Aìªêõ_Tß¼Ë~*W7ÛŒïB_²þ—ú‡1WøMÖ?µâ¾Pë·+Ô÷µ~Ïy·xIÒAþS­r!§¼lû֕ɼvÍ÷ç·Œ¬ŒõÞcΠvè’ô3/eýKƒhÔWó'IðDÁyö“¤ÿÇ‹çaõ’‚ÕKRª—¤Ïàõ’ôX½$…`õ’‚ÕKRV/I!ŒêSJé„TêSJé„üîs…º&ϳIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00100.html000066400000000000000000000723541224474465600212510ustar00rootroot00000000000000 libpqxx: pqxx::tablewriter Class Reference
pqxx::tablewriter Class Reference

#include <tablewriter.hxx>

Inheritance diagram for pqxx::tablewriter:
pqxx::tablestream pqxx::internal::transactionfocus pqxx::internal::namedclass

Public Types

typedef unsigned size_type

Public Member Functions

 tablewriter (transaction_base &, const std::string &WName, const std::string &Null=std::string())
template<typename ITER >
 tablewriter (transaction_base &, const std::string &WName, ITER begincolumns, ITER endcolumns)
template<typename ITER >
 tablewriter (transaction_base &T, const std::string &WName, ITER begincolumns, ITER endcolumns, const std::string &Null)
 ~tablewriter () throw ()
template<typename IT >
void insert (IT Begin, IT End)
template<typename TUPLE >
void insert (const TUPLE &)
template<typename IT >
void push_back (IT Begin, IT End)
template<typename TUPLE >
void push_back (const TUPLE &)
void reserve (size_type)
template<typename TUPLE >
tablewriteroperator<< (const TUPLE &)
tablewriteroperator<< (tablereader &)
template<typename IT >
std::string generate (IT Begin, IT End) const
template<typename TUPLE >
std::string generate (const TUPLE &) const
virtual void complete ()
void write_raw_line (const std::string &)
- Public Member Functions inherited from pqxx::tablestream
 tablestream (transaction_base &Trans, const std::string &Null=std::string())
virtual ~tablestream ()=0 throw ()
- Public Member Functions inherited from pqxx::internal::transactionfocus
 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Additional Inherited Members

- Protected Member Functions inherited from pqxx::tablestream
const std::string & NullStr () const
bool is_finished () const throw ()
void base_close ()
- Static Protected Member Functions inherited from pqxx::tablestream
template<typename ITER >
static std::string columnlist (ITER colbegin, ITER colend)
- Protected Attributes inherited from pqxx::internal::transactionfocus
transaction_basem_Trans

Detailed Description

Deprecated:
Efficiently write data directly to a database table.
Warning
This class does not work reliably with multibyte encodings. Using it with some multi-byte encodings may pose a security risk.

Member Typedef Documentation

typedef unsigned pqxx::tablewriter::size_type

Constructor & Destructor Documentation

pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
const std::string &  Null = std::string() 
)
template<typename ITER >
pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
ITER  begincolumns,
ITER  endcolumns 
)
template<typename ITER >
pqxx::tablewriter::tablewriter ( transaction_base T,
const std::string &  WName,
ITER  begincolumns,
ITER  endcolumns,
const std::string &  Null 
)
pqxx::tablewriter::~tablewriter ( ) throw ()

Member Function Documentation

void pqxx::tablewriter::complete ( )
virtual

Implements pqxx::tablestream.

template<typename IT >
std::string pqxx::tablewriter::generate ( IT  Begin,
IT  End 
) const
template<typename TUPLE >
std::string pqxx::tablewriter::generate ( const TUPLE &  T) const

References generate().

template<typename IT >
void pqxx::tablewriter::insert ( IT  Begin,
IT  End 
)

References generate(), and write_raw_line().

Referenced by insert(), operator<<(), and push_back().

template<typename TUPLE >
void pqxx::tablewriter::insert ( const TUPLE &  T)

References insert().

template<typename TUPLE >
tablewriter & pqxx::tablewriter::operator<< ( const TUPLE &  T)

References insert().

pqxx::tablewriter & pqxx::tablewriter::operator<< ( pqxx::tablereader R)
template<typename IT >
void pqxx::tablewriter::push_back ( IT  Begin,
IT  End 
)

References insert().

template<typename TUPLE >
void pqxx::tablewriter::push_back ( const TUPLE &  T)

References insert().

void pqxx::tablewriter::reserve ( size_type  )
void pqxx::tablewriter::write_raw_line ( const std::string &  Line)

Referenced by insert().


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00100.js000066400000000000000000000023251224474465600207100ustar00rootroot00000000000000var a00100 = [ [ "size_type", "a00100.html#a219cfed40ab2c1858b89e630e140e984", null ], [ "tablewriter", "a00100.html#af491ceeea1fb81f185c4460176ef594a", null ], [ "tablewriter", "a00100.html#a0cba43b103518b8e01c4d2f099a6d6dd", null ], [ "tablewriter", "a00100.html#af975d6cde30bbff394e88229448d8019", null ], [ "~tablewriter", "a00100.html#a3332310804e226da6d83c33f932290cc", null ], [ "complete", "a00100.html#a4dd97d641c5ccb16e2abbeaa2f0a50bc", null ], [ "generate", "a00100.html#a3f3bbf204195b04a00ea942c5f298c94", null ], [ "generate", "a00100.html#aff6a89343e60c12a55b1d6e6346b6dc2", null ], [ "insert", "a00100.html#a4cf8a6eb3e06f010ab153666d645d6d1", null ], [ "insert", "a00100.html#a0a312200fceabbd9b81c3db4169e06ec", null ], [ "operator<<", "a00100.html#ab99429233e750f61fac91dbb205c6676", null ], [ "operator<<", "a00100.html#a471da19c2f19ee8a205428a8e4c338ed", null ], [ "push_back", "a00100.html#aa77830abd7d255e513940092e68bcbb0", null ], [ "push_back", "a00100.html#a6686c385a22f6790a1962584a1b09d79", null ], [ "reserve", "a00100.html#a2fbc9559232987cab54d30add357a2cb", null ], [ "write_raw_line", "a00100.html#ac4b1eaf8b157f40e377cdcaa5d07e233", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00100.png000066400000000000000000000026001224474465600210540ustar00rootroot00000000000000‰PNG  IHDR¸À€œYYPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2IDATxíí’¬* EÛª~ÿG¾€È—öí™É9ÔÍŒ[$XÄþ ûßVþJ÷ßïïâßZíªÜ;ø‚ܱÝÖäÞØVw8.Ô~|zïîÏÛæ 792øçû÷ö÷`ž~g\,‡—ó„8Alƒâ•¦Ëóq‰mz‘ÌÑo{|ã¨:.ù'ðâ_Æs_ûi¦lÏó¤ñÍžæ½Þ)ç“=óä8$ô¼Lä/‡½õ˺ý¸Ñ¿ŽO\‰3ÎÚúu\[ç°×þÍ:^âu4ÝþtSä¸$S¨·l鯥¦ºg¯<ªØ‡I»&ݲGçWžç‰wã |ÿdy˜‚®®¾SgiV ×ñê4¶ù*¨]£ßÙ«ó#>O0dÚiì¬)[‡ð³Ï¾o63 9Mðxú›áKvÌàÍÞ¾ôàûü*Uú!Ã¼Žø0Û9"Ó¾Ú8ù>¿H•.—ßÎ/RåøŸsü|>c÷ªÊåùi»êRep>–¨ö1Uº‚3V•7T•æv•*k°$ý%9¸$YêùO¾$ýrpI²”ƒK’¥"ø¶mÛ‚ø5½VÔªà¯×¢ä«‚Gî5É—÷ª`+°”ƒXÊÁ,åà–rpK98€¥ÀR`)°”ƒXÊÁ,åà³¶mÛV›$­'—$K9¸$YêgÁÃüÔ ×}IúLÿð ×Ž÷úÐa¦^¾ŽYÍswHÖj,Î÷ô|_!¯¬ ë«¼ž ­3¹òt’tS#>Ó÷)AÜÐúfçÇ!ÿyðøõGðÝÐ¥NqœMÁÏKž“`:°çh+¨]’tSßÈñóá¼™ãç/gñ7U¥žØ¼£üQUêÁì«J÷é$é¦>H•/É’ôX.I–úÙŸ|I2’ƒK’¥\’,Á·mÛÀ¯é°¢V½%_Ó Ë¶iŽÃÓø¾p_¿ž‘{ºj8ƒï¯ÌÁœs¨Ç—%³Oÿèœ~/Çχó‹ïrâ/¥Ê›ªROlÞÑ^6úªrÞW€ú,U~ |G`©ÿɰƒXÊÁ,•~%Ba=ý§¦]Z*.þöIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00101.html000066400000000000000000000267071224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::thread_safety_model Struct Reference
pqxx::thread_safety_model Struct Reference

Descriptor of library's thread-safety model. More...

#include <util.hxx>

Public Attributes

bool have_safe_strerror
 Does standard C library have a thread-safe alternative to strerror?
bool safe_libpq
 Is the underlying libpq build thread-safe?
bool safe_query_cancel
 Is canceling queries thread-safe?
bool safe_result_copy
 Are copies of pqxx::result and pqxx::binarystring objects thread-safe?
bool safe_kerberos
 Is Kerberos thread-safe?
std::string description
 A human-readable description of any thread-safety issues.

Detailed Description

Descriptor of library's thread-safety model.

This describes what the library knows about various risks to thread-safety.

Member Data Documentation

std::string pqxx::thread_safety_model::description

A human-readable description of any thread-safety issues.

Referenced by pqxx::describe_thread_safety().

bool pqxx::thread_safety_model::have_safe_strerror

Does standard C library have a thread-safe alternative to strerror?

If not, its strerror implementation may still be thread-safe. Check your compiler's manual.

Without strerror_r (strerror_s in Visual C++) or a thread-safe strerror, the library can't safely obtain descriptions of certain run-time errors. In that case, your application must serialize all use of libpqxx.

Referenced by pqxx::describe_thread_safety().

bool pqxx::thread_safety_model::safe_kerberos

Is Kerberos thread-safe?

Warning
Is currently always false.

If your application uses Kerberos, all accesses to libpqxx or Kerberos must be serialized. Confine their use to a single thread, or protect it with a global lock.

Referenced by pqxx::describe_thread_safety().

bool pqxx::thread_safety_model::safe_libpq

Is the underlying libpq build thread-safe?

A "false" here may mean one of two things: either the libpq build is not thread-safe, or it is a thread-safe build of an older version that did not offer thread-safety information.

In that case, the best fix is to rebuild libpqxx against (a thread-safe build of) a newer libpq version.

Referenced by pqxx::describe_thread_safety().

bool pqxx::thread_safety_model::safe_query_cancel

Is canceling queries thread-safe?

If not, avoid use of the pqxx::pipeline class in threaded programs. Or better, rebuild libpqxx against a newer libpq version.

Referenced by pqxx::describe_thread_safety().

bool pqxx::thread_safety_model::safe_result_copy

Are copies of pqxx::result and pqxx::binarystring objects thread-safe?

If true, it's safe to copy an object of either of these types (copying these is done very efficiently, so don't worry about data size) and hand the copy off to another thread. The other thread may access the copy freely without any concurrency concerns.

Referenced by pqxx::describe_thread_safety().


The documentation for this struct was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00101.js000066400000000000000000000007671224474465600207210ustar00rootroot00000000000000var a00101 = [ [ "description", "a00101.html#adddd2eaf6dbc5feca29ce00f91b4d648", null ], [ "have_safe_strerror", "a00101.html#a76f2924aaefac243d3770f1f4b698211", null ], [ "safe_kerberos", "a00101.html#abe3528c0d2e42d6e98d80f0b45d79002", null ], [ "safe_libpq", "a00101.html#a3fe3fa8e530712e5228d2b5379871540", null ], [ "safe_query_cancel", "a00101.html#ace2546ec39e30e8793cc4a296216f259", null ], [ "safe_result_copy", "a00101.html#adb5c47ea21c35c73432de0d0b7e80bdb", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00102.html000066400000000000000000000204161224474465600212430ustar00rootroot00000000000000 libpqxx: pqxx::too_many_connections Class Reference
pqxx::too_many_connections Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::too_many_connections:
pqxx::broken_connection pqxx::failure pqxx::pqxx_exception

Public Member Functions

 too_many_connections (const std::string &err)
- Public Member Functions inherited from pqxx::broken_connection
 broken_connection ()
 broken_connection (const std::string &)
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::too_many_connections::too_many_connections ( const std::string &  err)
explicit

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00102.js000066400000000000000000000001471224474465600207120ustar00rootroot00000000000000var a00102 = [ [ "too_many_connections", "a00102.html#ad613a4a06c35fc29cdb838427250d727", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00102.png000066400000000000000000000022261224474465600210620ustar00rootroot00000000000000‰PNG  IHDR¬À®ÙxËPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2%IDATxíéÒ« ›C•ïÿÈ× Å-qîª&e»°¶#LþcŒ­@”¤6pYI²Àe%É‚?– ã!Iwø{YIºÉ¹lP‡ëÏËM6ÅEõðœB7\S›á2õîǧ¬L’¸æ‡UÐî8ªÎâVg— åGV&Iu®"»,ïT§Š©l.ßô©¼‡$Õ±•~[Ù©ÌZvÿ/ª³`®Å»¿'›-ÊÚ;¯^ß"].Öì·‘=Øîi’/³Á¼1—²¯—ÁIF¼¨–¤#ž¶·“7ÑyÎüYIºÀ@V’~—•$ \V’,èecŒ± èZ¡%Ù®kȶ%ÙÞµÛ¦d=Øà²¸,€. `ËXಸ,€. `ËXಸ,€. `ËBŒ1¶Q’ÚÀe%É—•$ ŒdCXîÆC’¾ÇF¶ÔûkÙ0Ç®?/7«VŸæó܉áa»$ÝçSÙÅaЕÂîHl ²{IzÆÇ‘Íòà¾fÿ›²ý×®ËN’ô7d ¥¼ZAëñeT_Z³û V•MÛí/–ÁA6ÈB<¼F*˜÷áZ!Iùb¼E%é—•$ lþn%É—•$ \V’,èecŒ± èZ¡%Ù®kȶ%ÙÞµÛ¦d=Øà²¸,€. `ËXಸ,€. `ËXಸ,€. `ËBŒ1¶Q’ÚÀe%É—•$ žËI*©IÒ3úA®Æù)YI:£"ÆŽýy¹É[JÇXŒ÷sPÒÃTŸš§1²ºuàõ2œ9‘æPÐîXÔæëì½<ß3—uèe°ò²k()?ª‘ÝvKç¼zë·íW~Ü׿’ûî±~d×ïÈßçP6üYd‹&ŸÈf˳¶Á²±ªËm'{öýÖìýÈdƒ4\&¿dƒ"5äól²A¡RÖ•ÙàÁ2x3JÒ;XÉŽ›§–+%éSZ¬$ý&.+I¸¬$YÐËÆc#дBK²]×mK²½k;¶MÉz6°Áe,pY \À—°Àe,pY \À—°Àe,pY \À—…Bh@¸,€. `Á]ÙÿôJý4'3ýž,À‹l3Þ É,ݬ½‡7–KÖ?+ž{'Ö\^iR ·Ì0ÖmZìd§IÇêGvY4ÖösçJ£¢gjRµ,+ ÊÈnÛe¯t"[vب2ÅîR ·«zUvü;,#tKvíw [[yƒmüoÈn'¸-»mR›i· ²5»ß`ßËž}ÿ£5»_fWÙ ÛÕl-ƒy´â-kÙ`ó‘óº2œ-ƒ7sªEbþTvÜyˆüHÑ:mð£ÈÚüáÝý»øs\À—°`ø !„6øëÃhO’ýá÷IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00103.html000066400000000000000000000362671224474465600212570ustar00rootroot00000000000000 libpqxx: pqxx::transaction< ISOLATIONLEVEL, READWRITE > Class Template Reference
pqxx::transaction< ISOLATIONLEVEL, READWRITE > Class Template Reference

Standard back-end transaction, templatized on isolation level. More...

#include <transaction.hxx>

Inheritance diagram for pqxx::transaction< ISOLATIONLEVEL, READWRITE >:
pqxx::basic_transaction pqxx::dbtransaction pqxx::transaction_base pqxx::internal::namedclass

Public Types

typedef isolation_traits
< ISOLATIONLEVEL > 
isolation_tag

Public Member Functions

 transaction (connection_base &C, const std::string &TName)
 Create a transaction.
 transaction (connection_base &C)
virtual ~transaction () throw ()

Additional Inherited Members

- Protected Member Functions inherited from pqxx::basic_transaction
 basic_transaction (connection_base &C, const std::string &IsolationLevel, readwrite_policy)
- Static Protected Member Functions inherited from pqxx::dbtransaction
static std::string fullname (const std::string &ttype, const std::string &isolation)
- Protected Attributes inherited from pqxx::transaction_base
internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Detailed Description

template<isolation_level ISOLATIONLEVEL = read_committed, readwrite_policy READWRITE = read_write>
class pqxx::transaction< ISOLATIONLEVEL, READWRITE >

Standard back-end transaction, templatized on isolation level.

This is the type you'll normally want to use to represent a transaction on the database.

While you may choose to create your own transaction object to interface to the database backend, it is recommended that you wrap your transaction code into a transactor code instead and let the transaction be created for you.

See Also
pqxx/transactor.hxx

If you should find that using a transactor makes your code less portable or too complex, go ahead, create your own transaction anyway.

Usage example: double all wages

extern connection C;
work T(C);
try
{
T.exec("UPDATE employees SET wage=wage*2");
T.commit(); // NOTE: do this inside try block
}
catch (const exception &e)
{
cerr << e.what() << endl;
T.abort(); // Usually not needed; same happens when T's life ends.
}

Member Typedef Documentation

template<isolation_level ISOLATIONLEVEL = read_committed, readwrite_policy READWRITE = read_write>
typedef isolation_traits<ISOLATIONLEVEL> pqxx::transaction< ISOLATIONLEVEL, READWRITE >::isolation_tag

Constructor & Destructor Documentation

template<isolation_level ISOLATIONLEVEL = read_committed, readwrite_policy READWRITE = read_write>
pqxx::transaction< ISOLATIONLEVEL, READWRITE >::transaction ( connection_base C,
const std::string &  TName 
)
explicit

Create a transaction.

Parameters
CConnection for this transaction to operate on
TNameOptional name for transaction; must begin with a letter and may contain letters and digits only

References pqxx::transaction_base::Begin().

template<isolation_level ISOLATIONLEVEL = read_committed, readwrite_policy READWRITE = read_write>
pqxx::transaction< ISOLATIONLEVEL, READWRITE >::transaction ( connection_base C)
explicit
template<isolation_level ISOLATIONLEVEL = read_committed, readwrite_policy READWRITE = read_write>
virtual pqxx::transaction< ISOLATIONLEVEL, READWRITE >::~transaction ( ) throw ()
virtual

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00103.js000066400000000000000000000005131224474465600207100ustar00rootroot00000000000000var a00103 = [ [ "isolation_tag", "a00103.html#a01e7ecea76d7d12c295e6979759eb754", null ], [ "transaction", "a00103.html#a5ad879f746d13f51e469c67665b5d3f9", null ], [ "transaction", "a00103.html#a664bdb9c889f946c162cac14bdbe6b7b", null ], [ "~transaction", "a00103.html#a028f5dc23672e38c82a8fd91cd4e4ee0", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00103.png000066400000000000000000000043701224474465600210650ustar00rootroot00000000000000‰PNG  IHDR:øKËÚePLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2‡IDATxíë–²:+;kùþ|¸…$€£ôÇñÛ3–ÜšHŠN÷_˜ÿòò·úøññ¼£áÏÛó[°¹wo³MĶ™lќսû—Ózœ~ŠÞ·Ž“Þ5IÝ/¾»q¢O>1ΰ÷žçÏÃ×%FRš¶ãΔ ÓŒJn ÛùBÏ_sŽ ÿë}cüPâ—ûÇÍ8š‡Í¤ng¼¿žŸN_cpn±/y22åÂ8­yg1VÏ×ãeæí}}üzÿhfrp\×€ú;åüz|Mî]ðN–œ) š(õ¨Ltέ’cM®-·¯õkÉÍèM5«|5vQÎ]en^5Õ಺Z³MŽŒËj^·ãâ«5[N—\[ÃjnÕ¸ýï¾¼Ç^0rÍ©©€Õ\YÍ.9ÖäVI­õ¾.¾}›ñŠº¦Ž–œ{ô5cê°¯¹$ǶbW³]=ªõn»šÞDS/ëq“|ÇqWäܨîå#Ï-±TôuÕ”ÞØ—Áyuõõnì]][{èxa5¾öÐe•wqKo{öë×Ö¤îõ#7=íšÕòÛ<|]0rS™/zç¿¿[ìËG^{c­o_ið{gfsŸºÍ6ÛNÖ&b97ª³‰ÀvP7×»¼ü--×Ç>—€8‹ÕD¸Ýì €ÕDÌÙÀy¬ ˆÅ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„ølu9çlrÎù,dI2’t«“¤V'I!¬N’BX$…øeuI’žbˆ¼üü ’ô2þ’:I:âKÕ%¥ifÃ÷ºSg›Æ£áʲ×F—«%h`=Wâ¶¿±¿Y’.âruóB›&¯¤ƒO Yb”T?ýf·û %ÕÏÕÙx}Öm§\¾ÛËm5ë­Ô=йdÿ‡Ô ë«Q²®¹Sêæøùæqÿ›ÔuË©ŸõVÉ.«ÛÝ,IòÎZ·owÔ=®u½ºo­uw:ìÚ;Ö;ŸìlÓ|ûÛgÝ&þK:ìá®$ýyþ²º©\ž\’tˆ³N’B\­N’¾«“¤V'I!¬N’BX$…Ô圳É9ç“|.7p«ˆp»Ù@«ˆ0˜³;€óX@‹au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«ñÙêrÎÙäœóYÈ’d$éV'I!¬N’BX$…°:I ñQêÒôYö$é ê=’ôN¾A$ýïS—”¦ißëN;õñ|‰JÓ×tÃ÷ºÓ̱ž­'æã9fÜËÙÍHÍfüªw—8Iº„«ÕÍkhš—’vŸuOIݧɠÙFJRû9 ‰“¤k¸<ë¶³)ßíå®NífÜŠìmm+Ü‘NIº†ÏP7,±’[?¨›£ê=ý¹¯V×-©³Ýä÷êîmÖ5eí¨M<]ëöü°Öýù¬»ÓaË,kƒ, zÛak½Ÿ£v ¶i¾}‡ýû v¿+IŸV7v€.ý$éƒpÖIRˆ‹ÕIÒ·bu’Âê$)„ÕIR«“¤ƒºœs69ç|€Ïå`Îbun7»`usvp«bq!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!¬ „Õ„°:€VÂêBX@«au!>[]J)™”R: ÀœÃêBX@«au!žU÷¼à!òÇàñâÔŸJ{ÛÖÇÔá—˜æ|w¢ùÅe„r½ŽÕ½°ׇ¨·õs‰:€»”¹•Ç­;ÝóÄ”½6â@é^Ýî–—²ÑÖ>[°¥yÔåÑšzßò6ç·ÒG—«%hI–>î8+«ƒûêÚ˜vvÝ=½ÿsêÊ•ÿ¡nŸ&OâàSB–õÓovq«ä.ÔUWªëoèžû‘º&º·ÜOy×=Z?‰ý$7ÃmGZNœU׌ݖ®ú#OÖº#uó[ëú»—wZ]}º¦þ´O| ®[´›°Q×ò]LYÛÖÒ¥ÇQÖõµÕ³U·-±û»>á‘ºí †DG÷ûuô(뎵ìî•êö%¶íͶîª;Ⱥ¦ÖíÛÄuk]¿BuØuÛ#uí}§Õu/Xëîtصw¬ ¶Míæ\iª}‡Ý¿µu…7;]•Ú<õ³Îx Þ¬îZëºõØØØþJSÄ~R×׺ã6qç­üE.žÇ«»zßœu²ª0Ïbu!¬ „Õ„°:€ƒº”R2)¥t’ÿ& ÝJgïl¨IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00104.html000066400000000000000000001447411224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::transaction_base Class Reference

#include <transaction_base.hxx>

Inheritance diagram for pqxx::transaction_base:
pqxx::internal::namedclass pqxx::dbtransaction pqxx::nontransaction pqxx::basic_robusttransaction pqxx::basic_transaction pqxx::subtransaction pqxx::robusttransaction< ISOLATIONLEVEL > pqxx::transaction< ISOLATIONLEVEL, READWRITE >

Public Types

typedef isolation_traits
< read_committed
isolation_tag
 If nothing else is known, our isolation level is at least read_committed.

Public Member Functions

virtual ~transaction_base ()=0
void commit ()
 Commit the transaction.
void abort ()
 Abort the transaction.
std::string esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string quote_raw (const std::string &str) const
std::string quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
result exec (const std::string &Query, const std::string &Desc=std::string())
 Execute query.
result exec (const std::stringstream &Query, const std::string &Desc=std::string())
internal::parameterized_invocation parameterized (const std::string &query)
 Parameterize a statement.
connection_baseconn () const
 Connection this transaction is running in.
void set_variable (const std::string &Var, const std::string &Val)
 Set session variable in this connection.
std::string get_variable (const std::string &)
 Get currently applicable value of variable.
Prepared statements
prepare::invocation prepared (const std::string &statement=std::string())
 Execute prepared statement.
Error/warning output
void process_notice (const char Msg[]) const
 Have connection process warning message.
void process_notice (const std::string &Msg) const
 Have connection process warning message.
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Protected Member Functions

 transaction_base (connection_base &c, bool direct=true)
 Create a transaction (to be called by implementation classes only)
void Begin ()
 Begin transaction (to be called by implementing class)
void End () throw ()
 End transaction. To be called by implementing class' destructor.
virtual void do_begin ()=0
 To be implemented by derived implementation class: start transaction.
virtual result do_exec (const char Query[])=0
 To be implemented by derived implementation class: perform query.
virtual void do_commit ()=0
 To be implemented by derived implementation class: commit transaction.
virtual void do_abort ()=0
 To be implemented by derived implementation class: abort transaction.
result DirectExec (const char C[], int Retries=0)
 Execute query on connection directly.
void reactivation_avoidance_clear () throw ()
 Forget about any reactivation-blocking resources we tried to allocate.

Protected Attributes

internal::reactivation_avoidance_counter m_reactivation_avoidance
 Resources allocated in this transaction that make reactivation impossible.

Friends

class pqxx::internal::gate::transaction_transactionfocus
class pqxx::internal::gate::transaction_tablereader
class pqxx::internal::gate::transaction_tablewriter
class pqxx::internal::gate::transaction_subtransaction

Member Typedef Documentation

If nothing else is known, our isolation level is at least read_committed.

Constructor & Destructor Documentation

pqxx::transaction_base::~transaction_base ( )
pure virtual
pqxx::transaction_base::transaction_base ( connection_base c,
bool  direct = true 
)
explicitprotected

Create a transaction (to be called by implementation classes only)

The optional name, if nonempty, must begin with a letter and may contain letters and digits only.

Parameters
cThe connection that this transaction is to act on.
directRunning directly in connection context (i.e. not nested)?

References conn(), and transaction_base().

Referenced by transaction_base().

Member Function Documentation

void pqxx::transaction_base::abort ( )

Abort the transaction.

No special effort is required to call this function; it will be called implicitly when the transaction is destructed.

void pqxx::transaction_base::Begin ( )
protected

Begin transaction (to be called by implementing class)

Will typically be called from implementing class' constructor.

Referenced by pqxx::transaction< ISOLATIONLEVEL, READWRITE >::transaction().

void pqxx::transaction_base::commit ( )

Commit the transaction.

Unless this function is called explicitly, the transaction will not be committed (actually the nontransaction implementation breaks this rule, hence the name).

Once this function returns, the whole transaction will typically be irrevocably completed in the database. There is also, however, a minute risk that the connection to the database may be lost at just the wrong moment. In that case, libpqxx may be unable to determine whether the transaction was completed or aborted and an in_doubt_error will be thrown to make this fact known to the caller. The robusttransaction implementation takes some special precautions to reduce this risk.

pqxx::result pqxx::transaction_base::DirectExec ( const char  C[],
int  Retries = 0 
)
protected

Execute query on connection directly.

Parameters
CQuery or command to execute
RetriesNumber of times to retry the query if it fails. Be extremely careful with this option; if you retry in the middle of a transaction, you may be setting up a new connection transparently and executing the latter part of the transaction without a backend transaction being active (and with the former part aborted).
virtual void pqxx::transaction_base::do_abort ( )
protectedpure virtual

To be implemented by derived implementation class: abort transaction.

Implemented in pqxx::dbtransaction.

virtual void pqxx::transaction_base::do_begin ( )
protectedpure virtual

To be implemented by derived implementation class: start transaction.

Implemented in pqxx::dbtransaction.

virtual void pqxx::transaction_base::do_commit ( )
protectedpure virtual

To be implemented by derived implementation class: commit transaction.

Implemented in pqxx::dbtransaction.

virtual result pqxx::transaction_base::do_exec ( const char  Query[])
protectedpure virtual

To be implemented by derived implementation class: perform query.

Implemented in pqxx::dbtransaction.

void pqxx::transaction_base::End ( ) throw ()
protected

End transaction. To be called by implementing class' destructor.

Referenced by pqxx::transaction< ISOLATIONLEVEL, READWRITE >::~transaction().

pqxx::result pqxx::transaction_base::exec ( const std::string &  Query,
const std::string &  Desc = std::string() 
)

Execute query.

Perform a query in this transaction.

This is one of the most important functions in libpqxx.

Most libpqxx exceptions can be thrown from here, including sql_error, broken_connection, and many sql_error subtypes such as feature_not_supported or insufficient_privilege. But any exception thrown by the C++ standard library may also occur here. All exceptions will be derived from std::exception, however, and all libpqxx-specific exception types are derived from pqxx::pqxx_exception.

Parameters
QueryQuery or command to execute
DescOptional identifier for query, to help pinpoint SQL errors
Returns
A result set describing the query's or command's result

Referenced by pqxx::internal::sql_cursor::sql_cursor().

result pqxx::transaction_base::exec ( const std::stringstream &  Query,
const std::string &  Desc = std::string() 
)

References exec().

Referenced by exec().

string pqxx::transaction_base::get_variable ( const std::string &  Var)

Get currently applicable value of variable.

First consults an internal cache of variables that have been set (whether in the ongoing transaction or in the connection) using the set_variable functions. If it is not found there, the database is queried.

Warning
Do not mix the set_variable with raw "SET" queries, and do not try to set or get variables while a pipeline or table stream is active.
This function used to be declared as const but isn't anymore.
pqxx::internal::parameterized_invocation pqxx::transaction_base::parameterized ( const std::string &  query)

Parameterize a statement.

pqxx::prepare::invocation pqxx::transaction_base::prepared ( const std::string &  statement = std::string())

Execute prepared statement.

Prepared statements are defined using the connection classes' prepare() function, and continue to live on in the ongoing session regardless of the context they were defined in (unless explicitly dropped using the connection's unprepare() function). Their execution however, like other forms of query execution, requires a transaction object.

Just like param_declaration is a helper class that lets you tag parameter declarations onto the statement declaration, the invocation class returned here lets you tag parameter values onto the call:

result run_mystatement(transaction_base &T)
{
return T.prepared("mystatement")("param1")(2)()(4).exec();
}

Here, parameter 1 (written as "<tt>$1</tt>" in the statement's body) is a string that receives the value "param1"; the second parameter is an integer with the value 2; the third receives a null, making its type irrelevant; and number 4 again is an integer. The ultimate invocation of exec() is essential; if you forget this, nothing happens.

To see whether any prepared statement has been defined under a given name, use:

T.prepared("mystatement").exists()
Warning
Do not try to execute a prepared statement manually through direct SQL statements. This is likely not to work, and even if it does, is likely to be slower than using the proper libpqxx functions. Also, libpqxx knows how to emulate prepared statements if some part of the infrastructure does not support them.
Actual definition of the prepared statement on the backend may be deferred until its first use, which means that any errors in the prepared statement may not show up until it is executed–and perhaps abort the ongoing transaction in the process.

If you leave out the statement name, the call refers to the nameless statement instead.

void pqxx::transaction_base::process_notice ( const char  Msg[]) const

Have connection process warning message.

void pqxx::transaction_base::process_notice ( const std::string &  Msg) const

Have connection process warning message.

void pqxx::transaction_base::reactivation_avoidance_clear ( ) throw ()
protected

Forget about any reactivation-blocking resources we tried to allocate.

References pqxx::result::clear().

void pqxx::transaction_base::set_variable ( const std::string &  Var,
const std::string &  Val 
)

Set session variable in this connection.

The new value is typically forgotten if the transaction aborts. Known exceptions to this rule are nontransaction, and PostgreSQL versions prior to 7.3. In the case of nontransaction, the set value will be kept regardless; but in that case, if the connection ever needs to be recovered, the set value will not be restored.

Parameters
VarThe variable to set
ValThe new value to store in the variable

Friends And Related Function Documentation

friend class pqxx::internal::gate::transaction_subtransaction
friend
friend class pqxx::internal::gate::transaction_tablereader
friend
friend class pqxx::internal::gate::transaction_tablewriter
friend
friend class pqxx::internal::gate::transaction_transactionfocus
friend

Member Data Documentation

internal::reactivation_avoidance_counter pqxx::transaction_base::m_reactivation_avoidance
protected

Resources allocated in this transaction that make reactivation impossible.

This number may be negative!


The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00104.js000066400000000000000000000055551224474465600207240ustar00rootroot00000000000000var a00104 = [ [ "isolation_tag", "a00104.html#af5e1900b64239bac292f5505f7799654", null ], [ "~transaction_base", "a00104.html#ad5ddea378795d92908af4b65e59d585a", null ], [ "transaction_base", "a00104.html#a92fc088d2f2c3e1e5992b4e14c703684", null ], [ "abort", "a00104.html#a955f2497216d9eae268ac662b46d5a45", null ], [ "Begin", "a00104.html#a1d2a8554499cbd93ff8c2bf5c15843ff", null ], [ "commit", "a00104.html#ab2cf42c4821aff7ff1cd906af9165725", null ], [ "conn", "a00104.html#aed167261c4d76876241b5f615b9b8c7a", null ], [ "DirectExec", "a00104.html#ac80f81e53c31f3a2052dc24fc6bbb7ee", null ], [ "do_abort", "a00104.html#a8fc9a363bcf7defb3c829a633c04ae6c", null ], [ "do_begin", "a00104.html#aa80a7816f63c425c28cd4037aaa8cf8f", null ], [ "do_commit", "a00104.html#a475695c55439007cd2438fb184ed8be3", null ], [ "do_exec", "a00104.html#a6f587ae3bda7a32c8828984e7c4aa16e", null ], [ "End", "a00104.html#af2ddcd7f1def9dfd3f15c0f3242b9136", null ], [ "esc", "a00203.html#ga98dee516d429520627fd94f5ccb2b023", null ], [ "esc", "a00203.html#ga38cc55d0d7637dd53a6508e2bc4beadb", null ], [ "esc", "a00203.html#ga80bbd3626005768e0d39bdfb6930e244", null ], [ "esc_raw", "a00203.html#ga6048218f7af70cd0423429d54203749c", null ], [ "esc_raw", "a00203.html#ga489c7438da9241486297a451a8579dc1", null ], [ "exec", "a00104.html#aed91d0b8029795b477470e854c907c4b", null ], [ "exec", "a00104.html#a938732e87f924fee764cddd8390de20f", null ], [ "get_variable", "a00104.html#a87f5147f2dc2dfbcc3b5aef4b461be86", null ], [ "parameterized", "a00104.html#a241ccb51d6d6a399164e7478adcd6157", null ], [ "prepared", "a00104.html#a1357ac4f6330284129c91882a169276d", null ], [ "process_notice", "a00104.html#a99f99eb85906a7541119c9098a36d799", null ], [ "process_notice", "a00104.html#aa90bc6e1219ff68ef11e1d04b76c205c", null ], [ "quote", "a00203.html#ga263a180c5d0decf645aca3fc1ed4d6ff", null ], [ "quote_name", "a00203.html#gad943d244673a97eef6c7a927f4f412c0", null ], [ "quote_raw", "a00203.html#gac62a687a3367d500a54d0e0a722880c6", null ], [ "quote_raw", "a00203.html#gaa10d27c49fd2089fe55ebc7ef060b65a", null ], [ "reactivation_avoidance_clear", "a00104.html#a84df458282939ef38cfddfaa07bea1d8", null ], [ "set_variable", "a00104.html#ab7510be596a5a14014064c884a10fd93", null ], [ "pqxx::internal::gate::transaction_subtransaction", "a00104.html#ae689290143788842755389246915b9f2", null ], [ "pqxx::internal::gate::transaction_tablereader", "a00104.html#afbc1622f03aeb05c34ac44f1c5c179dc", null ], [ "pqxx::internal::gate::transaction_tablewriter", "a00104.html#a02ad6878f438fc51b297b32e7512e244", null ], [ "pqxx::internal::gate::transaction_transactionfocus", "a00104.html#acf16920b6582767aae17d6c57770e853", null ], [ "m_reactivation_avoidance", "a00104.html#adc48441869caf6a4b84911cd6984c36a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00104.png000066400000000000000000000100551224474465600210630ustar00rootroot00000000000000‰PNG  IHDRÂø<¯ÉPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¼IDATxíÝëVâJÐMe-Þÿ‘r Èx¡•O9lÐ Róý þ¦ãOŸù9,+»ŸÞÿ –ÓF¶ÁP°Fmd ë3µ‘ÝOPP°˜©|쾆‚e½UøÙ ØœŸo>Z÷¶ì‹×½\gó¬ÏÑ CÁ²v^p/{+Üšþëì=çïo…¡`a¿ÓÌÍfÿö`¿7î›uÚ+w÷‡6oÇw¿{îîßù¼·õ»§õÇóßîö M=<ßÝí+|¸ÎÛù—ãûÿÓd((XØOOø¾™û½ñ­^‡Çæ^Ž_ž8?ïzýùü·†¾]r×õËóó‚ËûœŽŸŸÿÎ^ Ëùñ ?î¡§*ÎöÄCÃ/…;ìµ§=w¶÷O?­ßŸpÛìóóÓun×]ž·ÁPðýü„ïulÚi<ùÜðÙžùösX:o·#ï÷ä›o„ËáÓÞ{^vÙk/ëÞ¿o Èô{ÔeÝUêØÔCO ?î¹³½ö´ÕžÏ»Z?ÿF¸¹Þ©Â‡ë\Ö¯7»ÎÞOPP°˜é7ö¨Óf¹ß)÷{ã~<4ê¼g÷ÒKug{ó©Éï¿.ÍŸ=ŸmÆ÷×ýüÜ CÁ²Þ*üã¾ÛzOÍ}{ðÖä}³¯šuhø[ÿÞ*zÞ;÷÷»ã»³&Nx»Þ¼ùÇo†ýu×¹¬Û{wþï48­0,kW៟ð}³Ï÷ þ…-~ß CÁÂ~cÂ÷{îáù/íËßCAÁÂ~zÂß*||¾ù£ n…¡àüÕ†µÁP𷵑m0¬ÏÔF>v?AAÁb¦6ò±ûV –õVá6òûV –uœÄéøs>ÜçŸ=‡‚‚‚[[(((X“V Öf»m‡¡ `eZa((X›]ƒÛa((X—V V¨†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ `uZa((XV V§†‚‚Õi…¡ àžÍf³©Íf³ù.((XL'Ðà `YDx@ƒƒ‚euá  –ÕI„48(XV'Ðà `Y‹Nâ×ß|·ò_‹ú­0,k=†{Za(ø_úÝIÜØìß`÷ûüàò¦›·g»WŽæ«O¯ž½]à|ì´îö=ÞŸ ¿¤†‚eýr…÷=”ÔÆÛiÉqËíúîݺwïaãrû펵ÂP°¬ßÞ…o«wú=ùôx¶úêØ¼œï :{v^ß CÁŸ÷Þì~.OOëf»í*|X8ùíq+ Ú+|®áù=Ïí»­æ»-ùó ¿;~Q+ Ëúå _j;ß‚Ooz¿Â÷êúQ…o_{·~\+ Ëúí]øÜÜë Ÿz}üÞ ¾?x0;vìþáñéÉÍ.|³þô~O+ Ëúí ÿÙ‘o…¡`Yë­ðn£}û%´ÂP°¬îÂð€V –ÕI„48(XV'Ðà `YDx@ƒƒ‚euá  –ÕI„48(XÖf³ÙÔf³Ù|ÜÚBAAÁš´ÂPP°6Ûm; +Ó CAÁÚìÜCAÁº´ÂPP°B-0¬N+ «Ó CAÁê´ÂPP°:­0¬N+ «Ó CAÁê´ÂPP°:­0¬N+ 7¶Ûí¶¶Ûív<>=ùÛ»ð‡^2šwöÅsl…aÔó*|ïa’¬Ôó+üÇl…á´ÂIò€V8IÆ´Â0ªN’´ÂI2¦†QϪp’ü)Ï®p’ü5­0Œêø%ÉZá$Ó Ã¨Ž_’< N’1­0Œêø%ÉZá$Ó Ã¨Ž_’< N’1­0Œš¦iªiš¦ïj†Ó4Mc à¯ÚBAAÁš´ÂPP°6Ûm; +Ó CAÁÚìÜCAÁº´ÂPP°B-0¬N+ «Ó CAÁê´ÂPP°:­0¬N+ «Ó CAÁê´ÂPP°:­0¬N+  Øn·ÛÚn·ÛÚn·ÛÅ@Áw5:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aL3„‡4:Ó aÌkg8MÓô²¶Ó4M¯ªNÓ4i†Ó4McLIRIò=óñK’J’ïi†I2¦N’‡tü’dL3L’1­p’<¤ã—$cša’Œi…“ä!¿$Ó “dL+œ$éø%ɘf˜$cžYáM’ܸwì³><'Éåö­ÅIò/2~_JõE"K’+¯\ác ¯ÝËT8Iþé'*œ$¿ã…+œ$W^$²$¹ò×*œ$Ïö£Þd³ÿ»ßç³v9zyqïðü²êtèxÂeÝþ…ýkïWÝ^üøúå Në’ä'Ë{c÷ªÑýR…/¡Ì¿àNŸäòr6¹ºÍ?ì<®Ùõ’Íìv¿è÷âÿþT_$²$¹òô ’åÕ¼½Ô´%É}?¼ Ÿs¹èôáNGGÎÁϦíxh~½ÓՎמ]èr™«‹ŸÏ®¶Ö]x<Õ‰,I®<þ0Ë«y;.yÕè~«Â÷&É_ô¼ ÿÝTŸ_á¿—åËTx÷Ýõö“$+±† ¿zª­p’Œé.œ$é.œ$cZá$ó£N’ÿg_’ü5Í0IÆ´ÂIòŽ_’Œi†I2¦N’‡tü’dL3L’1­p’<¤ã—$cša’Œi…“ä!¿$Ó “dÌ®ÂÓ4M5MÓôM³ñ›¦iªiš¦oj†Ó4Mcàum¡àaÍ Ðñƒ1Í žo»íüÁˆf èøÁ˜fÏ·›¾Î h†P°€ŽŒi†P°ˆŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†P°€ŽŒi†ð—MÓ4½¬í4MÓ«j†Ó4Mc `À”$•$ß3¯p’T’|O+ £:~Iò€V8IÆ´Â0ªã—$h…“dL+ £:~Iò€V8IÆ´Â0ªã—$h…“dL+ £~jü6IrcwìÞá$yï³Åo/nv?‡'Ç—3O?—'—5—Ë×ÌŽ_H’¯øv…×Åñðùõ˵æ—>:/¾ü—Ó’\n­0Œz¥ 'É?.vš•˃ÓÓT¾_sz4_qgž_ªÂIòOÏâæ¼Ë»ÜÖwþ·]/H’[­0ŒúpüÞ¾?ßµ—ï¦åò•;ÿŸ¼úJ¿]uþ}¹;í×ëî\ðßs;_3­«s®‡´Â§µê(>®ðé•Vžîã þ#öc•Mno§× fÿ“Ÿ¯ºZ›M.·Ùºó„_í"wæö2~?4·ïj“$WîTøã´ÖÅÝ _ŸpõwVáY´­0Œúd¾¦ëá¾ùê½¾»þ/½óò »¹ÌüÍfcüݹ]û°¹ö·Ó›\Ïíg%¾· ˜Öz£8¿{Âì=ÿf‹/ÄéÐM´­0Œú Ÿçëò_yË<^˹½jÑÍôßÌíyDîÎía¶n·žãÄý{ëù°ÄWxQÜ|]×ô¶ÂWöÞåN§†Q_¯ðíWø‡¾™Ã½ü½­çþL¾Ûu~fnwá÷i­7Šw—ºþÃgo÷þ}ïU¸»0ü˜+|Äù¦ro*çK“Íìv¿èïfôîÜÎþ»ç3qýàîÜÞ>¸7·óóní³ß­ðÇi­5ŠÏ+<ߊ?¯ð,ÚVF}² Ÿgñz(ç£u˜×ùÒÓÂãiçUÇ—.×9,>^àtâ|Ôo¦h÷âišÏW¸LäÍȜלÇí¸øx?«Æì…$ù’{»ð‡i­1Š«ÊÎN¸½ÐgþG´­0Œú¤Â÷&IÝ«ðŸKë—?G+ £Zá$yÀÿ¡Â¿ý1ZaÕ 'Éþ»p’ü¢VF}Xá$©$yï}…“¤’ä«ZaÕñK’´ÂI2¦†Q¿$y@+œ$cZaÕñK’´ÂI2¦†Q¿$y@+œ$cZa5MÓTÓ4MßÕ §išÆ@Áãþ4‹ãmBIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00105.html000066400000000000000000000301411224474465600212420ustar00rootroot00000000000000 libpqxx: pqxx::internal::transactionfocus Class Reference
pqxx::internal::transactionfocus Class Reference

#include <transaction_base.hxx>

Inheritance diagram for pqxx::internal::transactionfocus:
pqxx::internal::namedclass pqxx::pipeline pqxx::subtransaction pqxx::tablestream pqxx::tablereader pqxx::tablewriter

Public Member Functions

 transactionfocus (transaction_base &t)
- Public Member Functions inherited from pqxx::internal::namedclass
 namedclass (const std::string &Classname, const std::string &Name="")
const std::string & name () const throw ()
const std::string & classname () const throw ()
std::string description () const

Protected Member Functions

void register_me ()
void unregister_me () throw ()
void reg_pending_error (const std::string &) throw ()
bool registered () const throw ()

Protected Attributes

transaction_basem_Trans

Constructor & Destructor Documentation

pqxx::internal::transactionfocus::transactionfocus ( transaction_base t)
explicit

Member Function Documentation

void pqxx::internal::transactionfocus::reg_pending_error ( const std::string &  err) throw ()
protected
void pqxx::internal::transactionfocus::register_me ( )
protected
bool pqxx::internal::transactionfocus::registered ( ) const throw ()
protected
void pqxx::internal::transactionfocus::unregister_me ( ) throw ()
protected

Member Data Documentation

transaction_base& pqxx::internal::transactionfocus::m_Trans
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00105.js000066400000000000000000000007541224474465600207210ustar00rootroot00000000000000var a00105 = [ [ "transactionfocus", "a00105.html#ac1ad1a201cacde2cd35182dd3bfb66fa", null ], [ "reg_pending_error", "a00105.html#adae9df5aee401ccb6f1d77024d524322", null ], [ "register_me", "a00105.html#a267f75f541c85a38605fb6b8c66d1e0a", null ], [ "registered", "a00105.html#a474a6ca017e7a313bc33e7b2b5a2d1d7", null ], [ "unregister_me", "a00105.html#a53309d8e6bb85774cb16bf6a340cb558", null ], [ "m_Trans", "a00105.html#a9924dff8ce3203ca9fb9e584800ef9f4", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00105.png000066400000000000000000000051121224474465600210620ustar00rootroot00000000000000‰PNG  IHDRÀq„( PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2 ÙIDATxíÝív¢JFáÇb-ïÿ’åK&¨™ZæÍ¸šn¦‹ÚVý…cÐÝþ>枺ü}֞ϓ3vÂ?ÁÊ;áøtŸ)gŽL÷™•3vÂá¹Úù¢§áúröçy§çŸ;>çôä>b'ž‹ïW°Ós¿ðœ«Ï¬‹p|Ve9],¹Ouù\饹W¸Ëñzã:|¿|}UÊ˪aÝuþÕÎÛüÛúÛp¿~¸¾>©ïŸs]?Ž_Ÿ».98>‹ä÷ÒõíêgïÒEÒÛÉ}|¼¾É5]7Ÿ?¬¿Êw•ñòÔñzX7þ?÷ñáú¡‚B€Ã³Lþ­òÝ“Jö%o/M/éÄÎÉñ¶n2ÿÞæ’Ïe¼­ç×í‡ä÷íunçå{*ï¤Ò]ÿnm8ö]º—z"{?u"u¿r&élÞãÿ»ÝêÕå{8™HÐW¸ëÐiøêG&뮇az?«_uŸ=tr¸~õ3&ónçË ÆNøW¸ÛùÕa{7œ¬}¦ƒ*㨓Ùç~ëaí8×Éø™Ï{œ5™;á_`’í¹%“Bµ"È’qÎôqkçcËGÎ —€Çå;¯KCoÍ|iç8>6æÙÜ—ìLg‡ˆ5;g w½vΔy¬m yÇRú0÷5;ÓÙáßážíÑÈiá\íÎ',xÎÎ?˜¸eç}_K]!Àa²=H9·óA ‰ÀóÎ>›|÷hŸwöñgðu~¿˜H>üJ†}¥³Ã?Åc-úˆÄÇN8<±´Gì„íñ¡iŽpxb'hØ Ú#vB€öˆ =N§Óé^ç 4Eì„Íq>GOб4ÇEÎè #vB€‰› =b'hØ Ú#vB€öˆ =b'hØ Ú#vB€öˆ =b'“óù|çóù¼#`Áç¿™DÇ$¹…}‰°Fr û;aäö%vÂÉ-ìKì„5’[Ø—Ø k$·°/±ÖHna_b'¬‘ܾÄNX#¹…}‰°Fr û;aäö%vÂÉ-ìKì„5’[Ø—Ø k$·°/ŸA×uÝoqû%A×uÝ6ÿOðtUUŸÇ4·UUŸÇ¡"€ß ¹­ªÚØ $·UU;;aƒä¶ªjb'lÜVUí@ì„ ~õÍœªjö¹ <ŒUU½Ì/æö¶Áç÷ù^P¿Á¸“?ÄñwÞÿ!kç_{5ÙYUõ"±6xóÍœêÔ‡yùN&¡ßFûªr¿? ,ƪª^æÅÜnlwØí¸»~o—Óqç³…“Ãõ«Ÿ1›WUõ-ïÚù}(ÃŽ¦9·û×8ùeq¶óîYÿ–ªN‹ÏÊÙÚÝ·ɯڹ±ÝÙ'Wk£³hêTãg2¯ªê{Þ¶ó™Pv\§?³¸†É·YUÕs´\;—/âþ½¸ý]"ÿG;··»²ÕI+˜ŽÎÆþhUÕ÷¼_;Ÿåá•Ût‰‡þY;¯ëcUU/ówí\tö¹f÷²3kÑÎÙŽ'/zådpž˜ªªçø;£ûÃïvu¬ªêe~bçj2ÖÊü”Ѻí þ?;WßüZ»z¸;Ù|jüTU=IÃvŽM¾C+œÜn¢³olw¶ÛÙ&Ws½=VUõ=oÛùL(ó7¿¶Ï?ÆPUõ-×ÎáÕÌßÑ=Ì{ï?ÔÓûë­ªz•—kç·ÛÜ÷~ÏÖu—ýygýø:#üíÚùý›¿m«ÿ·xÑqMÃ;Xg<]ûIû®ªúotößÝPUÕKü¤³·J쬪Z#vÆÎªªubgUÕOˆ°Á›vVUíÉ»¹­ªjƒCE¿Ar[Uµ±6Hn«ªv vÂÉmUÕÄNØ ¹­ªÚØ t]×}"‰ ëºn_ @€×9C€M;!@sœÏÑ´Fì„Íq‘3zB€Æˆ Eâ&hØ Ú#vB€öˆ =b'hØ Ú#vB€öˆ =b'hØ ^æ|>Ÿ?p8>?·±ŽIì„í;!@{ÄNб´Gì„í;!@{ÄNб´Gì„í;!@{ÄNб´Gì„í;!À{t]×ýç®ëº_âH@€%]UÕç1µ³ªêóˆ°Aì¬ªÚØ ÄΪªˆ°Aì¬ªÚØ ÄΪªˆ°ÁßÌíiy6TU­°9¡ªjß³óé .ãoo?vÂ6±³ª¦ŸW‚ˆð‹¼”ÛSú„\¾‡“I¯Wý×}bÏ}Îps< libpqxx: pqxx::transactor< TRANSACTION > Class Template Reference
pqxx::transactor< TRANSACTION > Class Template Reference

#include <transactor.hxx>

Public Member Functions

 transactor (const std::string &TName="transactor")
void operator() (TRANSACTION &T)
 Overridable transaction definition; insert your database code here.
void on_abort (const char[]) throw ()
 Optional overridable function to be called if transaction is aborted.
void on_commit ()
 Optional overridable function to be called after successful commit.
void on_doubt () throw ()
 Overridable function to be called when "in doubt" about outcome.
std::string Name () const
 The transactor's name.

Constructor & Destructor Documentation

template<typename TRANSACTION = transaction<read_committed>>
pqxx::transactor< TRANSACTION >::transactor ( const std::string &  TName = "transactor< TRANSACTION >")
explicit

Member Function Documentation

template<typename TRANSACTION = transaction<read_committed>>
std::string pqxx::transactor< TRANSACTION >::Name ( ) const

The transactor's name.

template<typename TRANSACTION = transaction<read_committed>>
void pqxx::transactor< TRANSACTION >::on_abort ( const char  []) throw ()

Optional overridable function to be called if transaction is aborted.

This need not imply complete failure; the transactor will automatically retry the operation a number of times before giving up. on_abort() will be called for each of the failed attempts.

One parameter is passed in by the framework: an error string describing why the transaction failed. This will also be logged to the connection's notice processor.

template<typename TRANSACTION = transaction<read_committed>>
void pqxx::transactor< TRANSACTION >::on_commit ( )

Optional overridable function to be called after successful commit.

If your on_commit() throws an exception, the actual back-end transaction will remain committed, so any changes in the database remain regardless of how this function terminates.

template<typename TRANSACTION = transaction<read_committed>>
void pqxx::transactor< TRANSACTION >::on_doubt ( ) throw ()

Overridable function to be called when "in doubt" about outcome.

This may happen if the connection to the backend is lost while attempting to commit. In that case, the backend may have committed the transaction but is unable to confirm this to the frontend; or the transaction may have failed, causing it to be rolled back, but again without acknowledgement to the client program. The best way to deal with this situation is typically to wave red flags in the user's face and ask him to investigate.

The robusttransaction class is intended to reduce the chances of this error occurring, at a certain cost in performance.

See Also
robusttransaction
template<typename TRANSACTION = transaction<read_committed>>
void pqxx::transactor< TRANSACTION >::operator() ( TRANSACTION &  T)

Overridable transaction definition; insert your database code here.

The operation will be retried if the connection to the backend is lost or the operation fails, but not if the connection is broken in such a way as to leave the library in doubt as to whether the operation succeeded. In that case, an in_doubt_error will be thrown.

Recommended practice is to allow this operator to modify only the transactor itself, and the dedicated transaction object it is passed as an argument. This is what makes side effects, retrying etc. controllable in the transactor framework.

Parameters
TDedicated transaction context created to perform this operation.

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00106.js000066400000000000000000000007231224474465600207160ustar00rootroot00000000000000var a00106 = [ [ "transactor", "a00106.html#a326761951cbf1a7b38ee912a4ca3556f", null ], [ "Name", "a00106.html#aa6045f47cf10d83a2d3d221813d7d53c", null ], [ "on_abort", "a00106.html#a11e2fe0df76ccba33e0c6cd7b8f6da2d", null ], [ "on_commit", "a00106.html#aacc3fb9eb7993788cafe66aa88d87d6b", null ], [ "on_doubt", "a00106.html#ade15ec930b8c4baee2c22ceec5af9c2d", null ], [ "operator()", "a00106.html#ab02770d55fdda6bc4e5b4323aa53e4e8", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00107.html000066400000000000000000001520111224474465600212450ustar00rootroot00000000000000 libpqxx: pqxx::tuple Class Reference

Reference to one row in a result. More...

#include <tuple.hxx>

Inheritance diagram for pqxx::tuple:
pqxx::const_result_iterator pqxx::const_reverse_result_iterator

Public Types

typedef tuple_size_type size_type
typedef tuple_difference_type difference_type
typedef const_tuple_iterator const_iterator
typedef const_iterator iterator
typedef field reference
typedef const_tuple_iterator pointer
typedef
const_reverse_tuple_iterator 
const_reverse_iterator
typedef const_reverse_iterator reverse_iterator

Public Member Functions

 tuple (const result *r, size_t i) throw ()
 ~tuple () throw ()
const_iterator begin () const throw ()
const_iterator end () const throw ()
size_type size () const throw ()
void swap (tuple &) throw ()
size_t rownumber () const throw ()
size_t num () const
tuple slice (size_type Begin, size_type End) const
bool PQXX_PURE empty () const throw ()
Comparison
bool PQXX_PURE operator== (const tuple &) const throw ()
bool operator!= (const tuple &rhs) const throw ()
Field access
reference front () const throw ()
reference back () const throw ()
const_reverse_tuple_iterator rbegin () const
const_reverse_tuple_iterator rend () const
reference operator[] (size_type) const throw ()
reference operator[] (int) const throw ()
reference operator[] (const char[]) const
reference operator[] (const std::string &) const
reference at (size_type) const throw (pqxx::range_error)
reference at (int) const throw (pqxx::range_error)
reference at (const char[]) const
reference at (const std::string &) const
Column information
size_type column_number (const std::string &ColName) const
 Number of given column (throws exception if it doesn't exist)
size_type column_number (const char[]) const
 Number of given column (throws exception if it doesn't exist)
oid column_type (size_type) const
 Type of given column.
oid column_type (int ColNum) const
 Type of given column.
oid column_type (const std::string &ColName) const
 Type of given column.
oid column_type (const char ColName[]) const
 Type of given column.
oid column_table (size_type ColNum) const
 What table did this column come from?
oid column_table (int ColNum) const
 What table did this column come from?
oid column_table (const std::string &ColName) const
 What table did this column come from?
size_type table_column (size_type) const
 What column number in its table did this result column come from?
size_type table_column (int ColNum) const
 What column number in its table did this result column come from?
size_type table_column (const std::string &ColName) const
 What column number in its table did this result column come from?

Protected Attributes

const resultm_Home
size_t m_Index
size_type m_Begin
size_type m_End

Friends

class field

Detailed Description

Reference to one row in a result.

A tuple represents one row (also called a tuple) in a query result set. It also acts as a container mapping column numbers or names to field values (see below):

cout << tuple["date"].c_str() << ": " << tuple["name"].c_str() << endl;

The tuple itself acts like a (non-modifyable) container, complete with its own const_iterator and const_reverse_iterator.

Member Typedef Documentation

Constructor & Destructor Documentation

pqxx::tuple::tuple ( const result r,
size_t  i 
) throw ()
Deprecated:
Do not use this constructor. It will become private.

References tuple().

Referenced by tuple().

pqxx::tuple::~tuple ( ) throw ()

Member Function Documentation

pqxx::field pqxx::tuple::at ( size_type  i) const throw (pqxx::range_error)
pqxx::tuple::reference pqxx::tuple::at ( int  i) const throw (pqxx::range_error)
pqxx::field pqxx::tuple::at ( const char  f[]) const
pqxx::tuple::reference pqxx::tuple::at ( const std::string &  s) const
pqxx::tuple::reference pqxx::tuple::back ( ) const throw ()
pqxx::tuple::const_iterator pqxx::tuple::begin ( ) const throw ()
size_type pqxx::tuple::column_number ( const std::string &  ColName) const

Number of given column (throws exception if it doesn't exist)

References column_number().

Referenced by column_number().

pqxx::tuple::size_type pqxx::tuple::column_number ( const char  ColName[]) const

Number of given column (throws exception if it doesn't exist)

References pqxx::result::column_number().

pqxx::oid pqxx::tuple::column_table ( size_type  ColNum) const

What table did this column come from?

oid pqxx::tuple::column_table ( int  ColNum) const

What table did this column come from?

References column_table().

Referenced by column_table().

oid pqxx::tuple::column_table ( const std::string &  ColName) const

What table did this column come from?

References column_table().

Referenced by column_table().

pqxx::oid pqxx::tuple::column_type ( size_type  ColNum) const

Type of given column.

oid pqxx::tuple::column_type ( int  ColNum) const

Type of given column.

References column_type().

Referenced by column_type().

oid pqxx::tuple::column_type ( const std::string &  ColName) const

Type of given column.

References column_type().

Referenced by column_type().

oid pqxx::tuple::column_type ( const char  ColName[]) const

Type of given column.

References column_type().

Referenced by column_type().

bool pqxx::tuple::empty ( ) const throw ()
pqxx::tuple::const_iterator pqxx::tuple::end ( ) const throw ()
pqxx::tuple::reference pqxx::tuple::front ( ) const throw ()
size_t pqxx::tuple::num ( ) const
bool pqxx::tuple::operator!= ( const tuple rhs) const throw ()
bool pqxx::tuple::operator== ( const tuple rhs) const throw ()
pqxx::tuple::reference pqxx::tuple::operator[] ( size_type  i) const throw ()
pqxx::tuple::reference pqxx::tuple::operator[] ( int  i) const throw ()
pqxx::tuple::reference pqxx::tuple::operator[] ( const char  f[]) const
pqxx::tuple::reference pqxx::tuple::operator[] ( const std::string &  s) const
pqxx::tuple::const_reverse_iterator pqxx::tuple::rbegin ( ) const
pqxx::tuple::const_reverse_iterator pqxx::tuple::rend ( ) const
size_t pqxx::tuple::rownumber ( ) const throw ()
size_type pqxx::tuple::size ( ) const throw ()
pqxx::tuple pqxx::tuple::slice ( size_type  Begin,
size_type  End 
) const

Produce a slice of this tuple, containing the given range of columns.

The slice runs from the range's starting column to the range's end column, exclusive. It looks just like a normal result tuple, except slices can be empty.

Warning
Slicing is a relatively new feature, and not all software may be prepared to deal with empty slices. If there is any chance that your program might be creating empty slices and passing them to code that may not be designed with the possibility of empty tuples in mind, be sure to test for that case.

References m_Begin, and m_End.

void pqxx::tuple::swap ( tuple rhs) throw ()
pqxx::tuple::size_type pqxx::tuple::table_column ( size_type  ColNum) const

What column number in its table did this result column come from?

A meaningful answer can be given only if the column in question comes directly from a column in a table. If the column is computed in any other way, a logic_error will be thrown.

Parameters
ColNuma zero-based column number in this result set
Returns
a zero-based column number in originating table

Requires libpq from PostgreSQL 7.4 or better, as well as a server version of at least 7.4.

size_type pqxx::tuple::table_column ( int  ColNum) const

What column number in its table did this result column come from?

References table_column().

Referenced by table_column().

size_type pqxx::tuple::table_column ( const std::string &  ColName) const

What column number in its table did this result column come from?

References table_column().

Referenced by table_column().

Friends And Related Function Documentation

friend class field
friend

Member Data Documentation

size_type pqxx::tuple::m_Begin
protected

Referenced by slice().

size_type pqxx::tuple::m_End
protected

Referenced by slice().

const result* pqxx::tuple::m_Home
protected
size_t pqxx::tuple::m_Index
protected

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00107.js000066400000000000000000000071731224474465600207250ustar00rootroot00000000000000var a00107 = [ [ "const_iterator", "a00107.html#abb8219326beee6e2d04cdc186c948b28", null ], [ "const_reverse_iterator", "a00107.html#a00b39ba19194ab4ed39a66db5d706bdf", null ], [ "difference_type", "a00107.html#a8fff40c4046b2b183229a423b036c295", null ], [ "iterator", "a00107.html#aae56e5f3e7f68f16408ba7c876e364f3", null ], [ "pointer", "a00107.html#a2ba69a8ed5d72f6a2c8c4e44959c3754", null ], [ "reference", "a00107.html#a2caabd2c88c96db279a31477392f0dee", null ], [ "reverse_iterator", "a00107.html#a619a58bbca87bfbc98c98aa2f5095500", null ], [ "size_type", "a00107.html#ac641388403460c8bc2ba5d340693d4be", null ], [ "tuple", "a00107.html#a97a80dea1c26f652161f82f18931eb4a", null ], [ "~tuple", "a00107.html#aa3815a9bb105e74635472a15538784a3", null ], [ "at", "a00107.html#aa29b77ecf936a1ff5d28e27cb6282f77", null ], [ "at", "a00107.html#a6a24050891ea1955bd1f1353db56d1d6", null ], [ "at", "a00107.html#a039d07211fbc47ca5dbb8d1134a41ca6", null ], [ "at", "a00107.html#a2804eeb76741f665a976405678a56b2b", null ], [ "back", "a00107.html#a740b31ef6d306b4a6fe88b720f0b9edd", null ], [ "begin", "a00107.html#ad5234f6faf0360b0d6f5b44d970323f6", null ], [ "column_number", "a00107.html#aef33d07890dfee76b579e545276127d7", null ], [ "column_number", "a00107.html#a862f927c5fcf486ac801fa182f2b3b3b", null ], [ "column_table", "a00107.html#aa4bbc0682c7966082d952b68c4e2a088", null ], [ "column_table", "a00107.html#a5ce82cef5ce0c07188307c0e734a2cc8", null ], [ "column_table", "a00107.html#a3ba92ea4db8924603f8b7d9fe05a419c", null ], [ "column_type", "a00107.html#a8aae05132a22bc73c5310935ae1e6a39", null ], [ "column_type", "a00107.html#a161202f7f52589b5c00446e7c497ade0", null ], [ "column_type", "a00107.html#ac38d058ad7f5cc73c6a645136d7bba1e", null ], [ "column_type", "a00107.html#adf67f0634d187421841bbe7d78abc0f9", null ], [ "empty", "a00107.html#a5744c5e000bb73a068ad2515c1158472", null ], [ "end", "a00107.html#a015c73dac6acc99a6b28be2a5c0c58d7", null ], [ "front", "a00107.html#a1d6a03419766400fb89bd9c574e6c5b3", null ], [ "num", "a00107.html#a1cf7ff6980433ae25d4438b792039e71", null ], [ "operator!=", "a00107.html#ab3ea1af4e6c962a57ae9c280fd022b84", null ], [ "operator==", "a00107.html#a07445c00ef5336b58ae6ed0111ea7eb1", null ], [ "operator[]", "a00107.html#a32b661539c164b767b0b90179df91b80", null ], [ "operator[]", "a00107.html#ab788fa8e6231991a743a4bfdab6b79c1", null ], [ "operator[]", "a00107.html#ad7a7f22ebcf73da265c7572a8abbbc81", null ], [ "operator[]", "a00107.html#af16492e8b29383c548553f78e55f2ca6", null ], [ "rbegin", "a00107.html#a1b2e60c035ce44465903da29d2b9073b", null ], [ "rend", "a00107.html#a151caf9b33bc5f6e3a3210a0a9850be2", null ], [ "rownumber", "a00107.html#add3b3950f875cc68334a62e5c15dd34d", null ], [ "size", "a00107.html#ae68a37e2db5b44e1521d8c0156a3c4f9", null ], [ "slice", "a00107.html#afbe1a4b84afca1f448d169c169d936bf", null ], [ "swap", "a00107.html#a396da22c05b8841636602333fa49055d", null ], [ "table_column", "a00107.html#ae21cedae764c516074261dbc3f360671", null ], [ "table_column", "a00107.html#a83ced5b92cf759526acb1e3f61886c35", null ], [ "table_column", "a00107.html#a7ecb5e742835c2b2c45f19fc3e8c95f5", null ], [ "field", "a00107.html#acd53905ae10cba58b4337aefe648aec6", null ], [ "m_Begin", "a00107.html#a9e4e5bc2702da6058b8bf679a86e6253", null ], [ "m_End", "a00107.html#a702fb7ee202de0c4d303aa86c6700ec7", null ], [ "m_Home", "a00107.html#add93ece18a68e9f3cf4697861511f624", null ], [ "m_Index", "a00107.html#a45283ce03e2ed9642b0407124155980b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00107.png000066400000000000000000000017331224474465600210710ustar00rootroot00000000000000‰PNG  IHDRшNeþâPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2jIDATxíë–£ ‹9óþ¼ÞP.š¸³êtØÎ±’ˆÐRvƒ !„® t„ØÆló¨Qs«;îíFÇ Ñ¦pãK!ýÙ&žÞËõ‰¹À%\l4Mv:¦ÀÚc¹\6\ÃÕ9ª§¾ÓåªG—Fãà*n4* ëeŽ.ã¾uÔî Ûû¤ut°×.µ×}ÕÜøt#€cú3ømÜÀ6n`›ñUBðß]ÑÑ÷woJÝ B)õgä{€uÜÀ6n`7°ØÆlãF¶q#Û¸€mÜÀ6n`7°üŒc|‚ïc|¢$u„I’mÜH’ls§Q¤× ]¶^ÅÉ_²it8äb£ 0E¾×?ù]Bjò>Ë…$ë¹ Ÿt²^ËIê¶iZ%éFósœ‚*hçÈ‚”UmGÓ«¸ÒY[%é˜39ª§\Ä]þU½êb)ÒRö?4zÙ*IûÜc´UVdü4U×¥nK-ßlÔVÔ¾QSuÅdÞV]›ÖK²u´³3´å¶»Žêékî°¾n2:ÚëÒ}ʽ.¯ºª6Ë'²& 7’$Û¸‘$Ùf0Š1Æžx„/€®èÎèë«7¥îŒ¡Î”ú3è Ï€m libpqxx: pqxx::undefined_column Class Reference
pqxx::undefined_column Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::undefined_column:
pqxx::syntax_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 undefined_column (const std::string &err)
 undefined_column (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::syntax_error
 syntax_error (const std::string &err, int pos=-1)
 syntax_error (const std::string &err, const std::string &Q, int pos=-1)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Additional Inherited Members

- Public Attributes inherited from pqxx::syntax_error
const int error_position
 Approximate position in string where error occurred, or -1 if unknown.

Constructor & Destructor Documentation

pqxx::undefined_column::undefined_column ( const std::string &  err)
explicit
pqxx::undefined_column::undefined_column ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00108.js000066400000000000000000000002661224474465600207220ustar00rootroot00000000000000var a00108 = [ [ "undefined_column", "a00108.html#a2cef7f04b77370c1744fdefbd68cf254", null ], [ "undefined_column", "a00108.html#a21df53ad96763c63ad6bc691848b68b5", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00108.png000066400000000000000000000024521224474465600210710ustar00rootroot00000000000000‰PNG  IHDR’ø0ÊO€PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¹IDATxíír« —e&ïÿÈ×hŒh4'ilËíœ ‹ÛÃGÿRk­}AUí‰TRH%ÕˆŸW*cR=àW”TyP*–ñ£!¿š‚æëû†ësîs}L_\Ëã[S§6éQiqüØâC:jnb°ªnEÛÔÔ©KÚ‰Òö“9¥yn˜ênõ›ovlÕ%®tým•¦ºs”W&hn³T?ë]¥f³ìmïçÍ‹ëüöÒkQ:8RóPž¸Û±¸×½¸pOn YõˆWûŸ¥4náÇ;æ7•T¾¬¤ú»¤’jD*©F JµÖÚçpè‹þ”.—îœúSŒzsêP)O@L*D¤@D*D¤@D*D¤@D*D¤@D*D¤@D*Düi¥Zkí ªjO¤’jD*©Fœ§Tʽ4&Õ/qšÒZâg”Ê-C~/,“—ñí–ß5q}Yb¨ú”7”î3]¥´<¤™MESV y'JíLm VKµçø›JÃúì+M ª1_TZMÜ6[\Òûúú^zÜÞ»Jófÿ¾…;8qM¸®²sÅí, ª¯ðÞÂpë¨>'•T#þô¿]ÕSH%Õˆ>•j­µ+ÎáÐý)].Ý9õ§4õæÔ¡Rž8€˜TˆH%€ˆTˆH%€ˆTˆH%€ˆTˆH%€ˆTˆH%€ˆTˆøÓJµÖÚTÕžH%ÕˆTR8W©¨~Êÿ©T,ãTC~/´Ó/­­R™{ )k*TyEitÕâqjg»–FælU¡zÈKQš'½M¼x*M­;JÛ—xm?Wºb«týýŒR»Rm½(ÝŸç+5»eg{{離tpâæàæ‹õR=*mÞ?W¯ÿ§•§)­z>ÒnÛRù‘R³Kö·÷: ;áyØ/Ï÷R3ãQ”NÜÜ¿9ë·Ý=/¸C´»p/]ßÊ7+{½Y@€ˆž£Ð©‘J׋±”Rzâžv*÷æûIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00109.html000066400000000000000000000305171224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::undefined_function Class Reference
pqxx::undefined_function Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::undefined_function:
pqxx::syntax_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 undefined_function (const std::string &err)
 undefined_function (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::syntax_error
 syntax_error (const std::string &err, int pos=-1)
 syntax_error (const std::string &err, const std::string &Q, int pos=-1)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Additional Inherited Members

- Public Attributes inherited from pqxx::syntax_error
const int error_position
 Approximate position in string where error occurred, or -1 if unknown.

Constructor & Destructor Documentation

pqxx::undefined_function::undefined_function ( const std::string &  err)
explicit
pqxx::undefined_function::undefined_function ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00109.js000066400000000000000000000002721224474465600207200ustar00rootroot00000000000000var a00109 = [ [ "undefined_function", "a00109.html#ad7beff0f4d7b7353da9e675e899bb350", null ], [ "undefined_function", "a00109.html#af634ee86c8bbeffb1db85a10c611e99b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00109.png000066400000000000000000000024731224474465600210750ustar00rootroot00000000000000‰PNG  IHDR—øÖã„ÄPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2ÊIDATxíír« —e&ïÿÈ×h4h49iMËž ‹ÛÃGÿRk­BUíŽôR“^ªq~Å«ŒIõßòR}ÆžW±Œ_ùRhF{Ñ|}Ÿr}Î}®é‹ky|kêÔUÚõš†G°øŽš›h¬ª›GÑ65uj›öãµýnÎ#ÍsÃTw«ß|³£¬¶é^×ßÖkª;Ñëq¡^47!ºW?„íK^ÍÚÛ÷Ï›ïÂóãÅþz#^nï›çñv^–ºwÖñÉMó¢Yõˆxÿ½Æ½½wý²—ê ¾ç¥úÛ¤—jœôR3xÕZkœÅ C:õº\úëÔkÐêR¬W¯<ï^qÒ NzÄI/€8é'½â¤@œôˆ“^qÒ NzÄù^µÖÚ!TÕîH/Õ8é¥çT¯R–Ò˜T¿È™^k“ô*·ˆ ùR¸”ñí–/!›¸¾Ü£©ú‚÷¼–é®fZÒ̦¢)«x3^ítmÈV+·'úë^Ãrí{M ª¾îµš½m¶xO_‰Õ·ö×ã¾ßõšOÁ‡×ñà<6»Ï·ãqoPñö:žr;©>'½Tãü‰ÿÛª'‘^ªq:öªµÖþ8‹ @‡têu¹ô)Ö©× Õ¥X¯^yÞ!½â¤@œôˆ“^qÒ NzÄI/€8é'½â¤@œôˆó'¼j­µC¨ªÝ‘^ªqÒK5ÎÙ^Eõþk¯bçò¥Ð:Ü[[¯2÷SÖT¨>#æ5Ž< mñ8µS^K#s¶ªP}F0^óÌ·Ù×£O¥©uÇkûZê3¼n!Ùz]?èÕ.\Ûc/^ËóC^ÍÚÙ÷/ö×'ãupç0=?K¶9ƪG„×1t?u{}ÂkÜï¡»@õˆÿ:^ª?Lz©ÆI/Õ8ƒW­µöÀY\:¤S¯Ë¥O±N½­.ÅzõÊóðé'½â¤@œôˆ“^qÒ NzÄI/€8é'½â¤@œ?áUk­BUíŽôR“^ªqÎõ*ª§ðzË8Ï/…vîñõÆÔ¥Ü³µåX7öš³¦Bõg^Óøã(ӭǦb¥53g« ÕžÆk;ój ©´éÔ|ÙLÙV‹kTùº×²Ž«å—èÁk®;ßkµNëk¯£u\žß÷jö×ξo•¼6'ääu<8Ë‚=a>›“{?~K¶í¡®Ò‹u ÜKçÝY§z=Už~ªïò]¯ÏDë¯üßV=‡ôRÓ±W­µöÀY\:¤S¯Ë¥O±N½­.ÅzõÊóðé'½â¤@œôˆ“^qÒ NzÄI/€8é'½â¤@œ?áUJ)BèŽôˆ“^q¾îÕ|wtzÖ]ª>ý¾×áouš´x …±týÛçBóÝõ9þm÷^ÓÝ7gm[Ûe¾#w†¸}» ´4­¼æÁoؤ[Û½×}¦M[ÓeýgíwÛ6mâµí±7ðÛ¯Õ®ÚJžã5þÃxZy®×*ÀÏãõdÂs¼š³¿ïס٠Ôö±îÝn/âupçþ÷Òæì5‚£»àˆîãÐé'½â\oÑRJéŽMËzØ­dIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00110.html000066400000000000000000000304501224474465600212410ustar00rootroot00000000000000 libpqxx: pqxx::undefined_table Class Reference
pqxx::undefined_table Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::undefined_table:
pqxx::syntax_error pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 undefined_table (const std::string &err)
 undefined_table (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::syntax_error
 syntax_error (const std::string &err, int pos=-1)
 syntax_error (const std::string &err, const std::string &Q, int pos=-1)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Additional Inherited Members

- Public Attributes inherited from pqxx::syntax_error
const int error_position
 Approximate position in string where error occurred, or -1 if unknown.

Constructor & Destructor Documentation

pqxx::undefined_table::undefined_table ( const std::string &  err)
explicit
pqxx::undefined_table::undefined_table ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00110.js000066400000000000000000000002641224474465600207110ustar00rootroot00000000000000var a00110 = [ [ "undefined_table", "a00110.html#a639bf511f48a2eb3715f857fd91f1bce", null ], [ "undefined_table", "a00110.html#af1f3774f9f8b5cf656a9e6f442e2aea8", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00110.png000066400000000000000000000023041224474465600210560ustar00rootroot00000000000000‰PNG  IHDR…øõ¸ÕPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2SIDATxí뎬 ‹Ä÷ä£( íe.z²é… ´P6àþ%Æ›C”¤Æ¸…[H’å—!]’dù±…$PX…7–k¥xöE÷ô;¿ìtÏ1Óm~bª§_EÛÅn1ýY‹¹ík‹}Ê_t¯¿5ïRò†E±ðG»óº{ÓË·ûâ4'‡ ?}óŒ,»zm;_‘‹“ý¢[’Îxß"íÀr›JRÍ,$éŸXHR#ÜÂ-$É2ZÄckn24§ ‹aèA£ ‹Q¢>,üŒ¸À·p ‹[¸€Å-ÜÀân`q ·°ü‹clQ’ãn!I–',BXké’¤ÏxÀ¢ž÷¿Y„åmÇr­ló…ôk)×tÌL?¶LIÒ1oY¬ƒORØ]ÓPÔ%éœ÷rQ^¦£Zƒ#­[Œ‰?¶˜;$é‚-ª¹Ênm×yøf_ìwç¡EÞ«®ÈÉ)’2ùå†eo’tÉ»+rçk I׸…ÿO•$‹[thcŒ­¸ÉМ.,†¡.,F‰4ú°ð3â{ÜÂ-,ná·p ‹[¸€Å-ÜÀòw,bŒ±9DIjŒ[¸…$Y²’ô=ý[…4úX®•rÆ­·´9j¼ÍEÑ I\Z¤qæt~•LµD.ªI:à:yže®z¬¹6÷XØW‹vÃby]k1ýý7‹r ʈ£\¬÷G,Š•?Ø/öÅs¹89#9×gd-ÌÑ’$ëyë{pókñ EÚ•W§Q’Îè?’ôÜÂ-$É2ZÄckn24§ ‹aèA£ ‹Q¢>,üŒ¸À·p ‹[¸€Å-ÜÀân`q ·°ü‹clQ’ãn!I–G,‚$Ý¡W‹ F˵RΔ~.Ì!a+j§Ô–¢rQ4¼°˜GKÏ(èôZ"LC%‘ÉEÕð*vžê±¹f‚Š'‹ ФIA5’¶ëc‹uEª…IÉÞYä¶»UÆëˆÚâlEÖû§ž8Ø¥àÎÂìã[+rrFÖÔï^0Ÿsš¶#±6ârEÞøÜþFÕIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00111.html000066400000000000000000000167421224474465600212520ustar00rootroot00000000000000 libpqxx: pqxx::internal::unique< GUEST > Class Template Reference
pqxx::internal::unique< GUEST > Class Template Reference

Ensure proper opening/closing of GUEST objects related to a "host" object. More...

#include <util.hxx>

Public Member Functions

 unique ()
GUEST * get () const throw ()
void Register (GUEST *G)
void Unregister (GUEST *G)

Detailed Description

template<typename GUEST>
class pqxx::internal::unique< GUEST >

Ensure proper opening/closing of GUEST objects related to a "host" object.

Only a single GUEST may exist for a single host at any given time. GUEST must be derived from namedclass.

Constructor & Destructor Documentation

template<typename GUEST>
pqxx::internal::unique< GUEST >::unique ( )

Member Function Documentation

template<typename GUEST>
GUEST* pqxx::internal::unique< GUEST >::get ( ) const throw ()
template<typename GUEST>
void pqxx::internal::unique< GUEST >::Register ( GUEST *  G)
template<typename GUEST>
void pqxx::internal::unique< GUEST >::Unregister ( GUEST *  G)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00111.js000066400000000000000000000004671224474465600207170ustar00rootroot00000000000000var a00111 = [ [ "unique", "a00111.html#a7dce0951d8eff0a8d156ff1b73e2c878", null ], [ "get", "a00111.html#a9a6ace7374f5ed24d77d6e760e186d8b", null ], [ "Register", "a00111.html#a20d41d4090254a82c02f1d7e30af9d04", null ], [ "Unregister", "a00111.html#afd6cf65f79200733565eb68f9085611a", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00112.html000066400000000000000000000266421224474465600212530ustar00rootroot00000000000000 libpqxx: pqxx::unique_violation Class Reference
pqxx::unique_violation Class Reference

#include <except.hxx>

Inheritance diagram for pqxx::unique_violation:
pqxx::integrity_constraint_violation pqxx::sql_error pqxx::failure pqxx::pqxx_exception

Public Member Functions

 unique_violation (const std::string &err)
 unique_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::integrity_constraint_violation
 integrity_constraint_violation (const std::string &err)
 integrity_constraint_violation (const std::string &err, const std::string &Q)
- Public Member Functions inherited from pqxx::sql_error
 sql_error ()
 sql_error (const std::string &)
 sql_error (const std::string &, const std::string &Q)
virtual ~sql_error () throw ()
const std::string &PQXX_PURE query () const throw ()
 The query whose execution triggered the exception.
- Public Member Functions inherited from pqxx::failure
 failure (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Constructor & Destructor Documentation

pqxx::unique_violation::unique_violation ( const std::string &  err)
explicit
pqxx::unique_violation::unique_violation ( const std::string &  err,
const std::string &  Q 
)

The documentation for this class was generated from the following file:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00112.js000066400000000000000000000002661224474465600207150ustar00rootroot00000000000000var a00112 = [ [ "unique_violation", "a00112.html#aadb2cddaf2f72188f118784495e60720", null ], [ "unique_violation", "a00112.html#a704dbc98b56d620ec131498b77578261", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00112.png000066400000000000000000000027351224474465600210700ustar00rootroot00000000000000‰PNG  IHDRÌø—ù{PLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2lIDATxíí²«*›E•ïÿÈ×/‰{wR¶A@ ÿcŒ­@”¤6pI²ˆËH’EŒÉ„ñ¤O°'#IrM&(ŒÓõç¥-áMópýðŸú ÓCy¼Êê$é$e¦µŒÓ*hw5gÏ}Sý)?²:I:ÇÕÈ”“¥ó™æÔ0ÕÍõÅ=OI:dz2ï”™êþZf¿Þ4gÁX«wzN&{)j àuój™þÞ¼3¿ŽÌAºJ‹¸™ÍæÄ±Ôý|›½ø"¼i–¤#î}`ž”_ò×ߌGF’Þð2’d—‘$‹¸Œ$Y¤—‰1ÆFx€ Z’麆lZ’é]Ú±iJƳ€M\À".`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆË\#Æ[(Imà2’d—‘$‹<$ÂRIú>ÏÈl—o]&ÌϾ?/…uÙa¼šÏKp&†‹5n’ô9ß’YÖ8èHaw$ŠŠ¬,I÷øZdò5æÁÙl¬šÝ¿)Ó了ÌÔ I7ù…ÌfÉy³‚ÖãËQùÑ;³OU™”,n³ƒl–…hÐLsžX$é6_Üf¿þŠHÒk\F’¶4%#IËH’E\F’,ÒËÄc#<@Ð -Ét]C6-Éô.íØ4%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe®cŒ­@”¤6pI²ˆËH’E” ’ôS\f³Â0.²?/…|ákk.R¯þo:e’ô·eÆåLëQÐñ‘¯s(¤Ó¦B’>ã~dÒrç%o—4•¦ÖŠLyqs'þXf~ø¥Ìð³.“﫼G-2Ë¿%™ì­¨$€7Èd³×Ùl9IP’®ómvê;òû¯ÌÃ2ã‹3ýJÒI²ˆËH’E\F’,ÒËÄc#<@Ð -Ét]C6-Éô.íØ4%ãÙ À&.`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe®cŒ­@”¤6pI²ˆËH’EÎÊ„J©h¯7HÒž¢ï‹ÑkMG“]ÌášoÈœäÝóÌd‚ÂØ§?/…ì¾ña Ua9M}§[ÇÆtµNšºÍ½–q§AÆAç¶|ôuÅs–NëìyõrÏ*3Ý8öUPíÈ/²º}Ce9E¯ì¶Ýè»»JÛq‹È”=Ò9ߦå˜9U™ýÈy]6ô¦ùHfÓ½XÅÇ2ÃO ÚP>ÚºÌÌÔ¼Œ´“™¶a¹ê¬ûY™ýÒv‘‘¶,·¾–yÔ×2ÕmV“ÉÞ£pôμÙMºÝ¯dæÐ}$s”ͪ/\‘ͶbGÙ,ßfiÝSf*÷÷V¦Èfã‹êÊ6ûÂãʽ’ôUîÈì"‘½ÔÙC’.pãî[‘ÙÍù§qÉd$é_Çe$É".#IéebŒ± h…–dº®!›–dz—vlš’ñl`—°ˆËXÄe,â2q‹¸ €E\À".`—°ˆËXÄe,â2×!„V ´ËXÄe,ò3™Sî6¥O—d%25-€K\‘éûއ|ž ÙìÃÿøXÇê‘aôõ"›ié›ê—RúZ¤êü.€W\’™¦g$P9涬n‘I+.eJÛÁNp-2å<é\kN¥Ó2ë ³­¶(3üÊy‹UOûìd6ÓžŒÌnÞ÷Ûìw2Ù«POi‹—/WeYéÖ?“9ÊfË6Ùí›< lóÒò¶Ùlº¨8ÅÕmvõcðèWìa™1 \ùtœæÓ¸ €E\À"ÃG*„Úà?ò ¢ÓÎ-©‚IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00113.html000066400000000000000000000154401224474465600212460ustar00rootroot00000000000000 libpqxx: pqxx::usage_error Class Reference

Error in usage of libpqxx library, similar to std::logic_error. More...

#include <except.hxx>

Inheritance diagram for pqxx::usage_error:
pqxx::pqxx_exception

Public Member Functions

 usage_error (const std::string &)
- Public Member Functions inherited from pqxx::pqxx_exception
virtual ~pqxx_exception ()=0 throw ()
 Support run-time polymorphism, and keep this class abstract.
virtual const PQXX_CONST
std::exception & 
base () const =0 throw ()
 Return std::exception base-class object.

Detailed Description

Error in usage of libpqxx library, similar to std::logic_error.

Constructor & Destructor Documentation

pqxx::usage_error::usage_error ( const std::string &  whatarg)
explicit

The documentation for this class was generated from the following files:
libpqxx-4.0.1+dfsg/doc/html/Reference/a00113.js000066400000000000000000000001361224474465600207120ustar00rootroot00000000000000var a00113 = [ [ "usage_error", "a00113.html#ac13c13a650ab45684355682a98655f5b", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00113.png000066400000000000000000000010221224474465600210550ustar00rootroot00000000000000‰PNG  IHDRP æèPLTEÿÿÿèìõuÂÀÀÀ‰ÜtRNSÿÿÿÿÿÿÿÕÊT2¡IDATxíá’ƒ „7ËLßÿ‘OQ ˆÕ^ss“+„úBû!„`*’4”8Áw $6’¬õU’<(%Æ,ÏAPå6ýéÀ%}$o½@ÕüÁ þ ˆˆ¥~Óæ\óŠíUIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/a00114_source.html000066400000000000000000000356001224474465600226270ustar00rootroot00000000000000 libpqxx: basic_connection.hxx Source File
basic_connection.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/basic_connection.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::basic_connection class template
8  * Instantiations of basic_connection bring connections and policies together
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/basic_connection instead.
10  *
11  * Copyright (c) 2006-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_BASIC_CONNECTION
20 #define PQXX_H_BASIC_CONNECTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <memory>
26 #include <string>
27 
28 #include "pqxx/connection_base"
29 
30 #ifdef PQXX_QUIET_DESTRUCTORS
31 #include "pqxx/errorhandler"
32 #endif
33 
34 
35 namespace pqxx
36 {
37 
38 // TODO: Also mix in thread synchronization policy here!
40 
54 template<typename CONNECTPOLICY> class basic_connection :
55  public connection_base
56 {
57 public:
59  connection_base(m_policy),
60  m_options(PGSTD::string()),
61  m_policy(m_options)
62  { init(); }
63 
64  explicit basic_connection(const PGSTD::string &opt) :
65  connection_base(m_policy), m_options(opt), m_policy(m_options) {init();}
66 
67  explicit basic_connection(const char opt[]) :
68  connection_base(m_policy),
69  m_options(opt?opt:PGSTD::string()),
70  m_policy(m_options)
71  { init(); }
72 
73  ~basic_connection() throw ()
74  {
75 #ifdef PQXX_QUIET_DESTRUCTORS
76  quiet_errorhandler quiet(*this);
77 #endif
78  close();
79  }
80 
81  const PGSTD::string &options() const throw () //[t1]
82  {return m_policy.options();}
83 
84 private:
86  PGSTD::string m_options;
88  CONNECTPOLICY m_policy;
89 };
90 
91 } // namespace
92 
93 #include "pqxx/compiler-internal-post.hxx"
94 
95 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00116_source.html000066400000000000000000000635431224474465600226400ustar00rootroot00000000000000 libpqxx: binarystring.hxx Source File
binarystring.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/binarystring.hxx
5  *
6  * DESCRIPTION
7  * Representation for raw, binary data.
8  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/binarystring instead.
9  *
10  * Copyright (c) 2003-2013, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_BINARYSTRING
19 #define PQXX_H_BINARYSTRING
20 
21 #include "pqxx/compiler-public.hxx"
22 #include "pqxx/compiler-internal-pre.hxx"
23 
24 #include <string>
25 
26 #include "pqxx/result"
27 
28 
29 namespace pqxx
30 {
31 
33 
59 class PQXX_LIBEXPORT binarystring :
61  unsigned char,
62  pqxx::internal::freemallocmem_templated<unsigned char> >
63 {
64 public:
66  typedef PGSTD::char_traits<char_type>::char_type value_type;
67  typedef size_t size_type;
68  typedef long difference_type;
69  typedef const value_type &const_reference;
70  typedef const value_type *const_pointer;
72 
73 #ifdef PQXX_HAVE_REVERSE_ITERATOR
74  typedef PGSTD::reverse_iterator<const_iterator> const_reverse_iterator;
75 #endif
76 
77 private:
78  typedef internal::PQAlloc<
79  value_type,
80  pqxx::internal::freemallocmem_templated<unsigned char> >
81  super;
82 
83 public:
85 
88  explicit binarystring(const field &); //[t62]
89 
91  explicit binarystring(const PGSTD::string &);
92 
94  binarystring(const void *, size_t);
95 
97  size_type size() const throw () { return m_size; } //[t62]
99  size_type length() const throw () { return size(); } //[t62]
100  bool empty() const throw () { return size()==0; } //[t62]
101 
102  const_iterator begin() const throw () { return data(); } //[t62]
103  const_iterator end() const throw () { return data()+m_size; } //[t62]
104 
105  const_reference front() const throw () { return *begin(); } //[t62]
106  const_reference back() const throw () { return *(data()+m_size-1); } //[t62]
107 
108 #ifdef PQXX_HAVE_REVERSE_ITERATOR
109  const_reverse_iterator rbegin() const //[t62]
110  { return const_reverse_iterator(end()); }
111  const_reverse_iterator rend() const //[t62]
112  { return const_reverse_iterator(begin()); }
113 #endif
114 
116  const value_type *data() const throw () {return super::get();} //[t62]
117 
118  const_reference operator[](size_type i) const throw () //[t62]
119  { return data()[i]; }
120 
121  bool PQXX_PURE operator==(const binarystring &) const throw (); //[t62]
122  bool operator!=(const binarystring &rhs) const throw () //[t62]
123  { return !operator==(rhs); }
124 
126  const_reference at(size_type) const; //[t62]
127 
129  void swap(binarystring &); //[t62]
130 
132 
135  const char *get() const throw () //[t62]
136  {
137  return reinterpret_cast<const char *>(super::get());
138  }
139 
141 
147  PGSTD::string str() const; //[t62]
148 
149 private:
150  size_type m_size;
151 };
152 
153 
160 
161 
165 PGSTD::string PQXX_LIBEXPORT escape_binary(const PGSTD::string &bin);
167 
171 PGSTD::string PQXX_LIBEXPORT escape_binary(const char bin[]);
173 
177 PGSTD::string PQXX_LIBEXPORT escape_binary(const char bin[], size_t len);
179 
183 PGSTD::string PQXX_LIBEXPORT escape_binary(const unsigned char bin[]);
185 
189 PGSTD::string PQXX_LIBEXPORT escape_binary(const unsigned char bin[], size_t len);
190 
196 }
197 
198 #include "pqxx/compiler-internal-post.hxx"
199 
200 #endif
201 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00117_source.html000066400000000000000000000156261224474465600226400ustar00rootroot00000000000000 libpqxx: compiler-internal-post.hxx Source File
compiler-internal-post.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/compiler-internal-post.hxx
5  *
6  * DESCRIPTION
7  * Compiler deficiency workarounds for compiling libpqxx headers.
8  * To be called at the end of each libpqxx header, in order to
9  * restore the client program's settings.
10  *
11  * Copyright (c) 2006, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 // NO GUARDS HERE! This code should be executed every time!
20 
21 #ifdef _WIN32
22 
23 #ifdef _MSC_VER
24 #pragma warning (pop) // Restore client program's warning state
25 #endif
26 
27 #endif
28 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00118_source.html000066400000000000000000000242701224474465600226340ustar00rootroot00000000000000 libpqxx: compiler-internal-pre.hxx Source File
compiler-internal-pre.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/compiler-internal-pre.hxx
5  *
6  * DESCRIPTION
7  * Compiler deficiency workarounds for compiling libpqxx headers.
8  * To be called at the start of each libpqxx header, in order to
9  * push the client program's settings and apply libpqxx's settings.
10  * Must be balanced by an include of -header-post.hxx at the end
11  * of the header.
12  *
13  * Copyright (c) 2006,2007, Jeroen T. Vermeulen <jtv@xs4all.nl>
14  *
15  * See COPYING for copyright license. If you did not receive a file called
16  * COPYING with this source code, please notify the distributor of this mistake,
17  * or contact the author.
18  *
19  *-------------------------------------------------------------------------
20  */
21 // NO GUARDS HERE! This code should be executed every time!
22 
23 #ifdef _WIN32
24 
25 #ifdef _MSC_VER
26 
27 // Save client program warning state, and set warning level 4.
28 // Setting the warning level explicitly ensures that libpqxx
29 // headers will work with this warning level as well.
30 #pragma warning (push,4)
31 
32 #pragma warning (disable: 4251)
33 #pragma warning (disable: 4258) // Complains that for-scope usage is correct
34 #pragma warning (disable: 4273)
35 #pragma warning (disable: 4275)
36 #pragma warning (disable: 4290)
37 #pragma warning (disable: 4355)
38 #pragma warning (disable: 4511) // Copy constructor could not be generated
39 #pragma warning (disable: 4512) // Assignment operator could not be generated
40 #pragma warning (disable: 4786)
41 #pragma warning (disable: 4800) // Performance warning for boolean conversions
42 #pragma warning (disable: 4996) // Complaint that strncpy() "may" be unsafe
43 
44 #endif // _MSC_VER
45 
46 #endif // _WIN32
47 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00119_source.html000066400000000000000000000354501224474465600226370ustar00rootroot00000000000000 libpqxx: compiler-internal.hxx Source File
compiler-internal.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/compiler-internal.hxx
5  *
6  * DESCRIPTION
7  * Compiler deficiency workarounds for compiling libpqxx itself.
8  * DO NOT INCLUDE THIS FILE when building client programs.
9  *
10  * Copyright (c) 2002-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_COMPILER_INTERNAL
19 #define PQXX_H_COMPILER_INTERNAL
20 
21 
22 // Workarounds & definitions needed to compile libpqxx into a library
23 #include "pqxx/config-internal-compiler.h"
24 
25 // Library-private configuration related to libpq version
26 #include "pqxx/config-internal-libpq.h"
27 
28 #ifdef _WIN32
29 
30 #ifdef PQXX_SHARED
31 #undef PQXX_LIBEXPORT
32 #define PQXX_LIBEXPORT __declspec(dllexport)
33 // TODO: Does Windows have a way to "unexport" a symbol in an exported class?
34 #define PQXX_PRIVATE __declspec()
35 #endif // PQXX_SHARED
36 
37 #ifdef _MSC_VER
38 #pragma warning (disable: 4251 4275 4273)
39 #pragma warning (disable: 4258) // Complains that for-scope usage is correct.
40 #pragma warning (disable: 4290)
41 #pragma warning (disable: 4351)
42 #pragma warning (disable: 4355)
43 #pragma warning (disable: 4786)
44 #pragma warning (disable: 4800) // Performance warning for boolean conversions.
45 #pragma warning (disable: 4996) // Complains that strncpy() "may" be unsafe.
46 #endif
47 
48 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32
49 
50 #define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
51 #define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
52 
53 #endif // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
54 
55 
56 #include "pqxx/compiler-public.hxx"
57 
58 #include <cstddef>
59 
60 #ifdef PQXX_HAVE_LIMITS
61 #include <limits>
62 #else // PQXX_HAVE_LIMITS
63 #include <climits>
64 namespace PGSTD
65 {
67 template<typename T> struct numeric_limits
68 {
69  static T max() throw ();
70  static T min() throw ();
71 };
72 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
73 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
74 }
75 #endif // PQXX_HAVE_LIMITS
76 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00120_source.html000066400000000000000000001225721224474465600226310ustar00rootroot00000000000000 libpqxx: compiler-public.hxx Source File
compiler-public.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/compiler-public.hxx
5  *
6  * DESCRIPTION
7  * Compiler deficiency workarounds for libpqxx clients
8  *
9  * Copyright (c) 2002-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
10  *
11  * See COPYING for copyright license. If you did not receive a file called
12  * COPYING with this source code, please notify the distributor of this mistake,
13  * or contact the author.
14  *
15  *-------------------------------------------------------------------------
16  */
17 #ifndef PQXX_H_COMPILER_PUBLIC
18 #define PQXX_H_COMPILER_PUBLIC
19 
20 #ifdef PQXX_HAVE_BOOST_SMART_PTR
21 #include <boost/smart_ptr.hpp>
22 #endif
23 
24 #ifdef PQXX_HAVE_MOVE
25 #include <utility>
26 #define PQXX_MOVE(value) (PGSTD::move(value))
27 #else
28 #define PQXX_MOVE(value) (value)
29 #endif
30 
31 #ifdef _MSC_VER
32 
33 /* Work around a particularly pernicious and deliberate bug in Visual C++:
34  * min() and max() are defined as macros, which can have some very nasty
35  * consequences. This compiler bug can be switched off by defining NOMINMAX.
36  *
37  * We don't like making choices for the user and defining environmental macros
38  * of our own accord, but in this case it's the only way to compile without
39  * incurring a significant risk of bugs--and there doesn't appear to be any
40  * downside. One wonders why this compiler wart is being maintained at all,
41  * since the introduction of inline functions back in the 20th century.
42  */
43 #if defined(min) || defined(max)
44 #error "Oops: min() and/or max() are defined as preprocessor macros.\
45  Define NOMINMAX macro before including any system headers!"
46 #endif
47 
48 #ifndef NOMINMAX
49 #define NOMINMAX
50 #endif
51 
52 // Suppress vtables on abstract classes.
53 #define PQXX_NOVTABLE __declspec(novtable)
54 
55 #endif // _MSC_VER
56 
57 
58 // Workarounds & definitions that need to be included even in library's headers
59 #include "pqxx/config-public-compiler.h"
60 
61 
62 #ifdef PQXX_BROKEN_ITERATOR
63 #include <cstddef>
64 #include <cstdlib>
66 
74 namespace PGSTD
75 {
77 template<typename Cat,
78  typename T,
79  typename Dist,
80  typename Ptr=T*,
81  typename Ref=T&> struct iterator
82 {
83  typedef Cat iterator_category;
84  typedef T value_type;
85  typedef Dist difference_type;
86  typedef Ptr pointer;
87  typedef Ref reference;
88 };
89 }
90 #else
91 #include <iterator>
92 #endif // PQXX_BROKEN_ITERATOR
93 
94 #ifndef PQXX_HAVE_CHAR_TRAITS
95 #include <cstddef>
96 namespace PGSTD
97 {
99 template<typename CHAR> struct char_traits {};
101 template<> struct char_traits<char>
102 {
103  typedef int int_type;
104  typedef size_t pos_type;
105  typedef long off_type;
106  typedef char char_type;
107 
108  static int_type eof() { return -1; }
109 };
111 template<> struct char_traits<unsigned char>
112 {
113  typedef int int_type;
114  typedef size_t pos_type;
115  typedef long off_type;
116  typedef unsigned char char_type;
117 
118  static int_type eof() { return -1; }
119 };
120 }
121 #endif
122 
123 // Workarounds for SUN Workshop 6
124 #if defined(__SUNPRO_CC)
125 #if __SUNPRO_CC_COMPAT < 5
126 #error "This compiler version is not capable of building libpqxx."
127 #endif // __SUNPRO_CC_COMPAT < 5
128 #define PQXX_PRIVATE __hidden
129 #endif // __SUNPRO_CC
130 
131 
132 // Workarounds for Compaq C++ for Alpha
133 #if defined(__DECCXX_VER)
134 #define __USE_STD_IOSTREAM
135 #endif // __DECCXX_VER
136 
137 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_CONST)
138 #define PQXX_CONST __attribute__ ((const))
139 #else
140 #define PQXX_CONST
141 #endif
142 
143 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_DEPRECATED)
144 #define PQXX_DEPRECATED __attribute__ ((deprecated))
145 #else
146 #define PQXX_DEPRECATED
147 #endif
148 
149 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_NORETURN)
150 #define PQXX_NORETURN __attribute__ ((noreturn))
151 #else
152 #define PQXX_NORETURN
153 #endif
154 
155 #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_PURE)
156 #define PQXX_PURE __attribute__ ((pure))
157 #else
158 #define PQXX_PURE
159 #endif
160 
161 
162 // Workarounds for Windows
163 #ifdef _WIN32
164 
165 
166 /* For now, export DLL symbols if _DLL is defined. This is done automatically
167  * by the compiler when linking to the dynamic version of the runtime library,
168  * according to "gzh"
169  */
170 // TODO: Define custom macro to govern how libpqxx will be linked to client
171 #if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED)
172 #define PQXX_LIBEXPORT __declspec(dllimport)
173 #endif // !PQXX_LIBEXPORT && PQXX_SHARED
174 
175 
176 // Workarounds for Microsoft Visual C++
177 #ifdef _MSC_VER
178 
179 #if _MSC_VER < 1300
180 #error If you're using Visual C++, you'll need at least version 7 (.NET)
181 #elif _MSC_VER < 1310
182 // Workarounds for pre-2003 Visual C++.NET
183 #undef PQXX_HAVE_REVERSE_ITERATOR
184 #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
185 #define PQXX_TYPENAME
186 #endif // _MSC_VER < 1310
187 
188 // Automatically link with the appropriate libpq (static or dynamic, debug or
189 // release). The default is to use the release DLL. Define PQXX_PQ_STATIC to
190 // link to a static version of libpq, and _DEBUG to link to a debug version.
191 // The two may be combined.
192 #if defined(PQXX_AUTOLINK)
193 #if defined(PQXX_PQ_STATIC)
194 #ifdef _DEBUG
195 #pragma comment(lib, "libpqd")
196 #else
197 #pragma comment(lib, "libpq")
198 #endif
199 #else
200 #ifdef _DEBUG
201 #pragma comment(lib, "libpqddll")
202 #else
203 #pragma comment(lib, "libpqdll")
204 #endif
205 #endif
206 #endif
207 
208 // If we're not compiling libpqxx itself, automatically link with the correct
209 // libpqxx library. To link with the libpqxx DLL, define PQXX_SHARED; the
210 // default is to link with the static library. This is also the recommended
211 // practice.
212 // Note that the preprocessor macro PQXX_INTERNAL is used to detect whether we
213 // are compiling the libpqxx library itself. When you compile the library
214 // yourself using your own project file, make sure to include this define.
215 #if defined(PQXX_AUTOLINK) && !defined(PQXX_INTERNAL)
216  #ifdef PQXX_SHARED
217  #ifdef _DEBUG
218  #pragma comment(lib, "libpqxxD")
219  #else
220  #pragma comment(lib, "libpqxx")
221  #endif
222  #else // !PQXX_SHARED
223  #ifdef _DEBUG
224  #pragma comment(lib, "libpqxx_staticD")
225  #else
226  #pragma comment(lib, "libpqxx_static")
227  #endif
228  #endif
229 #endif
230 
232 
244 #define PQXX_QUIET_DESTRUCTORS
245 
246 #endif // _MSC_VER
247 #endif // _WIN32
248 
249 #ifndef PQXX_LIBEXPORT
250 #define PQXX_LIBEXPORT
251 #endif
252 
253 #ifndef PQXX_PRIVATE
254 #define PQXX_PRIVATE
255 #endif
256 
257 // Some compilers (well, VC) stumble over some required cases of "typename"
258 #ifndef PQXX_TYPENAME
259 #define PQXX_TYPENAME typename
260 #endif
261 
262 #ifndef PQXX_NOVTABLE
263 #define PQXX_NOVTABLE
264 #endif
265 
266 #endif
267 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00121_source.html000066400000000000000000000106401224474465600226220ustar00rootroot00000000000000 libpqxx: config-internal-autotools.h Source File
config-internal-autotools.h
1 /* Automatically generated from config.h: internal/autotools config. */
2 #define PACKAGE "libpqxx"
3 #define PACKAGE_BUGREPORT "Jeroen T. Vermeulen <jtv@xs4all.nl>"
4 #define PACKAGE_NAME "libpqxx"
5 #define PACKAGE_STRING "libpqxx 4.0.1"
6 #define PACKAGE_TARNAME "libpqxx"
7 #define PACKAGE_VERSION "4.0.1"
8 #define VERSION "4.0.1"
libpqxx-4.0.1+dfsg/doc/html/Reference/a00122_source.html000066400000000000000000000140561224474465600226300ustar00rootroot00000000000000 libpqxx: config-internal-compiler.h Source File
config-internal-compiler.h
1 /* Automatically generated from config.h: internal/compiler config. */
2 #define HAVE_SYS_TYPES_H 1
3 #define HAVE_UNISTD_H 1
4 #define PQXX_HAVE_COUNT_IF 1
5 #define PQXX_HAVE_C_NAN 1
6 #define PQXX_HAVE_DISTANCE 1
7 #define PQXX_HAVE_GCC_VISIBILITY 1
8 #define PQXX_HAVE_IMBUE 1
9 #define PQXX_HAVE_LOCALE 1
10 #define PQXX_HAVE_NAN 1
11 #define PQXX_HAVE_POLL 1
12 #define PQXX_HAVE_QUIET_NAN 1
13 #define PQXX_HAVE_SLEEP 1
14 #define PQXX_HAVE_STRERROR_R 1
15 #define PQXX_HAVE_STRERROR_R_GNU 1
16 #define PQXX_HAVE_STRING_CLEAR 1
17 #define PQXX_HAVE_STRNLEN 1
18 #define PQXX_HAVE_SYS_SELECT_H 1
libpqxx-4.0.1+dfsg/doc/html/Reference/a00123_source.html000066400000000000000000000112551224474465600226270ustar00rootroot00000000000000 libpqxx: config-internal-libpq.h Source File
config-internal-libpq.h
1 /* Automatically generated from config.h: internal/libpq config. */
2 #define PQXX_HAVE_LO_TELL 1
3 #define PQXX_HAVE_PQCANCEL 1
4 #define PQXX_HAVE_PQCLIENTENCODING 1
5 #define PQXX_HAVE_PQDESCRIBEPORTAL 1
6 #define PQXX_HAVE_PQENCRYPTPASSWORD 1
7 #define PQXX_HAVE_PQESCAPEIDENTIFIER 1
8 #define PQXX_HAVE_PQESCAPELITERAL 1
9 #define PQXX_HAVE_PQISTHREADSAFE 1
10 #define PQXX_HAVE_PQMBLEN 1
libpqxx-4.0.1+dfsg/doc/html/Reference/a00124_source.html000066400000000000000000000136041224474465600226300ustar00rootroot00000000000000 libpqxx: config-public-compiler.h Source File
config-public-compiler.h
1 /* Automatically generated from config.h: public/compiler config. */
2 #define PGSTD std
3 #define PQXXTR1 std::tr1
4 #define PQXX_HAVE_AUTO_PTR 1
5 #define PQXX_HAVE_CHAR_TRAITS 1
6 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1
7 #define PQXX_HAVE_GCC_CONST 1
8 #define PQXX_HAVE_GCC_DEPRECATED 1
9 #define PQXX_HAVE_GCC_NORETURN 1
10 #define PQXX_HAVE_GCC_PURE 1
11 #define PQXX_HAVE_IOS 1
12 #define PQXX_HAVE_LIMITS 1
13 #define PQXX_HAVE_LONG_DOUBLE 1
14 #define PQXX_HAVE_REVERSE_ITERATOR 1
15 #define PQXX_HAVE_SHARED_PTR 1
16 #define PQXX_HAVE_STREAMBUF 1
17 #define PQXX_TR1_HEADERS 1
libpqxx-4.0.1+dfsg/doc/html/Reference/a00125_source.html000066400000000000000000001043561224474465600226360ustar00rootroot00000000000000 libpqxx: config.h Source File
config.h
1 /* include/pqxx/config.h. Generated from config.h.in by configure. */
2 /* include/pqxx/config.h.in. Generated from configure.ac by autoheader. */
3 
4 /* Define to 1 if you have the <dlfcn.h> header file. */
5 #define HAVE_DLFCN_H 1
6 
7 /* Define to 1 if you have the <inttypes.h> header file. */
8 #define HAVE_INTTYPES_H 1
9 
10 /* Define to 1 if you have the `pq' library (-lpq). */
11 #define HAVE_LIBPQ 1
12 
13 /* Define to 1 if you have the <memory.h> header file. */
14 #define HAVE_MEMORY_H 1
15 
16 /* Define to 1 if you have the <stdint.h> header file. */
17 #define HAVE_STDINT_H 1
18 
19 /* Define to 1 if you have the <stdlib.h> header file. */
20 #define HAVE_STDLIB_H 1
21 
22 /* Define to 1 if you have the <strings.h> header file. */
23 #define HAVE_STRINGS_H 1
24 
25 /* Define to 1 if you have the <string.h> header file. */
26 #define HAVE_STRING_H 1
27 
28 /* Define to 1 if you have the <sys/stat.h> header file. */
29 #define HAVE_SYS_STAT_H 1
30 
31 /* Define to 1 if you have the <sys/types.h> header file. */
32 #define HAVE_SYS_TYPES_H 1
33 
34 /* Define to 1 if you have the <unistd.h> header file. */
35 #define HAVE_UNISTD_H 1
36 
37 /* Define to the sub-directory in which libtool stores uninstalled libraries.
38  */
39 #define LT_OBJDIR ".libs/"
40 
41 /* Name of package */
42 #define PACKAGE "libpqxx"
43 
44 /* Define to the address where bug reports for this package should be sent. */
45 #define PACKAGE_BUGREPORT "Jeroen T. Vermeulen <jtv@xs4all.nl>"
46 
47 /* Define to the full name of this package. */
48 #define PACKAGE_NAME "libpqxx"
49 
50 /* Define to the full name and version of this package. */
51 #define PACKAGE_STRING "libpqxx 4.0.1"
52 
53 /* Define to the one symbol short name of this package. */
54 #define PACKAGE_TARNAME "libpqxx"
55 
56 /* Define to the home page for this package. */
57 #define PACKAGE_URL ""
58 
59 /* Define to the version of this package. */
60 #define PACKAGE_VERSION "4.0.1"
61 
62 /* name of standard library namespace (normally "std") */
63 #define PGSTD std
64 
65 /* namespace of TR1 standard extensions (e.g. "std" or "std::tr1") */
66 #define PQXXTR1 std::tr1
67 
68 /* Define if <iterator> lacks an iterator template definition */
69 /* #undef PQXX_BROKEN_ITERATOR */
70 
71 /* Define if function overloading using "using" breaks */
72 /* #undef PQXX_BROKEN_USING_DECL */
73 
74 /* Define if compiler has auto_ptr */
75 #define PQXX_HAVE_AUTO_PTR 1
76 
77 /* Define if you have the <boost/smart_ptr.hpp> header */
78 /* #undef PQXX_HAVE_BOOST_SMART_PTR */
79 
80 /* Define if std provides the char_traits template and <char> specialization
81  */
82 #define PQXX_HAVE_CHAR_TRAITS 1
83 
84 /* Define if count_if() works according to the standard */
85 #define PQXX_HAVE_COUNT_IF 1
86 
87 /* Define if preprocessor supports pragma "message" */
88 #define PQXX_HAVE_CPP_PRAGMA_MESSAGE 1
89 
90 /* Define if preprocessor supports nonstandard "warning" directive */
91 /* #undef PQXX_HAVE_CPP_WARNING */
92 
93 /* Define if math.h defines C99 isinf() */
94 /* #undef PQXX_HAVE_C_ISINF */
95 
96 /* Define if math.h defines C99 isnan() */
97 /* #undef PQXX_HAVE_C_ISNAN */
98 
99 /* Define if C math header defines NAN */
100 #define PQXX_HAVE_C_NAN 1
101 
102 /* Define if distance() works according to the standard */
103 #define PQXX_HAVE_DISTANCE 1
104 
105 /* Define if g++ supports const attribute */
106 #define PQXX_HAVE_GCC_CONST 1
107 
108 /* Define if g++ supports deprecated attribute, as in g++ 4.0 */
109 #define PQXX_HAVE_GCC_DEPRECATED 1
110 
111 /* Define if g++ supports noreturn attribute */
112 #define PQXX_HAVE_GCC_NORETURN 1
113 
114 /* Define if g++ supports pure attribute */
115 #define PQXX_HAVE_GCC_PURE 1
116 
117 /* Define if g++ supports visibility attribute, as in g++ 4.0 */
118 #define PQXX_HAVE_GCC_VISIBILITY 1
119 
120 /* Define if stringstream::imbue works */
121 #define PQXX_HAVE_IMBUE 1
122 
123 /* Define if you have the <ios> header */
124 #define PQXX_HAVE_IOS 1
125 
126 /* Define if <limits> exists */
127 #define PQXX_HAVE_LIMITS 1
128 
129 /* Define if you have the <locale> header */
130 #define PQXX_HAVE_LOCALE 1
131 
132 /* Define if the compiler supports the standard "long double" type */
133 #define PQXX_HAVE_LONG_DOUBLE 1
134 
135 /* Define if the compiler supports "long long" types */
136 /* #undef PQXX_HAVE_LONG_LONG */
137 
138 /* Define if libpq has lo_tell() */
139 #define PQXX_HAVE_LO_TELL 1
140 
141 /* Define if compiler has move(). */
142 /* #undef PQXX_HAVE_MOVE */
143 
144 /* Define if C99 fnan()/nan()/lnan() are available */
145 #define PQXX_HAVE_NAN 1
146 
147 /* Define if the system has the poll() function (mainly GNU/Linux) */
148 #define PQXX_HAVE_POLL 1
149 
150 /* Define if libpq has PQcancel() and friends */
151 #define PQXX_HAVE_PQCANCEL 1
152 
153 /* Define if libpq has PQclientEncoding() */
154 #define PQXX_HAVE_PQCLIENTENCODING 1
155 
156 /* Define if libpq has PQdescribePortal() */
157 #define PQXX_HAVE_PQDESCRIBEPORTAL 1
158 
159 /* Define if libpq has PQencryptPassword() */
160 #define PQXX_HAVE_PQENCRYPTPASSWORD 1
161 
162 /* Define if libpq has PQescapeIdentifier() */
163 #define PQXX_HAVE_PQESCAPEIDENTIFIER 1
164 
165 /* Define if libpq has PQescapeLiteral() */
166 #define PQXX_HAVE_PQESCAPELITERAL 1
167 
168 /* Define if libpq has PQisthreadsafe() */
169 #define PQXX_HAVE_PQISTHREADSAFE 1
170 
171 /* Define if libpq has PQmblen() */
172 #define PQXX_HAVE_PQMBLEN 1
173 
174 /* Define if PQunescapeBytea() supports hex escape format */
175 /* #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 */
176 
177 /* Define if std::numeric_limits has quiet_NaN() */
178 #define PQXX_HAVE_QUIET_NAN 1
179 
180 /* Define if reverse_iterator template works as expected */
181 #define PQXX_HAVE_REVERSE_ITERATOR 1
182 
183 /* Define if compiler has shared_ptr */
184 #define PQXX_HAVE_SHARED_PTR 1
185 
186 /* Define if POSIX sleep() exists */
187 #define PQXX_HAVE_SLEEP 1
188 
189 /* Define if you have the <streambuf> header; if not, <streambuf.h> is used */
190 #define PQXX_HAVE_STREAMBUF 1
191 
192 /* Define if strerror_r exists */
193 #define PQXX_HAVE_STRERROR_R 1
194 
195 /* Define for GNU-style strerror_r */
196 #define PQXX_HAVE_STRERROR_R_GNU 1
197 
198 /* Define if string class has the clear() function */
199 #define PQXX_HAVE_STRING_CLEAR 1
200 
201 /* Define if strlcpy exists */
202 /* #undef PQXX_HAVE_STRLCPY */
203 
204 /* Define if strnlen exists */
205 #define PQXX_HAVE_STRNLEN 1
206 
207 /* Define if the sys/select.h header defines a working select() and friends,
208  as per POSIX 1003.1-2001 */
209 #define PQXX_HAVE_SYS_SELECT_H 1
210 
211 /* Define if compiler has unique_ptr */
212 /* #undef PQXX_HAVE_UNIQUE_PTR */
213 
214 /* Define if select() accepts NULL fd_set arguments */
215 /* #undef PQXX_SELECT_ACCEPTS_NULL */
216 
217 /* Define if headers for TR1 extension to standard live in tr1/ */
218 #define PQXX_TR1_HEADERS 1
219 
220 /* Define to 1 if you have the ANSI C header files. */
221 #define STDC_HEADERS 1
222 
223 /* Version number of package */
224 #define VERSION "4.0.1"
libpqxx-4.0.1+dfsg/doc/html/Reference/a00127_source.html000066400000000000000000000426101224474465600226320ustar00rootroot00000000000000 libpqxx: connection.hxx Source File
connection.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/connection.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::connection and pqxx::lazyconnection classes.
8  * Different ways of setting up a backend connection.
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_CONNECTION
20 #define PQXX_H_CONNECTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/connectionpolicy"
26 #include "pqxx/basic_connection"
27 
28 namespace pqxx
29 {
30 
73 
74 
84 class PQXX_LIBEXPORT connect_direct : public connectionpolicy
85 {
86 public:
87  explicit connect_direct(const PGSTD::string &opts) : connectionpolicy(opts) {}
88  virtual handle do_startconnect(handle);
89 };
90 
93 
94 
96 
100 class PQXX_LIBEXPORT connect_lazy : public connectionpolicy
101 {
102 public:
103  explicit connect_lazy(const PGSTD::string &opts) : connectionpolicy(opts) {}
104  virtual handle do_completeconnect(handle);
105 };
106 
107 
110 
111 
113 
119 class PQXX_LIBEXPORT connect_async : public connectionpolicy
120 {
121 public:
122  explicit connect_async(const PGSTD::string &opts);
123  virtual handle do_startconnect(handle);
124  virtual handle do_completeconnect(handle);
125  virtual handle do_dropconnect(handle) throw ();
126  virtual bool is_ready(handle) const throw ();
127 
128 private:
130  bool m_connecting;
131 };
132 
133 
136 
137 
139 
143 class PQXX_LIBEXPORT connect_null : public connectionpolicy
144 {
145 public:
146  explicit connect_null(const PGSTD::string &opts) : connectionpolicy(opts) {}
147 };
148 
149 
152 
157 }
158 
159 #include "pqxx/compiler-internal-post.hxx"
160 
161 #endif
162 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00129_source.html000066400000000000000000002177571224474465600226540ustar00rootroot00000000000000 libpqxx: connection_base.hxx Source File
connection_base.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/connection_base.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::connection_base abstract base class.
8  * pqxx::connection_base encapsulates a frontend to backend connection
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_CONNECTION_BASE
20 #define PQXX_H_CONNECTION_BASE
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <bitset>
26 #include <list>
27 #include <map>
28 #include <memory>
29 
30 #include "pqxx/errorhandler"
31 #include "pqxx/except"
32 #include "pqxx/prepared_statement"
33 #include "pqxx/strconv"
34 #include "pqxx/util"
35 
36 
37 /* Use of the libpqxx library starts here.
38  *
39  * Everything that can be done with a database through libpqxx must go through
40  * a connection object derived from connection_base.
41  */
42 
43 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
44  */
45 
46 namespace pqxx
47 {
48 class binarystring;
49 class connectionpolicy;
50 class notification_receiver;
51 class result;
52 class transaction_base;
53 
54 namespace internal
55 {
57 class sql_cursor;
58 
60 {
61 public:
62  reactivation_avoidance_counter() : m_counter(0) {}
63 
64  void add(int n) throw () { m_counter += n; }
65  void clear() throw () { m_counter = 0; }
66  int get() const throw () { return m_counter; }
67 
68 private:
69  int m_counter;
70 };
71 
72 }
73 
74 
76 
94 PGSTD::string PQXX_LIBEXPORT encrypt_password( //[t0]
95  const PGSTD::string &user,
96  const PGSTD::string &password);
97 
98 
99 namespace internal
100 {
101 namespace gate
102 {
103 class connection_dbtransaction;
104 class connection_errorhandler;
105 class connection_largeobject;
106 class connection_notification_receiver;
107 class connection_parameterized_invocation;
108 class connection_pipeline;
109 class connection_prepare_invocation;
110 class connection_reactivation_avoidance_exemption;
111 class connection_sql_cursor;
112 class connection_transaction;
113 } // namespace pqxx::internal::gate
114 } // namespace pqxx::internal
115 
116 
118 
151 class PQXX_LIBEXPORT connection_base
152 {
153 public:
155  void disconnect() throw (); //[t2]
156 
158 
162  bool PQXX_PURE is_open() const throw (); //[t1]
163 
174 
175 
185  void activate(); //[t12]
186 
188 
196  void deactivate(); //[t12]
197 
199 
243  void inhibit_reactivation(bool inhibit) //[t86]
244  { m_inhibit_reactivation=inhibit; }
245 
247 
252  void simulate_failure(); //[t94]
254 
256  void process_notice(const char[]) throw (); //[t14]
258  void process_notice(const PGSTD::string &) throw (); //[t14]
259 
261  void trace(PGSTD::FILE *) throw (); //[t3]
262 
271 
272 
275  const char *dbname(); //[t1]
276 
278 
281  const char *username(); //[t1]
282 
284 
287  const char *hostname(); //[t1]
288 
290 
293  const char *port(); //[t1]
294 
296 
305  int PQXX_PURE backendpid() const throw (); //[t1]
306 
308 
322  int PQXX_PURE sock() const throw (); //[t87]
323 
334 
337  {
340 
343 
346 
355 
358 
361 
364 
367 
370 
373 
375  cap_end
376  };
377 
378 
380 
396  bool supports(capability c) const throw () { return m_caps.test(c); } //[t88]
397 
399 
411  int PQXX_PURE protocol_version() const throw (); //[t1]
412 
414 
426  int PQXX_PURE server_version() const throw (); //[t1]
428 
430 
436  void set_client_encoding(const PGSTD::string &Encoding) //[t7]
437  { set_variable("CLIENT_ENCODING", Encoding); }
438 
440 
456  void set_variable(const PGSTD::string &Var,
457  const PGSTD::string &Value); //[t60]
458 
460 
467  PGSTD::string get_variable(const PGSTD::string &); //[t60]
469 
470 
475 
476 
488  int get_notifs(); //[t4]
489 
490 
492 
498  int await_notification(); //[t78]
499 
501 
507  int await_notification(long seconds, long microseconds); //[t79]
509 
510 
547 
548 
581  void prepare(const PGSTD::string &name, const PGSTD::string &definition);
582 
584 
590  void prepare(const PGSTD::string &definition);
591 
593  void unprepare(const PGSTD::string &name);
594 
596 
606  void prepare_now(const PGSTD::string &name);
607 
637 
638 
646  template<typename TRANSACTOR>
647  void perform(const TRANSACTOR &T, int Attempts); //[t4]
648 
650 
653  template<typename TRANSACTOR>
654  void perform(const TRANSACTOR &T) { perform(T, 3); }
655 
660 
661 
664  PGSTD::string adorn_name(const PGSTD::string &); //[90]
665 
734 
735  PGSTD::string esc(const char str[]);
736 
738  PGSTD::string esc(const char str[], size_t maxlen);
739 
741  PGSTD::string esc(const PGSTD::string &str);
742 
744  PGSTD::string esc_raw(const unsigned char str[], size_t len);
745 
747  PGSTD::string quote_raw(const unsigned char str[], size_t len);
748 
750  PGSTD::string quote_name(const PGSTD::string &identifier);
751 
753 
754  template<typename T>
755  PGSTD::string quote(const T &t)
756  {
757  if (string_traits<T>::is_null(t)) return "NULL";
758  return "'" + this->esc(to_string(t)) + "'";
759  }
760 
761  PGSTD::string quote(const binarystring &);
763 
765  void cancel_query();
766 
769  {
770  // These values must match those in libpq's PGVerbosity enum.
771  terse=0,
772  normal=1,
773  verbose=2
774  };
775 
777 
785  void set_verbosity(error_verbosity verbosity) throw();
787  error_verbosity get_verbosity() const throw() {return m_verbosity;}
788 
790 
802  PGSTD::vector<errorhandler *> get_errorhandlers() const;
803 
804 protected:
805  explicit connection_base(connectionpolicy &);
806  void init();
807 
808  void close() throw ();
809  void wait_read() const;
810  void wait_read(long seconds, long microseconds) const;
811  void wait_write() const;
812 
813 private:
814 
815  result make_result(internal::pq::PGresult *rhs, const PGSTD::string &query);
816 
817  void PQXX_PRIVATE clearcaps() throw ();
818  void PQXX_PRIVATE SetupState();
819  void PQXX_PRIVATE check_result(const result &);
820 
821  void PQXX_PRIVATE InternalSetTrace() throw ();
822  int PQXX_PRIVATE PQXX_PURE Status() const throw ();
823  const char * PQXX_PURE ErrMsg() const throw ();
824  void PQXX_PRIVATE Reset();
825  void PQXX_PRIVATE RestoreVars();
826  PGSTD::string PQXX_PRIVATE RawGetVar(const PGSTD::string &);
827  void PQXX_PRIVATE process_notice_raw(const char msg[]) throw ();
828 
829  void read_capabilities() throw ();
830 
831  prepare::internal::prepared_def &find_prepared(const PGSTD::string &);
832 
833  prepare::internal::prepared_def &register_prepared(const PGSTD::string &);
834 
835  friend class internal::gate::connection_prepare_invocation;
836  result prepared_exec(const PGSTD::string &,
837  const char *const[],
838  const int[],
839  const int[],
840  int);
841  bool prepared_exists(const PGSTD::string &) const;
842 
844  internal::pq::PGconn *m_Conn;
845 
846  connectionpolicy &m_policy;
847 
849  internal::unique<transaction_base> m_Trans;
850 
851  PGSTD::list<errorhandler *> m_errorhandlers;
852 
854  PGSTD::FILE *m_Trace;
855 
856  typedef PGSTD::multimap<PGSTD::string, pqxx::notification_receiver *>
857  receiver_list;
859  receiver_list m_receivers;
860 
862  PGSTD::map<PGSTD::string, PGSTD::string> m_Vars;
863 
864  typedef PGSTD::map<PGSTD::string, prepare::internal::prepared_def> PSMap;
865 
867  PSMap m_prepared;
868 
870  int m_serverversion;
871 
873  internal::reactivation_avoidance_counter m_reactivation_avoidance;
874 
876  int m_unique_id;
877 
879  bool m_Completed;
880 
882  bool m_inhibit_reactivation;
883 
885  PGSTD::bitset<cap_end> m_caps;
886 
888  error_verbosity m_verbosity;
889 
890  friend class internal::gate::connection_errorhandler;
891  void PQXX_PRIVATE register_errorhandler(errorhandler *);
892  void PQXX_PRIVATE unregister_errorhandler(errorhandler *) throw ();
893 
894  friend class internal::gate::connection_transaction;
895  result PQXX_PRIVATE Exec(const char[], int Retries);
896  void PQXX_PRIVATE RegisterTransaction(transaction_base *);
897  void PQXX_PRIVATE UnregisterTransaction(transaction_base *) throw ();
898  bool PQXX_PRIVATE ReadCopyLine(PGSTD::string &);
899  void PQXX_PRIVATE WriteCopyLine(const PGSTD::string &);
900  void PQXX_PRIVATE EndCopyWrite();
901  void PQXX_PRIVATE RawSetVar(const PGSTD::string &, const PGSTD::string &);
902  void PQXX_PRIVATE AddVariables(const PGSTD::map<PGSTD::string,
903  PGSTD::string> &);
904 
905  friend class internal::gate::connection_largeobject;
906  internal::pq::PGconn *RawConnection() const { return m_Conn; }
907 
908  friend class internal::gate::connection_notification_receiver;
909  void add_receiver(notification_receiver *);
910  void remove_receiver(notification_receiver *) throw ();
911 
912  friend class internal::gate::connection_pipeline;
913  void PQXX_PRIVATE start_exec(const PGSTD::string &);
914  bool PQXX_PRIVATE consume_input() throw ();
915  bool PQXX_PRIVATE is_busy() const throw ();
916  int PQXX_PRIVATE encoding_code();
917  internal::pq::PGresult *get_result();
918 
919  friend class internal::gate::connection_dbtransaction;
920 
921  friend class internal::gate::connection_sql_cursor;
922  void add_reactivation_avoidance_count(int);
923 
924  friend class internal::gate::connection_reactivation_avoidance_exemption;
925 
926  friend class internal::gate::connection_parameterized_invocation;
927  result parameterized_exec(
928  const PGSTD::string &query,
929  const char *const params[],
930  const int paramlengths[],
931  const int binaries[],
932  int nparams);
933 
934  // Not allowed:
936  connection_base &operator=(const connection_base &);
937 };
938 
939 
940 
941 #ifdef PQXX_HAVE_AUTO_PTR
942 
943 struct PQXX_LIBEXPORT PQXX_NOVTABLE noticer :
944  PGSTD::unary_function<const char[], void>
945 {
946  virtual ~noticer() throw () {}
947  virtual void operator()(const char[]) throw () =0;
948 };
950 struct PQXX_LIBEXPORT nonnoticer : noticer
951 {
952  virtual void operator()(const char[]) throw () {}
953 };
955 class PQXX_LIBEXPORT scoped_noticer : errorhandler
956 {
957 public:
958  scoped_noticer(connection_base &c, PGSTD::auto_ptr<noticer> t) throw () :
959  errorhandler(c), m_noticer(t.release()) {}
960 protected:
961  scoped_noticer(connection_base &c, noticer *t) throw () :
962  errorhandler(c), m_noticer(t) {}
963  virtual bool operator()(const char msg[]) throw ()
964  {
965  (*m_noticer)(msg);
966  return false;
967  }
968 private:
969  PGSTD::auto_ptr<noticer> m_noticer;
970 };
972 class PQXX_LIBEXPORT disable_noticer : scoped_noticer
973 {
974 public:
975  explicit disable_noticer(connection_base &c) :
976  scoped_noticer(c, new nonnoticer) {}
977 };
978 #endif
979 
980 
981 namespace internal
982 {
983 
986 {
987 public:
988  explicit reactivation_avoidance_exemption(connection_base &C);
990 
991  void close_connection() throw () { m_open = false; }
992 
993 private:
994  connection_base &m_home;
995  int m_count;
996  bool m_open;
997 };
998 
999 
1000 void wait_read(const internal::pq::PGconn *);
1001 void wait_read(const internal::pq::PGconn *, long seconds, long microseconds);
1002 void wait_write(const internal::pq::PGconn *);
1003 } // namespace pqxx::internal
1004 
1005 
1006 } // namespace pqxx
1007 
1008 #include "pqxx/compiler-internal-post.hxx"
1009 
1010 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00130_source.html000066400000000000000000000267531224474465600226360ustar00rootroot00000000000000 libpqxx: connectionpolicy.hxx Source File
connectionpolicy.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/connectionpolicy.hxx
5  *
6  * DESCRIPTION
7  * definition of the connection policy classes
8  * Interface for defining connection policies
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead.
10  *
11  * Copyright (c) 2005-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_CONNECTIONPOLICY
20 #define PQXX_H_CONNECTIONPOLICY
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <string>
26 
27 #include "pqxx/internal/libpq-forward.hxx"
28 
29 
30 namespace pqxx
31 {
32 
33 
38 
39 class PQXX_LIBEXPORT connectionpolicy
40 {
41 public:
42  typedef internal::pq::PGconn *handle;
43 
44  explicit connectionpolicy(const PGSTD::string &opts);
45  virtual ~connectionpolicy() throw ();
46 
47  const PGSTD::string &options() const throw () { return m_options; }
48 
49  virtual handle do_startconnect(handle orig);
50  virtual handle do_completeconnect(handle orig);
51  virtual handle do_dropconnect(handle orig) throw ();
52  virtual handle do_disconnect(handle orig) throw ();
53  virtual bool is_ready(handle) const throw ();
54 
55 protected:
56  handle normalconnect(handle);
57 
58 private:
59  PGSTD::string m_options;
60 };
61 
63 } // namespace
64 
65 #include "pqxx/compiler-internal-post.hxx"
66 
67 #endif
68 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00132_source.html000066400000000000000000001775671224474465600226520ustar00rootroot00000000000000 libpqxx: cursor.hxx Source File
cursor.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/cursor.hxx
5  *
6  * DESCRIPTION
7  * definition of the iterator/container-style cursor classes
8  * C++-style wrappers for SQL cursors
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/cursor instead.
10  *
11  * Copyright (c) 2004-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_CURSOR
20 #define PQXX_H_CURSOR
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <stdexcept>
26 
27 #ifdef PQXX_HAVE_LIMITS
28 #include <limits>
29 #endif
30 
31 #include "pqxx/result"
32 #include "pqxx/transaction_base"
33 
34 
35 namespace pqxx
36 {
37 class dbtransaction;
38 
39 
41 
52 class PQXX_LIBEXPORT cursor_base
53 {
54 public:
57 
59 
63  {
67  random_access
68  };
69 
71 
75  {
79  update
80  };
81 
83 
102  {
106  loose
107  };
108 
113 
114 
117  static difference_type all() throw (); //[t81]
119 
121  static difference_type next() throw () { return 1; } //[t81]
123 
125  static difference_type prior() throw () { return -1; } //[t0]
127 
129  static difference_type backward_all() throw (); //[t0]
130 
132 
134 
139  const PGSTD::string &name() const throw () { return m_name; } //[t81]
140 
141 protected:
143  const PGSTD::string &Name,
144  bool embellish_name=true);
145 
146  const PGSTD::string m_name;
147 
148 private:
150  cursor_base();
152  cursor_base(const cursor_base &);
154  cursor_base &operator=(const cursor_base &);
155 };
156 
157 
159 {
160 #ifdef PQXX_HAVE_LIMITS
161  return PGSTD::numeric_limits<int>::max()-1;
162 #else
163  return INT_MAX-1;
164 #endif
165 }
166 
168 {
169 #ifdef PQXX_HAVE_LIMITS
170  return PGSTD::numeric_limits<int>::min()+1;
171 #else
172  return INT_MIN+1;
173 #endif
174 }
175 
176 
177 namespace internal
178 {
180 
194 class PQXX_LIBEXPORT sql_cursor : public cursor_base
195 {
196 public:
198  const PGSTD::string &query,
199  const PGSTD::string &cname,
203  bool hold);
204 
206  const PGSTD::string &cname,
208 
209  ~sql_cursor() throw () { close(); }
210 
211  result fetch(difference_type rows, difference_type &displacement);
213  { difference_type d=0; return fetch(rows, d); }
214  difference_type move(difference_type rows, difference_type &displacement);
216  { difference_type d=0; return move(rows, d); }
217 
219 
225  difference_type pos() const throw () { return m_pos; }
226 
228 
234  difference_type endpos() const throw () { return m_endpos; }
235 
237  const result &empty_result() const throw () { return m_empty_result; }
238 
239  void close() throw ();
240 
241 private:
242  difference_type adjust(difference_type hoped, difference_type actual);
243  static PGSTD::string stridestring(difference_type);
245  void init_empty_result(transaction_base &);
246 
248  connection_base &m_home;
249 
251  result m_empty_result;
252 
253  result m_cached_current_row;
254 
256  bool m_adopted;
257 
259  cursor_base::ownershippolicy m_ownership;
260 
262  int m_at_end;
263 
265  difference_type m_pos;
266 
268  difference_type m_endpos;
269 };
270 
271 
272 result::size_type PQXX_LIBEXPORT obtain_stateless_cursor_size(sql_cursor &);
273 result PQXX_LIBEXPORT stateless_cursor_retrieve(
274  sql_cursor &,
275  result::difference_type size,
276  result::difference_type begin_pos,
277  result::difference_type end_pos);
278 
279 } // namespace internal
280 
281 
283 
289 template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
291 {
292 public:
295 
297  stateless_cursor(
298  transaction_base &trans,
299  const PGSTD::string &query,
300  const PGSTD::string &cname,
301  bool hold) :
302  m_cur(trans, query, cname, cursor_base::random_access, up, op, hold)
303  {
304  }
305 
307  stateless_cursor(
308  transaction_base &trans,
309  const PGSTD::string adopted_cursor) :
310  m_cur(trans, adopted_cursor, op)
311  {
312  // Put cursor in known position
313  m_cur.move(cursor_base::backward_all());
314  }
315 
316  void close() throw () { m_cur.close(); }
317 
319 
322  size_type size() { return internal::obtain_stateless_cursor_size(m_cur); }
323 
325 
336  result retrieve(difference_type begin_pos, difference_type end_pos)
337  {
339  m_cur,
340  result::difference_type(size()),
341  begin_pos,
342  end_pos);
343  }
344 
345  const PGSTD::string &name() const throw () { return m_cur.name(); }
346 
347 private:
348  internal::sql_cursor m_cur;
349 };
350 
351 
352 class icursor_iterator;
353 
354 
355 namespace internal
356 {
357 namespace gate
358 {
359 class icursor_iterator_icursorstream;
360 class icursorstream_icursor_iterator;
361 } // namespace internal::gate
362 } // namespace internal
363 
364 
366 
381 class PQXX_LIBEXPORT icursorstream
382 {
383 public:
386 
388 
400  const PGSTD::string &query,
401  const PGSTD::string &basename,
402  difference_type sstride=1); //[t81]
403 
405 
430  const field &cname,
431  difference_type sstride=1,
433 
434  operator bool() const throw () { return !m_done; }
435 
437 
443  icursorstream &get(result &res) { res = fetchblock(); return *this; } //[t81]
445 
451  icursorstream &operator>>(result &res) { return get(res); } //[t81]
452 
454 
458  icursorstream &ignore(PGSTD::streamsize n=1); //[t81]
459 
461 
464  void set_stride(difference_type stride); //[t81]
465  difference_type stride() const throw () { return m_stride; } //[t81]
466 
467 private:
468  result fetchblock();
469 
470  friend class internal::gate::icursorstream_icursor_iterator;
471  size_type forward(size_type n=1);
472  void insert_iterator(icursor_iterator *) throw ();
473  void remove_iterator(icursor_iterator *) const throw ();
474 
475  void service_iterators(difference_type);
476 
477  internal::sql_cursor m_cur;
478 
479  difference_type m_stride;
480  difference_type m_realpos, m_reqpos;
481 
482  mutable icursor_iterator *m_iterators;
483 
484  bool m_done;
485 };
486 
487 
489 
515 class PQXX_LIBEXPORT icursor_iterator :
516  public PGSTD::iterator<PGSTD::input_iterator_tag,
517  result,
519  const result *,
520  const result &>
521 {
522 public:
526 
527  icursor_iterator() throw (); //[t84]
528  explicit icursor_iterator(istream_type &) throw (); //[t84]
529  icursor_iterator(const icursor_iterator &) throw (); //[t84]
530  ~icursor_iterator() throw ();
531 
532  const result &operator*() const { refresh(); return m_here; } //[t84]
533  const result *operator->() const { refresh(); return &m_here; } //[t84]
534  icursor_iterator &operator++(); //[t84]
535  icursor_iterator operator++(int); //[t84]
536  icursor_iterator &operator+=(difference_type); //[t84]
537  icursor_iterator &operator=(const icursor_iterator &) throw (); //[t84]
538 
539  bool operator==(const icursor_iterator &rhs) const; //[t84]
540  bool operator!=(const icursor_iterator &rhs) const throw () //[t84]
541  { return !operator==(rhs); }
542  bool operator<(const icursor_iterator &rhs) const; //[t84]
543  bool operator>(const icursor_iterator &rhs) const //[t84]
544  { return rhs < *this; }
545  bool operator<=(const icursor_iterator &rhs) const //[t84]
546  { return !(*this > rhs); }
547  bool operator>=(const icursor_iterator &rhs) const //[t84]
548  { return !(*this < rhs); }
549 
550 private:
551  void refresh() const;
552 
553  friend class internal::gate::icursor_iterator_icursorstream;
554  difference_type pos() const throw () { return m_pos; }
555  void fill(const result &);
556 
557  icursorstream *m_stream;
558  result m_here;
559  difference_type m_pos;
560  icursor_iterator *m_prev, *m_next;
561 };
562 
563 
564 } // namespace pqxx
565 
566 #include "pqxx/compiler-internal-post.hxx"
567 
568 #endif
569 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00134_source.html000066400000000000000000000341431224474465600226320ustar00rootroot00000000000000 libpqxx: dbtransaction.hxx Source File
dbtransaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/dbtransaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::dbtransaction abstract base class.
8  * pqxx::dbransaction defines a real transaction on the database
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
10  *
11  * Copyright (c) 2004-2009, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_DBTRANSACTION
20 #define PQXX_H_DBTRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/transaction_base"
26 
27 namespace pqxx
28 {
29 
31 {
34 };
35 
36 
38 
73 class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
74 {
75 public:
76  virtual ~dbtransaction();
77 
78 protected:
81  const PGSTD::string &IsolationString,
83 
84  explicit dbtransaction(
86  bool direct=true,
88 
89 
91  void start_backend_transaction();
92 
94  virtual void do_begin(); //[t1]
96  virtual result do_exec(const char Query[]);
98  virtual void do_commit() =0;
100 
106  virtual void do_abort(); //[t13]
107 
108  static PGSTD::string fullname(const PGSTD::string &ttype,
109  const PGSTD::string &isolation);
110 
111 private:
113  PGSTD::string m_StartCmd;
114 };
115 
116 
117 } // namespace pqxx
118 
119 #include "pqxx/compiler-internal-post.hxx"
120 
121 #endif
122 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00136_source.html000066400000000000000000000340771224474465600226420ustar00rootroot00000000000000 libpqxx: errorhandler.hxx Source File
errorhandler.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/errorhandler.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::errorhandler class.
8  * pqxx::errorhandler handlers errors and warnings in a database session.
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead.
10  *
11  * Copyright (c) 2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_ERRORHANDLER
20 #define PQXX_H_ERRORHANDLER
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <functional>
26 
27 
28 namespace pqxx
29 {
30 class connection_base;
31 
32 namespace internal
33 {
34 namespace gate
35 {
36 class errorhandler_connection_base;
37 }
38 }
39 
45 
46 
57 class PQXX_LIBEXPORT errorhandler :
58  public PGSTD::unary_function<const char[], bool>
59 {
60 public:
61  explicit errorhandler(connection_base &);
62  virtual ~errorhandler();
63 
65 
69  virtual bool operator()(const char msg[]) throw () =0;
70 
71 private:
72  connection_base *m_home;
73 
74  friend class internal::gate::errorhandler_connection_base;
75  void unregister() throw ();
76 
77  // Not allowed:
78  errorhandler();
79  errorhandler(const errorhandler &);
80  errorhandler &operator=(const errorhandler &);
81 };
82 
83 
85 class quiet_errorhandler : public errorhandler
86 {
87 public:
88  quiet_errorhandler(connection_base &conn) : errorhandler(conn) {}
89 
90  virtual bool operator()(const char[]) throw () { return false; }
91 };
92 
97 } // namespace pqxx
98 
99 #include "pqxx/compiler-internal-post.hxx"
100 
101 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00138_source.html000066400000000000000000002056121224474465600226370ustar00rootroot00000000000000 libpqxx: except.hxx Source File
except.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/except.hxx
5  *
6  * DESCRIPTION
7  * definition of libpqxx exception classes
8  * pqxx::sql_error, pqxx::broken_connection, pqxx::in_doubt_error, ...
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/except instead.
10  *
11  * Copyright (c) 2003-2008, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_EXCEPT
20 #define PQXX_H_EXCEPT
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include <stdexcept>
26 
27 #include "pqxx/util"
28 
29 
30 namespace pqxx
31 {
32 
49 
50 
61 class PQXX_LIBEXPORT PQXX_NOVTABLE pqxx_exception
62 {
63 public:
65  virtual ~pqxx_exception() throw () =0;
66 
68 
90  virtual const PQXX_CONST PGSTD::exception &base() const throw () =0; //[t0]
91 };
92 
93 
95 class PQXX_LIBEXPORT failure :
96  public pqxx_exception, public PGSTD::runtime_error
97 {
98  virtual const PGSTD::exception &base() const throw () { return *this; }
99 public:
100  explicit failure(const PGSTD::string &);
101 };
102 
103 
105 
123 class PQXX_LIBEXPORT broken_connection : public failure
124 {
125 public:
127  explicit broken_connection(const PGSTD::string &);
128 };
129 
130 
132 
133 class PQXX_LIBEXPORT sql_error : public failure
134 {
135  PGSTD::string m_Q;
136 
137 public:
138  sql_error();
139  explicit sql_error(const PGSTD::string &);
140  sql_error(const PGSTD::string &, const PGSTD::string &Q);
141  virtual ~sql_error() throw ();
142 
144  const PGSTD::string & PQXX_PURE query() const throw (); //[t56]
145 };
146 
147 
148 // TODO: should this be called statement_completion_unknown!?
150 
156 class PQXX_LIBEXPORT in_doubt_error : public failure
157 {
158 public:
159  explicit in_doubt_error(const PGSTD::string &);
160 };
161 
162 
164 class PQXX_LIBEXPORT internal_error :
165  public pqxx_exception, public PGSTD::logic_error
166 {
167  virtual const PGSTD::exception &base() const throw () { return *this; }
168 public:
169  explicit internal_error(const PGSTD::string &);
170 };
171 
172 
174 class PQXX_LIBEXPORT usage_error :
175  public pqxx_exception, public PGSTD::logic_error
176 {
177  virtual const PGSTD::exception &base() const throw () { return *this; }
178 public:
179  explicit usage_error(const PGSTD::string &);
180 };
181 
182 
184 class PQXX_LIBEXPORT argument_error :
185  public pqxx_exception, public PGSTD::invalid_argument
186 {
187  virtual const PGSTD::exception &base() const throw () { return *this; }
188 public:
189  explicit argument_error(const PGSTD::string &);
190 };
191 
192 
193 class PQXX_LIBEXPORT conversion_error :
194  public pqxx_exception, public PGSTD::domain_error
195 {
196  virtual const PGSTD::exception &base() const throw () { return *this; }
197 public:
198  explicit conversion_error(const PGSTD::string &);
199 };
200 
201 
203 class PQXX_LIBEXPORT range_error :
204  public pqxx_exception, public PGSTD::out_of_range
205 {
206  virtual const PGSTD::exception &base() const throw () { return *this; }
207 public:
208  explicit range_error(const PGSTD::string &);
209 };
210 
211 
213 class PQXX_LIBEXPORT feature_not_supported : public sql_error
214 {
215 public:
216  explicit feature_not_supported(const PGSTD::string &err) : sql_error(err) {}
217  feature_not_supported(const PGSTD::string &err, const PGSTD::string &Q) :
218  sql_error(err,Q) {}
219 };
220 
222 class PQXX_LIBEXPORT data_exception : public sql_error
223 {
224 public:
225  explicit data_exception(const PGSTD::string &err) : sql_error(err) {}
226  data_exception(const PGSTD::string &err, const PGSTD::string &Q) :
227  sql_error(err,Q) {}
228 };
229 
230 class PQXX_LIBEXPORT integrity_constraint_violation : public sql_error
231 {
232 public:
233  explicit integrity_constraint_violation(const PGSTD::string &err) :
234  sql_error(err) {}
235  integrity_constraint_violation(const PGSTD::string &err,
236  const PGSTD::string &Q) :
237  sql_error(err, Q) {}
238 };
239 
240 class PQXX_LIBEXPORT restrict_violation :
242 {
243 public:
244  explicit restrict_violation(const PGSTD::string &err) :
246  restrict_violation(const PGSTD::string &err,
247  const PGSTD::string &Q) :
249 };
250 
251 class PQXX_LIBEXPORT not_null_violation :
253 {
254 public:
255  explicit not_null_violation(const PGSTD::string &err) :
257  not_null_violation(const PGSTD::string &err,
258  const PGSTD::string &Q) :
260 };
261 
262 class PQXX_LIBEXPORT foreign_key_violation :
264 {
265 public:
266  explicit foreign_key_violation(const PGSTD::string &err) :
268  foreign_key_violation(const PGSTD::string &err,
269  const PGSTD::string &Q) :
271 };
272 
273 class PQXX_LIBEXPORT unique_violation :
275 {
276 public:
277  explicit unique_violation(const PGSTD::string &err) :
279  unique_violation(const PGSTD::string &err,
280  const PGSTD::string &Q) :
282 };
283 
284 class PQXX_LIBEXPORT check_violation :
286 {
287 public:
288  explicit check_violation(const PGSTD::string &err) :
290  check_violation(const PGSTD::string &err,
291  const PGSTD::string &Q) :
293 };
294 
295 class PQXX_LIBEXPORT invalid_cursor_state : public sql_error
296 {
297 public:
298  explicit invalid_cursor_state(const PGSTD::string &err) : sql_error(err) {}
299  invalid_cursor_state(const PGSTD::string &err, const PGSTD::string &Q) :
300  sql_error(err,Q) {}
301 };
302 
303 class PQXX_LIBEXPORT invalid_sql_statement_name : public sql_error
304 {
305 public:
306  explicit invalid_sql_statement_name(const PGSTD::string &err) :
307  sql_error(err) {}
308  invalid_sql_statement_name(const PGSTD::string &err, const PGSTD::string &Q) :
309  sql_error(err,Q) {}
310 };
311 
312 class PQXX_LIBEXPORT invalid_cursor_name : public sql_error
313 {
314 public:
315  explicit invalid_cursor_name(const PGSTD::string &err) : sql_error(err) {}
316  invalid_cursor_name(const PGSTD::string &err, const PGSTD::string &Q) :
317  sql_error(err,Q) {}
318 };
319 
320 class PQXX_LIBEXPORT syntax_error : public sql_error
321 {
322 public:
324  const int error_position;
325 
326  explicit syntax_error(const PGSTD::string &err, int pos=-1) :
327  sql_error(err), error_position(pos) {}
328  syntax_error(const PGSTD::string &err, const PGSTD::string &Q, int pos=-1) :
329  sql_error(err,Q), error_position(pos) {}
330 };
331 
332 class PQXX_LIBEXPORT undefined_column : public syntax_error
333 {
334 public:
335  explicit undefined_column(const PGSTD::string &err) : syntax_error(err) {}
336  undefined_column(const PGSTD::string &err, const PGSTD::string &Q) :
337  syntax_error(err, Q) {}
338 };
339 
340 class PQXX_LIBEXPORT undefined_function : public syntax_error
341 {
342 public:
343  explicit undefined_function(const PGSTD::string &err) : syntax_error(err) {}
344  undefined_function(const PGSTD::string &err, const PGSTD::string &Q) :
345  syntax_error(err, Q) {}
346 };
347 
348 class PQXX_LIBEXPORT undefined_table : public syntax_error
349 {
350 public:
351  explicit undefined_table(const PGSTD::string &err) : syntax_error(err) {}
352  undefined_table(const PGSTD::string &err, const PGSTD::string &Q) :
353  syntax_error(err, Q) {}
354 };
355 
356 class PQXX_LIBEXPORT insufficient_privilege : public sql_error
357 {
358 public:
359  explicit insufficient_privilege(const PGSTD::string &err) : sql_error(err) {}
360  insufficient_privilege(const PGSTD::string &err, const PGSTD::string &Q) :
361  sql_error(err,Q) {}
362 };
363 
365 class PQXX_LIBEXPORT insufficient_resources : public sql_error
366 {
367 public:
368  explicit insufficient_resources(const PGSTD::string &err) : sql_error(err) {}
369  insufficient_resources(const PGSTD::string &err, const PGSTD::string &Q) :
370  sql_error(err,Q) {}
371 };
372 
373 class PQXX_LIBEXPORT disk_full : public insufficient_resources
374 {
375 public:
376  explicit disk_full(const PGSTD::string &err) : insufficient_resources(err) {}
377  disk_full(const PGSTD::string &err, const PGSTD::string &Q) :
378  insufficient_resources(err,Q) {}
379 };
380 
381 class PQXX_LIBEXPORT out_of_memory : public insufficient_resources
382 {
383 public:
384  explicit out_of_memory(const PGSTD::string &err) :
385  insufficient_resources(err) {}
386  out_of_memory(const PGSTD::string &err, const PGSTD::string &Q) :
387  insufficient_resources(err,Q) {}
388 };
389 
390 class PQXX_LIBEXPORT too_many_connections : public broken_connection
391 {
392 public:
393  explicit too_many_connections(const PGSTD::string &err) :
394  broken_connection(err) {}
395 };
396 
398 
400 class PQXX_LIBEXPORT plpgsql_error : public sql_error
401 {
402 public:
403  explicit plpgsql_error(const PGSTD::string &err) :
404  sql_error(err) {}
405  plpgsql_error(const PGSTD::string &err, const PGSTD::string &Q) :
406  sql_error(err, Q) {}
407 };
408 
410 class PQXX_LIBEXPORT plpgsql_raise : public plpgsql_error
411 {
412 public:
413  explicit plpgsql_raise(const PGSTD::string &err) :
414  plpgsql_error(err) {}
415  plpgsql_raise(const PGSTD::string &err, const PGSTD::string &Q) :
416  plpgsql_error(err, Q) {}
417 };
418 
419 class PQXX_LIBEXPORT plpgsql_no_data_found : public plpgsql_error
420 {
421 public:
422  explicit plpgsql_no_data_found(const PGSTD::string &err) :
423  plpgsql_error(err) {}
424  plpgsql_no_data_found(const PGSTD::string &err, const PGSTD::string &Q) :
425  plpgsql_error(err, Q) {}
426 };
427 
428 class PQXX_LIBEXPORT plpgsql_too_many_rows : public plpgsql_error
429 {
430 public:
431  explicit plpgsql_too_many_rows(const PGSTD::string &err) :
432  plpgsql_error(err) {}
433  plpgsql_too_many_rows(const PGSTD::string &err, const PGSTD::string &Q) :
434  plpgsql_error(err, Q) {}
435 };
436 
441 }
442 
443 #include "pqxx/compiler-internal-post.hxx"
444 
445 #endif
446 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00140_source.html000066400000000000000000001276471224474465600226430ustar00rootroot00000000000000 libpqxx: field.hxx Source File
field.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/field.hxx
5  *
6  * DESCRIPTION
7  * definitions for the pqxx::field class.
8  * pqxx::field refers to a field in a query result.
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/field instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_FIELD
20 #define PQXX_H_FIELD
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/strconv"
26 
27 
28 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
29  */
30 
31 namespace pqxx
32 {
33 class result;
34 class tuple;
35 
36 typedef unsigned int tuple_size_type;
37 typedef signed int tuple_difference_type;
38 
40 
43 class PQXX_LIBEXPORT field
44 {
45 public:
46  typedef size_t size_type;
47 
49 
53  field(const tuple &T, tuple_size_type C) throw (); //[t1]
54 
59 
60 
76  bool operator==(const field &) const; //[t75]
77 
79 
81  bool operator!=(const field &rhs) const //[t82]
82  {return !operator==(rhs);}
84 
89 
90  const char *name() const; //[t11]
91 
93  oid type() const; //[t7]
94 
96  oid table() const; //[t2]
97 
98  tuple_size_type num() const { return col(); } //[t82]
99 
101  tuple_size_type table_column() const; //[t93]
103 
108 
109 
114  const char *c_str() const; //[t2]
115 
117  template<typename T> bool to(T &Obj) const //[t3]
118  {
119  const char *const bytes = c_str();
120  if (!bytes[0] && is_null()) return false;
121  from_string(bytes, Obj);
122  return true;
123  }
124 
126  template<typename T> bool operator>>(T &Obj) const //[t7]
127  { return to(Obj); }
128 
129 #ifdef PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
130 
131  template<> bool to<PGSTD::string>(PGSTD::string &Obj) const;
132 
134 
137  template<> bool to<const char *>(const char *&Obj) const;
138 #endif
139 
141  template<typename T> bool to(T &Obj, const T &Default) const //[t12]
142  {
143  const bool NotNull = to(Obj);
144  if (!NotNull) Obj = Default;
145  return NotNull;
146  }
147 
149 
152  template<typename T> T as(const T &Default) const //[t1]
153  {
154  T Obj;
155  to(Obj, Default);
156  return Obj;
157  }
158 
160  template<typename T> T as() const //[t45]
161  {
162  T Obj;
163  const bool NotNull = to(Obj);
164  if (!NotNull) Obj = string_traits<T>::null();
165  return Obj;
166  }
167 
168  bool is_null() const throw (); //[t12]
169  size_type size() const throw (); //[t11]
171 
172 
173 protected:
174  const result *home() const throw () { return m_home; }
175  size_t idx() const throw () { return m_row; }
176  tuple_size_type col() const throw () { return m_col; }
177 
179 
180 private:
181  const result *m_home;
182  size_t m_row;
183 };
184 
185 
187 template<>
188 inline bool field::to<PGSTD::string>(PGSTD::string &Obj) const
189 {
190  const char *const bytes = c_str();
191  if (!bytes[0] && is_null()) return false;
192  Obj = PGSTD::string(bytes, size());
193  return true;
194 }
195 
197 
202 template<>
203 inline bool field::to<const char *>(const char *&Obj) const
204 {
205  if (is_null()) return false;
206  Obj = c_str();
207  return true;
208 }
209 
210 
211 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
213 #ifdef PQXX_HAVE_STREAMBUF
214  public PGSTD::basic_streambuf<CHAR, TRAITS>
215 #else
216  public PGSTD::streambuf
217 #endif
218 {
219 public:
220  typedef CHAR char_type;
221  typedef TRAITS traits_type;
222  typedef typename traits_type::int_type int_type;
223 #ifdef PQXX_HAVE_STREAMBUF
224  typedef typename traits_type::pos_type pos_type;
225  typedef typename traits_type::off_type off_type;
226 #else
227  typedef streamoff off_type;
228  typedef streampos pos_type;
229 #endif
230  typedef PGSTD::ios::openmode openmode;
231  typedef PGSTD::ios::seekdir seekdir;
232 
233  explicit field_streambuf(const field &F) : //[t74]
234  m_Field(F)
235  {
236  initialize();
237  }
238 
239 #ifdef PQXX_HAVE_STREAMBUF
240 protected:
241 #endif
242  virtual int sync() { return traits_type::eof(); }
243 
244 protected:
246  { return traits_type::eof(); }
247  virtual pos_type seekpos(pos_type, openmode) {return traits_type::eof();}
248  virtual int_type overflow(int_type) { return traits_type::eof(); }
249  virtual int_type underflow() { return traits_type::eof(); }
250 
251 private:
252  const field &m_Field;
253 
254  int_type initialize()
255  {
256  char_type *G =
257  reinterpret_cast<char_type *>(const_cast<char *>(m_Field.c_str()));
258  this->setg(G, G, G + m_Field.size());
259  return int_type(m_Field.size());
260  }
261 };
262 
263 
265 
273 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
275 #ifdef PQXX_HAVE_STREAMBUF
276  public PGSTD::basic_istream<CHAR, TRAITS>
277 #else
278  public PGSTD::istream
279 #endif
280 {
281 #ifdef PQXX_HAVE_STREAMBUF
282  typedef PGSTD::basic_istream<CHAR, TRAITS> super;
283 #else
284  typedef PGSTD::istream super;
285 #endif
286 
287 public:
288  typedef CHAR char_type;
289  typedef TRAITS traits_type;
290  typedef typename traits_type::int_type int_type;
291  typedef typename traits_type::pos_type pos_type;
292  typedef typename traits_type::off_type off_type;
293 
294  basic_fieldstream(const field &F) : super(0), m_Buf(F)
295  { super::init(&m_Buf); }
296 
297 private:
299 };
300 
302 
303 } // namespace pqxx
304 
305 
306 #include "pqxx/compiler-internal-post.hxx"
307 
308 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00141_source.html000066400000000000000000000315161224474465600226310ustar00rootroot00000000000000 libpqxx: isolation.hxx Source File
isolation.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/isolation.hxx
5  *
6  * DESCRIPTION
7  * definitions of transaction isolation levels
8  * Policies and traits describing SQL transaction isolation levels
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/isolation instead.
10  *
11  * Copyright (c) 2003-2013, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_ISOLATION
20 #define PQXX_H_ISOLATION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/util"
26 
27 namespace pqxx
28 {
29 
31 
61 {
62  // read_uncommitted,
66 };
67 
69 template<isolation_level LEVEL> struct isolation_traits
70 {
71  static isolation_level level() throw () { return LEVEL; }
72  static const char *name() throw ();
73 };
74 
75 
76 template<> inline const char *isolation_traits<read_committed>::name() throw ()
77  { return "READ COMMITTED"; }
78 template<> inline const char *isolation_traits<repeatable_read>::name() throw ()
79  { return "REPEATABLE READ"; }
80 template<> inline const char *isolation_traits<serializable>::name() throw ()
81  { return "SERIALIZABLE"; }
82 
83 }
84 
85 
86 #include "pqxx/compiler-internal-post.hxx"
87 
88 #endif
89 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00143_source.html000066400000000000000000002507471224474465600226440ustar00rootroot00000000000000 libpqxx: largeobject.hxx Source File
largeobject.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/largeobject.hxx
5  *
6  * DESCRIPTION
7  * libpqxx's Large Objects interface
8  * Allows access to large objects directly, or through I/O streams
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/largeobject instead.
10  *
11  * Copyright (c) 2003-2012, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_LARGEOBJECT
20 #define PQXX_H_LARGEOBJECT
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #ifdef PQXX_HAVE_STREAMBUF
26 #include <streambuf>
27 #else
28 #include <streambuf.h>
29 #endif
30 
31 #include "pqxx/dbtransaction"
32 
33 
34 namespace pqxx
35 {
36 
37 class largeobjectaccess;
38 
40 
47 class PQXX_LIBEXPORT largeobject
48 {
49 public:
50  typedef long size_type;
51 
53  largeobject() throw (); //[t48]
54 
56 
58  explicit largeobject(dbtransaction &T); //[t48]
59 
61 
65  explicit largeobject(oid O) throw () : m_ID(O) {} //[t48]
66 
68 
72  largeobject(dbtransaction &T, const PGSTD::string &File); //[t53]
73 
75 
79  largeobject(const largeobjectaccess &O) throw (); //[t50]
80 
82 
86  oid id() const throw () { return m_ID; } //[t48]
87 
96 
97 
98  bool operator==(const largeobject &other) const //[t51]
99  { return m_ID == other.m_ID; }
101 
102  bool operator!=(const largeobject &other) const //[t51]
103  { return m_ID != other.m_ID; }
105 
106  bool operator<=(const largeobject &other) const //[t51]
107  { return m_ID <= other.m_ID; }
109 
110  bool operator>=(const largeobject &other) const //[t51]
111  { return m_ID >= other.m_ID; }
113 
114  bool operator<(const largeobject &other) const //[t51]
115  { return m_ID < other.m_ID; }
117 
118  bool operator>(const largeobject &other) const //[t51]
119  { return m_ID > other.m_ID; }
121 
123 
127  void to_file(dbtransaction &T, const PGSTD::string &File) const; //[t52]
128 
130 
134  void remove(dbtransaction &T) const; //[t48]
135 
136 protected:
137  static internal::pq::PGconn * PQXX_PURE RawConnection(const dbtransaction &T);
138 
139  PGSTD::string Reason(int err) const;
140 
141 private:
142  oid m_ID;
143 };
144 
145 
146 // TODO: New hierarchy with separate read / write / mixed-mode access
147 
149 class PQXX_LIBEXPORT largeobjectaccess : private largeobject
150 {
151 public:
153  typedef long off_type;
155 
157 
161  typedef PGSTD::ios::openmode openmode;
162 
164 
168  typedef PGSTD::ios::seekdir seekdir;
169 
171 
175  explicit largeobjectaccess(dbtransaction &T,
176  openmode mode =
177  PGSTD::ios::in |
178  PGSTD::ios::out); //[t51]
179 
181 
188  oid O,
189  openmode mode =
190  PGSTD::ios::in |
191  PGSTD::ios::out); //[t52]
192 
194 
200  largeobject O,
201  openmode mode = PGSTD::ios::in | PGSTD::ios::out); //[t50]
202 
204 
210  const PGSTD::string &File,
211  openmode mode =
212  PGSTD::ios::in | PGSTD::ios::out); //[t55]
213 
214  ~largeobjectaccess() throw () { close(); }
215 
217 
220  using largeobject::id;
221 
223 
226  void to_file(const PGSTD::string &File) const //[t54]
227  { largeobject::to_file(m_Trans, File); }
228 
229 #ifdef PQXX_BROKEN_USING_DECL
230 
231 
235  void to_file(dbtransaction &T, const PGSTD::string &F) const
236  { largeobject::to_file(T, F); }
237 #else
238  using largeobject::to_file;
239 #endif
240 
245 
246 
250  void write(const char Buf[], size_type Len); //[t51]
251 
253 
256  void write(const PGSTD::string &Buf) //[t50]
257  { write(Buf.c_str(), static_cast<size_type>(Buf.size())); }
258 
260 
266  size_type read(char Buf[], size_type Len); //[t50]
267 
269 
272  size_type seek(size_type dest, seekdir dir); //[t51]
273 
275 
278  size_type tell() const; //[t50]
280 
290 
291 
299  pos_type cseek(off_type dest, seekdir dir) throw (); //[t50]
300 
302 
308  off_type cwrite(const char Buf[], size_type Len) throw (); //[t50]
309 
311 
317  off_type cread(char Buf[], size_type Len) throw (); //[t50]
318 
320 
324  pos_type ctell() const throw (); //[t50]
326 
331 
332  void process_notice(const PGSTD::string &) throw (); //[t50]
334 
335  using largeobject::remove;
336 
337  using largeobject::operator==;
338  using largeobject::operator!=;
339  using largeobject::operator<;
340  using largeobject::operator<=;
341  using largeobject::operator>;
342  using largeobject::operator>=;
343 
344 private:
345  PGSTD::string PQXX_PRIVATE Reason(int err) const;
346  internal::pq::PGconn *RawConnection() const
347  { return largeobject::RawConnection(m_Trans); }
348 
349  void open(openmode mode);
350  void close() throw ();
351 
352  dbtransaction &m_Trans;
353  int m_fd;
354 
355  // Not allowed:
356  largeobjectaccess();
357  largeobjectaccess(const largeobjectaccess &);
358  largeobjectaccess operator=(const largeobjectaccess &);
359 };
360 
361 
363 
371 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
373 #ifdef PQXX_HAVE_STREAMBUF
374  public PGSTD::basic_streambuf<CHAR, TRAITS>
375 #else
376  public PGSTD::streambuf
377 #endif
378 {
379  typedef long size_type;
380 public:
381  typedef CHAR char_type;
382  typedef TRAITS traits_type;
383  typedef typename traits_type::int_type int_type;
384 #ifdef PQXX_HAVE_STREAMBUF
385  typedef typename traits_type::pos_type pos_type;
386  typedef typename traits_type::off_type off_type;
387 #else
388  typedef streamoff off_type;
389  typedef streampos pos_type;
390 #endif
393 
395  largeobject O,
396  openmode mode = PGSTD::ios::in | PGSTD::ios::out,
397  size_type BufSize=512) : //[t48]
398  m_BufSize(BufSize),
399  m_Obj(T, O, mode),
400  m_G(0),
401  m_P(0)
402  { initialize(mode); }
403 
405  oid O,
406  openmode mode = PGSTD::ios::in | PGSTD::ios::out,
407  size_type BufSize=512) : //[t48]
408  m_BufSize(BufSize),
409  m_Obj(T, O, mode),
410  m_G(0),
411  m_P(0)
412  { initialize(mode); }
413 
414  virtual ~largeobject_streambuf() throw () { delete [] m_P; delete [] m_G; }
415 
416 
418  void process_notice(const PGSTD::string &s) { m_Obj.process_notice(s); }
419 
420 #ifdef PQXX_HAVE_STREAMBUF
421 protected:
422 #endif
423  virtual int sync()
424  {
425  // setg() sets eback, gptr, egptr
426  this->setg(this->eback(), this->eback(), this->egptr());
427  return overflow(EoF());
428  }
429 
430 protected:
431  virtual pos_type seekoff(off_type offset,
432  seekdir dir,
433  openmode)
434  {
435  return AdjustEOF(m_Obj.cseek(largeobjectaccess::off_type(offset), dir));
436  }
437 
438  virtual pos_type seekpos(pos_type pos, openmode)
439  {
440  const largeobjectaccess::pos_type newpos = m_Obj.cseek(
442  PGSTD::ios::beg);
443  return AdjustEOF(newpos);
444  }
445 
446  virtual int_type overflow(int_type ch = EoF())
447  {
448  char *const pp = this->pptr();
449  if (!pp) return EoF();
450  char *const pb = this->pbase();
451  int_type res = 0;
452 
453  if (pp > pb) res = int_type(AdjustEOF(m_Obj.cwrite(pb, pp-pb)));
454  this->setp(m_P, m_P + m_BufSize);
455 
456  // Write that one more character, if it's there.
457  if (ch != EoF())
458  {
459  *this->pptr() = char(ch);
460  this->pbump(1);
461  }
462  return res;
463  }
464 
465  virtual int_type underflow()
466  {
467  if (!this->gptr()) return EoF();
468  char *const eb = this->eback();
469  const int_type res(static_cast<int_type>(
470  AdjustEOF(m_Obj.cread(this->eback(), m_BufSize))));
471  this->setg(eb, eb, eb + ((res==EoF()) ? 0 : res));
472  return (!res || (res == EoF())) ? EoF() : *eb;
473  }
474 
475 private:
477  static int_type EoF() { return traits_type::eof(); }
478 
480  template<typename INTYPE>
481  static PGSTD::streampos AdjustEOF(INTYPE pos)
482  { return (pos==-1) ? PGSTD::streampos(EoF()) : PGSTD::streampos(pos); }
483 
484  void initialize(openmode mode)
485  {
486  if (mode & PGSTD::ios::in)
487  {
488  m_G = new char_type[unsigned(m_BufSize)];
489  this->setg(m_G, m_G, m_G);
490  }
491  if (mode & PGSTD::ios::out)
492  {
493  m_P = new char_type[unsigned(m_BufSize)];
494  this->setp(m_P, m_P + m_BufSize);
495  }
496  }
497 
498  const size_type m_BufSize;
499  largeobjectaccess m_Obj;
500 
501  // Get & put buffers
502  char_type *m_G, *m_P;
503 };
504 
505 
507 
515 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
517 #ifdef PQXX_HAVE_STREAMBUF
518  public PGSTD::basic_istream<CHAR, TRAITS>
519 #else
520  public PGSTD::istream
521 #endif
522 {
523 #ifdef PQXX_HAVE_STREAMBUF
524  typedef PGSTD::basic_istream<CHAR, TRAITS> super;
525 #else
526  typedef PGSTD::istream super;
527 #endif
528 
529 public:
530  typedef CHAR char_type;
531  typedef TRAITS traits_type;
532  typedef typename traits_type::int_type int_type;
533  typedef typename traits_type::pos_type pos_type;
534  typedef typename traits_type::off_type off_type;
535 
537 
543  largeobject O,
544  largeobject::size_type BufSize=512) : //[t57]
545  super(0),
546  m_Buf(T, O, PGSTD::ios::in, BufSize)
547  { super::init(&m_Buf); }
548 
550 
556  oid O,
557  largeobject::size_type BufSize=512) : //[t48]
558  super(0),
559  m_Buf(T, O, PGSTD::ios::in, BufSize)
560  { super::init(&m_Buf); }
561 
562 private:
564 };
565 
567 
568 
570 
578 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
580 #ifdef PQXX_HAVE_STREAMBUF
581  public PGSTD::basic_ostream<CHAR, TRAITS>
582 #else
583  public PGSTD::ostream
584 #endif
585 {
586 #ifdef PQXX_HAVE_STREAMBUF
587  typedef PGSTD::basic_ostream<CHAR, TRAITS> super;
588 #else
589  typedef PGSTD::ostream super;
590 #endif
591 public:
592  typedef CHAR char_type;
593  typedef TRAITS traits_type;
594  typedef typename traits_type::int_type int_type;
595  typedef typename traits_type::pos_type pos_type;
596  typedef typename traits_type::off_type off_type;
597 
599 
605  largeobject O,
606  largeobject::size_type BufSize=512) : //[t48]
607  super(0),
608  m_Buf(T, O, PGSTD::ios::out, BufSize)
609  { super::init(&m_Buf); }
610 
612 
618  oid O,
619  largeobject::size_type BufSize=512) : //[t57]
620  super(0),
621  m_Buf(T, O, PGSTD::ios::out, BufSize)
622  { super::init(&m_Buf); }
623 
625  {
626  try
627  {
628 #ifdef PQXX_HAVE_STREAMBUF
629  m_Buf.pubsync(); m_Buf.pubsync();
630 #else
631  m_Buf.sync(); m_Buf.sync();
632 #endif
633  }
634  catch (const PGSTD::exception &e)
635  {
636  m_Buf.process_notice(e.what());
637  }
638  }
639 
640 private:
642 };
643 
645 
646 
648 
656 template<typename CHAR=char, typename TRAITS=PGSTD::char_traits<CHAR> >
658 #ifdef PQXX_HAVE_STREAMBUF
659  public PGSTD::basic_iostream<CHAR, TRAITS>
660 #else
661  public PGSTD::iostream
662 #endif
663 {
664 #ifdef PQXX_HAVE_STREAMBUF
665  typedef PGSTD::basic_iostream<CHAR, TRAITS> super;
666 #else
667  typedef PGSTD::iostream super;
668 #endif
669 
670 public:
671  typedef CHAR char_type;
672  typedef TRAITS traits_type;
673  typedef typename traits_type::int_type int_type;
674  typedef typename traits_type::pos_type pos_type;
675  typedef typename traits_type::off_type off_type;
676 
678 
684  largeobject O,
685  largeobject::size_type BufSize=512) : //[t59]
686  super(0),
687  m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize)
688  { super::init(&m_Buf); }
689 
691 
697  oid O,
698  largeobject::size_type BufSize=512) : //[t59]
699  super(0),
700  m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize)
701  { super::init(&m_Buf); }
702 
704  {
705  try
706  {
707 #ifdef PQXX_HAVE_STREAMBUF
708  m_Buf.pubsync(); m_Buf.pubsync();
709 #else
710  m_Buf.sync(); m_Buf.sync();
711 #endif
712  }
713  catch (const PGSTD::exception &e)
714  {
715  m_Buf.process_notice(e.what());
716  }
717  }
718 
719 private:
721 };
722 
724 
725 } // namespace pqxx
726 
727 #include "pqxx/compiler-internal-post.hxx"
728 
729 #endif
730 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00145_source.html000066400000000000000000000274771224474465600226500ustar00rootroot00000000000000 libpqxx: nontransaction.hxx Source File
nontransaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/nontransaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::nontransaction class.
8  * pqxx::nontransaction provides nontransactional database access
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction instead.
10  *
11  * Copyright (c) 2002-2008, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_NONTRANSACTION
20 #define PQXX_H_NONTRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/connection_base"
26 #include "pqxx/result"
27 #include "pqxx/transaction_base"
28 
29 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
30  */
31 
32 
33 namespace pqxx
34 {
35 
37 
62 class PQXX_LIBEXPORT nontransaction : public transaction_base
63 {
64 public:
66 
72  const PGSTD::string &Name=PGSTD::string()) : //[t14]
73  namedclass("nontransaction", Name), transaction_base(C) { Begin(); }
74 
75  virtual ~nontransaction(); //[t14]
76 
77 private:
78  virtual void do_begin() {} //[t14]
79  virtual result do_exec(const char C[]); //[t14]
80  virtual void do_commit() {} //[t14]
81  virtual void do_abort() {} //[t14]
82 };
83 
84 
85 } // namespace pqxx
86 
87 
88 #include "pqxx/compiler-internal-post.hxx"
89 
90 #endif
91 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00147_source.html000066400000000000000000000276741224474465600226510ustar00rootroot00000000000000 libpqxx: notification.hxx Source File
notification.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/notification.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::notification_receiver functor interface.
8  * pqxx::notification_receiver handles incoming notifications.
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/notification instead.
10  *
11  * Copyright (c) 2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_NOTIFICATION
20 #define PQXX_H_NOTIFICATION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 namespace pqxx
26 {
27 class connection_base;
28 
29 
31 
59 class PQXX_LIBEXPORT PQXX_NOVTABLE notification_receiver :
60  public PGSTD::binary_function<const PGSTD::string &, int, void>
61 {
62 public:
64 
68  notification_receiver(connection_base &c, const PGSTD::string &channel);
69  virtual ~notification_receiver();
70 
72  const PGSTD::string &channel() const { return m_channel; }
73 
75 
82  virtual void operator()(const PGSTD::string &payload, int backend_pid) =0;
83 
84 protected:
85  connection_base &conn() const throw () { return m_conn; }
86 
87 private:
88  // Not allowed.
90  // Not allowed.
91  notification_receiver &operator=(const notification_receiver &);
92 
93  connection_base &m_conn;
94  PGSTD::string m_channel;
95 };
96 }
97 
98 #include "pqxx/compiler-internal-pre.hxx"
99 #include "pqxx/compiler-internal-post.hxx"
100 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00149_source.html000066400000000000000000000360621224474465600226420ustar00rootroot00000000000000 libpqxx: notify-listen.hxx Source File
notify-listen.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/notify-listen.hxx
5  *
6  * DESCRIPTION
7  * Definition of the obsolete pqxx::notify_listener functor interface.
8  * Predecessor to notification_receiver. Deprecated. Do not use.
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/notify-listen instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_NOTIFY_LISTEN
20 #define PQXX_H_NOTIFY_LISTEN
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/notification"
26 
27 
28 namespace pqxx
29 {
30 class connection_base;
31 class notify_listener;
32 
33 namespace internal
34 {
37 {
38 public:
40  connection_base &c,
41  const PGSTD::string &channel_name,
42  notify_listener *wrappee) :
43  notification_receiver(c, channel_name),
44  m_wrappee(wrappee)
45  {}
46 
47  virtual void operator()(const PGSTD::string &, int backend_pid);
48 
49 private:
50  notify_listener *m_wrappee;
51 };
52 }
53 
54 
56 
58 class PQXX_LIBEXPORT PQXX_NOVTABLE notify_listener :
59  public PGSTD::unary_function<int, void>
60 {
61 public:
62  notify_listener(connection_base &c, const PGSTD::string &n);
63  virtual ~notify_listener() throw ();
64  const PGSTD::string &name() const { return m_forwarder.channel(); }
65  virtual void operator()(int be_pid) =0;
66 
67 
68 protected:
69  connection_base &Conn() const throw () { return conn(); }
70  connection_base &conn() const throw () { return m_conn; }
71 
72 private:
73  connection_base &m_conn;
75 };
76 }
77 
78 
79 #include "pqxx/compiler-internal-post.hxx"
80 
81 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00150_source.html000066400000000000000000000131071224474465600226250ustar00rootroot00000000000000 libpqxx: performance.hxx Source File
performance.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/performance.hxx
5  *
6  * DESCRIPTION
7  * performance features documentation
8  * Documentation only: libpqxx performance features.
9  * DO NOT INCLUDE THIS FILE; it's here only to provide documentation.
10  *
11  * Copyright (c) 2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00152_source.html000066400000000000000000000623521224474465600226350ustar00rootroot00000000000000 libpqxx: pipeline.hxx Source File
pipeline.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/pipeline.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::pipeline class.
8  * Throughput-optimized query manager
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/pipeline instead.
10  *
11  * Copyright (c) 2003-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_PIPELINE
20 #define PQXX_H_PIPELINE
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #ifdef PQXX_HAVE_LIMITS
26 #include <limits>
27 #endif
28 
29 #include <map>
30 #include <string>
31 
32 #include "pqxx/transaction_base"
33 
34 
35 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
36  */
37 
38 namespace pqxx
39 {
40 
42 
58 class PQXX_LIBEXPORT pipeline : public internal::transactionfocus
59 {
60 public:
61  typedef long query_id;
62 
63  explicit pipeline(transaction_base &,
64  const PGSTD::string &Name=PGSTD::string()); //[t69]
65 
66  ~pipeline() throw ();
67 
69 
75  query_id insert(const PGSTD::string &); //[t69]
76 
78 
79  void complete(); //[t71]
80 
82 
91  void flush(); //[t70]
92 
94 
102  void cancel();
103 
105  bool is_finished(query_id) const; //[t71]
106 
108 
114  result retrieve(query_id qid) //[t71]
115  { return retrieve(m_queries.find(qid)).second; }
116 
118 
119  PGSTD::pair<query_id, result> retrieve(); //[t69]
120 
121  bool empty() const throw () { return m_queries.empty(); } //[t69]
122 
124 
135  int retain(int retain_max=2); //[t70]
136 
137 
139  void resume(); //[t70]
140 
141 private:
142  class PQXX_PRIVATE Query
143  {
144  public:
145  explicit Query(const PGSTD::string &q) : m_query(q), m_res() {}
146 
147  const result &get_result() const throw () { return m_res; }
148  void set_result(const result &r) throw () { m_res = r; }
149  const PGSTD::string &get_query() const throw () { return m_query; }
150 
151  private:
152  PGSTD::string m_query;
153  result m_res;
154  };
155 
156  typedef PGSTD::map<query_id,Query> QueryMap;
157 
158  struct getquery:PGSTD::unary_function<QueryMap::const_iterator,PGSTD::string>
159  {
160  getquery(){} // Silences bogus warning in some gcc versions
161  PGSTD::string operator()(QueryMap::const_iterator i) const
162  { return i->second.get_query(); }
163  };
164 
165  void attach();
166  void detach();
167 
169  static query_id qid_limit() throw ()
170  {
171 #if defined(PQXX_HAVE_LIMITS)
172  return PGSTD::numeric_limits<query_id>::max();
173 #else
174  return LONG_MAX;
175 #endif
176  }
177 
179  query_id PQXX_PRIVATE generate_id();
180 
181  bool have_pending() const throw ()
182  { return m_issuedrange.second != m_issuedrange.first; }
183 
184  void PQXX_PRIVATE issue();
185 
187  void set_error_at(query_id qid) throw () { if (qid < m_error) m_error = qid; }
188 
189  void PQXX_PRIVATE PQXX_NORETURN internal_error(const PGSTD::string &err)
190  throw (PGSTD::logic_error);
191 
192  bool PQXX_PRIVATE obtain_result(bool expect_none=false);
193 
194  void PQXX_PRIVATE obtain_dummy();
195  void PQXX_PRIVATE get_further_available_results();
196  void PQXX_PRIVATE check_end_results();
197 
199  void PQXX_PRIVATE receive_if_available();
200 
202  void PQXX_PRIVATE receive(pipeline::QueryMap::const_iterator stop);
203  PGSTD::pair<pipeline::query_id, result>
204  retrieve(pipeline::QueryMap::iterator);
205 
206  QueryMap m_queries;
207  PGSTD::pair<QueryMap::iterator,QueryMap::iterator> m_issuedrange;
208  int m_retain;
209  int m_num_waiting;
210  query_id m_q_id;
211 
213  bool m_dummy_pending;
214 
216  query_id m_error;
217 
219  pipeline(const pipeline &);
221  pipeline &operator=(const pipeline &);
222 };
223 
224 
225 } // namespace
226 
227 
228 #include "pqxx/compiler-internal-post.hxx"
229 
230 #endif
231 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00154_source.html000066400000000000000000000471151224474465600226370ustar00rootroot00000000000000 libpqxx: prepared_statement.hxx Source File
prepared_statement.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/prepared_statement.hxx
5  *
6  * DESCRIPTION
7  * Helper classes for defining and executing prepared statements
8  * See the connection_base hierarchy for more about prepared statements
9  *
10  * Copyright (c) 2006-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_PREPARED_STATEMENT
19 #define PQXX_H_PREPARED_STATEMENT
20 
21 #include "pqxx/compiler-public.hxx"
22 #include "pqxx/compiler-internal-pre.hxx"
23 
24 #include "pqxx/internal/statement_parameters.hxx"
25 
26 
27 namespace pqxx
28 {
29 class binarystring;
30 class connection_base;
31 class transaction_base;
32 class result;
33 
34 
36 namespace prepare
37 {
123 
124 class PQXX_LIBEXPORT invocation : internal::statement_parameters
125 {
126 public:
127  invocation(transaction_base &, const PGSTD::string &statement);
128 
130  result exec() const;
131 
133  bool exists() const;
134 
136  invocation &operator()() { add_param(); return *this; }
137 
139 
142  template<typename T> invocation &operator()(const T &v)
143  { add_param(v, true); return *this; }
144 
146 
149  invocation &operator()(const binarystring &v)
150  { add_binary_param(v, true); return *this; }
151 
153 
157  template<typename T> invocation &operator()(const T &v, bool nonnull)
158  { add_param(v, nonnull); return *this; }
159 
161 
165  invocation &operator()(const binarystring &v, bool nonnull)
166  { add_binary_param(v, nonnull); return *this; }
167 
169 
187  template<typename T> invocation &operator()(T *v, bool nonnull=true)
188  { add_param(v, nonnull); return *this; }
189 
191 
195  invocation &operator()(const char *v, bool nonnull=true)
196  { add_param(v, nonnull); return *this; }
197 
198 private:
200  invocation &operator=(const invocation &);
201 
202  transaction_base &m_home;
203  const PGSTD::string m_statement;
204  PGSTD::vector<PGSTD::string> m_values;
205  PGSTD::vector<bool> m_nonnull;
206 
207  invocation &setparam(const PGSTD::string &, bool nonnull);
208 };
209 
210 
211 namespace internal
212 {
214 struct PQXX_LIBEXPORT prepared_def
215 {
217  PGSTD::string definition;
220 
221  prepared_def();
222  explicit prepared_def(const PGSTD::string &);
223 };
224 
225 } // namespace pqxx::prepare::internal
226 } // namespace pqxx::prepare
227 } // namespace pqxx
228 
229 #include "pqxx/compiler-internal-post.hxx"
230 
231 #endif
232 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00156_source.html000066400000000000000000002371031224474465600226370ustar00rootroot00000000000000 libpqxx: result.hxx Source File
result.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/result.hxx
5  *
6  * DESCRIPTION
7  * definitions for the pqxx::result class and support classes.
8  * pqxx::result represents the set of result tuples from a database query
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/result instead.
10  *
11  * Copyright (c) 2001-2012, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_RESULT
20 #define PQXX_H_RESULT
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #ifdef PQXX_HAVE_IOS
26 #include <ios>
27 #endif
28 
29 #include <stdexcept>
30 
31 #include "pqxx/internal/result_data.hxx"
32 
33 #include "pqxx/except"
34 #include "pqxx/field"
35 #include "pqxx/tuple"
36 #include "pqxx/util"
37 
38 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
39  */
40 
41 // TODO: Support SQL arrays
42 
43 namespace pqxx
44 {
45 namespace internal
46 {
47 namespace gate
48 {
49 class result_connection;
50 class result_creation;
51 class result_sql_cursor;
52 } // namespace internal::gate
53 } // namespace internal
54 
55 
56 class const_result_iterator;
57 class const_reverse_result_iterator;
58 
59 
61 
81 class PQXX_LIBEXPORT result :
82  private internal::PQAlloc<
83  const internal::result_data, internal::freemem_result_data>
84 {
85  typedef internal::PQAlloc<
86  const internal::result_data, internal::freemem_result_data> super;
87 public:
88  typedef unsigned long size_type;
89  typedef signed long difference_type;
96 
98  typedef pqxx::tuple tuple;
101 
102  result() throw () : super(), m_data(0) {} //[t3]
103  result(const result &rhs) throw () : //[t1]
104  super(rhs), m_data(rhs.m_data) {}
105 
106  result &operator=(const result &rhs) throw () //[t10]
107  { super::operator=(rhs); m_data=rhs.m_data; return *this; }
108 
113  bool operator==(const result &) const throw (); //[t70]
114  bool operator!=(const result &rhs) const throw () //[t70]
115  { return !operator==(rhs); }
117 
118  const_reverse_iterator rbegin() const; //[t75]
119  const_reverse_iterator rend() const; //[t75]
120 
121  const_iterator begin() const throw (); //[t1]
122  inline const_iterator end() const throw (); //[t1]
123 
124  reference front() const throw () { return tuple(this,0); } //[t74]
125  reference back() const throw () {return tuple(this,size()-1);} //[t75]
126 
127  size_type PQXX_PURE size() const throw (); //[t2]
128  bool PQXX_PURE empty() const throw (); //[t11]
129  size_type capacity() const throw () { return size(); } //[t20]
130 
131  void swap(result &) throw (); //[t77]
132 
133  const tuple operator[](size_type i) const throw () //[t2]
134  { return tuple(this, i); }
135  const tuple at(size_type) const throw (range_error); //[t10]
136 
137  void clear() throw () { super::reset(); m_data = 0; } //[t20]
138 
143 
144  tuple::size_type PQXX_PURE columns() const throw (); //[t11]
145 
147  tuple::size_type column_number(const char ColName[]) const; //[t11]
148 
150  tuple::size_type column_number(const PGSTD::string &Name) const //[t11]
151  {return column_number(Name.c_str());}
152 
154  const char *column_name(tuple::size_type Number) const; //[t11]
155 
157  oid column_type(tuple::size_type ColNum) const; //[t7]
159  oid column_type(int ColNum) const //[t7]
160  { return column_type(tuple::size_type(ColNum)); }
161 
163  oid column_type(const PGSTD::string &ColName) const //[t7]
164  { return column_type(column_number(ColName)); }
165 
167  oid column_type(const char ColName[]) const //[t7]
168  { return column_type(column_number(ColName)); }
169 
171  oid column_table(tuple::size_type ColNum) const; //[t2]
172 
174  oid column_table(int ColNum) const //[t2]
175  { return column_table(tuple::size_type(ColNum)); }
176 
178  oid column_table(const PGSTD::string &ColName) const //[t2]
179  { return column_table(column_number(ColName)); }
180 
182  tuple::size_type table_column(tuple::size_type ColNum) const; //[t93]
183 
185  tuple::size_type table_column(int ColNum) const //[t93]
186  { return table_column(tuple::size_type(ColNum)); }
187 
189  tuple::size_type table_column(const PGSTD::string &ColName) const //[t93]
190  { return table_column(column_number(ColName)); }
192 
194  const PGSTD::string & PQXX_PURE query() const throw (); //[t70]
195 
197 
200  oid PQXX_PURE inserted_oid() const; //[t13]
201 
203 
206  size_type PQXX_PURE affected_rows() const; //[t7]
207 
208 
209 private:
210  friend class pqxx::field;
211  const char * PQXX_PURE GetValue(size_type Row, tuple::size_type Col) const;
212  bool PQXX_PURE GetIsNull(size_type Row, tuple::size_type Col) const;
213  field::size_type PQXX_PURE GetLength(
214  size_type,
215  tuple::size_type) const throw ();
216 
217  friend class pqxx::internal::gate::result_creation;
218  result(internal::pq::PGresult *rhs,
219  int protocol,
220  const PGSTD::string &Query,
221  int encoding_code);
222  void PQXX_PRIVATE CheckStatus() const;
223 
224  friend class pqxx::internal::gate::result_connection;
225  bool operator!() const throw () { return !m_data; }
226  operator bool() const throw () { return m_data != 0; }
227 
228  void PQXX_PRIVATE PQXX_NORETURN ThrowSQLError(
229  const PGSTD::string &Err,
230  const PGSTD::string &Query) const;
231  int PQXX_PRIVATE PQXX_PURE errorposition() const throw ();
232  PGSTD::string PQXX_PRIVATE StatusError() const;
233 
234  friend class pqxx::internal::gate::result_sql_cursor;
235  const char * PQXX_PURE CmdStatus() const throw ();
236 
238  pqxx::internal::pq::PGresult *m_data;
239 
240  static const PGSTD::string PQXX_PRIVATE s_empty_string;
241 };
242 
243 
245 
249 class PQXX_LIBEXPORT const_result_iterator :
250  public PGSTD::iterator<
251  PGSTD::random_access_iterator_tag,
252  const tuple,
255  tuple>,
256  public tuple
257 {
258 public:
259  typedef const tuple *pointer;
260  typedef tuple reference;
263 
264  const_result_iterator() throw () : tuple(0,0) {}
265  const_result_iterator(const tuple &t) throw () : tuple(t) {}
266 
282  pointer operator->() const { return this; } //[t12]
283  reference operator*() const { return tuple(*this); } //[t12]
285 
290  const_result_iterator operator++(int); //[t12]
291  const_result_iterator &operator++() { ++m_Index; return *this; } //[t1]
292  const_result_iterator operator--(int); //[t12]
293  const_result_iterator &operator--() { --m_Index; return *this; } //[t12]
294 
295  const_result_iterator &operator+=(difference_type i) //[t12]
296  { m_Index = size_type(difference_type(m_Index) + i); return *this; }
297  const_result_iterator &operator-=(difference_type i) //[t12]
298  { m_Index = size_type(difference_type (m_Index) - i); return *this; }
300 
305  bool operator==(const const_result_iterator &i) const //[t12]
306  {return m_Index==i.m_Index;}
307  bool operator!=(const const_result_iterator &i) const //[t12]
308  {return m_Index!=i.m_Index;}
309  bool operator<(const const_result_iterator &i) const //[t12]
310  {return m_Index<i.m_Index;}
311  bool operator<=(const const_result_iterator &i) const //[t12]
312  {return m_Index<=i.m_Index;}
313  bool operator>(const const_result_iterator &i) const //[t12]
314  {return m_Index>i.m_Index;}
315  bool operator>=(const const_result_iterator &i) const //[t12]
316  {return m_Index>=i.m_Index;}
318 
323  inline const_result_iterator operator+(difference_type) const; //[t12]
324  friend const_result_iterator operator+( //[t12]
325  difference_type,
326  const_result_iterator);
327  inline const_result_iterator operator-(difference_type) const; //[t12]
328  inline difference_type operator-(const_result_iterator) const; //[t12]
330 
331 private:
332  friend class pqxx::result;
333  const_result_iterator(const pqxx::result *r, result::size_type i) throw () :
334  tuple(r, i) {}
335 };
336 
337 
339 class PQXX_LIBEXPORT const_reverse_result_iterator :
340  private const_result_iterator
341 {
342 public:
343  typedef const_result_iterator super;
344  typedef const_result_iterator iterator_type;
345  using iterator_type::iterator_category;
348 #ifndef _MSC_VER
349  using iterator_type::value_type;
351 #else
352  // Workaround for Visual C++.NET 2003, which has access problems
353  typedef const tuple &reference;
354  typedef tuple value_type;
355 #endif
356 
358  const const_reverse_result_iterator &rhs) :
359  const_result_iterator(rhs) {}
361  const const_result_iterator &rhs) :
362  const_result_iterator(rhs) { super::operator--(); }
363 
364  const_result_iterator PQXX_PURE base() const throw (); //[t75]
365 
370  using const_result_iterator::operator->; //[t75]
371  using const_result_iterator::operator*; //[t75]
373 
378  const_reverse_result_iterator &operator=( //[t75]
380  { iterator_type::operator=(r); return *this; }
381  const_reverse_result_iterator operator++() //[t75]
382  { iterator_type::operator--(); return *this; }
383  const_reverse_result_iterator operator++(int); //[t75]
384  const_reverse_result_iterator &operator--() //[t75]
385  { iterator_type::operator++(); return *this; }
386  const_reverse_result_iterator operator--(int); //[t75]
387  const_reverse_result_iterator &operator+=(difference_type i) //[t75]
388  { iterator_type::operator-=(i); return *this; }
389  const_reverse_result_iterator &operator-=(difference_type i) //[t75]
390  { iterator_type::operator+=(i); return *this; }
392 
397  const_reverse_result_iterator operator+(difference_type i) const //[t75]
398  { return const_reverse_result_iterator(base() - i); }
399  const_reverse_result_iterator operator-(difference_type i) //[t75]
400  { return const_reverse_result_iterator(base() + i); }
401  difference_type operator-( //[t75]
402  const const_reverse_result_iterator &rhs) const
403  { return rhs.const_result_iterator::operator-(*this); }
405 
410  bool operator==( //[t75]
411  const const_reverse_result_iterator &rhs) const throw ()
412  { return iterator_type::operator==(rhs); }
413  bool operator!=( //[t75]
414  const const_reverse_result_iterator &rhs) const throw ()
415  { return !operator==(rhs); }
416 
417  bool operator<(const const_reverse_result_iterator &rhs) const //[t75]
418  { return iterator_type::operator>(rhs); }
419  bool operator<=(const const_reverse_result_iterator &rhs) const //[t75]
420  { return iterator_type::operator>=(rhs); }
421  bool operator>(const const_reverse_result_iterator &rhs) const //[t75]
422  { return iterator_type::operator<(rhs); }
423  bool operator>=(const const_reverse_result_iterator &rhs) const //[t75]
424  { return iterator_type::operator<=(rhs); }
426 };
427 
428 
429 
431 
451 template<typename CHAR>
452 inline PGSTD::basic_ostream<CHAR> &operator<<(
453  PGSTD::basic_ostream<CHAR> &S, const pqxx::field &F) //[t46]
454 {
455  S.write(F.c_str(), PGSTD::streamsize(F.size()));
456  return S;
457 }
458 
459 
461 template<typename T>
462 inline void from_string(const field &F, T &Obj) //[t46]
463  { from_string(F.c_str(), Obj, F.size()); }
464 
466 template<>
467 inline PGSTD::string to_string(const field &Obj) //[t74]
468  { return PGSTD::string(Obj.c_str(), Obj.size()); }
469 
470 
471 inline const_result_iterator
473 {
474  return const_result_iterator(
475  m_Home, size_type(result::difference_type(m_Index) + o));
476 }
477 
478 inline const_result_iterator
479 operator+(result::difference_type o, const_result_iterator i)
480  { return i + o; }
481 
482 inline const_result_iterator
484 {
485  return const_result_iterator(
486  m_Home,
488 }
489 
491 const_result_iterator::operator-(const_result_iterator i) const
492  { return result::difference_type(num() - i.num()); }
493 
494 inline const_result_iterator result::end() const throw ()
495  { return const_result_iterator(this, size()); }
496 
497 
501  { return const_reverse_result_iterator(i.base() - n); }
502 
503 } // namespace pqxx
504 
505 
506 #include "pqxx/compiler-internal-post.hxx"
507 
508 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00158_source.html000066400000000000000000000444571224474465600226510ustar00rootroot00000000000000 libpqxx: robusttransaction.hxx Source File
robusttransaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/robusttransaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::robusttransaction class.
8  * pqxx::robusttransaction is a slower but safer transaction class
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/robusttransaction instead.
10  *
11  * Copyright (c) 2002-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_ROBUSTTRANSACTION
20 #define PQXX_H_ROBUSTTRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/dbtransaction"
26 
27 #ifdef PQXX_QUIET_DESTRUCTORS
28 #include "pqxx/errorhandler"
29 #endif
30 
31 
32 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
33  */
34 
35 
36 namespace pqxx
37 {
38 
45 class PQXX_LIBEXPORT PQXX_NOVTABLE basic_robusttransaction :
46  public dbtransaction
47 {
48 public:
51 
52  virtual ~basic_robusttransaction() =0; //[t16]
53 
54 protected:
56  connection_base &C,
57  const PGSTD::string &IsolationLevel,
58  const PGSTD::string &table_name=PGSTD::string()); //[t16]
59 
60 private:
61  typedef unsigned long IDType;
62  IDType m_record_id;
63  PGSTD::string m_xid;
64  PGSTD::string m_LogTable;
65  PGSTD::string m_sequence;
66  int m_backendpid;
67 
68  virtual void do_begin(); //[t18]
69  virtual void do_commit(); //[t16]
70  virtual void do_abort(); //[t18]
71 
72  void PQXX_PRIVATE CreateLogTable();
73  void PQXX_PRIVATE CreateTransactionRecord();
74  PGSTD::string PQXX_PRIVATE sql_delete() const;
75  void PQXX_PRIVATE DeleteTransactionRecord() throw ();
76  bool PQXX_PRIVATE CheckTransactionRecord();
77 };
78 
79 
80 
82 
148 template<isolation_level ISOLATIONLEVEL=read_committed>
150 {
151 public:
153 
155 
160  const PGSTD::string &Name=PGSTD::string()) :
161  namedclass(fullname("robusttransaction",isolation_tag::name()), Name),
162  basic_robusttransaction(C, isolation_tag::name())
163  { Begin(); }
164 
165  virtual ~robusttransaction() throw ()
166  {
167 #ifdef PQXX_QUIET_DESTRUCTORS
168  quiet_errorhandler quiet(conn());
169 #endif
170  End();
171  }
172 };
173 
178 } // namespace pqxx
179 
180 
181 #include "pqxx/compiler-internal-post.hxx"
182 
183 #endif
184 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00161_source.html000066400000000000000000001366601224474465600226410ustar00rootroot00000000000000 libpqxx: strconv.hxx Source File
strconv.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/stringconv.hxx
5  *
6  * DESCRIPTION
7  * String conversion definitions for libpqxx
8  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stringconv instead.
9  *
10  * Copyright (c) 2008-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_STRINGCONV
19 #define PQXX_H_STRINGCONV
20 
21 #include "pqxx/compiler-public.hxx"
22 
23 #include <sstream>
24 #include <stdexcept>
25 
26 
27 namespace pqxx
28 {
29 
41 
43 
46 template<typename T> struct string_traits {};
47 
48 namespace internal
49 {
51 void PQXX_LIBEXPORT PQXX_NORETURN throw_null_conversion(
52  const PGSTD::string &type);
53 } // namespace pqxx::internal
54 
55 #define PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(T) \
56 template<> struct PQXX_LIBEXPORT string_traits<T> \
57 { \
58  typedef T subject_type; \
59  static const char *name() { return #T; } \
60  static bool has_null() { return false; } \
61  static bool is_null(T) { return false; } \
62  static T null() \
63  { internal::throw_null_conversion(name()); return subject_type(); } \
64  static void from_string(const char Str[], T &Obj); \
65  static PGSTD::string to_string(T Obj); \
66 };
67 
69 
76 #ifdef PQXX_HAVE_LONG_LONG
79 #endif
80 
83 #ifdef PQXX_HAVE_LONG_DOUBLE
85 #endif
86 
87 #undef PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION
88 
90 template<> struct PQXX_LIBEXPORT string_traits<const char *>
91 {
92  static const char *name() { return "const char *"; }
93  static bool has_null() { return true; }
94  static bool is_null(const char *t) { return !t; }
95  static const char *null() { return NULL; }
96  static void from_string(const char Str[], const char *&Obj) { Obj = Str; }
97  static PGSTD::string to_string(const char *Obj) { return Obj; }
98 };
99 
101 template<> struct PQXX_LIBEXPORT string_traits<char *>
102 {
103  static const char *name() { return "char *"; }
104  static bool has_null() { return true; }
105  static bool is_null(const char *t) { return !t; }
106  static const char *null() { return NULL; }
107 
108  // Don't allow this conversion since it breaks const-safety.
109  // static void from_string(const char Str[], char *&Obj);
110 
111  static PGSTD::string to_string(char *Obj) { return Obj; }
112 };
113 
115 template<size_t N> struct PQXX_LIBEXPORT string_traits<char[N]>
116 {
117  static const char *name() { return "char[]"; }
118  static bool has_null() { return true; }
119  static bool is_null(const char t[]) { return !t; }
120  static const char *null() { return NULL; }
121  static PGSTD::string to_string(const char Obj[]) { return Obj; }
122 };
123 
125 
128 template<size_t N> struct PQXX_LIBEXPORT string_traits<const char[N]>
129 {
130  static const char *name() { return "char[]"; }
131  static bool has_null() { return true; }
132  static bool is_null(const char t[]) { return !t; }
133  static const char *null() { return NULL; }
134  static PGSTD::string to_string(const char Obj[]) { return Obj; }
135 };
136 
137 
138 template<> struct PQXX_LIBEXPORT string_traits<PGSTD::string>
139 {
140  static const char *name() { return "string"; }
141  static bool has_null() { return false; }
142  static bool is_null(const PGSTD::string &) { return false; }
143  static PGSTD::string null()
144  { internal::throw_null_conversion(name()); return PGSTD::string(); }
145  static void from_string(const char Str[], PGSTD::string &Obj) { Obj=Str; }
146  static PGSTD::string to_string(const PGSTD::string &Obj) { return Obj; }
147 };
148 
149 template<> struct PQXX_LIBEXPORT string_traits<const PGSTD::string>
150 {
151  static const char *name() { return "const string"; }
152  static bool has_null() { return false; }
153  static bool is_null(const PGSTD::string &) { return false; }
154  static const PGSTD::string null()
155  { internal::throw_null_conversion(name()); return PGSTD::string(); }
156  static const PGSTD::string to_string(const PGSTD::string &Obj) { return Obj; }
157 };
158 
159 template<> struct PQXX_LIBEXPORT string_traits<PGSTD::stringstream>
160 {
161  static const char *name() { return "stringstream"; }
162  static bool has_null() { return false; }
163  static bool is_null(const PGSTD::stringstream &) { return false; }
164  static PGSTD::stringstream null()
165  {
167  // No, dear compiler, we don't need a return here.
168  throw 0;
169  }
170  static void from_string(const char Str[], PGSTD::stringstream &Obj)
171  { Obj.clear(); Obj << Str; }
172  static PGSTD::string to_string(const PGSTD::stringstream &Obj)
173  { return Obj.str(); }
174 };
175 
176 
177 // TODO: Implement date conversions
178 
180 
192 template<typename T>
193  inline void from_string(const char Str[], T &Obj)
194 {
195  if (!Str)
196  throw PGSTD::runtime_error("Attempt to read NULL string");
198 }
199 
200 
202 
208 template<typename T> inline void from_string(const char Str[], T &Obj, size_t)
209 {
210  return from_string(Str, Obj);
211 }
212 
213 template<>
214  inline void from_string<PGSTD::string>(const char Str[],
215  PGSTD::string &Obj,
216  size_t len) //[t0]
217 {
218  if (!Str)
219  throw PGSTD::runtime_error("Attempt to read NULL string");
220  Obj.assign(Str, len);
221 }
222 
223 template<typename T>
224  inline void from_string(const PGSTD::string &Str, T &Obj) //[t45]
225  { from_string(Str.c_str(), Obj); }
226 
227 template<typename T>
228  inline void from_string(const PGSTD::stringstream &Str, T &Obj) //[t0]
229  { from_string(Str.str(), Obj); }
230 
231 template<> inline void
232 from_string(const PGSTD::string &Str, PGSTD::string &Obj) //[t46]
233  { Obj = Str; }
234 
235 
236 namespace internal
237 {
239 inline int digit_to_number(char c) throw () { return c-'0'; }
240 inline char number_to_digit(int i) throw () { return static_cast<char>(i+'0'); }
241 } // namespace pqxx::internal
242 
243 
245 
249 template<typename T> inline PGSTD::string to_string(const T &Obj)
250  { return string_traits<T>::to_string(Obj); }
251 
253 
254 } // namespace pqxx
255 
256 #endif
257 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00163_source.html000066400000000000000000000301141224474465600226260ustar00rootroot00000000000000 libpqxx: subtransaction.hxx Source File
subtransaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/subtransaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::subtransaction class.
8  * pqxx::subtransaction is a nested transaction, i.e. one within a transaction
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead.
10  *
11  * Copyright (c) 2005-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_SUBTRANSACTION
20 #define PQXX_H_SUBTRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/dbtransaction"
26 
27 
28 
29 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
30  */
31 
32 
33 namespace pqxx
34 {
35 
39 
40 
86 class PQXX_LIBEXPORT subtransaction :
88  public dbtransaction
89 {
90 public:
92  explicit subtransaction( //[t88]
93  dbtransaction &T, const PGSTD::string &Name=PGSTD::string());
94 
96  explicit subtransaction(
97  subtransaction &T, const PGSTD::string &Name=PGSTD::string());
98 
99 private:
100  virtual void do_begin(); //[t88]
101  virtual void do_commit(); //[t88]
102  virtual void do_abort(); //[t88]
103 
104  void check_backendsupport() const;
105 
106  dbtransaction &m_parent;
107 };
108 
109 }
110 
111 
112 #include "pqxx/compiler-internal-post.hxx"
113 
114 #endif
115 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00165_source.html000066400000000000000000000451311224474465600226350ustar00rootroot00000000000000 libpqxx: tablereader.hxx Source File
tablereader.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/tablereader.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::tablereader class.
8  * pqxx::tablereader enables optimized batch reads from a database table
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablereader instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TABLEREADER
20 #define PQXX_H_TABLEREADER
21 #include "pqxx/compiler-public.hxx"
22 #include "pqxx/compiler-internal-pre.hxx"
23 #include "pqxx/result"
24 #include "pqxx/tablestream"
25 namespace pqxx
26 {
28 
31 class PQXX_LIBEXPORT tablereader : public tablestream
32 {
33 public:
35  const PGSTD::string &Name,
36  const PGSTD::string &Null=PGSTD::string());
37  template<typename ITER>
39  const PGSTD::string &Name,
40  ITER begincolumns,
41  ITER endcolumns);
42  template<typename ITER> tablereader(transaction_base &,
43  const PGSTD::string &Name,
44  ITER begincolumns,
45  ITER endcolumns,
46  const PGSTD::string &Null);
47  ~tablereader() throw ();
48  template<typename TUPLE> tablereader &operator>>(TUPLE &);
49  operator bool() const throw () { return !m_Done; }
50  bool operator!() const throw () { return m_Done; }
51  bool get_raw_line(PGSTD::string &Line);
52  template<typename TUPLE>
53  void tokenize(PGSTD::string, TUPLE &) const;
54  virtual void complete();
55 private:
56  void setup(transaction_base &T,
57  const PGSTD::string &RName,
58  const PGSTD::string &Columns=PGSTD::string());
59  void PQXX_PRIVATE reader_close();
60  PGSTD::string extract_field(const PGSTD::string &,
61  PGSTD::string::size_type &) const;
62  bool m_Done;
63 };
64 template<typename ITER> inline
66  const PGSTD::string &Name,
67  ITER begincolumns,
68  ITER endcolumns) :
69  namedclass(Name, "tablereader"),
70  tablestream(T, PGSTD::string()),
71  m_Done(true)
72 {
73  setup(T, Name, columnlist(begincolumns, endcolumns));
74 }
75 template<typename ITER> inline
77  const PGSTD::string &Name,
78  ITER begincolumns,
79  ITER endcolumns,
80  const PGSTD::string &Null) :
81  namedclass(Name, "tablereader"),
82  tablestream(T, Null),
83  m_Done(true)
84 {
85  setup(T, Name, columnlist(begincolumns, endcolumns));
86 }
87 template<typename TUPLE>
88 inline void tablereader::tokenize(PGSTD::string Line, TUPLE &T) const
89 {
90  PGSTD::back_insert_iterator<TUPLE> ins = PGSTD::back_inserter(T);
91  PGSTD::string::size_type here=0;
92  while (here < Line.size()) *ins++ = extract_field(Line, here);
93 }
94 template<typename TUPLE>
96 {
97  PGSTD::string Line;
98  if (get_raw_line(Line)) tokenize(Line, T);
99  return *this;
100 }
101 } // namespace pqxx
102 #include "pqxx/compiler-internal-post.hxx"
103 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00167_source.html000066400000000000000000000277011224474465600226420ustar00rootroot00000000000000 libpqxx: tablestream.hxx Source File
tablestream.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/tablestream.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::tablestream class.
8  * pqxx::tablestream provides optimized batch access to a database table
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TABLESTREAM
20 #define PQXX_H_TABLESTREAM
21 #include "pqxx/compiler-public.hxx"
22 #include "pqxx/compiler-internal-pre.hxx"
23 #include "pqxx/transaction_base"
24 namespace pqxx
25 {
26 class transaction_base;
28 class PQXX_LIBEXPORT PQXX_NOVTABLE tablestream :
30 {
31 public:
32  explicit tablestream(transaction_base &Trans,
33  const PGSTD::string &Null=PGSTD::string());
34  virtual ~tablestream() throw () =0;
35  virtual void complete() =0;
36 protected:
37  const PGSTD::string &NullStr() const { return m_Null; }
38  bool is_finished() const throw () { return m_Finished; }
39  void base_close();
40  template<typename ITER>
41  static PGSTD::string columnlist(ITER colbegin, ITER colend);
42 private:
43  PGSTD::string m_Null;
44  bool m_Finished;
45  tablestream();
46  tablestream(const tablestream &);
47  tablestream &operator=(const tablestream &);
48 };
49 template<typename ITER> inline
50 PGSTD::string tablestream::columnlist(ITER colbegin, ITER colend)
51 {
52  return separated_list(",", colbegin, colend);
53 }
54 } // namespace pqxx
55 #include "pqxx/compiler-internal-post.hxx"
56 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00169_source.html000066400000000000000000001021571224474465600226430ustar00rootroot00000000000000 libpqxx: tablewriter.hxx Source File
tablewriter.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/tablewriter.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::tablewriter class.
8  * pqxx::tablewriter enables optimized batch updates to a database table
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablewriter.hxx instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TABLEWRITER
20 #define PQXX_H_TABLEWRITER
21 #include "pqxx/compiler-public.hxx"
22 #include "pqxx/compiler-internal-pre.hxx"
23 #include "pqxx/tablestream"
24 namespace pqxx
25 {
26 class tablereader;
28 
31 class PQXX_LIBEXPORT tablewriter : public tablestream
32 {
33 public:
34  typedef unsigned size_type;
36  const PGSTD::string &WName,
37  const PGSTD::string &Null=PGSTD::string());
38  template<typename ITER> tablewriter(transaction_base &,
39  const PGSTD::string &WName,
40  ITER begincolumns,
41  ITER endcolumns);
42  template<typename ITER> tablewriter(transaction_base &T,
43  const PGSTD::string &WName,
44  ITER begincolumns,
45  ITER endcolumns,
46  const PGSTD::string &Null);
47  ~tablewriter() throw ();
48  template<typename IT> void insert(IT Begin, IT End);
49  template<typename TUPLE> void insert(const TUPLE &);
50  template<typename IT> void push_back(IT Begin, IT End);
51  template<typename TUPLE> void push_back(const TUPLE &);
52  void reserve(size_type) {}
53  template<typename TUPLE> tablewriter &operator<<(const TUPLE &);
55  template<typename IT> PGSTD::string generate(IT Begin, IT End) const;
56  template<typename TUPLE> PGSTD::string generate(const TUPLE &) const;
57  virtual void complete();
58  void write_raw_line(const PGSTD::string &);
59 private:
60  void setup(transaction_base &,
61  const PGSTD::string &WName,
62  const PGSTD::string &Columns = PGSTD::string());
63  void PQXX_PRIVATE writer_close();
64 };
65 } // namespace pqxx
66 namespace PGSTD
67 {
68 template<>
69  class back_insert_iterator<pqxx::tablewriter> :
70  public iterator<output_iterator_tag, void,void,void,void>
71 {
72 public:
73  explicit back_insert_iterator(pqxx::tablewriter &W) throw () :
74  m_Writer(&W) {}
75  back_insert_iterator &
76  operator=(const back_insert_iterator &rhs) throw ()
77  {
78  m_Writer = rhs.m_Writer;
79  return *this;
80  }
81  template<typename TUPLE>
82  back_insert_iterator &operator=(const TUPLE &T)
83  {
84  m_Writer->insert(T);
85  return *this;
86  }
87  back_insert_iterator &operator++() { return *this; }
88  back_insert_iterator &operator++(int) { return *this; }
89  back_insert_iterator &operator*() { return *this; }
90 private:
91  pqxx::tablewriter *m_Writer;
92 };
93 } // namespace PGSTD
94 namespace pqxx
95 {
96 template<typename ITER> inline tablewriter::tablewriter(transaction_base &T,
97  const PGSTD::string &WName,
98  ITER begincolumns,
99  ITER endcolumns) :
100  namedclass("tablewriter", WName),
101  tablestream(T, PGSTD::string())
102 {
103  setup(T, WName, columnlist(begincolumns, endcolumns));
104 }
105 template<typename ITER> inline tablewriter::tablewriter(transaction_base &T,
106  const PGSTD::string &WName,
107  ITER begincolumns,
108  ITER endcolumns,
109  const PGSTD::string &Null) :
110  namedclass("tablewriter", WName),
111  tablestream(T, Null)
112 {
113  setup(T, WName, columnlist(begincolumns, endcolumns));
114 }
115 namespace internal
116 {
117 PGSTD::string PQXX_LIBEXPORT Escape(
118  const PGSTD::string &s,
119  const PGSTD::string &null);
120 inline PGSTD::string EscapeAny(
121  const PGSTD::string &s,
122  const PGSTD::string &null)
123 { return Escape(s, null); }
124 inline PGSTD::string EscapeAny(
125  const char s[],
126  const PGSTD::string &null)
127 { return s ? Escape(PGSTD::string(s), null) : "\\N"; }
128 template<typename T> inline PGSTD::string EscapeAny(
129  const T &t,
130  const PGSTD::string &null)
131 { return Escape(to_string(t), null); }
132 template<typename IT> class Escaper
133 {
134  const PGSTD::string &m_null;
135 public:
136  explicit Escaper(const PGSTD::string &null) : m_null(null) {}
137  PGSTD::string operator()(IT i) const { return EscapeAny(*i, m_null); }
138 };
139 }
140 template<typename IT>
141 inline PGSTD::string tablewriter::generate(IT Begin, IT End) const
142 {
143  return separated_list("\t", Begin, End, internal::Escaper<IT>(NullStr()));
144 }
145 template<typename TUPLE>
146 inline PGSTD::string tablewriter::generate(const TUPLE &T) const
147 {
148  return generate(T.begin(), T.end());
149 }
150 template<typename IT> inline void tablewriter::insert(IT Begin, IT End)
151 {
152  write_raw_line(generate(Begin, End));
153 }
154 template<typename TUPLE> inline void tablewriter::insert(const TUPLE &T)
155 {
156  insert(T.begin(), T.end());
157 }
158 template<typename IT>
159 inline void tablewriter::push_back(IT Begin, IT End)
160 {
161  insert(Begin, End);
162 }
163 template<typename TUPLE>
164 inline void tablewriter::push_back(const TUPLE &T)
165 {
166  insert(T.begin(), T.end());
167 }
168 template<typename TUPLE>
169 inline tablewriter &tablewriter::operator<<(const TUPLE &T)
170 {
171  insert(T);
172  return *this;
173 }
174 } // namespace pqxx
175 #include "pqxx/compiler-internal-post.hxx"
176 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00171_source.html000066400000000000000000000464051224474465600226370ustar00rootroot00000000000000 libpqxx: transaction.hxx Source File
transaction.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/transaction.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::transaction class.
8  * pqxx::transaction represents a standard database transaction
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TRANSACTION
20 #define PQXX_H_TRANSACTION
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/dbtransaction"
26 
27 #ifdef PQXX_QUIET_DESTRUCTORS
28 #include "pqxx/errorhandler"
29 #endif
30 
31 
32 
33 /* Methods tested in eg. self-test program test1 are marked with "//[t1]"
34  */
35 
36 
37 namespace pqxx
38 {
39 
44 
45 class PQXX_LIBEXPORT basic_transaction : public dbtransaction
46 {
47 protected:
48  basic_transaction( //[t1]
49  connection_base &C,
50  const PGSTD::string &IsolationLevel,
52 
53 private:
54  virtual void do_commit(); //[t1]
55 };
56 
57 
59 
87 template<
88  isolation_level ISOLATIONLEVEL=read_committed,
89  readwrite_policy READWRITE=read_write>
91 {
92 public:
94 
96 
101  explicit transaction(connection_base &C, const PGSTD::string &TName): //[t1]
102  namedclass(fullname("transaction", isolation_tag::name()), TName),
103  basic_transaction(C, isolation_tag::name(), READWRITE)
104  { Begin(); }
105 
106  explicit transaction(connection_base &C) : //[t1]
107  namedclass(fullname("transaction", isolation_tag::name())),
108  basic_transaction(C, isolation_tag::name(), READWRITE)
109  { Begin(); }
110 
111  virtual ~transaction() throw ()
112  {
113 #ifdef PQXX_QUIET_DESTRUCTORS
114  quiet_errorhandler quiet(conn());
115 #endif
116  End();
117  }
118 };
119 
120 
123 
126 
128 
129 }
130 
131 
132 #include "pqxx/compiler-internal-post.hxx"
133 
134 #endif
135 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00173_source.html000066400000000000000000001417041224474465600226370ustar00rootroot00000000000000 libpqxx: transaction_base.hxx Source File
transaction_base.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/transaction_base.hxx
5  *
6  * DESCRIPTION
7  * common code and definitions for the transaction classes.
8  * pqxx::transaction_base defines the interface for any abstract class that
9  * represents a database transaction
10  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction_base instead.
11  *
12  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
13  *
14  * See COPYING for copyright license. If you did not receive a file called
15  * COPYING with this source code, please notify the distributor of this mistake,
16  * or contact the author.
17  *
18  *-------------------------------------------------------------------------
19  */
20 #ifndef PQXX_H_TRANSACTION_BASE
21 #define PQXX_H_TRANSACTION_BASE
22 
23 #include "pqxx/compiler-public.hxx"
24 #include "pqxx/compiler-internal-pre.hxx"
25 
26 /* End-user programs need not include this file, unless they define their own
27  * transaction classes. This is not something the typical program should want
28  * to do.
29  *
30  * However, reading this file is worthwhile because it defines the public
31  * interface for the available transaction classes such as transaction and
32  * nontransaction.
33  */
34 
35 #include "pqxx/connection_base"
36 #include "pqxx/isolation"
37 #include "pqxx/result"
38 
39 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
40  */
41 
42 namespace pqxx
43 {
44 class connection_base;
45 class transaction_base;
46 
47 
48 namespace internal
49 {
50 class sql_cursor;
51 
52 class PQXX_LIBEXPORT transactionfocus : public virtual namedclass
53 {
54 public:
56  namedclass("transactionfocus"),
57  m_Trans(t),
58  m_registered(false)
59  {
60  }
61 
62 protected:
63  void register_me();
64  void unregister_me() throw ();
65  void reg_pending_error(const PGSTD::string &) throw ();
66  bool registered() const throw () { return m_registered; }
67 
69 
70 private:
71  bool m_registered;
72 
78  transactionfocus &operator=(const transactionfocus &);
79 };
80 
81 
82 class PQXX_LIBEXPORT parameterized_invocation : statement_parameters
83 {
84 public:
85  parameterized_invocation(connection_base &, const PGSTD::string &query);
86 
87  parameterized_invocation &operator()() { add_param(); return *this; }
88  parameterized_invocation &operator()(const binarystring &v)
89  { add_binary_param(v, true); return *this; }
90  template<typename T> parameterized_invocation &operator()(const T &v)
91  { add_param(v, true); return *this; }
92  parameterized_invocation &operator()(const binarystring &v, bool nonnull)
93  { add_binary_param(v, nonnull); return *this; }
94  template<typename T>
95  parameterized_invocation &operator()(const T &v, bool nonnull)
96  { add_param(v, nonnull); return *this; }
97 
98  result exec();
99 
100 private:
103 
104  connection_base &m_home;
105  const PGSTD::string m_query;
106 };
107 } // namespace internal
108 
109 
110 namespace internal
111 {
112 namespace gate
113 {
114 class transaction_subtransaction;
115 class transaction_tablereader;
116 class transaction_tablewriter;
117 class transaction_transactionfocus;
118 } // namespace internal::gate
119 } // namespace internal
120 
121 
123 
133 class PQXX_LIBEXPORT PQXX_NOVTABLE transaction_base :
134  public virtual internal::namedclass
135 {
136 public:
139 
140  virtual ~transaction_base() =0; //[t1]
141 
143 
155  void commit(); //[t1]
156 
158 
161  void abort(); //[t10]
162 
167 
168  PGSTD::string esc(const char str[]) const { return conn().esc(str); }
170  PGSTD::string esc(const char str[], size_t maxlen) const
171  { return conn().esc(str, maxlen); }
173  PGSTD::string esc(const PGSTD::string &str) const { return conn().esc(str); }
174 
176 
187  PGSTD::string esc_raw(const unsigned char str[], size_t len) const //[t62]
188  { return conn().esc_raw(str, len); }
190  PGSTD::string esc_raw(const PGSTD::string &) const; //[t62]
191 
193 
194  template<typename T> PGSTD::string quote(const T &t) const
195  { return conn().quote(t); }
196 
198  PGSTD::string quote_raw(const unsigned char str[], size_t len) const
199  { return conn().quote_raw(str, len); }
200 
201  PGSTD::string quote_raw(const PGSTD::string &str) const;
202 
204  PGSTD::string quote_name(const PGSTD::string &identifier) const
205  { return conn().quote_name(identifier); }
207 
209 
224  result exec(const PGSTD::string &Query,
225  const PGSTD::string &Desc=PGSTD::string()); //[t1]
226 
227  result exec(const PGSTD::stringstream &Query,
228  const PGSTD::string &Desc=PGSTD::string())
229  { return exec(Query.str(), Desc); }
230 
232  /* Use this to build up a parameterized statement invocation, then invoke it
233  * using @c exec()
234  *
235  * Example: @c trans.parameterized("SELECT $1 + 1")(1).exec();
236  */
237  internal::parameterized_invocation parameterized(const PGSTD::string &query);
238 
243 
244 
288  prepare::invocation prepared(const PGSTD::string &statement=PGSTD::string());
289 
291 
296 
297  void process_notice(const char Msg[]) const //[t14]
298  { m_Conn.process_notice(Msg); }
300  void process_notice(const PGSTD::string &Msg) const //[t14]
301  { m_Conn.process_notice(Msg); }
303 
305  connection_base &conn() const { return m_Conn; } //[t4]
306 
308 
316  void set_variable(const PGSTD::string &Var, const PGSTD::string &Val);//[t61]
317 
319 
328  PGSTD::string get_variable(const PGSTD::string &); //[t61]
329 
330 
331 protected:
333 
339  explicit transaction_base(connection_base &c, bool direct=true);
340 
342 
344  void Begin();
345 
347  void End() throw ();
348 
350  virtual void do_begin() =0;
352  virtual result do_exec(const char Query[]) =0;
354  virtual void do_commit() =0;
356  virtual void do_abort() =0;
357 
358  // For use by implementing class:
359 
361 
369  result DirectExec(const char C[], int Retries=0);
370 
372  void reactivation_avoidance_clear() throw ()
373  {m_reactivation_avoidance.clear();}
374 
375 protected:
377 
380 
381 private:
382  /* A transaction goes through the following stages in its lifecycle:
383  * <ul>
384  * <li> nascent: the transaction hasn't actually begun yet. If our connection
385  * fails at this stage, it may recover and the transaction can attempt to
386  * establish itself again.
387  * <li> active: the transaction has begun. Since no commit command has been
388  * issued, abortion is implicit if the connection fails now.
389  * <li> aborted: an abort has been issued; the transaction is terminated and
390  * its changes to the database rolled back. It will accept no further
391  * commands.
392  * <li> committed: the transaction has completed successfully, meaning that a
393  * commit has been issued. No further commands are accepted.
394  * <li> in_doubt: the connection was lost at the exact wrong time, and there
395  * is no way of telling whether the transaction was committed or aborted.
396  * </ul>
397  *
398  * Checking and maintaining state machine logic is the responsibility of the
399  * base class (ie., this one).
400  */
401  enum Status
402  {
403  st_nascent,
404  st_active,
405  st_aborted,
406  st_committed,
407  st_in_doubt
408  };
409 
411  void PQXX_PRIVATE activate();
412 
413  void PQXX_PRIVATE CheckPendingError();
414 
415  template<typename T> bool parm_is_null(T *p) const throw () { return !p; }
416  template<typename T> bool parm_is_null(T) const throw () { return false; }
417 
418  friend class pqxx::internal::gate::transaction_transactionfocus;
419  void PQXX_PRIVATE RegisterFocus(internal::transactionfocus *);
420  void PQXX_PRIVATE UnregisterFocus(internal::transactionfocus *) throw ();
421  void PQXX_PRIVATE RegisterPendingError(const PGSTD::string &) throw ();
422 
423  friend class pqxx::internal::gate::transaction_tablereader;
424  void PQXX_PRIVATE BeginCopyRead(const PGSTD::string &, const PGSTD::string &);
425  bool ReadCopyLine(PGSTD::string &);
426 
427  friend class pqxx::internal::gate::transaction_tablewriter;
428  void PQXX_PRIVATE BeginCopyWrite(
429  const PGSTD::string &Table,
430  const PGSTD::string &Columns);
431  void WriteCopyLine(const PGSTD::string &);
432  void EndCopyWrite();
433 
434  friend class pqxx::internal::gate::transaction_subtransaction;
435 
436  connection_base &m_Conn;
437 
438  internal::unique<internal::transactionfocus> m_Focus;
439  Status m_Status;
440  bool m_Registered;
441  PGSTD::map<PGSTD::string, PGSTD::string> m_Vars;
442  PGSTD::string m_PendingError;
443 
449  transaction_base &operator=(const transaction_base &);
450 };
451 
452 } // namespace pqxx
453 
454 
455 #include "pqxx/compiler-internal-post.hxx"
456 
457 #endif
458 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00174_source.html000066400000000000000000000515321224474465600226370ustar00rootroot00000000000000 libpqxx: transactor.hxx Source File
transactor.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/transactor.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::transactor class.
8  * pqxx::transactor is a framework-style wrapper for safe transactions
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transactor instead.
10  *
11  * Copyright (c) 2001-2008, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TRANSACTOR
20 #define PQXX_H_TRANSACTOR
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/connection_base"
26 #include "pqxx/transaction"
27 
28 
29 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
30  */
31 
32 namespace pqxx
33 {
34 
36 
65 template<typename TRANSACTION=transaction<read_committed> >
66  class transactor :
67  public PGSTD::unary_function<TRANSACTION, void>
68 {
69 public:
70  explicit transactor(const PGSTD::string &TName="transactor") : //[t4]
71  m_Name(TName) { }
72 
74 
85  void operator()(TRANSACTION &T); //[t4]
86 
87  // Overridable member functions, called by connection_base::perform() if an
88  // attempt to run transaction fails/succeeds, respectively, or if the
89  // connection is lost at just the wrong moment, goes into an indeterminate
90  // state. Use these to patch up runtime state to match events, if needed, or
91  // to report failure conditions.
92 
94 
102  void on_abort(const char[]) throw () {} //[t13]
103 
105 
109  void on_commit() {} //[t7]
110 
112 
123  void on_doubt() throw () {} //[t13]
124 
125  // TODO: Rename Name()--is there a compatible way?
127  PGSTD::string Name() const { return m_Name; } //[t13]
128 
129 private:
130  PGSTD::string m_Name;
131 };
132 
133 
134 }
135 
136 
137 template<typename TRANSACTOR>
138 inline void pqxx::connection_base::perform(const TRANSACTOR &T,
139  int Attempts)
140 {
141  if (Attempts <= 0) return;
142 
143  bool Done = false;
144 
145  // Make attempts to perform T
146  // TODO: Differentiate between db-related exceptions and other exceptions?
147  do
148  {
149  --Attempts;
150 
151  // Work on a copy of T2 so we can restore the starting situation if need be
152  TRANSACTOR T2(T);
153  try
154  {
155  typename TRANSACTOR::argument_type X(*this, T2.Name());
156  T2(X);
157  X.commit();
158  Done = true;
159  }
160  catch (const in_doubt_error &)
161  {
162  // Not sure whether transaction went through or not. The last thing in
163  // the world that we should do now is retry.
164  T2.on_doubt();
165  throw;
166  }
167  catch (const PGSTD::exception &e)
168  {
169  // Could be any kind of error.
170  T2.on_abort(e.what());
171  if (Attempts <= 0) throw;
172  continue;
173  }
174  catch (...)
175  {
176  // Don't try to forge ahead if we don't even know what happened
177  T2.on_abort("Unknown exception");
178  throw;
179  }
180 
181  T2.on_commit();
182  } while (!Done);
183 }
184 
185 
186 #include "pqxx/compiler-internal-post.hxx"
187 
188 #endif
189 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00175_source.html000066400000000000000000000157051224474465600226420ustar00rootroot00000000000000 libpqxx: trigger.hxx Source File
trigger.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/trigger.hxx
5  *
6  * DESCRIPTION
7  * definition of the pqxx::trigger functor interface.
8  * OBSOLETE. Include pqxx/notify-listen instead.
9  *
10  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_TRIGGER
19 #define PQXX_H_TRIGGER
20 
21 #include "pqxx/notify-listen"
22 
23 namespace pqxx
24 {
30 }
31 
32 #endif
33 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00176.html000066400000000000000000002266651224474465600212740ustar00rootroot00000000000000 libpqxx: pqxx Namespace Reference
pqxx Namespace Reference

The home of all libpqxx classes, functions, templates, etc. More...

Namespaces

namespace  internal
 Private namespace for libpqxx's internal use; do not access.
namespace  prepare
 Dedicated namespace for helper types related to prepared statements.

Classes

class  basic_connection
 The ultimate template that defines a connection type. More...
class  binarystring
class  connect_direct
 Connection policy; creates an immediate connection to a database. More...
class  connect_lazy
 Lazy connection policy; causes connection to be deferred until first use. More...
class  connect_async
 Asynchronous connection policy; connects "in the background". More...
class  connect_null
 Nonfunctional, always-down connection policy for testing/debugging purposes. More...
class  connection_base
 connection_base abstract base class; represents a connection to a database. More...
class  connectionpolicy
class  cursor_base
 Common definitions for cursor types. More...
class  stateless_cursor
 "Stateless cursor" class: easy API for retrieving parts of result sets More...
class  icursorstream
 Simple read-only cursor represented as a stream of results. More...
class  icursor_iterator
 Approximate istream_iterator for icursorstream. More...
class  dbtransaction
class  errorhandler
 Base class for error-handler callbacks. More...
class  quiet_errorhandler
 An error handler that suppresses any previously registered error handlers. More...
class  pqxx_exception
 Mixin base class to identify libpqxx-specific exception types. More...
class  failure
 Run-time failure encountered by libpqxx, similar to std::runtime_error. More...
class  broken_connection
 Exception class for lost or failed backend connection. More...
class  sql_error
 Exception class for failed queries. More...
class  in_doubt_error
 "Help, I don't know whether transaction was committed successfully!" More...
class  internal_error
 Internal error in libpqxx library. More...
class  usage_error
 Error in usage of libpqxx library, similar to std::logic_error. More...
class  argument_error
 Invalid argument passed to libpqxx, similar to std::invalid_argument. More...
class  conversion_error
class  range_error
 Something is out of range, similar to std::out_of_range. More...
class  feature_not_supported
 Database feature not supported in current setup. More...
class  data_exception
 Error in data provided to SQL statement. More...
class  integrity_constraint_violation
class  restrict_violation
class  not_null_violation
class  foreign_key_violation
class  unique_violation
class  check_violation
class  invalid_cursor_state
class  invalid_sql_statement_name
class  invalid_cursor_name
class  syntax_error
class  undefined_column
class  undefined_function
class  undefined_table
class  insufficient_privilege
class  insufficient_resources
 Resource shortage on the server. More...
class  disk_full
class  out_of_memory
class  too_many_connections
class  plpgsql_error
 PL/pgSQL error. More...
class  plpgsql_raise
 Exception raised in PL/pgSQL procedure. More...
class  plpgsql_no_data_found
class  plpgsql_too_many_rows
class  field
 Reference to a field in a result set. More...
class  field_streambuf
class  basic_fieldstream
 Input stream that gets its data from a result field. More...
struct  isolation_traits
 Traits class to describe an isolation level; primarly for libpqxx's own use. More...
class  largeobject
 Identity of a large object. More...
class  largeobjectaccess
 Accessor for large object's contents. More...
class  largeobject_streambuf
 Streambuf to use large objects in standard I/O streams. More...
class  basic_ilostream
 Input stream that gets its data from a large object. More...
class  basic_olostream
 Output stream that writes data back to a large object. More...
class  basic_lostream
 Stream that reads and writes a large object. More...
class  nontransaction
class  notification_receiver
class  notify_listener
 Obsolete notification receiver. More...
class  pipeline
 Processes several queries in FIFO manner, optimized for high throughput. More...
class  result
 Result set containing data returned by a query or command. More...
class  const_result_iterator
 Iterator for rows (tuples) in a result. Use as result::const_iterator. More...
class  const_reverse_result_iterator
 Reverse iterator for result. Use as result::const_reverse_iterator. More...
class  basic_robusttransaction
class  robusttransaction
 Slightly slower, better-fortified version of transaction. More...
struct  string_traits
 Traits class for use in string conversions. More...
struct  string_traits< const char * >
 String traits for C-style string ("pointer to const char") More...
struct  string_traits< char * >
 String traits for non-const C-style string ("pointer to char") More...
struct  string_traits< char[N]>
 String traits for C-style string constant ("array of char") More...
struct  string_traits< const char[N]>
 String traits for "array of const char.". More...
struct  string_traits< std::string >
struct  string_traits< const std::string >
struct  string_traits< std::stringstream >
class  subtransaction
 "Transaction" nested within another transaction More...
class  tablereader
class  tablestream
class  tablewriter
class  basic_transaction
class  transaction
 Standard back-end transaction, templatized on isolation level. More...
class  transaction_base
class  transactor
class  tuple
 Reference to one row in a result. More...
class  const_tuple_iterator
 Iterator for fields in a tuple. Use as tuple::const_iterator. More...
class  const_reverse_tuple_iterator
 Reverse iterator for a tuple. Use as tuple::const_reverse_iterator. More...
struct  thread_safety_model
 Descriptor of library's thread-safety model. More...
class  items
 Container of items with easy contents initialization and string rendering. More...

Typedefs

typedef basic_connection
< connect_direct
connection
 The "standard" connection type: connect to database right now.
typedef basic_connection
< connect_lazy
lazyconnection
 A "lazy" connection type: connect to database only when needed.
typedef basic_connection
< connect_async
asyncconnection
 "Asynchronous" connection type: start connecting, but don't wait for it
typedef basic_connection
< connect_null
nullconnection
 A "dummy" connection type: don't connect to any database at all.
typedef unsigned int tuple_size_type
typedef signed int tuple_difference_type
typedef basic_fieldstream< char > fieldstream
typedef basic_ilostream< char > ilostream
typedef basic_olostream< char > olostream
typedef basic_lostream< char > lostream
typedef transaction work
 Bog-standard, default transaction type.
typedef transaction
< read_committed, read_only
read_transaction
 Read-only transaction.
typedef notify_listener trigger

Enumerations

enum  readwrite_policy { read_only, read_write }
enum  isolation_level { read_committed, repeatable_read, serializable }
 Transaction isolation levels. More...

Functions

std::string escape_binary (const std::string &bin)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string encrypt_password (const std::string &user, const std::string &password)
 Encrypt password for given user. Requires libpq 8.2 or better.
template<>
bool field::to< std::string > (std::string &Obj) const
 Specialization: to(string &).
template<typename CHAR >
std::basic_ostream< CHAR > & operator<< (std::basic_ostream< CHAR > &S, const pqxx::field &F)
 Write a result field to any type of stream.
template<typename T >
void from_string (const field &F, T &Obj)
 Convert a field's string contents to another type.
template<>
std::string to_string (const field &Obj)
 Convert a field to a string.
const_result_iterator operator+ (result::difference_type o, const_result_iterator i)
const_reverse_result_iterator operator+ (result::difference_type n, const const_reverse_result_iterator &i)
template<typename T >
void from_string (const char Str[], T &Obj)
 Attempt to convert postgres-generated string to given built-in type.
template<typename T >
void from_string (const char Str[], T &Obj, size_t)
 Conversion with known string length (for strings that may contain nuls)
template<>
void from_string< std::string > (const char Str[], std::string &Obj, size_t len)
template<typename T >
void from_string (const std::string &Str, T &Obj)
template<typename T >
void from_string (const std::stringstream &Str, T &Obj)
template<>
void from_string (const std::string &Str, std::string &Obj)
template<typename T >
std::string to_string (const T &Obj)
 Convert built-in type to a readable string that PostgreSQL will understand.
const_tuple_iterator operator+ (const_tuple_iterator::difference_type o, const_tuple_iterator i)
thread_safety_model describe_thread_safety () throw ()
 Describe thread safety available in this build.
template<typename ITER , typename ACCESS >
std::string separated_list (const std::string &sep, ITER begin, ITER end, ACCESS access)
 Access iterators using ACCESS functor, returning separator-separated list.
template<typename ITER >
std::string separated_list (const std::string &sep, ITER begin, ITER end)
 Render sequence as a string, using given separator between items.
template<typename OBJ >
std::string separated_list (const std::string &sep, OBJ *begin, OBJ *end)
 Render array as a string, using given separator between items.
template<typename CONTAINER >
std::string separated_list (const std::string &sep, const CONTAINER &c)
 Render items in a container as a string, using given separator.

Variables

const oid oid_none = 0
 The "null" oid.

Detailed Description

The home of all libpqxx classes, functions, templates, etc.

Typedef Documentation

Deprecated:
The trigger class from libpqxx 1.x/2.x has been replaced with notification_receiver.
typedef signed int pqxx::tuple_difference_type
typedef unsigned int pqxx::tuple_size_type

Enumeration Type Documentation

Transaction isolation levels.

These are as defined in the SQL standard. But there are a few notes specific to PostgreSQL.

First, postgres does not support "read uncommitted." The lowest level you can get is "read committed," which is better. PostgreSQL is built on the MVCC paradigm, which guarantees "read committed" isolation without any additional performance overhead, so there was no point in providing the lower level.

Second, "repeatable read" also makes more isolation guarantees than the standard requires. According to the standard, this level prevents "dirty reads" and "nonrepeatable reads," but not "phantom reads." In postgres, it actually prevents all three.

Third, "serializable" is only properly supported starting at postgres 9.1. If you request "serializable" isolation on an older backend, you will get the same isolation as in "repeatable read." It's better than the "repeatable read" defined in the SQL standard, but not a complete implementation of the standard's "serializable" isolation level.

In general, a lower isolation level will allow more surprising interactions between ongoing transactions, but improve performance. A higher level gives you more protection from subtle concurrency bugs, but sometimes it may not be possible to complete your transaction without avoiding paradoxes in the data. In that case a transaction may fail, and the application will have to re-do the whole thing based on the latest state of the database.

Study the levels and design your application with the right level in mind.

Enumerator:
read_committed 
repeatable_read 
serializable 
Enumerator:
read_only 
read_write 

Function Documentation

std::string pqxx::encrypt_password ( const std::string &  user,
const std::string &  password 
)

Encrypt password for given user. Requires libpq 8.2 or better.

Use this when setting a new password for the user if password encryption is enabled. Inputs are the username the password is for, and the plaintext password.

Returns
encrypted version of the password, suitable for encrypted PostgreSQL authentication.

Thus the password for a user can be changed with:

void setpw(transaction_base &t, const string &user, const string &pw)
{
t.exec("ALTER USER " + user + " "
"PASSWORD '" + encrypt_password(user,pw) + "'");
}
Since
libpq 8.2
template<>
bool pqxx::field::to< std::string > ( std::string &  Obj) const

Specialization: to(string &).

template<typename T >
void pqxx::from_string ( const field &  F,
T &  Obj 
)

Convert a field's string contents to another type.

References pqxx::field::c_str(), and pqxx::field::size().

Referenced by from_string(), pqxx::internal::sql_cursor::move(), and pqxx::field::to().

const_tuple_iterator pqxx::operator+ ( const_tuple_iterator::difference_type  o,
const_tuple_iterator  i 
)
const_result_iterator pqxx::operator+ ( result::difference_type  o,
const_result_iterator  i 
)
const_reverse_result_iterator pqxx::operator+ ( result::difference_type  n,
const const_reverse_result_iterator &  i 
)
template<typename CHAR >
std::basic_ostream<CHAR>& pqxx::operator<< ( std::basic_ostream< CHAR > &  S,
const pqxx::field F 
)

Write a result field to any type of stream.

This can be convenient when writing a field to an output stream. More importantly, it lets you write a field to e.g. a stringstream which you can then use to read, format and convert the field in ways that to() does not support.

Example: parse a field into a variable of the nonstandard "<tt>long long</tt>" type.

extern result R;
long long L;
stringstream S;
// Write field's string into S
S << R[0][0];
// Parse contents of S into L
S >> L;

References pqxx::field::c_str(), and pqxx::field::size().

template<typename ITER , typename ACCESS >
std::string pqxx::separated_list ( const std::string &  sep,
ITER  begin,
ITER  end,
ACCESS  access 
)

Access iterators using ACCESS functor, returning separator-separated list.

Parameters
sepseparator string (to be placed between items)
beginbeginning of items sequence
endend of items sequence
accessfunctor defining how to dereference sequence elements

References to_string().

Referenced by pqxx::tablestream::columnlist(), pqxx::tablewriter::generate(), and separated_list().

Variable Documentation

libpqxx-4.0.1+dfsg/doc/html/Reference/a00176.js000066400000000000000000000113661224474465600207320ustar00rootroot00000000000000var a00176 = [ [ "internal", "a00194.html", "a00194" ], [ "prepare", "a00196.html", "a00196" ], [ "basic_connection", "a00006.html", "a00006" ], [ "binarystring", "a00013.html", "a00013" ], [ "connect_direct", "a00020.html", "a00020" ], [ "connect_lazy", "a00021.html", "a00021" ], [ "connect_async", "a00019.html", "a00019" ], [ "connect_null", "a00022.html", "a00022" ], [ "connection_base", "a00023.html", "a00023" ], [ "connectionpolicy", "a00024.html", "a00024" ], [ "cursor_base", "a00030.html", "a00030" ], [ "stateless_cursor", "a00087.html", "a00087" ], [ "icursorstream", "a00044.html", "a00044" ], [ "icursor_iterator", "a00043.html", "a00043" ], [ "dbtransaction", "a00032.html", "a00032" ], [ "errorhandler", "a00036.html", "a00036" ], [ "quiet_errorhandler", "a00076.html", "a00076" ], [ "pqxx_exception", "a00074.html", "a00074" ], [ "failure", "a00038.html", "a00038" ], [ "broken_connection", "a00014.html", "a00014" ], [ "sql_error", "a00086.html", "a00086" ], [ "in_doubt_error", "a00045.html", "a00045" ], [ "internal_error", "a00049.html", "a00049" ], [ "usage_error", "a00113.html", "a00113" ], [ "argument_error", "a00004.html", "a00004" ], [ "conversion_error", "a00029.html", "a00029" ], [ "range_error", "a00077.html", "a00077" ], [ "feature_not_supported", "a00039.html", "a00039" ], [ "data_exception", "a00031.html", "a00031" ], [ "integrity_constraint_violation", "a00048.html", "a00048" ], [ "restrict_violation", "a00081.html", "a00081" ], [ "not_null_violation", "a00061.html", "a00061" ], [ "foreign_key_violation", "a00042.html", "a00042" ], [ "unique_violation", "a00112.html", "a00112" ], [ "check_violation", "a00018.html", "a00018" ], [ "invalid_cursor_state", "a00051.html", "a00051" ], [ "invalid_sql_statement_name", "a00052.html", "a00052" ], [ "invalid_cursor_name", "a00050.html", "a00050" ], [ "syntax_error", "a00097.html", "a00097" ], [ "undefined_column", "a00108.html", "a00108" ], [ "undefined_function", "a00109.html", "a00109" ], [ "undefined_table", "a00110.html", "a00110" ], [ "insufficient_privilege", "a00046.html", "a00046" ], [ "insufficient_resources", "a00047.html", "a00047" ], [ "disk_full", "a00035.html", "a00035" ], [ "out_of_memory", "a00066.html", "a00066" ], [ "too_many_connections", "a00102.html", "a00102" ], [ "plpgsql_error", "a00069.html", "a00069" ], [ "plpgsql_raise", "a00071.html", "a00071" ], [ "plpgsql_no_data_found", "a00070.html", "a00070" ], [ "plpgsql_too_many_rows", "a00072.html", "a00072" ], [ "field", "a00040.html", "a00040" ], [ "field_streambuf", "a00041.html", "a00041" ], [ "basic_fieldstream", "a00007.html", "a00007" ], [ "isolation_traits", "a00054.html", "a00054" ], [ "largeobject", "a00056.html", "a00056" ], [ "largeobjectaccess", "a00058.html", "a00058" ], [ "largeobject_streambuf", "a00057.html", "a00057" ], [ "basic_ilostream", "a00008.html", "a00008" ], [ "basic_olostream", "a00010.html", "a00010" ], [ "basic_lostream", "a00009.html", "a00009" ], [ "nontransaction", "a00060.html", "a00060" ], [ "notification_receiver", "a00062.html", "a00062" ], [ "notify_listener", "a00063.html", "a00063" ], [ "pipeline", "a00068.html", "a00068" ], [ "result", "a00082.html", "a00082" ], [ "const_result_iterator", "a00025.html", "a00025" ], [ "const_reverse_result_iterator", "a00026.html", "a00026" ], [ "basic_robusttransaction", "a00011.html", "a00011" ], [ "robusttransaction", "a00083.html", "a00083" ], [ "string_traits", "a00088.html", null ], [ "string_traits< const char * >", "a00091.html", "a00091" ], [ "string_traits< char * >", "a00089.html", "a00089" ], [ "string_traits< char[N]>", "a00090.html", "a00090" ], [ "string_traits< const char[N]>", "a00092.html", "a00092" ], [ "string_traits< std::string >", "a00094.html", "a00094" ], [ "string_traits< const std::string >", "a00093.html", "a00093" ], [ "string_traits< std::stringstream >", "a00095.html", "a00095" ], [ "subtransaction", "a00096.html", "a00096" ], [ "tablereader", "a00098.html", "a00098" ], [ "tablestream", "a00099.html", "a00099" ], [ "tablewriter", "a00100.html", "a00100" ], [ "basic_transaction", "a00012.html", "a00012" ], [ "transaction", "a00103.html", "a00103" ], [ "transaction_base", "a00104.html", "a00104" ], [ "transactor", "a00106.html", "a00106" ], [ "tuple", "a00107.html", "a00107" ], [ "const_tuple_iterator", "a00028.html", "a00028" ], [ "const_reverse_tuple_iterator", "a00027.html", "a00027" ], [ "thread_safety_model", "a00101.html", "a00101" ], [ "items", "a00055.html", "a00055" ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00178_source.html000066400000000000000000002051721224474465600226440ustar00rootroot00000000000000 libpqxx: tuple.hxx Source File
tuple.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/result.hxx
5  *
6  * DESCRIPTION
7  * definitions for the pqxx::result class and support classes.
8  * pqxx::result represents the set of result tuples from a database query
9  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tuple instead.
10  *
11  * Copyright (c) 2001-2011, Jeroen T. Vermeulen <jtv@xs4all.nl>
12  *
13  * See COPYING for copyright license. If you did not receive a file called
14  * COPYING with this source code, please notify the distributor of this mistake,
15  * or contact the author.
16  *
17  *-------------------------------------------------------------------------
18  */
19 #ifndef PQXX_H_TUPLE
20 #define PQXX_H_TUPLE
21 
22 #include "pqxx/compiler-public.hxx"
23 #include "pqxx/compiler-internal-pre.hxx"
24 
25 #include "pqxx/except"
26 #include "pqxx/field"
27 
28 
29 /* Methods tested in eg. self-test program test001 are marked with "//[t1]"
30  */
31 
32 namespace pqxx
33 {
34 class const_tuple_iterator;
35 class const_reverse_tuple_iterator;
36 class result;
37 class range_error;
38 
39 
41 
52 class PQXX_LIBEXPORT tuple
53 {
54 public:
59  typedef field reference;
63 
65  tuple(const result *r, size_t i) throw ();
66 
67  ~tuple() throw () {} // Yes Scott Meyers, you're absolutely right[1]
68 
73  bool PQXX_PURE operator==(const tuple &) const throw (); //[t75]
74  bool operator!=(const tuple &rhs) const throw () //[t75]
75  { return !operator==(rhs); }
77 
78  const_iterator begin() const throw (); //[t82]
79  const_iterator end() const throw (); //[t82]
80 
85  reference front() const throw (); //[t74]
86  reference back() const throw (); //[t75]
87 
88  const_reverse_tuple_iterator rbegin() const; //[t82]
89  const_reverse_tuple_iterator rend() const; //[t82]
90 
91  reference operator[](size_type) const throw (); //[t11]
92  reference operator[](int) const throw (); //[t2]
93  reference operator[](const char[]) const; //[t11]
94  reference operator[](const PGSTD::string &) const; //[t11]
95  reference at(size_type) const throw (pqxx::range_error); //[t11]
96  reference at(int) const throw (pqxx::range_error); //[t11]
97  reference at(const char[]) const; //[t11]
98  reference at(const PGSTD::string &) const; //[t11]
100 
101  size_type size() const throw () //[t11]
102  { return m_End-m_Begin; }
103 
104  void swap(tuple &) throw (); //[t11]
105 
106  size_t rownumber() const throw () { return m_Index; } //[t11]
107 
112 
113  size_type column_number(const PGSTD::string &ColName) const //[t30]
114  { return column_number(ColName.c_str()); }
115 
117  size_type column_number(const char[]) const; //[t30]
118 
120  oid column_type(size_type) const; //[t7]
121 
123  oid column_type(int ColNum) const //[t7]
124  { return column_type(size_type(ColNum)); }
125 
127  oid column_type(const PGSTD::string &ColName) const //[t7]
128  { return column_type(column_number(ColName)); }
129 
131  oid column_type(const char ColName[]) const //[t7]
132  { return column_type(column_number(ColName)); }
133 
135  oid column_table(size_type ColNum) const; //[t2]
136 
138  oid column_table(int ColNum) const //[t2]
139  { return column_table(size_type(ColNum)); }
141  oid column_table(const PGSTD::string &ColName) const //[t2]
142  { return column_table(column_number(ColName)); }
143 
145 
155  size_type table_column(size_type) const; //[t93]
156 
158  size_type table_column(int ColNum) const //[t93]
159  { return table_column(size_type(ColNum)); }
160 
162  size_type table_column(const PGSTD::string &ColName) const //[t93]
163  { return table_column(column_number(ColName)); }
165 
166  size_t num() const { return rownumber(); } //[t1]
167 
180  tuple slice(size_type Begin, size_type End) const;
181 
182  // Is this an empty slice?
183  bool PQXX_PURE empty() const throw ();
184 
185 protected:
186  friend class field;
187  const result *m_Home;
188  size_t m_Index;
189  size_type m_Begin;
190  size_type m_End;
191 
192 private:
193  // Not allowed:
194  tuple();
195 };
196 
197 
199 class PQXX_LIBEXPORT const_tuple_iterator :
200  public PGSTD::iterator<PGSTD::random_access_iterator_tag,
201  const field,
202  tuple::size_type>,
203  public field
204 {
205  typedef PGSTD::iterator<PGSTD::random_access_iterator_tag,
206  const field,
207  tuple::size_type> it;
208 public:
209  using it::pointer;
212  typedef field reference;
213 
214  const_tuple_iterator(const tuple &T, tuple::size_type C) throw () : //[t82]
215  field(T, C) {}
216  const_tuple_iterator(const field &F) throw () : field(F) {} //[t82]
217 
222  pointer operator->() const { return this; } //[t82]
223  reference operator*() const { return field(*this); } //[t82]
225 
230  const_tuple_iterator operator++(int); //[t82]
231  const_tuple_iterator &operator++() { ++m_col; return *this; } //[t82]
232  const_tuple_iterator operator--(int); //[t82]
233  const_tuple_iterator &operator--() { --m_col; return *this; } //[t82]
234 
235  const_tuple_iterator &operator+=(difference_type i) //[t82]
236  { m_col = size_type(difference_type(m_col) + i); return *this; }
237  const_tuple_iterator &operator-=(difference_type i) //[t82]
238  { m_col = size_type(difference_type(m_col) - i); return *this; }
240 
245  bool operator==(const const_tuple_iterator &i) const //[t82]
246  {return col()==i.col();}
247  bool operator!=(const const_tuple_iterator &i) const //[t82]
248  {return col()!=i.col();}
249  bool operator<(const const_tuple_iterator &i) const //[t82]
250  {return col()<i.col();}
251  bool operator<=(const const_tuple_iterator &i) const //[t82]
252  {return col()<=i.col();}
253  bool operator>(const const_tuple_iterator &i) const //[t82]
254  {return col()>i.col();}
255  bool operator>=(const const_tuple_iterator &i) const //[t82]
256  {return col()>=i.col();}
258 
263  inline const_tuple_iterator operator+(difference_type) const; //[t82]
264 
265  friend const_tuple_iterator operator+( //[t82]
266  difference_type,
268 
269  inline const_tuple_iterator operator-(difference_type) const; //[t82]
270  inline difference_type operator-(const_tuple_iterator) const; //[t82]
272 };
273 
274 
277 {
278 public:
281  using iterator_type::iterator_category;
283  using iterator_type::pointer;
284 #ifndef _MSC_VER
285  using iterator_type::value_type;
287 #else
288  // Workaround for Visual C++.NET 2003, which has access problems
289  typedef field value_type;
290  typedef const field &reference;
291 #endif
292 
295  explicit
296  const_reverse_tuple_iterator(const super &rhs) throw() : //[t82]
297  const_tuple_iterator(rhs) { super::operator--(); }
298 
299  iterator_type PQXX_PURE base() const throw (); //[t82]
300 
305  using iterator_type::operator->; //[t82]
306  using iterator_type::operator*; //[t82]
308 
314  operator=(const const_reverse_tuple_iterator &r) //[t82]
315  { iterator_type::operator=(r); return *this; }
316  const_reverse_tuple_iterator operator++() //[t82]
317  { iterator_type::operator--(); return *this; }
318  const_reverse_tuple_iterator operator++(int); //[t82]
319  const_reverse_tuple_iterator &operator--() //[t82]
320  { iterator_type::operator++(); return *this; }
321  const_reverse_tuple_iterator operator--(int); //[t82]
322  const_reverse_tuple_iterator &operator+=(difference_type i) //[t82]
323  { iterator_type::operator-=(i); return *this; }
324  const_reverse_tuple_iterator &operator-=(difference_type i) //[t82]
325  { iterator_type::operator+=(i); return *this; }
327 
332  const_reverse_tuple_iterator operator+(difference_type i) const //[t82]
333  { return const_reverse_tuple_iterator(base()-i); }
334  const_reverse_tuple_iterator operator-(difference_type i) //[t82]
335  { return const_reverse_tuple_iterator(base()+i); }
336  difference_type
337  operator-(const const_reverse_tuple_iterator &rhs) const //[t82]
338  { return rhs.const_tuple_iterator::operator-(*this); }
340 
345  bool
346  operator==(const const_reverse_tuple_iterator &rhs) const throw () //[t82]
347  { return iterator_type::operator==(rhs); }
348  bool
349  operator!=(const const_reverse_tuple_iterator &rhs) const throw () //[t82]
350  { return !operator==(rhs); }
351 
352  bool operator<(const const_reverse_tuple_iterator &rhs) const //[t82]
353  { return iterator_type::operator>(rhs); }
354  bool operator<=(const const_reverse_tuple_iterator &rhs) const //[t82]
355  { return iterator_type::operator>=(rhs); }
356  bool operator>(const const_reverse_tuple_iterator &rhs) const //[t82]
357  { return iterator_type::operator<(rhs); }
358  bool operator>=(const const_reverse_tuple_iterator &rhs) const //[t82]
359  { return iterator_type::operator<=(rhs); }
361 };
362 
363 
364 inline const_tuple_iterator
365 const_tuple_iterator::operator+(difference_type o) const
366 {
367  return const_tuple_iterator(
368  tuple(home(), idx()),
369  size_type(difference_type(col()) + o));
370 }
371 
374  { return i + o; }
375 
376 inline const_tuple_iterator
377 const_tuple_iterator::operator-(difference_type o) const
378 {
379  return const_tuple_iterator(
380  tuple(home(), idx()),
381  size_type(difference_type(col()) - o));
382 }
383 
386  { return difference_type(num() - i.num()); }
387 
388 
389 } // namespace pqxx
390 
391 
392 /*
393 [1] Scott Meyers, in one of his essential books, "Effective C++" and "More
394 Effective C++", points out that it is good style to have any class containing
395 a member of pointer type define a destructor--just to show that it knows what it
396 is doing with the pointer. This helps prevent nasty memory leak / double
397 deletion bugs typically resulting from programmers' omission to deal with such
398 issues in their destructors.
399 
400 The @c -Weffc++ option in gcc generates warnings for noncompliance with Scott's
401 style guidelines, and hence necessitates the definition of this destructor,
402 trivial as it may be.
403 */
404 
405 
406 #include "pqxx/compiler-internal-post.hxx"
407 
408 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00180_source.html000066400000000000000000002166221224474465600226370ustar00rootroot00000000000000 libpqxx: util.hxx Source File
util.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/util.hxx
5  *
6  * DESCRIPTION
7  * Various utility definitions for libpqxx
8  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/util instead.
9  *
10  * Copyright (c) 2001-2012, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_UTIL
19 #define PQXX_H_UTIL
20 
21 #include "pqxx/compiler-public.hxx"
22 
23 #include <cstdio>
24 #include <cctype>
25 #include <stdexcept>
26 #include <string>
27 #include <typeinfo>
28 #include <vector>
29 
30 #ifdef PQXX_TR1_HEADERS
31 #include <tr1/memory>
32 #else
33 #include <memory>
34 #endif
35 
36 #include "pqxx/strconv"
37 
38 
261 
262 namespace pqxx {}
263 
265 
270 namespace PGSTD {}
271 
272 #include <pqxx/internal/libpq-forward.hxx>
273 
274 
275 namespace pqxx
276 {
278 
280 struct PQXX_LIBEXPORT thread_safety_model
281 {
283 
291 
293 
301 
303 
307 
309 
315 
317 
324 
326  PGSTD::string description;
327 };
328 
330 thread_safety_model PQXX_LIBEXPORT describe_thread_safety() throw ();
331 
333 const oid oid_none = 0;
334 
336 
358 template<typename T=PGSTD::string, typename CONT=PGSTD::vector<T> >
359 class items : public CONT
360 {
361 public:
363  items() : CONT() {} //[t0]
365  explicit items(const T &t) : CONT() { this->push_back(t); } //[t0]
366  items(const T &t1, const T &t2) : CONT() //[t0]
367  { this->push_back(t1); this->push_back(t2); }
368  items(const T &t1, const T &t2, const T &t3) : CONT() //[t0]
369  { this->push_back(t1); this->push_back(t2); this->push_back(t3); }
370  items(const T &t1, const T &t2, const T &t3, const T &t4) : CONT() //[t0]
371  {
372  this->push_back(t1);
373  this->push_back(t2);
374  this->push_back(t3);
375  this->push_back(t4);
376  }
377  items(const T&t1,const T&t2,const T&t3,const T&t4,const T&t5):CONT() //[t0]
378  {
379  this->push_back(t1);
380  this->push_back(t2);
381  this->push_back(t3);
382  this->push_back(t4);
383  this->push_back(t5);
384  }
386  items(const CONT &c) : CONT(c) {} //[t0]
387 
389  items &operator()(const T &t) //[t0]
390  {
391  this->push_back(t);
392  return *this;
393  }
394 };
395 
396 
397 namespace internal
398 {
399 // TODO: Does standard library provide a ready-made version of this?
401 template<typename ITER> struct dereference
402 {
403  typename ITER::value_type operator()(ITER i) const { return *i; }
404 };
405 template<typename T> struct deref_ptr { T operator()(T *i) const {return *i;} };
406 } // namespace internal
407 
408 
410 
416 template<typename ITER, typename ACCESS> inline
417 PGSTD::string separated_list(const PGSTD::string &sep, //[t0]
418  ITER begin,
419  ITER end,
420  ACCESS access)
421 {
422  PGSTD::string result;
423  if (begin != end)
424  {
425  result = to_string(access(begin));
426  for (++begin; begin != end; ++begin)
427  {
428  result += sep;
429  result += to_string(access(begin));
430  }
431  }
432  return result;
433 }
434 
439 
441 template<typename ITER> inline PGSTD::string
442 separated_list(const PGSTD::string &sep, ITER begin, ITER end) //[t0]
443  { return separated_list(sep,begin,end,internal::dereference<ITER>()); }
444 
445 
447 template<typename OBJ> inline PGSTD::string
448 separated_list(const PGSTD::string &sep, OBJ *begin, OBJ *end) //[t0]
449  { return separated_list(sep,begin,end,internal::deref_ptr<OBJ>()); }
450 
451 
453 template<typename CONTAINER> inline PGSTD::string
454 separated_list(const PGSTD::string &sep, const CONTAINER &c) //[t10]
455  { return separated_list(sep, c.begin(), c.end()); }
457 
459 
468 namespace internal
469 {
470 typedef unsigned long result_size_type;
472 } // namespace internal
473 
474 
475 namespace internal
476 {
477 void PQXX_LIBEXPORT freepqmem(const void *) throw ();
478 template<typename P> inline void freepqmem_templated(P *p) throw ()
479 {
480  freepqmem(p);
481 }
482 
483 void PQXX_LIBEXPORT freemallocmem(const void *) throw ();
484 template<typename P> inline void freemallocmem_templated(P *p) throw ()
485 {
486  freemallocmem(p);
487 }
488 
489 
490 #ifdef PQXX_HAVE_SHARED_PTR
491 
493 template<typename T, void (*DELETER)(T *) = freepqmem_templated<T> >
494  class PQAlloc
495 {
496 public:
497  typedef T content_type;
498  PQAlloc() throw () : m_ptr() {}
499  PQAlloc(const PQAlloc &rhs) throw () : m_ptr(rhs.m_ptr) {}
500  explicit PQAlloc(T *t) : m_ptr(t, DELETER) {}
501 
502  T *get() const throw () { return m_ptr.get(); }
503  PQAlloc &operator=(const PQAlloc &rhs) throw ()
504  {
505  m_ptr = rhs.m_ptr;
506  return *this;
507  }
508 
509  T *operator->() const throw () { return m_ptr.get(); }
510  T &operator*() const throw () { return *m_ptr; }
511  void reset() throw () { m_ptr.reset(); }
512  void swap(PQAlloc &other) throw () { m_ptr.swap(other.m_ptr); }
513 
514 private:
515  PQXXTR1::shared_ptr<T> m_ptr;
516 };
517 
518 #else // !PQXX_HAVE_SHARED_PTR
519 
522 class PQXX_LIBEXPORT refcount
523 {
524  refcount *volatile m_l, *volatile m_r;
525 
526 public:
527  refcount();
528  ~refcount();
529 
531  void makeref(refcount &) throw ();
532 
534  bool loseref() throw ();
535 
536 private:
538  refcount(const refcount &);
540  refcount &operator=(const refcount &);
541 };
542 
543 
545 
558 template<typename T, void (*DELETER)(T *) = freepqmem_templated<T> >
559 class PQAlloc
560 {
561  T *m_Obj;
562  mutable refcount m_rc;
563 public:
564  typedef T content_type;
565 
566  PQAlloc() throw () : m_Obj(0), m_rc() {}
567  PQAlloc(const PQAlloc &rhs) throw () : m_Obj(0), m_rc() { makeref(rhs); }
568  ~PQAlloc() throw () { loseref(); }
569 
570  PQAlloc &operator=(const PQAlloc &rhs) throw () {redoref(rhs); return *this;}
571 
573 
575  explicit PQAlloc(T *obj) throw () : m_Obj(obj), m_rc() {}
576 
577  void swap(PQAlloc &rhs) throw ()
578  {
579  PQAlloc tmp(*this);
580  *this = rhs;
581  rhs = tmp;
582  }
583 
584  //PQAlloc &operator=(T *obj) throw () { redoref(obj); return *this; }
585 
587  operator bool() const throw () { return m_Obj != 0; }
588 
590  bool operator!() const throw () { return !m_Obj; }
591 
593 
595  T *operator->() const throw (PGSTD::logic_error)
596  {
597  if (!m_Obj) throw PGSTD::logic_error("Null pointer dereferenced");
598  return m_Obj;
599  }
600 
602 
604  T &operator*() const throw (PGSTD::logic_error) { return *operator->(); }
605 
607 
609  T *get() const throw () { return m_Obj; }
610 
611  void reset() throw () { loseref(); }
612 
613 private:
614  void makeref(T *p) throw () { m_Obj = p; }
615 
616  void makeref(const PQAlloc &rhs) throw ()
617  {
618  m_Obj = rhs.m_Obj;
619  m_rc.makeref(rhs.m_rc);
620  }
621 
623  void loseref() throw ()
624  {
625  if (m_rc.loseref() && m_Obj) DELETER(m_Obj);
626  m_Obj = 0;
627  }
628 
629  void redoref(const PQAlloc &rhs) throw ()
630  { if (rhs.m_Obj != m_Obj) { loseref(); makeref(rhs); } }
631  void redoref(T *obj) throw ()
632  { if (obj != m_Obj) { loseref(); makeref(obj); } }
633 };
634 
635 #endif // PQXX_HAVE_SHARED_PTR
636 
637 
638 template<typename T> class scoped_array
639 {
640  T *m_ptr;
641 public:
642  typedef size_t size_type;
643  typedef long difference_type;
644 
645  scoped_array() : m_ptr(0) {}
646  explicit scoped_array(size_type n) : m_ptr(new T[n]) {}
647  explicit scoped_array(T *t) : m_ptr(t) {}
648  ~scoped_array() { delete [] m_ptr; }
649 
650  T *get() const throw () { return m_ptr; }
651  T &operator*() const throw () { return *m_ptr; }
652  template<typename INDEX> T &operator[](INDEX i) const throw ()
653  { return m_ptr[i]; }
654 
655  scoped_array &operator=(T *t) throw ()
656  {
657  if (t != m_ptr)
658  {
659  delete [] m_ptr;
660  m_ptr = t;
661  }
662  return *this;
663  }
664 
665 private:
667  scoped_array(const scoped_array &);
669 };
670 
671 
672 class PQXX_LIBEXPORT namedclass
673 {
674 public:
675  namedclass(const PGSTD::string &Classname, const PGSTD::string &Name="") :
676  m_Classname(Classname),
677  m_Name(Name)
678  {
679  }
680 
681  const PGSTD::string &name() const throw () { return m_Name; } //[t1]
682  const PGSTD::string &classname() const throw () {return m_Classname;} //[t73]
683  PGSTD::string description() const;
684 
685 private:
686  PGSTD::string m_Classname, m_Name;
687 };
688 
689 
690 void CheckUniqueRegistration(const namedclass *New, const namedclass *Old);
691 void CheckUniqueUnregistration(const namedclass *New, const namedclass *Old);
692 
693 
695 
698 template<typename GUEST>
699 class unique
700 {
701 public:
702  unique() : m_Guest(0) {}
703 
704  GUEST *get() const throw () { return m_Guest; }
705 
706  void Register(GUEST *G)
707  {
708  CheckUniqueRegistration(G, m_Guest);
709  m_Guest = G;
710  }
711 
712  void Unregister(GUEST *G)
713  {
714  CheckUniqueUnregistration(G, m_Guest);
715  m_Guest = 0;
716  }
717 
718 private:
719  GUEST *m_Guest;
720 
722  unique(const unique &);
724  unique &operator=(const unique &);
725 };
726 
728 
731 void PQXX_LIBEXPORT sleep_seconds(int);
732 
734 typedef const char *cstring;
735 
737 
746 cstring PQXX_LIBEXPORT strerror_wrapper(int err, char buf[], PGSTD::size_t len)
747  throw ();
748 
749 
751 extern const char sql_begin_work[], sql_commit_work[], sql_rollback_work[];
752 
753 
755 template<typename T> inline PGSTD::ptrdiff_t distance(T first, T last)
756 {
757 #ifdef PQXX_HAVE_DISTANCE
758  return PGSTD::distance(first, last);
759 #else
760  // Naive implementation. All we really need for now.
761  PGSTD::ptrdiff_t d;
762  for (d=0; first != last; ++d) ++first;
763  return d;
764 #endif
765 }
766 
767 } // namespace internal
768 } // namespace pqxx
769 
770 #endif
771 
libpqxx-4.0.1+dfsg/doc/html/Reference/a00181_source.html000066400000000000000000000153451224474465600226370ustar00rootroot00000000000000 libpqxx: version.hxx Source File
version.hxx
1 /*-------------------------------------------------------------------------
2  *
3  * FILE
4  * pqxx/version.hxx
5  *
6  * DESCRIPTION
7  * libpqxx version description.
8  * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/version instead.
9  *
10  * Copyright (c) 2009, Jeroen T. Vermeulen <jtv@xs4all.nl>
11  *
12  * See COPYING for copyright license. If you did not receive a file called
13  * COPYING with this source code, please notify the distributor of this mistake,
14  * or contact the author.
15  *
16  *-------------------------------------------------------------------------
17  */
18 #ifndef PQXX_H_VERSION
19 
21 #define PQXX_VERSION "4.0.1"
22 
24 #define PQXX_VERSION_MAJOR 4
25 
27 #define PQXX_VERSION_MINOR 0
28 
30 #define PQXX_ABI "4.0"
31 
32 #endif
libpqxx-4.0.1+dfsg/doc/html/Reference/a00194.html000066400000000000000000001205411224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::internal Namespace Reference
pqxx::internal Namespace Reference

Private namespace for libpqxx's internal use; do not access. More...

Namespaces

namespace  gate

Classes

class  reactivation_avoidance_counter
class  reactivation_avoidance_exemption
 Scoped exemption to reactivation avoidance. More...
class  sql_cursor
 Cursor with SQL positioning semantics. More...
class  notify_listener_forwarder
 Internal helper class to support old-style, payloadless notifications. More...
class  Escaper
class  transactionfocus
class  parameterized_invocation
struct  dereference
 Functor: dereference iterator. More...
struct  deref_ptr
class  refcount
class  PQAlloc
 Reference-counted smart pointer to libpq-allocated object. More...
class  scoped_array
class  namedclass
class  unique
 Ensure proper opening/closing of GUEST objects related to a "host" object. More...

Typedefs

typedef unsigned long result_size_type
typedef long result_difference_type
typedef const char * cstring
 Work around problem with library export directives and pointers.

Functions

void wait_read (const internal::pq::PGconn *)
void wait_read (const internal::pq::PGconn *, long seconds, long microseconds)
void wait_write (const internal::pq::PGconn *)
result::size_type obtain_stateless_cursor_size (sql_cursor &)
result stateless_cursor_retrieve (sql_cursor &, result::difference_type size, result::difference_type begin_pos, result::difference_type end_pos)
void PQXX_NORETURN throw_null_conversion (const std::string &type)
 Throw exception for attempt to convert null to given type.
int digit_to_number (char c) throw ()
 Compute numeric value of given textual digit (assuming that it is a digit)
char number_to_digit (int i) throw ()
std::string Escape (const std::string &s, const std::string &null)
std::string EscapeAny (const std::string &s, const std::string &null)
std::string EscapeAny (const char s[], const std::string &null)
template<typename T >
std::string EscapeAny (const T &t, const std::string &null)
void freepqmem (const void *) throw ()
template<typename P >
void freepqmem_templated (P *p) throw ()
void freemallocmem (const void *) throw ()
template<typename P >
void freemallocmem_templated (P *p) throw ()
void CheckUniqueRegistration (const namedclass *New, const namedclass *Old)
void CheckUniqueUnregistration (const namedclass *New, const namedclass *Old)
void sleep_seconds (int)
 Sleep for the given number of seconds.
cstring strerror_wrapper (int err, char buf[], std::size_t len) throw ()
 Human-readable description for error code, possibly using given buffer.
template<typename T >
std::ptrdiff_t distance (T first, T last)
 Wrapper for std::distance; not all platforms have std::distance().

Variables

const char sql_begin_work [] = "BEGIN"
 Commonly used SQL commands.
const char sql_commit_work [] = "COMMIT"
const char sql_rollback_work [] = "ROLLBACK"

Detailed Description

Private namespace for libpqxx's internal use; do not access.

This namespace hides definitions internal to libpqxx. These are not supposed to be used by client programs, and they may change at any time without notice.

Conversely, if you find something in this namespace tremendously useful, by all means do lodge a request for its publication.

Warning
Here be dragons!

Typedef Documentation

typedef const char* pqxx::internal::cstring

Work around problem with library export directives and pointers.

typedef unsigned long pqxx::internal::result_size_type

Function Documentation

void pqxx::internal::CheckUniqueRegistration ( const namedclass New,
const namedclass Old 
)
void pqxx::internal::CheckUniqueUnregistration ( const namedclass New,
const namedclass Old 
)
int pqxx::internal::digit_to_number ( char  c) throw ()

Compute numeric value of given textual digit (assuming that it is a digit)

template<typename T >
std::ptrdiff_t pqxx::internal::distance ( first,
last 
)

Wrapper for std::distance; not all platforms have std::distance().

string pqxx::internal::Escape ( const std::string &  s,
const std::string &  null 
)

Referenced by EscapeAny().

std::string pqxx::internal::EscapeAny ( const std::string &  s,
const std::string &  null 
)
std::string pqxx::internal::EscapeAny ( const char  s[],
const std::string &  null 
)

References Escape().

template<typename T >
std::string pqxx::internal::EscapeAny ( const T &  t,
const std::string &  null 
)

References Escape(), and pqxx::to_string().

void pqxx::internal::freemallocmem ( const void *  p) throw ()

Referenced by freemallocmem_templated().

template<typename P >
void pqxx::internal::freemallocmem_templated ( P *  p) throw ()

References freemallocmem().

void pqxx::internal::freepqmem ( const void *  p) throw ()

Referenced by freepqmem_templated().

template<typename P >
void pqxx::internal::freepqmem_templated ( P *  p) throw ()

References freepqmem().

char pqxx::internal::number_to_digit ( int  i) throw ()
void pqxx::internal::sleep_seconds ( int  s)

Sleep for the given number of seconds.

May return early, e.g. when interrupted by a signal. Completes instantly if a zero or negative sleep time is requested.

References pqxx::to_string().

cstring pqxx::internal::strerror_wrapper ( int  err,
char  buf[],
std::size_t  len 
) throw ()

Human-readable description for error code, possibly using given buffer.

Wrapper for strerror() or thread-safe variant, as available. The default code copies the string to the provided buffer, but this may not always be necessary. The result is guaranteed to remain usable for as long as the given buffer does.

Parameters
errsystem error code as copied from errno
bufcaller-provided buffer for message to be stored in, if needed
lenusable size (in bytes) of provided buffer
Returns
human-readable error string, which may or may not reside in buf

Referenced by pqxx::largeobject::Reason().

void pqxx::internal::throw_null_conversion ( const std::string &  type)
void pqxx::internal::wait_read ( const internal::pq::PGconn *  )
void pqxx::internal::wait_read ( const internal::pq::PGconn *  ,
long  seconds,
long  microseconds 
)
void pqxx::internal::wait_write ( const internal::pq::PGconn *  )

Variable Documentation

const char pqxx::internal::sql_begin_work = "BEGIN"

Commonly used SQL commands.

const char pqxx::internal::sql_commit_work = "COMMIT"
const char pqxx::internal::sql_rollback_work = "ROLLBACK"
libpqxx-4.0.1+dfsg/doc/html/Reference/a00194.js000066400000000000000000000014121224474465600207210ustar00rootroot00000000000000var a00194 = [ [ "gate", "a00195.html", null ], [ "reactivation_avoidance_counter", "a00078.html", "a00078" ], [ "reactivation_avoidance_exemption", "a00079.html", "a00079" ], [ "sql_cursor", "a00085.html", "a00085" ], [ "notify_listener_forwarder", "a00064.html", "a00064" ], [ "Escaper", "a00037.html", "a00037" ], [ "transactionfocus", "a00105.html", "a00105" ], [ "parameterized_invocation", "a00067.html", "a00067" ], [ "dereference", "a00034.html", "a00034" ], [ "deref_ptr", "a00033.html", "a00033" ], [ "refcount", "a00080.html", "a00080" ], [ "PQAlloc", "a00073.html", "a00073" ], [ "scoped_array", "a00084.html", "a00084" ], [ "namedclass", "a00059.html", "a00059" ], [ "unique", "a00111.html", "a00111" ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00195.html000066400000000000000000000061051224474465600212560ustar00rootroot00000000000000 libpqxx: pqxx::internal::gate Namespace Reference
pqxx::internal::gate Namespace Reference
libpqxx-4.0.1+dfsg/doc/html/Reference/a00196.html000066400000000000000000000103241224474465600212550ustar00rootroot00000000000000 libpqxx: pqxx::prepare Namespace Reference
pqxx::prepare Namespace Reference

Dedicated namespace for helper types related to prepared statements. More...

Namespaces

namespace  internal

Classes

class  invocation
 Helper class for passing parameters to, and executing, prepared statements. More...

Detailed Description

Dedicated namespace for helper types related to prepared statements.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00196.js000066400000000000000000000001541224474465600207250ustar00rootroot00000000000000var a00196 = [ [ "internal", "a00197.html", "a00197" ], [ "invocation", "a00053.html", "a00053" ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00197.html000066400000000000000000000072301224474465600212600ustar00rootroot00000000000000 libpqxx: pqxx::prepare::internal Namespace Reference
pqxx::prepare::internal Namespace Reference

Classes

struct  prepared_def
 Internal representation of a prepared statement definition. More...
libpqxx-4.0.1+dfsg/doc/html/Reference/a00197.js000066400000000000000000000001011224474465600207160ustar00rootroot00000000000000var a00197 = [ [ "prepared_def", "a00075.html", "a00075" ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00199.html000066400000000000000000000066531224474465600212720ustar00rootroot00000000000000 libpqxx: Performance features
Performance features

If your program's database interaction is not as efficient as it needs to be, the first place to look is usually the SQL you're executing. But libpqxx has a few specialized features to help you squeeze a bit more performance out of how you issue commands and retrieve data:

  • pqxx::pipeline lets you send queries to the database in batch, and continue other processing while they are executing.
  • Prepared statements. These can be executed many times without the server parsing and planning them each and every time. They also save you having to escape string parameters.

As always of course, don't risk the quality of your code for optimizations that you don't need!

libpqxx-4.0.1+dfsg/doc/html/Reference/a00200.html000066400000000000000000000207601224474465600212440ustar00rootroot00000000000000 libpqxx: Prepared statements
Prepared statements

Prepared statements are SQL queries that you define once and then invoke as many times as you like, typically with varying parameters. It's basically a function that you can define ad hoc.

If you have an SQL statement that you're going to execute many times in quick succession, it may be more efficient to prepare it once and reuse it. This saves the database backend the effort of parsing complex SQL and figuring out an efficient execution plan. Another nice side effect is that you don't need to worry about escaping parameters.

You create a prepared statement by preparing it on the connection, passing an identifier and its SQL text. The identifier is the name by which the prepared statement will be known; it should consist of letters, digits, and underscores only and start with a letter. The name is case-sensitive.

void prepare_my_statement(pqxx::connection_base &c)
{
c.prepare("my_statement", "SELECT * FROM Employee WHERE name = 'Xavier'");
}

Once you've done this, you'll be able to call my_statement from any transaction you execute on the same connection. You start an invocation by looking up your statement using a member function called "prepared". (The definition used a different member function, called "prepare" ).

pqxx::result execute_my_statement(pqxx::transaction_base &t)
{
return t.prepared("my_statement").exec();
}

Did I mention that prepared statements can have parameters? The query text can contain $1, $2 etc. as placeholders for parameter values that you will provide when you invoke the prepared satement.

void prepare_find(pqxx::connection_base &c)
{
// Prepare a statement called "find" that looks for employees with a given
// name (parameter 1) whose salary exceeds a given number (parameter 2).
"find",
"SELECT * FROM Employee WHERE name = $1 AND salary > $2");
}

How do you pass those parameters? C++ has no good way to let you pass an unlimited, variable number of arguments to a function call, and the compiler does not know how many you are going to pass. There's a trick for that: you can treat the value you get back from prepared as a function, which you call to pass a parameter. What you get back from that call is the same again, so you can call it again to pass another parameter and so on.

Once you've passed all parameters in this way, you invoke the statement with the parameters by calling exec on the invocation.

This example looks up the prepared statement "find," passes name and min_salary as parameters, and invokes the statement with those values:

pqxx::result execute_find(
pqxx::transaction_base &t, std::string name, int min_salary)
{
return t.prepared("find")(name)(min_salary).exec();
}
Warning
There are cases where prepared statements are actually slower than plain SQL. Sometimes the backend can produce a better execution plan when it knows the parameter values. For example, say you've got a web application and you're querying for users with status "inactive" who have email addresses in a given domain name X. If X is a very popular provider, the best way to plan the query may be to list the inactive users first and then filter for the email addresses you're looking for. But in other cases, it may be much faster to find matching email addresses first and then see which of their owners are "inactive." A prepared statement must be planned to fit either case, but a direct query can be optimized based on table statistics, partial indexes, etc.
libpqxx-4.0.1+dfsg/doc/html/Reference/a00201.html000066400000000000000000000511401224474465600212410ustar00rootroot00000000000000 libpqxx: String conversion
String conversion

Namespaces

namespace  pqxx::internal
 Private namespace for libpqxx's internal use; do not access.

Classes

struct  pqxx::string_traits< T >
 Traits class for use in string conversions. More...
struct  pqxx::string_traits< const char * >
 String traits for C-style string ("pointer to const char") More...
struct  pqxx::string_traits< char * >
 String traits for non-const C-style string ("pointer to char") More...
struct  pqxx::string_traits< char[N]>
 String traits for C-style string constant ("array of char") More...
struct  pqxx::string_traits< const char[N]>
 String traits for "array of const char.". More...
struct  pqxx::string_traits< std::string >
struct  pqxx::string_traits< const std::string >
struct  pqxx::string_traits< std::stringstream >

Macros

#define PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(T)

Functions

template<typename T >
void pqxx::from_string (const char Str[], T &Obj)
 Attempt to convert postgres-generated string to given built-in type.
template<typename T >
void pqxx::from_string (const char Str[], T &Obj, size_t)
 Conversion with known string length (for strings that may contain nuls)
template<>
void pqxx::from_string< std::string > (const char Str[], std::string &Obj, size_t len)
template<typename T >
void pqxx::from_string (const std::string &Str, T &Obj)
template<typename T >
void pqxx::from_string (const std::stringstream &Str, T &Obj)
template<>
void pqxx::from_string (const std::string &Str, std::string &Obj)
template<typename T >
std::string pqxx::to_string (const T &Obj)
 Convert built-in type to a readable string that PostgreSQL will understand.

Detailed Description

For purposes of communication with the server, values need to be converted from and to a human-readable string format that (unlike the various functions and templates in the C and C++ standard libraries) is not sensitive to locale settings and internationalization. This section contains functionality that is used extensively by libpqxx itself, but is also available for use by other programs.

Macro Definition Documentation

#define PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION (   T)
Value:
template<> struct PQXX_LIBEXPORT string_traits<T> \
{ \
typedef T subject_type; \
static const char *name() { return #T; } \
static bool has_null() { return false; } \
static bool is_null(T) { return false; } \
static T null() \
{ internal::throw_null_conversion(name()); return subject_type(); } \
static void from_string(const char Str[], T &Obj); \
static PGSTD::string to_string(T Obj); \
};

Function Documentation

template<typename T >
void pqxx::from_string ( const char  Str[],
T &  Obj 
)

Attempt to convert postgres-generated string to given built-in type.

If the form of the value found in the string does not match the expected type, e.g. if a decimal point is found when converting to an integer type, the conversion fails. Overflows (e.g. converting "9999999999" to a 16-bit C++ type) are also treated as errors. If in some cases this behaviour should be inappropriate, convert to something bigger such as long int first and then truncate the resulting value.

Only the simplest possible conversions are supported. No fancy features such as hexadecimal or octal, spurious signs, or exponent notation will work. No whitespace is stripped away. Only the kinds of strings that come out of PostgreSQL and out of to_string() can be converted.

References pqxx::from_string().

template<typename T >
void pqxx::from_string ( const char  Str[],
T &  Obj,
size_t   
)

Conversion with known string length (for strings that may contain nuls)

This is only used for strings, where embedded nul bytes should not determine the end of the string.

For all other types, this just uses the regular, nul-terminated version of from_string().

References pqxx::from_string().

template<typename T >
void pqxx::from_string ( const std::string &  Str,
T &  Obj 
)

References pqxx::from_string().

template<typename T >
void pqxx::from_string ( const std::stringstream &  Str,
T &  Obj 
)

References pqxx::from_string().

template<>
void pqxx::from_string ( const std::string &  Str,
std::string &  Obj 
)
template<>
void pqxx::from_string< std::string > ( const char  Str[],
std::string &  Obj,
size_t  len 
)
template<typename T >
std::string pqxx::to_string ( const T &  Obj)

Convert built-in type to a readable string that PostgreSQL will understand.

No special formatting is done, and any locale settings are ignored. The resulting string will be human-readable and in a format suitable for use in SQL queries.

References pqxx::to_string().

libpqxx-4.0.1+dfsg/doc/html/Reference/a00201.js000066400000000000000000000022711224474465600207120ustar00rootroot00000000000000var a00201 = [ [ "internal", "a00194.html", null ], [ "string_traits", "a00088.html", null ], [ "string_traits< const char * >", "a00091.html", null ], [ "string_traits< char * >", "a00089.html", null ], [ "string_traits< char[N]>", "a00090.html", null ], [ "string_traits< const char[N]>", "a00092.html", null ], [ "string_traits< std::string >", "a00094.html", null ], [ "string_traits< const std::string >", "a00093.html", null ], [ "string_traits< std::stringstream >", "a00095.html", null ], [ "PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION", "a00201.html#ga9c0b6d727ce7535938d64a819cf527b0", null ], [ "from_string", "a00201.html#ga58ff00a3552facca2cc34bea4e2faff2", null ], [ "from_string", "a00201.html#gaba8ca5ae8abde63e86fd1bba156404f0", null ], [ "from_string", "a00201.html#gaf46637e8067239ca82a8fa6ec1fa3ccd", null ], [ "from_string", "a00201.html#gaa57d02e03b8b7d8b91dec45e22abe0eb", null ], [ "from_string", "a00201.html#ga069ea52c5d8cc7916922932c587f350d", null ], [ "from_string< std::string >", "a00201.html#gac0605a68479f665fdb45ce21127c8fc8", null ], [ "to_string", "a00201.html#ga215c8af5887e32a2830f692b5d046a2c", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00202.html000066400000000000000000000202501224474465600212400ustar00rootroot00000000000000 libpqxx: Utility functions
Utility functions

Functions

template<typename ITER >
std::string pqxx::separated_list (const std::string &sep, ITER begin, ITER end)
 Render sequence as a string, using given separator between items.
template<typename OBJ >
std::string pqxx::separated_list (const std::string &sep, OBJ *begin, OBJ *end)
 Render array as a string, using given separator between items.
template<typename CONTAINER >
std::string pqxx::separated_list (const std::string &sep, const CONTAINER &c)
 Render items in a container as a string, using given separator.

Detailed Description

Function Documentation

template<typename ITER >
std::string pqxx::separated_list ( const std::string &  sep,
ITER  begin,
ITER  end 
)

Render sequence as a string, using given separator between items.

References pqxx::separated_list().

template<typename OBJ >
std::string pqxx::separated_list ( const std::string &  sep,
OBJ *  begin,
OBJ *  end 
)

Render array as a string, using given separator between items.

References pqxx::separated_list().

template<typename CONTAINER >
std::string pqxx::separated_list ( const std::string &  sep,
const CONTAINER &  c 
)

Render items in a container as a string, using given separator.

References pqxx::separated_list().

libpqxx-4.0.1+dfsg/doc/html/Reference/a00202.js000066400000000000000000000004061224474465600207110ustar00rootroot00000000000000var a00202 = [ [ "separated_list", "a00202.html#ga5123fc11695c56a283bf5d748c04f4ed", null ], [ "separated_list", "a00202.html#gab10091fa8ffba17cf84c8583838e501e", null ], [ "separated_list", "a00202.html#ga17dcbbfd542677b5b7ccd810dc8dd7f2", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00203.html000066400000000000000000001257141224474465600212540ustar00rootroot00000000000000 libpqxx: String escaping
String escaping

Binary data corresponding to PostgreSQL's "BYTEA" binary-string type. More...

Functions

std::string pqxx::escape_binary (const std::string &bin)
 Escape binary string for inclusion in SQL.
std::string pqxx::escape_binary (const char bin[])
 Escape binary string for inclusion in SQL.
std::string pqxx::escape_binary (const char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string pqxx::escape_binary (const unsigned char bin[])
 Escape binary string for inclusion in SQL.
std::string pqxx::escape_binary (const unsigned char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string pqxx::connection_base::esc (const char str[])
 Escape string for use as SQL string literal on this connection.
std::string pqxx::connection_base::esc (const char str[], size_t maxlen)
 Escape string for use as SQL string literal on this connection.
std::string pqxx::connection_base::esc (const std::string &str)
 Escape string for use as SQL string literal on this connection.
std::string pqxx::connection_base::esc_raw (const unsigned char str[], size_t len)
 Escape binary string for use as SQL string literal on this connection.
std::string pqxx::connection_base::quote_raw (const unsigned char str[], size_t len)
 Escape and quote a string of binary data.
std::string pqxx::connection_base::quote_name (const std::string &identifier)
 Escape and quote an SQL identifier for use in a query.
template<typename T >
std::string pqxx::connection_base::quote (const T &t)
 Represent object as SQL string, including quoting & escaping.
std::string pqxx::connection_base::quote (const binarystring &)
std::string pqxx::transaction_base::esc (const char str[]) const
 Escape string for use as SQL string literal in this transaction.
std::string pqxx::transaction_base::esc (const char str[], size_t maxlen) const
 Escape string for use as SQL string literal in this transaction.
std::string pqxx::transaction_base::esc (const std::string &str) const
 Escape string for use as SQL string literal in this transaction.
std::string pqxx::transaction_base::esc_raw (const unsigned char str[], size_t len) const
 Escape binary data for use as SQL string literal in this transaction.
std::string pqxx::transaction_base::esc_raw (const std::string &) const
 Escape binary data for use as SQL string literal in this transaction.
template<typename T >
std::string pqxx::transaction_base::quote (const T &t) const
 Represent object as SQL string, including quoting & escaping.
std::string pqxx::transaction_base::quote_raw (const unsigned char str[], size_t len) const
 Binary-escape and quote a binarystring for use as an SQL constant.
std::string pqxx::transaction_base::quote_raw (const std::string &str) const
std::string pqxx::transaction_base::quote_name (const std::string &identifier) const
 Escape an SQL identifier for use in a query.
std::string escape_binary (const std::string &bin)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const char bin[], size_t len)
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[])
 Escape binary string for inclusion in SQL.
std::string escape_binary (const unsigned char bin[], size_t len)
 Escape binary string for inclusion in SQL.

Detailed Description

Binary data corresponding to PostgreSQL's "BYTEA" binary-string type.

This class represents a binary string as stored in a field of type bytea. The raw value returned by a bytea field contains escape sequences for certain characters, which are filtered out by binarystring.

Internally a binarystring is zero-terminated, but it may also contain zero bytes, just like any other byte value. So don't assume that it can be treated as a C-style string unless you've made sure of this yourself.

The binarystring retains its value even if the result it was obtained from is destroyed, but it cannot be copied or assigned.

To convert the other way, i.e. from a raw series of bytes to a string suitable for inclusion as bytea values in your SQL, use the transaction's esc_raw() functions.

Warning
This class is implemented as a reference-counting smart pointer. Copying, swapping, and destroying binarystring objects that refer to the same underlying data block is not thread-safe. If you wish to pass binarystrings around between threads, make sure that each of these operations is protected against concurrency with similar operations on the same object, or other objects pointing to the same data block.

Use these functions to "groom" user-provided strings before using them in your SQL statements. This reduces the chance of failures when users type unexpected characters, but more importantly, it helps prevent so-called SQL injection attacks.

To understand what SQL injection vulnerabilities are and why they should be prevented, imagine you use the following SQL statement somewhere in your program:

TX.exec("SELECT number,amount "
"FROM accounts "
"WHERE allowed_to_see('" + userid + "','" + password + "')");

This shows a logged-in user important information on all accounts he is authorized to view. The userid and password strings are variables entered by the user himself.

Now, if the user is actually an attacker who knows (or can guess) the general shape of this SQL statement, imagine he enters the following password:

x') OR ('x' = 'x

Does that make sense to you? Probably not. But if this is inserted into the SQL string by the C++ code above, the query becomes:

SELECT number,amount
FROM accounts
WHERE allowed_to_see('user','x') OR ('x' = 'x')

Is this what you wanted to happen? Probably not! The neat allowed_to_see() clause is completely circumvented by the "<tt>OR ('x' = 'x')</tt>" clause, which is always true. Therefore, the attacker will get to see all accounts in the database!

To prevent this from happening, use the transaction's esc() function:

TX.exec("SELECT number,amount "
"FROM accounts "
"WHERE allowed_to_see('" + TX.esc(userid) + "', "
"'" + TX.esc(password) + "')");

Now, the quotes embedded in the attacker's string will be neatly escaped so they can't "break out" of the quoted SQL string they were meant to go into:

SELECT number,amount
FROM accounts
WHERE allowed_to_see('user', 'x'') OR (''x'' = ''x')

If you look carefully, you'll see that thanks to the added escape characters (a single-quote is escaped in SQL by doubling it) all we get is a very strange-looking password string–but not a change in the SQL statement.

Function Documentation

std::string pqxx::transaction_base::esc ( const char  str[]) const

Escape string for use as SQL string literal in this transaction.

std::string pqxx::transaction_base::esc ( const char  str[],
size_t  maxlen 
) const

Escape string for use as SQL string literal in this transaction.

std::string pqxx::transaction_base::esc ( const std::string &  str) const

Escape string for use as SQL string literal in this transaction.

string pqxx::connection_base::esc ( const char  str[])

Escape string for use as SQL string literal on this connection.

string pqxx::connection_base::esc ( const char  str[],
size_t  maxlen 
)

Escape string for use as SQL string literal on this connection.

string pqxx::connection_base::esc ( const std::string &  str)

Escape string for use as SQL string literal on this connection.

std::string pqxx::transaction_base::esc_raw ( const unsigned char  str[],
size_t  len 
) const

Escape binary data for use as SQL string literal in this transaction.

Raw, binary data is treated differently from regular strings. Binary strings are never interpreted as text, so they may safely include byte values or byte sequences that don't happen to represent valid characters in the character encoding being used.

The binary string does not stop at the first zero byte, as is the case with textual strings. Instead, they may contain zero bytes anywhere. If it happens to contain bytes that look like quote characters, or other things that can disrupt their use in SQL queries, they will be replaced with special escape sequences.

string pqxx::transaction_base::esc_raw ( const std::string &  str) const

Escape binary data for use as SQL string literal in this transaction.

string pqxx::connection_base::esc_raw ( const unsigned char  str[],
size_t  len 
)

Escape binary string for use as SQL string literal on this connection.

References pqxx::internal::PQAlloc< T, DELETER >::get().

std::string escape_binary ( const std::string &  bin)
related

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead
string pqxx::escape_binary ( const std::string &  bin)

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead

Referenced by pqxx::escape_binary().

string pqxx::escape_binary ( const char  bin[])

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead

References pqxx::escape_binary().

std::string escape_binary ( const char  bin[])
related

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead
string pqxx::escape_binary ( const char  bin[],
size_t  len 
)

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead

References pqxx::escape_binary().

std::string escape_binary ( const char  bin[],
size_t  len 
)
related

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead
string pqxx::escape_binary ( const unsigned char  bin[])

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead

References pqxx::escape_binary().

std::string escape_binary ( const unsigned char  bin[])
related

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead
string pqxx::escape_binary ( const unsigned char  bin[],
size_t  len 
)

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead

References pqxx::internal::PQAlloc< T, DELETER >::get().

std::string escape_binary ( const unsigned char  bin[],
size_t  len 
)
related

Escape binary string for inclusion in SQL.

Deprecated:
Use the transaction's esc_raw() functions instead
template<typename T >
std::string pqxx::transaction_base::quote ( const T &  t) const

Represent object as SQL string, including quoting & escaping.

Nulls are recognized and represented as SQL nulls.

template<typename T >
std::string pqxx::connection_base::quote ( const T &  t)

Represent object as SQL string, including quoting & escaping.

Nulls are recognized and represented as SQL nulls.

References pqxx::to_string().

string pqxx::connection_base::quote ( const binarystring b)
std::string pqxx::transaction_base::quote_name ( const std::string &  identifier) const

Escape an SQL identifier for use in a query.

string pqxx::connection_base::quote_name ( const std::string &  identifier)

Escape and quote an SQL identifier for use in a query.

References pqxx::internal::PQAlloc< T, DELETER >::get().

std::string pqxx::transaction_base::quote_raw ( const unsigned char  str[],
size_t  len 
) const

Binary-escape and quote a binarystring for use as an SQL constant.

string pqxx::transaction_base::quote_raw ( const std::string &  str) const
string pqxx::connection_base::quote_raw ( const unsigned char  str[],
size_t  len 
)

Escape and quote a string of binary data.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00203.js000066400000000000000000000040431224474465600207130ustar00rootroot00000000000000var a00203 = [ [ "esc", "a00203.html#ga98dee516d429520627fd94f5ccb2b023", null ], [ "esc", "a00203.html#ga38cc55d0d7637dd53a6508e2bc4beadb", null ], [ "esc", "a00203.html#ga80bbd3626005768e0d39bdfb6930e244", null ], [ "esc", "a00203.html#ga8978ff727c03a1aaaa3a9d3fd3268abf", null ], [ "esc", "a00203.html#gae711f65dd793a70629f97a2e0e54d8db", null ], [ "esc", "a00203.html#gaca9ba750fd096cfd652a4323dab3a653", null ], [ "esc_raw", "a00203.html#ga6048218f7af70cd0423429d54203749c", null ], [ "esc_raw", "a00203.html#ga489c7438da9241486297a451a8579dc1", null ], [ "esc_raw", "a00203.html#ga6a8c83d3dcea7114a00c188fe6a92779", null ], [ "escape_binary", "a00203.html#ga9c1a379cd2ba4eea395fb79df463eb98", null ], [ "escape_binary", "a00203.html#ga5a9191cb199f2b67350de847e468e38b", null ], [ "escape_binary", "a00203.html#gad40c643f4f483941c07c7f25d9091abc", null ], [ "escape_binary", "a00203.html#ga5b230e243d4ebbe8085a8048e912601e", null ], [ "escape_binary", "a00203.html#ga67d0543fc753d81b490cb7c77205a283", null ], [ "escape_binary", "a00203.html#ga787364a7ae884b781b58ac248ff0925c", null ], [ "escape_binary", "a00203.html#gad1faeced6ee13b17fbc3aca21712cc7c", null ], [ "escape_binary", "a00203.html#ga1147c3174b747009783b65981d4707f0", null ], [ "escape_binary", "a00203.html#ga80a4bfe9b1c1b88c29d16ba06102370b", null ], [ "escape_binary", "a00203.html#gaeb5da84878d4ea8f902f956b8240e73e", null ], [ "quote", "a00203.html#ga263a180c5d0decf645aca3fc1ed4d6ff", null ], [ "quote", "a00203.html#ga81fe65fbb9561af7c5f0b33a9fe27e5a", null ], [ "quote", "a00203.html#ga7e10c6bf1796584c0949383cb25541c2", null ], [ "quote_name", "a00203.html#gad943d244673a97eef6c7a927f4f412c0", null ], [ "quote_name", "a00203.html#gae68c4661843dcf695585f6e1b6011788", null ], [ "quote_raw", "a00203.html#gac62a687a3367d500a54d0e0a722880c6", null ], [ "quote_raw", "a00203.html#gaa10d27c49fd2089fe55ebc7ef060b65a", null ], [ "quote_raw", "a00203.html#ga8b59e512bedb3e8a69f3aa7e557daab7", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00204.html000066400000000000000000000263541224474465600212550ustar00rootroot00000000000000 libpqxx: Connection classes
Connection classes

Classes

class  pqxx::connect_direct
 Connection policy; creates an immediate connection to a database. More...
class  pqxx::connect_lazy
 Lazy connection policy; causes connection to be deferred until first use. More...
class  pqxx::connect_async
 Asynchronous connection policy; connects "in the background". More...
class  pqxx::connect_null
 Nonfunctional, always-down connection policy for testing/debugging purposes. More...
class  pqxx::connectionpolicy

Typedefs

typedef basic_connection
< connect_direct > 
pqxx::connection
 The "standard" connection type: connect to database right now.
typedef basic_connection
< connect_lazy > 
pqxx::lazyconnection
 A "lazy" connection type: connect to database only when needed.
typedef basic_connection
< connect_async > 
pqxx::asyncconnection
 "Asynchronous" connection type: start connecting, but don't wait for it
typedef basic_connection
< connect_null > 
pqxx::nullconnection
 A "dummy" connection type: don't connect to any database at all.

Detailed Description

The connection classes are where the use of a database begins. You must connect to a database in order to access it. Your connection represents a session with the database. In the context of that connection you can create transactions, which in turn you can use to execute SQL. A connection can have only one regular transaction open at a time, but you can break your work down into any number of consecutive transactions and there is also some support for transaction nesting (using the subtransaction class).

Many things come together in the connection classes. Handling of error and warning messages, for example, is defined by errorhandlers in the context of a connection. Prepared statements are also defined here.

Several types of connections are available, including plain connection and lazyconnection. These types are typedefs combining a derivative of the connection_base class (where essentially all connection-related functionality is defined) with a policy class which governs how the connection is to be established. You pass details such as the database you wish to connect to, username and password, and so on as as PostgreSQL "connection string" and certain environment variables that you can learn more about from the core postgres documentation.

See the connection_base documentation for a full list of features inherited by all connection classes. Connections can be deactivated and reactivated if needed (within reason, of course–you can't do this in the middle of a transaction), and where possible, disabled or broken connections are transparently re-enabled when you use them again. This is called "reactivation," and you may need to understand it because you'll want it disabled in certain situations.

You can also set certain variables defined by the backend to influence its behaviour for the duration of your session, such as the applicable text encoding. You can query the connection's capabilities (because some features will depend on the versions of libpq and of the server backend that you're using) and parameters that you set in your connection string and/or environment variables.

Typedef Documentation

typedef basic_connection<connect_async> pqxx::asyncconnection

"Asynchronous" connection type: start connecting, but don't wait for it

typedef basic_connection<connect_direct> pqxx::connection

The "standard" connection type: connect to database right now.

typedef basic_connection<connect_lazy> pqxx::lazyconnection

A "lazy" connection type: connect to database only when needed.

typedef basic_connection<connect_null> pqxx::nullconnection

A "dummy" connection type: don't connect to any database at all.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00204.js000066400000000000000000000010751224474465600207160ustar00rootroot00000000000000var a00204 = [ [ "connect_direct", "a00020.html", null ], [ "connect_lazy", "a00021.html", null ], [ "connect_async", "a00019.html", null ], [ "connect_null", "a00022.html", null ], [ "connectionpolicy", "a00024.html", null ], [ "asyncconnection", "a00204.html#ga710db2d58482a4ea8ebbb822c2b0d417", null ], [ "connection", "a00204.html#ga26edb910e4563d1115e22c627914e98b", null ], [ "lazyconnection", "a00204.html#ga8911912522c75dd0b154fefdde735272", null ], [ "nullconnection", "a00204.html#ga830f18f804ec3e4cc8bab713169fb529", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00205.html000066400000000000000000000234501224474465600212500ustar00rootroot00000000000000 libpqxx: Transaction classes
Transaction classes

Abstract base class responsible for bracketing a backend transaction. More...

Classes

class  pqxx::basic_robusttransaction
class  pqxx::robusttransaction< ISOLATIONLEVEL >
 Slightly slower, better-fortified version of transaction. More...
class  pqxx::basic_transaction
class  pqxx::transaction< ISOLATIONLEVEL, READWRITE >
 Standard back-end transaction, templatized on isolation level. More...

Typedefs

typedef transaction pqxx::work
 Bog-standard, default transaction type.
typedef transaction
< read_committed, read_only > 
pqxx::read_transaction
 Read-only transaction.

Detailed Description

Abstract base class responsible for bracketing a backend transaction.

Interface definition (and common code) for "transaction" classes.

Simple "transaction" class offering no transactional integrity.

Use a dbtransaction-derived object such as "work" (transaction<>) to enclose operations on a database in a single "unit of work." This ensures that the whole series of operations either succeeds as a whole or fails completely. In no case will it leave half-finished work behind in the database.

Once processing on a transaction has succeeded and any changes should be allowed to become permanent in the database, call commit(). If something has gone wrong and the changes should be forgotten, call abort() instead. If you do neither, an implicit abort() is executed at destruction time.

It is an error to abort a transaction that has already been committed, or to commit a transaction that has already been aborted. Aborting an already aborted transaction or committing an already committed one has been allowed to make errors easier to deal with. Repeated aborts or commits have no effect after the first one.

Database transactions are not suitable for guarding long-running processes. If your transaction code becomes too long or too complex, please consider ways to break it up into smaller ones. There's no easy, general way to do this since application-specific considerations become important at this point.

The actual operations for beginning and committing/aborting the backend transaction are implemented by a derived class. The implementing concrete class must also call Begin() and End() from its constructors and destructors, respectively, and implement do_exec().

Warning
Read-only transactions require backend version 8.0 or better. On older backends, these transactions will be able to modify the database. Even if you have a newer server version, it is not wise to rely on read-only transactions alone to enforce a security model.

nontransaction, like transaction or any other transaction_base-derived class, provides access to a database through a connection. Unlike its siblings, however, nontransaction does not maintain any kind of transactional integrity. This may be useful eg. for read-only access to the database that does not require a consistent, atomic view on its data; or for operations that are not allowed within a backend transaction, such as creating tables.

For queries that update the database, however, a real transaction is likely to be faster unless the transaction consists of only a single record update.

Also, you can keep a nontransaction open for as long as you like. Actual back-end transactions are limited in lifespan, and will sometimes fail just because they took too long to execute or were left idle for too long. This will not happen with a nontransaction (although the connection may still time out, e.g. when the network is unavailable for a very long time).

Any query executed in a nontransaction is committed immediately, and neither commit() nor abort() has any effect.

Database features that require a backend transaction, such as cursors or large objects, will not work in a nontransaction.

All database access must be channeled through one of these classes for safety, although not all implementations of this interface need to provide full transactional integrity.

Several implementations of this interface are shipped with libpqxx, including the plain transaction class, the entirely unprotected nontransaction, and the more cautions robusttransaction.

Typedef Documentation

typedef transaction<read_committed, read_only> pqxx::read_transaction

Read-only transaction.

typedef transaction pqxx::work

Bog-standard, default transaction type.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00205.js000066400000000000000000000005641224474465600207210ustar00rootroot00000000000000var a00205 = [ [ "basic_robusttransaction", "a00011.html", null ], [ "robusttransaction", "a00083.html", null ], [ "basic_transaction", "a00012.html", null ], [ "transaction", "a00103.html", null ], [ "read_transaction", "a00205.html#gab81d0f16865bb70a79d4acb0d0657259", null ], [ "work", "a00205.html#ga82685329d6fd91f5ab30772d266fe5f0", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00206.html000066400000000000000000000071221224474465600212470ustar00rootroot00000000000000 libpqxx: Errorhandler
Errorhandler

Classes

class  pqxx::errorhandler
 Base class for error-handler callbacks. More...
class  pqxx::quiet_errorhandler
 An error handler that suppresses any previously registered error handlers. More...

Detailed Description

libpqxx-4.0.1+dfsg/doc/html/Reference/a00206.js000066400000000000000000000001601224474465600207120ustar00rootroot00000000000000var a00206 = [ [ "errorhandler", "a00036.html", null ], [ "quiet_errorhandler", "a00076.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00207.html000066400000000000000000000321061224474465600212500ustar00rootroot00000000000000 libpqxx: Exception classes
Exception classes

Classes

class  pqxx::pqxx_exception
 Mixin base class to identify libpqxx-specific exception types. More...
class  pqxx::failure
 Run-time failure encountered by libpqxx, similar to std::runtime_error. More...
class  pqxx::broken_connection
 Exception class for lost or failed backend connection. More...
class  pqxx::sql_error
 Exception class for failed queries. More...
class  pqxx::in_doubt_error
 "Help, I don't know whether transaction was committed successfully!" More...
class  pqxx::internal_error
 Internal error in libpqxx library. More...
class  pqxx::usage_error
 Error in usage of libpqxx library, similar to std::logic_error. More...
class  pqxx::argument_error
 Invalid argument passed to libpqxx, similar to std::invalid_argument. More...
class  pqxx::conversion_error
class  pqxx::range_error
 Something is out of range, similar to std::out_of_range. More...
class  pqxx::feature_not_supported
 Database feature not supported in current setup. More...
class  pqxx::data_exception
 Error in data provided to SQL statement. More...
class  pqxx::integrity_constraint_violation
class  pqxx::restrict_violation
class  pqxx::not_null_violation
class  pqxx::foreign_key_violation
class  pqxx::unique_violation
class  pqxx::check_violation
class  pqxx::invalid_cursor_state
class  pqxx::invalid_sql_statement_name
class  pqxx::invalid_cursor_name
class  pqxx::syntax_error
class  pqxx::undefined_column
class  pqxx::undefined_function
class  pqxx::undefined_table
class  pqxx::insufficient_privilege
class  pqxx::insufficient_resources
 Resource shortage on the server. More...
class  pqxx::disk_full
class  pqxx::out_of_memory
class  pqxx::too_many_connections
class  pqxx::plpgsql_error
 PL/pgSQL error. More...
class  pqxx::plpgsql_raise
 Exception raised in PL/pgSQL procedure. More...
class  pqxx::plpgsql_no_data_found
class  pqxx::plpgsql_too_many_rows

Detailed Description

These exception classes follow, roughly, the two-level hierarchy defined by the PostgreSQL error codes (see Appendix A of the PostgreSQL documentation corresponding to your server version). The hierarchy given here is, as yet, not a complete mirror of the error codes. There are some other differences as well, e.g. the error code statement_completion_unknown has a separate status in libpqxx as in_doubt_error, and too_many_connections is classified as a broken_connection rather than a subtype of insufficient_resources.

See Also
http://www.postgresql.org/docs/8.1/interactive/errcodes-appendix.html
libpqxx-4.0.1+dfsg/doc/html/Reference/a00207.js000066400000000000000000000032421224474465600207170ustar00rootroot00000000000000var a00207 = [ [ "pqxx_exception", "a00074.html", null ], [ "failure", "a00038.html", null ], [ "broken_connection", "a00014.html", null ], [ "sql_error", "a00086.html", null ], [ "in_doubt_error", "a00045.html", null ], [ "internal_error", "a00049.html", null ], [ "usage_error", "a00113.html", null ], [ "argument_error", "a00004.html", null ], [ "conversion_error", "a00029.html", null ], [ "range_error", "a00077.html", null ], [ "feature_not_supported", "a00039.html", null ], [ "data_exception", "a00031.html", null ], [ "integrity_constraint_violation", "a00048.html", null ], [ "restrict_violation", "a00081.html", null ], [ "not_null_violation", "a00061.html", null ], [ "foreign_key_violation", "a00042.html", null ], [ "unique_violation", "a00112.html", null ], [ "check_violation", "a00018.html", null ], [ "invalid_cursor_state", "a00051.html", null ], [ "invalid_sql_statement_name", "a00052.html", null ], [ "invalid_cursor_name", "a00050.html", null ], [ "syntax_error", "a00097.html", null ], [ "undefined_column", "a00108.html", null ], [ "undefined_function", "a00109.html", null ], [ "undefined_table", "a00110.html", null ], [ "insufficient_privilege", "a00046.html", null ], [ "insufficient_resources", "a00047.html", null ], [ "disk_full", "a00035.html", null ], [ "out_of_memory", "a00066.html", null ], [ "too_many_connections", "a00102.html", null ], [ "plpgsql_error", "a00069.html", null ], [ "plpgsql_raise", "a00071.html", null ], [ "plpgsql_no_data_found", "a00070.html", null ], [ "plpgsql_too_many_rows", "a00072.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/a00208.html000066400000000000000000000103041224474465600212450ustar00rootroot00000000000000 libpqxx: Notifications and Receivers
Notifications and Receivers

"Observer" base class for notifications. More...

"Observer" base class for notifications.

To listen on a notification issued using the NOTIFY command, derive your own class from notification_receiver and define its function-call operator to perform whatever action you wish to take when the given notification arrives. Then create an object of that class and pass it to your connection. DO NOT use raw SQL to listen for notifications, or your attempts to listen won't be resumed when a connection fails–and you'll have no way to notice.

Notifications never arrive inside a transaction, not even in a nontransaction. Therefore, you are free to open a transaction of your own inside your receiver's function invocation operator.

Notifications you are listening for may arrive anywhere within libpqxx code, but be aware that PostgreSQL defers notifications occurring inside transactions. (This was done for excellent reasons; just think about what happens if the transaction where you happen to handle an incoming notification is later rolled back for other reasons). So if you're keeping a transaction open, don't expect any of your receivers on the same connection to be notified.

(For very similar reasons, outgoing notifications are also not sent until the transaction that sends them commits.)

Multiple receivers on the same connection may listen on a notification of the same name. An incoming notification is processed by invoking all receivers (zero or more) of the same name.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00209.html000066400000000000000000000106741224474465600212600ustar00rootroot00000000000000 libpqxx: Transactor framework
Transactor framework

Wrapper for transactions that automatically restarts them on failure. More...

Wrapper for transactions that automatically restarts them on failure.

Some transactions may be replayed if their connection fails, until they do succeed. These can be encapsulated in a transactor-derived classes. The transactor framework will take care of setting up a backend transaction context for the operation, and of aborting and retrying if its connection goes bad.

The transactor framework also makes it easier for you to do this safely, avoiding typical pitfalls and encouraging programmers to separate their transaction definitions (essentially, business rules implementations) from their higher-level code (application using those business rules). The former go into the transactor-based class.

Pass an object of your transactor-based class to connection_base::perform() to execute the transaction code embedded in it (see the definitions in pqxx/connection_base.hxx).

connection_base::perform() is actually a template, specializing itself to any transactor type you pass to it. This means you will have to pass it a reference of your object's ultimate static type; runtime polymorphism is not allowed. Hence the absence of virtual methods in transactor. The exact methods to be called at runtime must be resolved at compile time.

Your transactor-derived class must define a copy constructor. This will be used to create a "clean" copy of your transactor for every attempt that perform() makes to run it.

libpqxx-4.0.1+dfsg/doc/html/Reference/a00210.html000066400000000000000000000146401224474465600212450ustar00rootroot00000000000000 libpqxx: Deprecated List
Deprecated List
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Member escape_binary
Use the transaction's esc_raw() functions instead
Class pqxx::notify_listener
Use notification_receiver instead.
Member pqxx::result::field
Use pqxx::field instead.
Member pqxx::result::tuple
Use pqxx::tuple instead.
Class pqxx::tablereader
Efficiently pull data directly out of a table.
Class pqxx::tablestream
Base class for obsolete tablereader/tablewriter classes.
Class pqxx::tablewriter
Efficiently write data directly to a database table.
Member pqxx::trigger
The trigger class from libpqxx 1.x/2.x has been replaced with notification_receiver.
Member pqxx::tuple::tuple (const result *r, size_t i)
Do not use this constructor. It will become private.
libpqxx-4.0.1+dfsg/doc/html/Reference/a00212.html000066400000000000000000000532071224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_connection< CONNECTPOLICY > Member List

This is the complete list of members for pqxx::basic_connection< CONNECTPOLICY >, including all inherited members.

activate()pqxx::connection_base
adorn_name(const std::string &)pqxx::connection_base
await_notification()pqxx::connection_base
await_notification(long seconds, long microseconds)pqxx::connection_base
backendpid() const pqxx::connection_base
basic_connection()pqxx::basic_connection< CONNECTPOLICY >
basic_connection(const std::string &opt)pqxx::basic_connection< CONNECTPOLICY >explicit
basic_connection(const char opt[])pqxx::basic_connection< CONNECTPOLICY >explicit
cancel_query()pqxx::connection_base
cap_create_table_with_oids enum valuepqxx::connection_base
cap_cursor_fetch_0 enum valuepqxx::connection_base
cap_cursor_scroll enum valuepqxx::connection_base
cap_cursor_update enum valuepqxx::connection_base
cap_cursor_with_hold enum valuepqxx::connection_base
cap_end enum valuepqxx::connection_base
cap_nested_transactions enum valuepqxx::connection_base
cap_notify_payload enum valuepqxx::connection_base
cap_parameterized_statements enum valuepqxx::connection_base
cap_prepare_unnamed_statement enum valuepqxx::connection_base
cap_prepared_statements enum valuepqxx::connection_base
cap_read_only_transactions enum valuepqxx::connection_base
cap_statement_varargs enum valuepqxx::connection_base
cap_table_column enum valuepqxx::connection_base
capability enum namepqxx::connection_base
close()pqxx::connection_baseprotected
connection_base(connectionpolicy &)pqxx::connection_baseexplicitprotected
dbname()pqxx::connection_base
deactivate()pqxx::connection_base
disconnect()pqxx::connection_base
error_verbosity enum namepqxx::connection_base
esc(const char str[])pqxx::connection_base
esc(const char str[], size_t maxlen)pqxx::connection_base
esc(const std::string &str)pqxx::connection_base
esc_raw(const unsigned char str[], size_t len)pqxx::connection_base
get_errorhandlers() const pqxx::connection_base
get_notifs()pqxx::connection_base
get_variable(const std::string &)pqxx::connection_base
get_verbosity() const pqxx::connection_base
hostname()pqxx::connection_base
inhibit_reactivation(bool inhibit)pqxx::connection_base
init()pqxx::connection_baseprotected
is_open() const pqxx::connection_base
normal enum valuepqxx::connection_base
options() const pqxx::basic_connection< CONNECTPOLICY >
perform(const TRANSACTOR &T, int Attempts)pqxx::connection_base
perform(const TRANSACTOR &T)pqxx::connection_base
port()pqxx::connection_base
prepare(const std::string &name, const std::string &definition)pqxx::connection_base
prepare(const std::string &definition)pqxx::connection_base
prepare_now(const std::string &name)pqxx::connection_base
process_notice(const char[])pqxx::connection_base
process_notice(const std::string &)pqxx::connection_base
protocol_version() const pqxx::connection_base
quote(const T &t)pqxx::connection_base
quote(const binarystring &)pqxx::connection_base
quote_name(const std::string &identifier)pqxx::connection_base
quote_raw(const unsigned char str[], size_t len)pqxx::connection_base
server_version() const pqxx::connection_base
set_client_encoding(const std::string &Encoding)pqxx::connection_base
set_variable(const std::string &Var, const std::string &Value)pqxx::connection_base
set_verbosity(error_verbosity verbosity)pqxx::connection_base
simulate_failure()pqxx::connection_base
sock() const pqxx::connection_base
supports(capability c) const pqxx::connection_base
terse enum valuepqxx::connection_base
trace(std::FILE *)pqxx::connection_base
unprepare(const std::string &name)pqxx::connection_base
username()pqxx::connection_base
verbose enum valuepqxx::connection_base
wait_read() const pqxx::connection_baseprotected
wait_read(long seconds, long microseconds) const pqxx::connection_baseprotected
wait_write() const pqxx::connection_baseprotected
~basic_connection()pqxx::basic_connection< CONNECTPOLICY >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00213.html000066400000000000000000000353211224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::binarystring Member List

This is the complete list of members for pqxx::binarystring, including all inherited members.

at(size_type) const pqxx::binarystring
back() const pqxx::binarystring
begin() const pqxx::binarystring
binarystring(const field &)pqxx::binarystringexplicit
binarystring(const std::string &)pqxx::binarystringexplicit
binarystring(const void *, size_t)pqxx::binarystring
char_type typedefpqxx::binarystring
const_iterator typedefpqxx::binarystring
const_pointer typedefpqxx::binarystring
const_reference typedefpqxx::binarystring
content_type typedefpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
data() const pqxx::binarystring
difference_type typedefpqxx::binarystring
empty() const pqxx::binarystring
end() const pqxx::binarystring
escape_binary(const std::string &bin)pqxx::binarystringrelated
escape_binary(const char bin[])pqxx::binarystringrelated
escape_binary(const char bin[], size_t len)pqxx::binarystringrelated
escape_binary(const unsigned char bin[])pqxx::binarystringrelated
escape_binary(const unsigned char bin[], size_t len)pqxx::binarystringrelated
front() const pqxx::binarystring
get() const pqxx::binarystring
length() const pqxx::binarystring
operator bool() constpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
operator!() constpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
operator!=(const binarystring &rhs) const pqxx::binarystring
operator*() constpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
operator->() constpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
operator=(const PQAlloc &rhs)pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
operator==(const binarystring &) const pqxx::binarystring
operator[](size_type i) const pqxx::binarystring
PQAlloc()pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
PQAlloc(const PQAlloc &rhs)pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
PQAlloc(unsigned char *obj)pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >explicitprivate
reset()pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
size() const pqxx::binarystring
size_type typedefpqxx::binarystring
str() const pqxx::binarystring
swap(binarystring &)pqxx::binarystring
PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >::swap(PQAlloc &rhs)pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
value_type typedefpqxx::binarystring
~PQAlloc()pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >private
libpqxx-4.0.1+dfsg/doc/html/Reference/a00214.html000066400000000000000000000141001224474465600212400ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connect_direct Member List

This is the complete list of members for pqxx::connect_direct, including all inherited members.

connect_direct(const std::string &opts)pqxx::connect_directexplicit
connectionpolicy(const std::string &opts)pqxx::connectionpolicyexplicit
do_completeconnect(handle orig)pqxx::connectionpolicyvirtual
do_disconnect(handle orig)pqxx::connectionpolicyvirtual
do_dropconnect(handle orig)pqxx::connectionpolicyvirtual
do_startconnect(handle)pqxx::connect_directvirtual
handle typedefpqxx::connectionpolicy
is_ready(handle) const pqxx::connectionpolicyvirtual
normalconnect(handle)pqxx::connectionpolicyprotected
options() const pqxx::connectionpolicy
~connectionpolicy()pqxx::connectionpolicyvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00215.html000066400000000000000000000140661224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connect_lazy Member List

This is the complete list of members for pqxx::connect_lazy, including all inherited members.

connect_lazy(const std::string &opts)pqxx::connect_lazyexplicit
connectionpolicy(const std::string &opts)pqxx::connectionpolicyexplicit
do_completeconnect(handle)pqxx::connect_lazyvirtual
do_disconnect(handle orig)pqxx::connectionpolicyvirtual
do_dropconnect(handle orig)pqxx::connectionpolicyvirtual
do_startconnect(handle orig)pqxx::connectionpolicyvirtual
handle typedefpqxx::connectionpolicy
is_ready(handle) const pqxx::connectionpolicyvirtual
normalconnect(handle)pqxx::connectionpolicyprotected
options() const pqxx::connectionpolicy
~connectionpolicy()pqxx::connectionpolicyvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00216.html000066400000000000000000000140501224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connect_async Member List

This is the complete list of members for pqxx::connect_async, including all inherited members.

connect_async(const std::string &opts)pqxx::connect_asyncexplicit
connectionpolicy(const std::string &opts)pqxx::connectionpolicyexplicit
do_completeconnect(handle)pqxx::connect_asyncvirtual
do_disconnect(handle orig)pqxx::connectionpolicyvirtual
do_dropconnect(handle)pqxx::connect_asyncvirtual
do_startconnect(handle)pqxx::connect_asyncvirtual
handle typedefpqxx::connectionpolicy
is_ready(handle) const pqxx::connect_asyncvirtual
normalconnect(handle)pqxx::connectionpolicyprotected
options() const pqxx::connectionpolicy
~connectionpolicy()pqxx::connectionpolicyvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00217.html000066400000000000000000000140771224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connect_null Member List

This is the complete list of members for pqxx::connect_null, including all inherited members.

connect_null(const std::string &opts)pqxx::connect_nullexplicit
connectionpolicy(const std::string &opts)pqxx::connectionpolicyexplicit
do_completeconnect(handle orig)pqxx::connectionpolicyvirtual
do_disconnect(handle orig)pqxx::connectionpolicyvirtual
do_dropconnect(handle orig)pqxx::connectionpolicyvirtual
do_startconnect(handle orig)pqxx::connectionpolicyvirtual
handle typedefpqxx::connectionpolicy
is_ready(handle) const pqxx::connectionpolicyvirtual
normalconnect(handle)pqxx::connectionpolicyprotected
options() const pqxx::connectionpolicy
~connectionpolicy()pqxx::connectionpolicyvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00218.html000066400000000000000000000562061224474465600212610ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connection_base Member List

This is the complete list of members for pqxx::connection_base, including all inherited members.

activate()pqxx::connection_base
adorn_name(const std::string &)pqxx::connection_base
await_notification()pqxx::connection_base
await_notification(long seconds, long microseconds)pqxx::connection_base
backendpid() const pqxx::connection_base
cancel_query()pqxx::connection_base
cap_create_table_with_oids enum valuepqxx::connection_base
cap_cursor_fetch_0 enum valuepqxx::connection_base
cap_cursor_scroll enum valuepqxx::connection_base
cap_cursor_update enum valuepqxx::connection_base
cap_cursor_with_hold enum valuepqxx::connection_base
cap_end enum valuepqxx::connection_base
cap_nested_transactions enum valuepqxx::connection_base
cap_notify_payload enum valuepqxx::connection_base
cap_parameterized_statements enum valuepqxx::connection_base
cap_prepare_unnamed_statement enum valuepqxx::connection_base
cap_prepared_statements enum valuepqxx::connection_base
cap_read_only_transactions enum valuepqxx::connection_base
cap_statement_varargs enum valuepqxx::connection_base
cap_table_column enum valuepqxx::connection_base
capability enum namepqxx::connection_base
close()pqxx::connection_baseprotected
connection_base(connectionpolicy &)pqxx::connection_baseexplicitprotected
dbname()pqxx::connection_base
deactivate()pqxx::connection_base
disconnect()pqxx::connection_base
error_verbosity enum namepqxx::connection_base
esc(const char str[])pqxx::connection_base
esc(const char str[], size_t maxlen)pqxx::connection_base
esc(const std::string &str)pqxx::connection_base
esc_raw(const unsigned char str[], size_t len)pqxx::connection_base
get_errorhandlers() const pqxx::connection_base
get_notifs()pqxx::connection_base
get_variable(const std::string &)pqxx::connection_base
get_verbosity() const pqxx::connection_base
hostname()pqxx::connection_base
inhibit_reactivation(bool inhibit)pqxx::connection_base
init()pqxx::connection_baseprotected
internal::gate::connection_dbtransaction classpqxx::connection_basefriend
internal::gate::connection_errorhandler classpqxx::connection_basefriend
internal::gate::connection_largeobject classpqxx::connection_basefriend
internal::gate::connection_notification_receiver classpqxx::connection_basefriend
internal::gate::connection_parameterized_invocation classpqxx::connection_basefriend
internal::gate::connection_pipeline classpqxx::connection_basefriend
internal::gate::connection_prepare_invocation classpqxx::connection_basefriend
internal::gate::connection_reactivation_avoidance_exemption classpqxx::connection_basefriend
internal::gate::connection_sql_cursor classpqxx::connection_basefriend
internal::gate::connection_transaction classpqxx::connection_basefriend
is_open() const pqxx::connection_base
normal enum valuepqxx::connection_base
perform(const TRANSACTOR &T, int Attempts)pqxx::connection_base
perform(const TRANSACTOR &T)pqxx::connection_base
port()pqxx::connection_base
prepare(const std::string &name, const std::string &definition)pqxx::connection_base
prepare(const std::string &definition)pqxx::connection_base
prepare_now(const std::string &name)pqxx::connection_base
process_notice(const char[])pqxx::connection_base
process_notice(const std::string &)pqxx::connection_base
protocol_version() const pqxx::connection_base
quote(const T &t)pqxx::connection_base
quote(const binarystring &)pqxx::connection_base
quote_name(const std::string &identifier)pqxx::connection_base
quote_raw(const unsigned char str[], size_t len)pqxx::connection_base
server_version() const pqxx::connection_base
set_client_encoding(const std::string &Encoding)pqxx::connection_base
set_variable(const std::string &Var, const std::string &Value)pqxx::connection_base
set_verbosity(error_verbosity verbosity)pqxx::connection_base
simulate_failure()pqxx::connection_base
sock() const pqxx::connection_base
supports(capability c) const pqxx::connection_base
terse enum valuepqxx::connection_base
trace(std::FILE *)pqxx::connection_base
unprepare(const std::string &name)pqxx::connection_base
username()pqxx::connection_base
verbose enum valuepqxx::connection_base
wait_read() const pqxx::connection_baseprotected
wait_read(long seconds, long microseconds) const pqxx::connection_baseprotected
wait_write() const pqxx::connection_baseprotected
libpqxx-4.0.1+dfsg/doc/html/Reference/a00219.html000066400000000000000000000134361224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::connectionpolicy Member List

This is the complete list of members for pqxx::connectionpolicy, including all inherited members.

connectionpolicy(const std::string &opts)pqxx::connectionpolicyexplicit
do_completeconnect(handle orig)pqxx::connectionpolicyvirtual
do_disconnect(handle orig)pqxx::connectionpolicyvirtual
do_dropconnect(handle orig)pqxx::connectionpolicyvirtual
do_startconnect(handle orig)pqxx::connectionpolicyvirtual
handle typedefpqxx::connectionpolicy
is_ready(handle) const pqxx::connectionpolicyvirtual
normalconnect(handle)pqxx::connectionpolicyprotected
options() const pqxx::connectionpolicy
~connectionpolicy()pqxx::connectionpolicyvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00220.html000066400000000000000000000171661224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::cursor_base Member List

This is the complete list of members for pqxx::cursor_base, including all inherited members.

accesspolicy enum namepqxx::cursor_base
all()pqxx::cursor_basestatic
backward_all()pqxx::cursor_basestatic
cursor_base(connection_base &, const std::string &Name, bool embellish_name=true)pqxx::cursor_baseprotected
difference_type typedefpqxx::cursor_base
forward_only enum valuepqxx::cursor_base
loose enum valuepqxx::cursor_base
m_namepqxx::cursor_baseprotected
name() const pqxx::cursor_base
next()pqxx::cursor_basestatic
owned enum valuepqxx::cursor_base
ownershippolicy enum namepqxx::cursor_base
prior()pqxx::cursor_basestatic
random_access enum valuepqxx::cursor_base
read_only enum valuepqxx::cursor_base
size_type typedefpqxx::cursor_base
update enum valuepqxx::cursor_base
updatepolicy enum namepqxx::cursor_base
libpqxx-4.0.1+dfsg/doc/html/Reference/a00221.html000066400000000000000000000124671224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::stateless_cursor< up, op > Member List

This is the complete list of members for pqxx::stateless_cursor< up, op >, including all inherited members.

close()pqxx::stateless_cursor< up, op >
difference_type typedefpqxx::stateless_cursor< up, op >
name() const pqxx::stateless_cursor< up, op >
retrieve(difference_type begin_pos, difference_type end_pos)pqxx::stateless_cursor< up, op >
size()pqxx::stateless_cursor< up, op >
size_type typedefpqxx::stateless_cursor< up, op >
stateless_cursor(transaction_base &trans, const std::string &query, const std::string &cname, bool hold)pqxx::stateless_cursor< up, op >
stateless_cursor(transaction_base &trans, const std::string adopted_cursor)pqxx::stateless_cursor< up, op >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00222.html000066400000000000000000000137601224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::icursorstream Member List

This is the complete list of members for pqxx::icursorstream, including all inherited members.

difference_type typedefpqxx::icursorstream
get(result &res)pqxx::icursorstream
icursorstream(transaction_base &context, const std::string &query, const std::string &basename, difference_type sstride=1)pqxx::icursorstream
icursorstream(transaction_base &context, const field &cname, difference_type sstride=1, cursor_base::ownershippolicy op=cursor_base::owned)pqxx::icursorstream
ignore(std::streamsize n=1)pqxx::icursorstream
internal::gate::icursorstream_icursor_iterator classpqxx::icursorstreamfriend
operator bool() const pqxx::icursorstream
operator>>(result &res)pqxx::icursorstream
set_stride(difference_type stride)pqxx::icursorstream
size_type typedefpqxx::icursorstream
stride() const pqxx::icursorstream
libpqxx-4.0.1+dfsg/doc/html/Reference/a00223.html000066400000000000000000000201601224474465600212430ustar00rootroot00000000000000 libpqxx: Member List
pqxx::icursor_iterator Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00224.html000066400000000000000000000343171224474465600212550ustar00rootroot00000000000000 libpqxx: Member List
pqxx::dbtransaction Member List

This is the complete list of members for pqxx::dbtransaction, including all inherited members.

abort()pqxx::transaction_base
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_abort()pqxx::dbtransactionprotectedvirtual
do_begin()pqxx::dbtransactionprotectedvirtual
do_commit()=0pqxx::dbtransactionprotectedpure virtual
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction_base
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~dbtransaction()pqxx::dbtransactionvirtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00225.html000066400000000000000000000103531224474465600212500ustar00rootroot00000000000000 libpqxx: Member List
pqxx::errorhandler Member List

This is the complete list of members for pqxx::errorhandler, including all inherited members.

errorhandler(connection_base &)pqxx::errorhandlerexplicit
internal::gate::errorhandler_connection_base classpqxx::errorhandlerfriend
operator()(const char msg[])=0pqxx::errorhandlerpure virtual
~errorhandler()pqxx::errorhandlervirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00226.html000066400000000000000000000103211224474465600212440ustar00rootroot00000000000000 libpqxx: Member List
pqxx::quiet_errorhandler Member List

This is the complete list of members for pqxx::quiet_errorhandler, including all inherited members.

errorhandler(connection_base &)pqxx::errorhandlerexplicit
operator()(const char[])pqxx::quiet_errorhandlervirtual
quiet_errorhandler(connection_base &conn)pqxx::quiet_errorhandler
~errorhandler()pqxx::errorhandlervirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00227.html000066400000000000000000000072471224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::pqxx_exception Member List

This is the complete list of members for pqxx::pqxx_exception, including all inherited members.

base() const =0pqxx::pqxx_exceptionpure virtual
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00228.html000066400000000000000000000072371224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::failure Member List

This is the complete list of members for pqxx::failure, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00229.html000066400000000000000000000103111224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
pqxx::broken_connection Member List

This is the complete list of members for pqxx::broken_connection, including all inherited members.

broken_connection()pqxx::broken_connection
broken_connection(const std::string &)pqxx::broken_connectionexplicit
failure(const std::string &)pqxx::failureexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00230.html000066400000000000000000000116201224474465600212420ustar00rootroot00000000000000 libpqxx: Member List
pqxx::sql_error Member List

This is the complete list of members for pqxx::sql_error, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00231.html000066400000000000000000000077261224474465600212570ustar00rootroot00000000000000 libpqxx: Member List
pqxx::in_doubt_error Member List

This is the complete list of members for pqxx::in_doubt_error, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
in_doubt_error(const std::string &)pqxx::in_doubt_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00232.html000066400000000000000000000072731224474465600212550ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal_error Member List

This is the complete list of members for pqxx::internal_error, including all inherited members.

internal_error(const std::string &)pqxx::internal_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00233.html000066400000000000000000000072571224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::usage_error Member List

This is the complete list of members for pqxx::usage_error, including all inherited members.

usage_error(const std::string &)pqxx::usage_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00234.html000066400000000000000000000072731224474465600212570ustar00rootroot00000000000000 libpqxx: Member List
pqxx::argument_error Member List

This is the complete list of members for pqxx::argument_error, including all inherited members.

argument_error(const std::string &)pqxx::argument_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00235.html000066400000000000000000000073031224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::conversion_error Member List

This is the complete list of members for pqxx::conversion_error, including all inherited members.

conversion_error(const std::string &)pqxx::conversion_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00236.html000066400000000000000000000072571224474465600212630ustar00rootroot00000000000000 libpqxx: Member List
pqxx::range_error Member List

This is the complete list of members for pqxx::range_error, including all inherited members.

range_error(const std::string &)pqxx::range_errorexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00237.html000066400000000000000000000130051224474465600212500ustar00rootroot00000000000000 libpqxx: Member List
pqxx::feature_not_supported Member List

This is the complete list of members for pqxx::feature_not_supported, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
feature_not_supported(const std::string &err)pqxx::feature_not_supportedexplicit
feature_not_supported(const std::string &err, const std::string &Q)pqxx::feature_not_supported
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00238.html000066400000000000000000000127331224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::data_exception Member List

This is the complete list of members for pqxx::data_exception, including all inherited members.

data_exception(const std::string &err)pqxx::data_exceptionexplicit
data_exception(const std::string &err, const std::string &Q)pqxx::data_exception
failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00239.html000066400000000000000000000130731224474465600212570ustar00rootroot00000000000000 libpqxx: Member List
pqxx::integrity_constraint_violation Member List

This is the complete list of members for pqxx::integrity_constraint_violation, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00240.html000066400000000000000000000141641224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::restrict_violation Member List

This is the complete list of members for pqxx::restrict_violation, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
query() const pqxx::sql_error
restrict_violation(const std::string &err)pqxx::restrict_violationexplicit
restrict_violation(const std::string &err, const std::string &Q)pqxx::restrict_violation
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00241.html000066400000000000000000000141641224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::not_null_violation Member List

This is the complete list of members for pqxx::not_null_violation, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
not_null_violation(const std::string &err)pqxx::not_null_violationexplicit
not_null_violation(const std::string &err, const std::string &Q)pqxx::not_null_violation
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00242.html000066400000000000000000000142061224474465600212500ustar00rootroot00000000000000 libpqxx: Member List
pqxx::foreign_key_violation Member List

This is the complete list of members for pqxx::foreign_key_violation, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
foreign_key_violation(const std::string &err)pqxx::foreign_key_violationexplicit
foreign_key_violation(const std::string &err, const std::string &Q)pqxx::foreign_key_violation
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00243.html000066400000000000000000000141501224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::unique_violation Member List

This is the complete list of members for pqxx::unique_violation, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
unique_violation(const std::string &err)pqxx::unique_violationexplicit
unique_violation(const std::string &err, const std::string &Q)pqxx::unique_violation
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00244.html000066400000000000000000000141421224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::check_violation Member List

This is the complete list of members for pqxx::check_violation, including all inherited members.

check_violation(const std::string &err)pqxx::check_violationexplicit
check_violation(const std::string &err, const std::string &Q)pqxx::check_violation
failure(const std::string &)pqxx::failureexplicit
integrity_constraint_violation(const std::string &err)pqxx::integrity_constraint_violationexplicit
integrity_constraint_violation(const std::string &err, const std::string &Q)pqxx::integrity_constraint_violation
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00245.html000066400000000000000000000127771224474465600212660ustar00rootroot00000000000000 libpqxx: Member List
pqxx::invalid_cursor_state Member List

This is the complete list of members for pqxx::invalid_cursor_state, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
invalid_cursor_state(const std::string &err)pqxx::invalid_cursor_stateexplicit
invalid_cursor_state(const std::string &err, const std::string &Q)pqxx::invalid_cursor_state
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00246.html000066400000000000000000000130431224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::invalid_sql_statement_name Member List

This is the complete list of members for pqxx::invalid_sql_statement_name, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
invalid_sql_statement_name(const std::string &err)pqxx::invalid_sql_statement_nameexplicit
invalid_sql_statement_name(const std::string &err, const std::string &Q)pqxx::invalid_sql_statement_name
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00247.html000066400000000000000000000127711224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::invalid_cursor_name Member List

This is the complete list of members for pqxx::invalid_cursor_name, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
invalid_cursor_name(const std::string &err)pqxx::invalid_cursor_nameexplicit
invalid_cursor_name(const std::string &err, const std::string &Q)pqxx::invalid_cursor_name
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00248.html000066400000000000000000000133041224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::syntax_error Member List

This is the complete list of members for pqxx::syntax_error, including all inherited members.

error_positionpqxx::syntax_error
failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
syntax_error(const std::string &err, int pos=-1)pqxx::syntax_errorexplicit
syntax_error(const std::string &err, const std::string &Q, int pos=-1)pqxx::syntax_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00249.html000066400000000000000000000144251224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::undefined_column Member List

This is the complete list of members for pqxx::undefined_column, including all inherited members.

error_positionpqxx::syntax_error
failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
syntax_error(const std::string &err, int pos=-1)pqxx::syntax_errorexplicit
syntax_error(const std::string &err, const std::string &Q, int pos=-1)pqxx::syntax_error
undefined_column(const std::string &err)pqxx::undefined_columnexplicit
undefined_column(const std::string &err, const std::string &Q)pqxx::undefined_column
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00250.html000066400000000000000000000144411224474465600212500ustar00rootroot00000000000000 libpqxx: Member List
pqxx::undefined_function Member List

This is the complete list of members for pqxx::undefined_function, including all inherited members.

error_positionpqxx::syntax_error
failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
syntax_error(const std::string &err, int pos=-1)pqxx::syntax_errorexplicit
syntax_error(const std::string &err, const std::string &Q, int pos=-1)pqxx::syntax_error
undefined_function(const std::string &err)pqxx::undefined_functionexplicit
undefined_function(const std::string &err, const std::string &Q)pqxx::undefined_function
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00251.html000066400000000000000000000144171224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::undefined_table Member List

This is the complete list of members for pqxx::undefined_table, including all inherited members.

error_positionpqxx::syntax_error
failure(const std::string &)pqxx::failureexplicit
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
syntax_error(const std::string &err, int pos=-1)pqxx::syntax_errorexplicit
syntax_error(const std::string &err, const std::string &Q, int pos=-1)pqxx::syntax_error
undefined_table(const std::string &err)pqxx::undefined_tableexplicit
undefined_table(const std::string &err, const std::string &Q)pqxx::undefined_table
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00252.html000066400000000000000000000130131224474465600212440ustar00rootroot00000000000000 libpqxx: Member List
pqxx::insufficient_privilege Member List

This is the complete list of members for pqxx::insufficient_privilege, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
insufficient_privilege(const std::string &err)pqxx::insufficient_privilegeexplicit
insufficient_privilege(const std::string &err, const std::string &Q)pqxx::insufficient_privilege
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00253.html000066400000000000000000000130131224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
pqxx::insufficient_resources Member List

This is the complete list of members for pqxx::insufficient_resources, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
insufficient_resources(const std::string &err)pqxx::insufficient_resourcesexplicit
insufficient_resources(const std::string &err, const std::string &Q)pqxx::insufficient_resources
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00254.html000066400000000000000000000140361224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::disk_full Member List

This is the complete list of members for pqxx::disk_full, including all inherited members.

disk_full(const std::string &err)pqxx::disk_fullexplicit
disk_full(const std::string &err, const std::string &Q)pqxx::disk_full
failure(const std::string &)pqxx::failureexplicit
insufficient_resources(const std::string &err)pqxx::insufficient_resourcesexplicit
insufficient_resources(const std::string &err, const std::string &Q)pqxx::insufficient_resources
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00255.html000066400000000000000000000140661224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::out_of_memory Member List

This is the complete list of members for pqxx::out_of_memory, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
insufficient_resources(const std::string &err)pqxx::insufficient_resourcesexplicit
insufficient_resources(const std::string &err, const std::string &Q)pqxx::insufficient_resources
out_of_memory(const std::string &err)pqxx::out_of_memoryexplicit
out_of_memory(const std::string &err, const std::string &Q)pqxx::out_of_memory
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00256.html000066400000000000000000000110071224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::too_many_connections Member List

This is the complete list of members for pqxx::too_many_connections, including all inherited members.

broken_connection()pqxx::broken_connection
broken_connection(const std::string &)pqxx::broken_connectionexplicit
failure(const std::string &)pqxx::failureexplicit
too_many_connections(const std::string &err)pqxx::too_many_connectionsexplicit
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00257.html000066400000000000000000000127251224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::plpgsql_error Member List

This is the complete list of members for pqxx::plpgsql_error, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
plpgsql_error(const std::string &err)pqxx::plpgsql_errorexplicit
plpgsql_error(const std::string &err, const std::string &Q)pqxx::plpgsql_error
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00258.html000066400000000000000000000140221224474465600212530ustar00rootroot00000000000000 libpqxx: Member List
pqxx::plpgsql_raise Member List

This is the complete list of members for pqxx::plpgsql_raise, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
plpgsql_error(const std::string &err)pqxx::plpgsql_errorexplicit
plpgsql_error(const std::string &err, const std::string &Q)pqxx::plpgsql_error
plpgsql_raise(const std::string &err)pqxx::plpgsql_raiseexplicit
plpgsql_raise(const std::string &err, const std::string &Q)pqxx::plpgsql_raise
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00259.html000066400000000000000000000141021224474465600212530ustar00rootroot00000000000000 libpqxx: Member List
pqxx::plpgsql_no_data_found Member List

This is the complete list of members for pqxx::plpgsql_no_data_found, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
plpgsql_error(const std::string &err)pqxx::plpgsql_errorexplicit
plpgsql_error(const std::string &err, const std::string &Q)pqxx::plpgsql_error
plpgsql_no_data_found(const std::string &err)pqxx::plpgsql_no_data_foundexplicit
plpgsql_no_data_found(const std::string &err, const std::string &Q)pqxx::plpgsql_no_data_found
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00260.html000066400000000000000000000141021224474465600212430ustar00rootroot00000000000000 libpqxx: Member List
pqxx::plpgsql_too_many_rows Member List

This is the complete list of members for pqxx::plpgsql_too_many_rows, including all inherited members.

failure(const std::string &)pqxx::failureexplicit
plpgsql_error(const std::string &err)pqxx::plpgsql_errorexplicit
plpgsql_error(const std::string &err, const std::string &Q)pqxx::plpgsql_error
plpgsql_too_many_rows(const std::string &err)pqxx::plpgsql_too_many_rowsexplicit
plpgsql_too_many_rows(const std::string &err, const std::string &Q)pqxx::plpgsql_too_many_rows
query() const pqxx::sql_error
sql_error()pqxx::sql_error
sql_error(const std::string &)pqxx::sql_errorexplicit
sql_error(const std::string &, const std::string &Q)pqxx::sql_error
~pqxx_exception()=0pqxx::pqxx_exceptionpure virtual
~sql_error()pqxx::sql_errorvirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00261.html000066400000000000000000000202311224474465600212440ustar00rootroot00000000000000 libpqxx: Member List
pqxx::field Member List

This is the complete list of members for pqxx::field, including all inherited members.

as(const T &Default) const pqxx::field
as() const pqxx::field
c_str() const pqxx::field
col() const pqxx::fieldprotected
field(const tuple &T, tuple_size_type C)pqxx::field
home() const pqxx::fieldprotected
idx() const pqxx::fieldprotected
is_null() const pqxx::field
m_colpqxx::fieldprotected
name() const pqxx::field
num() const pqxx::field
operator!=(const field &rhs) const pqxx::field
operator==(const field &) const pqxx::field
operator>>(T &Obj) const pqxx::field
size() const pqxx::field
size_type typedefpqxx::field
table() const pqxx::field
table_column() const pqxx::field
to(T &Obj) const pqxx::field
to(T &Obj, const T &Default) const pqxx::field
to(const char *&Obj) const pqxx::field
type() const pqxx::field
libpqxx-4.0.1+dfsg/doc/html/Reference/a00262.html000066400000000000000000000154661224474465600212630ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00263.html000066400000000000000000000113241224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00264.html000066400000000000000000000106341224474465600212550ustar00rootroot00000000000000 libpqxx: Member List
pqxx::isolation_traits< LEVEL > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00265.html000066400000000000000000000167431224474465600212650ustar00rootroot00000000000000 libpqxx: Member List
pqxx::largeobject Member List

This is the complete list of members for pqxx::largeobject, including all inherited members.

id() const pqxx::largeobject
largeobject()pqxx::largeobject
largeobject(dbtransaction &T)pqxx::largeobjectexplicit
largeobject(oid O)pqxx::largeobjectexplicit
largeobject(dbtransaction &T, const std::string &File)pqxx::largeobject
largeobject(const largeobjectaccess &O)pqxx::largeobject
operator!=(const largeobject &other) const pqxx::largeobject
operator<(const largeobject &other) const pqxx::largeobject
operator<=(const largeobject &other) const pqxx::largeobject
operator==(const largeobject &other) const pqxx::largeobject
operator>(const largeobject &other) const pqxx::largeobject
operator>=(const largeobject &other) const pqxx::largeobject
RawConnection(const dbtransaction &T)pqxx::largeobjectprotectedstatic
Reason(int err) const pqxx::largeobjectprotected
remove(dbtransaction &T) const pqxx::largeobject
size_type typedefpqxx::largeobject
to_file(dbtransaction &T, const std::string &File) const pqxx::largeobject
libpqxx-4.0.1+dfsg/doc/html/Reference/a00266.html000066400000000000000000000315111224474465600212540ustar00rootroot00000000000000 libpqxx: Member List
pqxx::largeobjectaccess Member List

This is the complete list of members for pqxx::largeobjectaccess, including all inherited members.

cread(char Buf[], size_type Len)pqxx::largeobjectaccess
cseek(off_type dest, seekdir dir)pqxx::largeobjectaccess
ctell() const pqxx::largeobjectaccess
cwrite(const char Buf[], size_type Len)pqxx::largeobjectaccess
id() const pqxx::largeobjectprivate
largeobject()pqxx::largeobjectprivate
largeobject(dbtransaction &T)pqxx::largeobjectexplicitprivate
largeobject(oid O)pqxx::largeobjectexplicitprivate
largeobject(dbtransaction &T, const std::string &File)pqxx::largeobjectprivate
largeobject(const largeobjectaccess &O)pqxx::largeobjectprivate
largeobjectaccess(dbtransaction &T, openmode mode=std::ios::in|std::ios::out)pqxx::largeobjectaccessexplicit
largeobjectaccess(dbtransaction &T, oid O, openmode mode=std::ios::in|std::ios::out)pqxx::largeobjectaccess
largeobjectaccess(dbtransaction &T, largeobject O, openmode mode=std::ios::in|std::ios::out)pqxx::largeobjectaccess
largeobjectaccess(dbtransaction &T, const std::string &File, openmode mode=std::ios::in|std::ios::out)pqxx::largeobjectaccess
off_type typedefpqxx::largeobjectaccess
openmode typedefpqxx::largeobjectaccess
operator!=(const largeobject &other) const pqxx::largeobjectprivate
operator<(const largeobject &other) const pqxx::largeobjectprivate
operator<=(const largeobject &other) const pqxx::largeobjectprivate
operator==(const largeobject &other) const pqxx::largeobjectprivate
operator>(const largeobject &other) const pqxx::largeobjectprivate
operator>=(const largeobject &other) const pqxx::largeobjectprivate
pos_type typedefpqxx::largeobjectaccess
process_notice(const std::string &)pqxx::largeobjectaccess
pqxx::largeobject::RawConnection(const dbtransaction &T)pqxx::largeobjectprivatestatic
read(char Buf[], size_type Len)pqxx::largeobjectaccess
remove(dbtransaction &T) const pqxx::largeobjectprivate
seek(size_type dest, seekdir dir)pqxx::largeobjectaccess
seekdir typedefpqxx::largeobjectaccess
size_type typedefpqxx::largeobjectaccess
tell() const pqxx::largeobjectaccess
to_file(const std::string &File) const pqxx::largeobjectaccess
pqxx::largeobject::to_file(dbtransaction &T, const std::string &File) const pqxx::largeobjectprivate
write(const char Buf[], size_type Len)pqxx::largeobjectaccess
write(const std::string &Buf)pqxx::largeobjectaccess
~largeobjectaccess()pqxx::largeobjectaccess
libpqxx-4.0.1+dfsg/doc/html/Reference/a00267.html000066400000000000000000000176111224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00268.html000066400000000000000000000120741224474465600212610ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_ilostream< CHAR, TRAITS > Member List

This is the complete list of members for pqxx::basic_ilostream< CHAR, TRAITS >, including all inherited members.

basic_ilostream(dbtransaction &T, largeobject O, largeobject::size_type BufSize=512)pqxx::basic_ilostream< CHAR, TRAITS >
basic_ilostream(dbtransaction &T, oid O, largeobject::size_type BufSize=512)pqxx::basic_ilostream< CHAR, TRAITS >
char_type typedefpqxx::basic_ilostream< CHAR, TRAITS >
int_type typedefpqxx::basic_ilostream< CHAR, TRAITS >
off_type typedefpqxx::basic_ilostream< CHAR, TRAITS >
pos_type typedefpqxx::basic_ilostream< CHAR, TRAITS >
traits_type typedefpqxx::basic_ilostream< CHAR, TRAITS >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00269.html000066400000000000000000000124661224474465600212670ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_olostream< CHAR, TRAITS > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00270.html000066400000000000000000000124511224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_lostream< CHAR, TRAITS > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00271.html000066400000000000000000000300051224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
pqxx::nontransaction Member List

This is the complete list of members for pqxx::nontransaction, including all inherited members.

abort()pqxx::transaction_base
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction_base
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
nontransaction(connection_base &C, const std::string &Name=std::string())pqxx::nontransactionexplicit
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~nontransaction()pqxx::nontransactionvirtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00272.html000066400000000000000000000110421224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
pqxx::notification_receiver Member List

This is the complete list of members for pqxx::notification_receiver, including all inherited members.

channel() const pqxx::notification_receiver
conn() const pqxx::notification_receiverprotected
notification_receiver(connection_base &c, const std::string &channel)pqxx::notification_receiver
operator()(const std::string &payload, int backend_pid)=0pqxx::notification_receiverpure virtual
~notification_receiver()pqxx::notification_receivervirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00273.html000066400000000000000000000113021224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
pqxx::notify_listener Member List

This is the complete list of members for pqxx::notify_listener, including all inherited members.

Conn() const pqxx::notify_listenerprotected
conn() const pqxx::notify_listenerprotected
name() const pqxx::notify_listener
notify_listener(connection_base &c, const std::string &n)pqxx::notify_listener
operator()(int be_pid)=0pqxx::notify_listenerpure virtual
~notify_listener()pqxx::notify_listenervirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00274.html000066400000000000000000000214121224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::pipeline Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00275.html000066400000000000000000000444761224474465600212720ustar00rootroot00000000000000 libpqxx: Member List
pqxx::result Member List

This is the complete list of members for pqxx::result, including all inherited members.

affected_rows() const pqxx::result
at(size_type) const pqxx::result
back() const pqxx::result
begin() const pqxx::result
capacity() const pqxx::result
clear()pqxx::result
column_name(tuple::size_type Number) const pqxx::result
column_number(const char ColName[]) const pqxx::result
column_number(const std::string &Name) const pqxx::result
column_table(tuple::size_type ColNum) const pqxx::result
column_table(int ColNum) const pqxx::result
column_table(const std::string &ColName) const pqxx::result
column_type(tuple::size_type ColNum) const pqxx::result
column_type(int ColNum) const pqxx::result
column_type(const std::string &ColName) const pqxx::result
column_type(const char ColName[]) const pqxx::result
columns() const pqxx::result
const_iterator typedefpqxx::result
const_reverse_iterator typedefpqxx::result
content_type typedefpqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
difference_type typedefpqxx::result
empty() const pqxx::result
end() const pqxx::result
field typedefpqxx::result
front() const pqxx::result
get() constpqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
inserted_oid() const pqxx::result
iterator typedefpqxx::result
operator!=(const result &rhs) const pqxx::result
operator*() constpqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
operator->() constpqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
operator=(const result &rhs)pqxx::result
PQAlloc< const internal::result_data, internal::freemem_result_data >::operator=(const PQAlloc &rhs)pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
operator==(const result &) const pqxx::result
operator[](size_type i) const pqxx::result
pointer typedefpqxx::result
PQAlloc()pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
PQAlloc(const PQAlloc &rhs)pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
PQAlloc(const internal::result_data *obj)pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >explicitprivate
pqxx::field classpqxx::resultfriend
pqxx::internal::gate::result_connection classpqxx::resultfriend
pqxx::internal::gate::result_creation classpqxx::resultfriend
pqxx::internal::gate::result_sql_cursor classpqxx::resultfriend
query() const pqxx::result
rbegin() const pqxx::result
reference typedefpqxx::result
rend() const pqxx::result
reset()pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
result()pqxx::result
result(const result &rhs)pqxx::result
reverse_iterator typedefpqxx::result
size() const pqxx::result
size_type typedefpqxx::result
swap(result &)pqxx::result
PQAlloc< const internal::result_data, internal::freemem_result_data >::swap(PQAlloc &rhs)pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
table_column(tuple::size_type ColNum) const pqxx::result
table_column(int ColNum) const pqxx::result
table_column(const std::string &ColName) const pqxx::result
tuple typedefpqxx::result
~PQAlloc()pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >private
libpqxx-4.0.1+dfsg/doc/html/Reference/a00276.html000066400000000000000000000470601224474465600212630ustar00rootroot00000000000000 libpqxx: Member List
pqxx::const_result_iterator Member List

This is the complete list of members for pqxx::const_result_iterator, including all inherited members.

at(size_type) const pqxx::tuple
at(int) const pqxx::tuple
at(const char[]) const pqxx::tuple
at(const std::string &) const pqxx::tuple
back() const pqxx::tuple
begin() const pqxx::tuple
column_number(const std::string &ColName) const pqxx::tuple
column_number(const char[]) const pqxx::tuple
column_table(size_type ColNum) const pqxx::tuple
column_table(int ColNum) const pqxx::tuple
column_table(const std::string &ColName) const pqxx::tuple
column_type(size_type) const pqxx::tuple
column_type(int ColNum) const pqxx::tuple
column_type(const std::string &ColName) const pqxx::tuple
column_type(const char ColName[]) const pqxx::tuple
const_iterator typedefpqxx::tuple
const_result_iterator()pqxx::const_result_iterator
const_result_iterator(const tuple &t)pqxx::const_result_iterator
const_reverse_iterator typedefpqxx::tuple
difference_type typedefpqxx::const_result_iterator
empty() const pqxx::tuple
end() const pqxx::tuple
front() const pqxx::tuple
iterator typedefpqxx::tuple
m_Beginpqxx::tupleprotected
m_Endpqxx::tupleprotected
m_Homepqxx::tupleprotected
m_Indexpqxx::tupleprotected
num() const pqxx::tuple
operator!=(const const_result_iterator &i) const pqxx::const_result_iterator
pqxx::tuple::operator!=(const tuple &rhs) const pqxx::tuple
operator*() const pqxx::const_result_iterator
operator+(difference_type) const pqxx::const_result_iterator
operator+(difference_type, const_result_iterator)pqxx::const_result_iteratorfriend
operator++(int)pqxx::const_result_iterator
operator++()pqxx::const_result_iterator
operator+=(difference_type i)pqxx::const_result_iterator
operator-(difference_type) const pqxx::const_result_iterator
operator-(const_result_iterator) const pqxx::const_result_iterator
operator--(int)pqxx::const_result_iterator
operator--()pqxx::const_result_iterator
operator-=(difference_type i)pqxx::const_result_iterator
operator->() const pqxx::const_result_iterator
operator<(const const_result_iterator &i) const pqxx::const_result_iterator
operator<=(const const_result_iterator &i) const pqxx::const_result_iterator
operator==(const const_result_iterator &i) const pqxx::const_result_iterator
pqxx::tuple::operator==(const tuple &) const pqxx::tuple
operator>(const const_result_iterator &i) const pqxx::const_result_iterator
operator>=(const const_result_iterator &i) const pqxx::const_result_iterator
operator[](size_type) const pqxx::tuple
operator[](int) const pqxx::tuple
operator[](const char[]) const pqxx::tuple
operator[](const std::string &) const pqxx::tuple
pointer typedefpqxx::const_result_iterator
pqxx::result classpqxx::const_result_iteratorfriend
rbegin() const pqxx::tuple
reference typedefpqxx::const_result_iterator
rend() const pqxx::tuple
reverse_iterator typedefpqxx::tuple
rownumber() const pqxx::tuple
size() const pqxx::tuple
size_type typedefpqxx::const_result_iterator
slice(size_type Begin, size_type End) const pqxx::tuple
swap(tuple &)pqxx::tuple
table_column(size_type) const pqxx::tuple
table_column(int ColNum) const pqxx::tuple
table_column(const std::string &ColName) const pqxx::tuple
tuple(const result *r, size_t i)pqxx::tuple
~tuple()pqxx::tuple
libpqxx-4.0.1+dfsg/doc/html/Reference/a00277.html000066400000000000000000000617741224474465600212740ustar00rootroot00000000000000 libpqxx: Member List
pqxx::const_reverse_result_iterator Member List

This is the complete list of members for pqxx::const_reverse_result_iterator, including all inherited members.

at(size_type) const pqxx::tupleprivate
at(int) const pqxx::tupleprivate
at(const char[]) const pqxx::tupleprivate
at(const std::string &) const pqxx::tupleprivate
back() const pqxx::tupleprivate
base() const pqxx::const_reverse_result_iterator
begin() const pqxx::tupleprivate
column_number(const std::string &ColName) const pqxx::tupleprivate
column_number(const char[]) const pqxx::tupleprivate
column_table(size_type ColNum) const pqxx::tupleprivate
column_table(int ColNum) const pqxx::tupleprivate
column_table(const std::string &ColName) const pqxx::tupleprivate
column_type(size_type) const pqxx::tupleprivate
column_type(int ColNum) const pqxx::tupleprivate
column_type(const std::string &ColName) const pqxx::tupleprivate
column_type(const char ColName[]) const pqxx::tupleprivate
const_iterator typedefpqxx::tupleprivate
const_result_iterator()pqxx::const_result_iteratorprivate
const_result_iterator(const tuple &t)pqxx::const_result_iteratorprivate
const_reverse_iterator typedefpqxx::tupleprivate
const_reverse_result_iterator(const const_reverse_result_iterator &rhs)pqxx::const_reverse_result_iterator
const_reverse_result_iterator(const const_result_iterator &rhs)pqxx::const_reverse_result_iteratorexplicit
difference_type typedefpqxx::const_reverse_result_iterator
empty() const pqxx::tupleprivate
end() const pqxx::tupleprivate
front() const pqxx::tupleprivate
iterator typedefpqxx::tupleprivate
iterator_type typedefpqxx::const_reverse_result_iterator
m_Beginpqxx::tupleprivate
m_Endpqxx::tupleprivate
m_Homepqxx::tupleprivate
m_Indexpqxx::tupleprivate
num() const pqxx::tupleprivate
operator!=(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator!=(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
pqxx::tuple::operator!=(const tuple &rhs) const pqxx::tupleprivate
operator*() const pqxx::const_result_iteratorprivate
operator+(difference_type i) const pqxx::const_reverse_result_iterator
operator++()pqxx::const_reverse_result_iterator
operator++(int)pqxx::const_reverse_result_iterator
operator+=(difference_type i)pqxx::const_reverse_result_iterator
operator-(difference_type i)pqxx::const_reverse_result_iterator
operator-(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator-(difference_type) const pqxx::const_result_iteratorprivate
pqxx::const_result_iterator::operator-(const_result_iterator) const pqxx::const_result_iteratorprivate
operator--()pqxx::const_reverse_result_iterator
operator--(int)pqxx::const_reverse_result_iterator
operator-=(difference_type i)pqxx::const_reverse_result_iterator
operator->() const pqxx::const_result_iteratorprivate
operator<(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator<(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
operator<=(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator<=(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
operator=(const const_reverse_result_iterator &r)pqxx::const_reverse_result_iterator
operator==(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator==(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
pqxx::tuple::operator==(const tuple &) const pqxx::tupleprivate
operator>(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator>(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
operator>=(const const_reverse_result_iterator &rhs) const pqxx::const_reverse_result_iterator
pqxx::const_result_iterator::operator>=(const const_result_iterator &i) const pqxx::const_result_iteratorprivate
operator[](size_type) const pqxx::tupleprivate
operator[](int) const pqxx::tupleprivate
operator[](const char[]) const pqxx::tupleprivate
operator[](const std::string &) const pqxx::tupleprivate
pointer typedefpqxx::const_reverse_result_iterator
rbegin() const pqxx::tupleprivate
reference typedefpqxx::const_reverse_result_iterator
rend() const pqxx::tupleprivate
reverse_iterator typedefpqxx::tupleprivate
rownumber() const pqxx::tupleprivate
size() const pqxx::tupleprivate
size_type typedefpqxx::const_result_iteratorprivate
slice(size_type Begin, size_type End) const pqxx::tupleprivate
super typedefpqxx::const_reverse_result_iterator
swap(tuple &)pqxx::tupleprivate
table_column(size_type) const pqxx::tupleprivate
table_column(int ColNum) const pqxx::tupleprivate
table_column(const std::string &ColName) const pqxx::tupleprivate
tuple(const result *r, size_t i)pqxx::tupleprivate
~tuple()pqxx::tupleprivate
libpqxx-4.0.1+dfsg/doc/html/Reference/a00278.html000066400000000000000000000340231224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_robusttransaction Member List

This is the complete list of members for pqxx::basic_robusttransaction, including all inherited members.

abort()pqxx::transaction_base
basic_robusttransaction(connection_base &C, const std::string &IsolationLevel, const std::string &table_name=std::string())pqxx::basic_robusttransactionprotected
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::basic_robusttransaction
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~basic_robusttransaction()=0pqxx::basic_robusttransactionpure virtual
~dbtransaction()pqxx::dbtransactionvirtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00279.html000066400000000000000000000353351224474465600212700ustar00rootroot00000000000000 libpqxx: Member List
pqxx::robusttransaction< ISOLATIONLEVEL > Member List

This is the complete list of members for pqxx::robusttransaction< ISOLATIONLEVEL >, including all inherited members.

abort()pqxx::transaction_base
basic_robusttransaction(connection_base &C, const std::string &IsolationLevel, const std::string &table_name=std::string())pqxx::basic_robusttransactionprotected
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::robusttransaction< ISOLATIONLEVEL >
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
robusttransaction(connection_base &C, const std::string &Name=std::string())pqxx::robusttransaction< ISOLATIONLEVEL >explicit
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~basic_robusttransaction()=0pqxx::basic_robusttransactionpure virtual
~dbtransaction()pqxx::dbtransactionvirtual
~robusttransaction()pqxx::robusttransaction< ISOLATIONLEVEL >virtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00280.html000066400000000000000000000116001224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< const char * > Member List

This is the complete list of members for pqxx::string_traits< const char * >, including all inherited members.

from_string(const char Str[], const char *&Obj)pqxx::string_traits< const char * >static
has_null()pqxx::string_traits< const char * >static
is_null(const char *t)pqxx::string_traits< const char * >static
name()pqxx::string_traits< const char * >static
null()pqxx::string_traits< const char * >static
to_string(const char *Obj)pqxx::string_traits< const char * >static
libpqxx-4.0.1+dfsg/doc/html/Reference/a00281.html000066400000000000000000000110251224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< char * > Member List

This is the complete list of members for pqxx::string_traits< char * >, including all inherited members.

has_null()pqxx::string_traits< char * >static
is_null(const char *t)pqxx::string_traits< char * >static
name()pqxx::string_traits< char * >static
null()pqxx::string_traits< char * >static
to_string(char *Obj)pqxx::string_traits< char * >static
libpqxx-4.0.1+dfsg/doc/html/Reference/a00282.html000066400000000000000000000110351224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< char[N]> Member List

This is the complete list of members for pqxx::string_traits< char[N]>, including all inherited members.

has_null()pqxx::string_traits< char[N]>static
is_null(const char t[])pqxx::string_traits< char[N]>static
name()pqxx::string_traits< char[N]>static
null()pqxx::string_traits< char[N]>static
to_string(const char Obj[])pqxx::string_traits< char[N]>static
libpqxx-4.0.1+dfsg/doc/html/Reference/a00283.html000066400000000000000000000111071224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< const char[N]> Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00284.html000066400000000000000000000116151224474465600212570ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< std::string > Member List

This is the complete list of members for pqxx::string_traits< std::string >, including all inherited members.

from_string(const char Str[], std::string &Obj)pqxx::string_traits< std::string >static
has_null()pqxx::string_traits< std::string >static
is_null(const std::string &)pqxx::string_traits< std::string >static
name()pqxx::string_traits< std::string >static
null()pqxx::string_traits< std::string >static
to_string(const std::string &Obj)pqxx::string_traits< std::string >static
libpqxx-4.0.1+dfsg/doc/html/Reference/a00285.html000066400000000000000000000111751224474465600212610ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< const std::string > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00286.html000066400000000000000000000117171224474465600212640ustar00rootroot00000000000000 libpqxx: Member List
pqxx::string_traits< std::stringstream > Member List

This is the complete list of members for pqxx::string_traits< std::stringstream >, including all inherited members.

from_string(const char Str[], std::stringstream &Obj)pqxx::string_traits< std::stringstream >static
has_null()pqxx::string_traits< std::stringstream >static
is_null(const std::stringstream &)pqxx::string_traits< std::stringstream >static
name()pqxx::string_traits< std::stringstream >static
null()pqxx::string_traits< std::stringstream >static
to_string(const std::stringstream &Obj)pqxx::string_traits< std::stringstream >static
libpqxx-4.0.1+dfsg/doc/html/Reference/a00287.html000066400000000000000000000372321224474465600212650ustar00rootroot00000000000000 libpqxx: Member List
pqxx::subtransaction Member List

This is the complete list of members for pqxx::subtransaction, including all inherited members.

abort()pqxx::transaction_base
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction_base
m_reactivation_avoidancepqxx::transaction_baseprotected
m_Transpqxx::internal::transactionfocusprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
reg_pending_error(const std::string &)pqxx::internal::transactionfocusprotected
register_me()pqxx::internal::transactionfocusprotected
registered() const pqxx::internal::transactionfocusprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
subtransaction(dbtransaction &T, const std::string &Name=std::string())pqxx::subtransactionexplicit
subtransaction(subtransaction &T, const std::string &Name=std::string())pqxx::subtransactionexplicit
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
transactionfocus(transaction_base &t)pqxx::internal::transactionfocusexplicit
unregister_me()pqxx::internal::transactionfocusprotected
~dbtransaction()pqxx::dbtransactionvirtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00288.html000066400000000000000000000241311224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::tablereader Member List

This is the complete list of members for pqxx::tablereader, including all inherited members.

base_close()pqxx::tablestreamprotected
classname() const pqxx::internal::namedclass
columnlist(ITER colbegin, ITER colend)pqxx::tablestreamprotectedstatic
complete()pqxx::tablereadervirtual
description() const pqxx::internal::namedclass
get_raw_line(std::string &Line)pqxx::tablereader
is_finished() const pqxx::tablestreamprotected
m_Transpqxx::internal::transactionfocusprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
NullStr() const pqxx::tablestreamprotected
operator bool() const pqxx::tablereader
operator!() const pqxx::tablereader
operator>>(TUPLE &)pqxx::tablereader
reg_pending_error(const std::string &)pqxx::internal::transactionfocusprotected
register_me()pqxx::internal::transactionfocusprotected
registered() const pqxx::internal::transactionfocusprotected
tablereader(transaction_base &, const std::string &Name, const std::string &Null=std::string())pqxx::tablereader
tablereader(transaction_base &, const std::string &Name, ITER begincolumns, ITER endcolumns)pqxx::tablereader
tablereader(transaction_base &, const std::string &Name, ITER begincolumns, ITER endcolumns, const std::string &Null)pqxx::tablereader
tablestream(transaction_base &Trans, const std::string &Null=std::string())pqxx::tablestreamexplicit
tokenize(std::string, TUPLE &) const pqxx::tablereader
transactionfocus(transaction_base &t)pqxx::internal::transactionfocusexplicit
unregister_me()pqxx::internal::transactionfocusprotected
~tablereader()pqxx::tablereader
~tablestream()=0pqxx::tablestreampure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00289.html000066400000000000000000000173771224474465600212770ustar00rootroot00000000000000 libpqxx: Member List
pqxx::tablestream Member List

This is the complete list of members for pqxx::tablestream, including all inherited members.

base_close()pqxx::tablestreamprotected
classname() const pqxx::internal::namedclass
columnlist(ITER colbegin, ITER colend)pqxx::tablestreamprotectedstatic
complete()=0pqxx::tablestreampure virtual
description() const pqxx::internal::namedclass
is_finished() const pqxx::tablestreamprotected
m_Transpqxx::internal::transactionfocusprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
NullStr() const pqxx::tablestreamprotected
reg_pending_error(const std::string &)pqxx::internal::transactionfocusprotected
register_me()pqxx::internal::transactionfocusprotected
registered() const pqxx::internal::transactionfocusprotected
tablestream(transaction_base &Trans, const std::string &Null=std::string())pqxx::tablestreamexplicit
transactionfocus(transaction_base &t)pqxx::internal::transactionfocusexplicit
unregister_me()pqxx::internal::transactionfocusprotected
~tablestream()=0pqxx::tablestreampure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00290.html000066400000000000000000000270021224474465600212510ustar00rootroot00000000000000 libpqxx: Member List
pqxx::tablewriter Member List

This is the complete list of members for pqxx::tablewriter, including all inherited members.

base_close()pqxx::tablestreamprotected
classname() const pqxx::internal::namedclass
columnlist(ITER colbegin, ITER colend)pqxx::tablestreamprotectedstatic
complete()pqxx::tablewritervirtual
description() const pqxx::internal::namedclass
generate(IT Begin, IT End) const pqxx::tablewriter
generate(const TUPLE &) const pqxx::tablewriter
insert(IT Begin, IT End)pqxx::tablewriter
insert(const TUPLE &)pqxx::tablewriter
is_finished() const pqxx::tablestreamprotected
m_Transpqxx::internal::transactionfocusprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
NullStr() const pqxx::tablestreamprotected
operator<<(const TUPLE &)pqxx::tablewriter
operator<<(tablereader &)pqxx::tablewriter
push_back(IT Begin, IT End)pqxx::tablewriter
push_back(const TUPLE &)pqxx::tablewriter
reg_pending_error(const std::string &)pqxx::internal::transactionfocusprotected
register_me()pqxx::internal::transactionfocusprotected
registered() const pqxx::internal::transactionfocusprotected
reserve(size_type)pqxx::tablewriter
size_type typedefpqxx::tablewriter
tablestream(transaction_base &Trans, const std::string &Null=std::string())pqxx::tablestreamexplicit
tablewriter(transaction_base &, const std::string &WName, const std::string &Null=std::string())pqxx::tablewriter
tablewriter(transaction_base &, const std::string &WName, ITER begincolumns, ITER endcolumns)pqxx::tablewriter
tablewriter(transaction_base &T, const std::string &WName, ITER begincolumns, ITER endcolumns, const std::string &Null)pqxx::tablewriter
transactionfocus(transaction_base &t)pqxx::internal::transactionfocusexplicit
unregister_me()pqxx::internal::transactionfocusprotected
write_raw_line(const std::string &)pqxx::tablewriter
~tablestream()=0pqxx::tablestreampure virtual
~tablewriter()pqxx::tablewriter
libpqxx-4.0.1+dfsg/doc/html/Reference/a00291.html000066400000000000000000000344101224474465600212530ustar00rootroot00000000000000 libpqxx: Member List
pqxx::basic_transaction Member List

This is the complete list of members for pqxx::basic_transaction, including all inherited members.

abort()pqxx::transaction_base
basic_transaction(connection_base &C, const std::string &IsolationLevel, readwrite_policy)pqxx::basic_transactionprotected
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_abort()pqxx::dbtransactionprotectedvirtual
do_begin()pqxx::dbtransactionprotectedvirtual
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction_base
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~dbtransaction()pqxx::dbtransactionvirtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00292.html000066400000000000000000000364351224474465600212650ustar00rootroot00000000000000 libpqxx: Member List
pqxx::transaction< ISOLATIONLEVEL, READWRITE > Member List

This is the complete list of members for pqxx::transaction< ISOLATIONLEVEL, READWRITE >, including all inherited members.

abort()pqxx::transaction_base
basic_transaction(connection_base &C, const std::string &IsolationLevel, readwrite_policy)pqxx::basic_transactionprotected
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
dbtransaction(connection_base &, const std::string &IsolationString, readwrite_policy rw=read_write)pqxx::dbtransactionprotected
dbtransaction(connection_base &, bool direct=true, readwrite_policy rw=read_write)pqxx::dbtransactionexplicitprotected
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_abort()pqxx::dbtransactionprotectedvirtual
do_begin()pqxx::dbtransactionprotectedvirtual
do_exec(const char Query[])pqxx::dbtransactionprotectedvirtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
fullname(const std::string &ttype, const std::string &isolation)pqxx::dbtransactionprotectedstatic
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction< ISOLATIONLEVEL, READWRITE >
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
start_backend_transaction()pqxx::dbtransactionprotected
transaction(connection_base &C, const std::string &TName)pqxx::transaction< ISOLATIONLEVEL, READWRITE >explicit
transaction(connection_base &C)pqxx::transaction< ISOLATIONLEVEL, READWRITE >explicit
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~dbtransaction()pqxx::dbtransactionvirtual
~transaction()pqxx::transaction< ISOLATIONLEVEL, READWRITE >virtual
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00293.html000066400000000000000000000335171224474465600212640ustar00rootroot00000000000000 libpqxx: Member List
pqxx::transaction_base Member List

This is the complete list of members for pqxx::transaction_base, including all inherited members.

abort()pqxx::transaction_base
Begin()pqxx::transaction_baseprotected
classname() const pqxx::internal::namedclass
commit()pqxx::transaction_base
conn() const pqxx::transaction_base
description() const pqxx::internal::namedclass
DirectExec(const char C[], int Retries=0)pqxx::transaction_baseprotected
do_abort()=0pqxx::transaction_baseprotectedpure virtual
do_begin()=0pqxx::transaction_baseprotectedpure virtual
do_commit()=0pqxx::transaction_baseprotectedpure virtual
do_exec(const char Query[])=0pqxx::transaction_baseprotectedpure virtual
End()pqxx::transaction_baseprotected
esc(const char str[]) const pqxx::transaction_base
esc(const char str[], size_t maxlen) const pqxx::transaction_base
esc(const std::string &str) const pqxx::transaction_base
esc_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
esc_raw(const std::string &) const pqxx::transaction_base
exec(const std::string &Query, const std::string &Desc=std::string())pqxx::transaction_base
exec(const std::stringstream &Query, const std::string &Desc=std::string())pqxx::transaction_base
get_variable(const std::string &)pqxx::transaction_base
isolation_tag typedefpqxx::transaction_base
m_reactivation_avoidancepqxx::transaction_baseprotected
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
parameterized(const std::string &query)pqxx::transaction_base
pqxx::internal::gate::transaction_subtransaction classpqxx::transaction_basefriend
pqxx::internal::gate::transaction_tablereader classpqxx::transaction_basefriend
pqxx::internal::gate::transaction_tablewriter classpqxx::transaction_basefriend
pqxx::internal::gate::transaction_transactionfocus classpqxx::transaction_basefriend
prepared(const std::string &statement=std::string())pqxx::transaction_base
process_notice(const char Msg[]) const pqxx::transaction_base
process_notice(const std::string &Msg) const pqxx::transaction_base
quote(const T &t) const pqxx::transaction_base
quote_name(const std::string &identifier) const pqxx::transaction_base
quote_raw(const unsigned char str[], size_t len) const pqxx::transaction_base
quote_raw(const std::string &str) const pqxx::transaction_base
reactivation_avoidance_clear()pqxx::transaction_baseprotected
set_variable(const std::string &Var, const std::string &Val)pqxx::transaction_base
transaction_base(connection_base &c, bool direct=true)pqxx::transaction_baseexplicitprotected
~transaction_base()=0pqxx::transaction_basepure virtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00294.html000066400000000000000000000113241224474465600212550ustar00rootroot00000000000000 libpqxx: Member List
pqxx::transactor< TRANSACTION > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00295.html000066400000000000000000000345411224474465600212640ustar00rootroot00000000000000 libpqxx: Member List
pqxx::tuple Member List

This is the complete list of members for pqxx::tuple, including all inherited members.

at(size_type) const pqxx::tuple
at(int) const pqxx::tuple
at(const char[]) const pqxx::tuple
at(const std::string &) const pqxx::tuple
back() const pqxx::tuple
begin() const pqxx::tuple
column_number(const std::string &ColName) const pqxx::tuple
column_number(const char[]) const pqxx::tuple
column_table(size_type ColNum) const pqxx::tuple
column_table(int ColNum) const pqxx::tuple
column_table(const std::string &ColName) const pqxx::tuple
column_type(size_type) const pqxx::tuple
column_type(int ColNum) const pqxx::tuple
column_type(const std::string &ColName) const pqxx::tuple
column_type(const char ColName[]) const pqxx::tuple
const_iterator typedefpqxx::tuple
const_reverse_iterator typedefpqxx::tuple
difference_type typedefpqxx::tuple
empty() const pqxx::tuple
end() const pqxx::tuple
field classpqxx::tuplefriend
front() const pqxx::tuple
iterator typedefpqxx::tuple
m_Beginpqxx::tupleprotected
m_Endpqxx::tupleprotected
m_Homepqxx::tupleprotected
m_Indexpqxx::tupleprotected
num() const pqxx::tuple
operator!=(const tuple &rhs) const pqxx::tuple
operator==(const tuple &) const pqxx::tuple
operator[](size_type) const pqxx::tuple
operator[](int) const pqxx::tuple
operator[](const char[]) const pqxx::tuple
operator[](const std::string &) const pqxx::tuple
pointer typedefpqxx::tuple
rbegin() const pqxx::tuple
reference typedefpqxx::tuple
rend() const pqxx::tuple
reverse_iterator typedefpqxx::tuple
rownumber() const pqxx::tuple
size() const pqxx::tuple
size_type typedefpqxx::tuple
slice(size_type Begin, size_type End) const pqxx::tuple
swap(tuple &)pqxx::tuple
table_column(size_type) const pqxx::tuple
table_column(int ColNum) const pqxx::tuple
table_column(const std::string &ColName) const pqxx::tuple
tuple(const result *r, size_t i)pqxx::tuple
~tuple()pqxx::tuple
libpqxx-4.0.1+dfsg/doc/html/Reference/a00296.html000066400000000000000000000334111224474465600212600ustar00rootroot00000000000000 libpqxx: Member List
pqxx::const_tuple_iterator Member List

This is the complete list of members for pqxx::const_tuple_iterator, including all inherited members.

as(const T &Default) const pqxx::field
as() const pqxx::field
c_str() const pqxx::field
col() const pqxx::fieldprotected
const_tuple_iterator(const tuple &T, tuple::size_type C)pqxx::const_tuple_iterator
const_tuple_iterator(const field &F)pqxx::const_tuple_iterator
difference_type typedefpqxx::const_tuple_iterator
field(const tuple &T, tuple_size_type C)pqxx::field
home() const pqxx::fieldprotected
idx() const pqxx::fieldprotected
is_null() const pqxx::field
m_colpqxx::fieldprotected
name() const pqxx::field
num() const pqxx::field
operator!=(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
pqxx::field::operator!=(const field &rhs) const pqxx::field
operator*() const pqxx::const_tuple_iterator
operator+(difference_type) const pqxx::const_tuple_iterator
operator+(difference_type, const_tuple_iterator)pqxx::const_tuple_iteratorfriend
operator++(int)pqxx::const_tuple_iterator
operator++()pqxx::const_tuple_iterator
operator+=(difference_type i)pqxx::const_tuple_iterator
operator-(difference_type) const pqxx::const_tuple_iterator
operator-(const_tuple_iterator) const pqxx::const_tuple_iterator
operator--(int)pqxx::const_tuple_iterator
operator--()pqxx::const_tuple_iterator
operator-=(difference_type i)pqxx::const_tuple_iterator
operator->() const pqxx::const_tuple_iterator
operator<(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
operator<=(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
operator==(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
pqxx::field::operator==(const field &) const pqxx::field
operator>(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
operator>=(const const_tuple_iterator &i) const pqxx::const_tuple_iterator
operator>>(T &Obj) const pqxx::field
reference typedefpqxx::const_tuple_iterator
size() const pqxx::field
size_type typedefpqxx::const_tuple_iterator
table() const pqxx::field
table_column() const pqxx::field
to(T &Obj) const pqxx::field
to(T &Obj, const T &Default) const pqxx::field
to(const char *&Obj) const pqxx::field
type() const pqxx::field
libpqxx-4.0.1+dfsg/doc/html/Reference/a00297.html000066400000000000000000000452201224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::const_reverse_tuple_iterator Member List

This is the complete list of members for pqxx::const_reverse_tuple_iterator, including all inherited members.

as(const T &Default) const pqxx::fieldprivate
as() const pqxx::fieldprivate
base() const pqxx::const_reverse_tuple_iterator
c_str() const pqxx::fieldprivate
col() const pqxx::fieldprivate
const_reverse_tuple_iterator(const const_reverse_tuple_iterator &r)pqxx::const_reverse_tuple_iterator
const_reverse_tuple_iterator(const super &rhs)pqxx::const_reverse_tuple_iteratorexplicit
const_tuple_iterator(const tuple &T, tuple::size_type C)pqxx::const_tuple_iteratorprivate
const_tuple_iterator(const field &F)pqxx::const_tuple_iteratorprivate
difference_type typedefpqxx::const_reverse_tuple_iterator
field(const tuple &T, tuple_size_type C)pqxx::fieldprivate
home() const pqxx::fieldprivate
idx() const pqxx::fieldprivate
is_null() const pqxx::fieldprivate
iterator_type typedefpqxx::const_reverse_tuple_iterator
m_colpqxx::fieldprivate
name() const pqxx::fieldprivate
num() const pqxx::fieldprivate
operator!=(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator!=(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
pqxx::field::operator!=(const field &rhs) const pqxx::fieldprivate
operator*() const pqxx::const_tuple_iteratorprivate
operator+(difference_type i) const pqxx::const_reverse_tuple_iterator
operator++()pqxx::const_reverse_tuple_iterator
operator++(int)pqxx::const_reverse_tuple_iterator
operator+=(difference_type i)pqxx::const_reverse_tuple_iterator
operator-(difference_type i)pqxx::const_reverse_tuple_iterator
operator-(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator-(difference_type) const pqxx::const_tuple_iteratorprivate
pqxx::const_tuple_iterator::operator-(const_tuple_iterator) const pqxx::const_tuple_iteratorprivate
operator--()pqxx::const_reverse_tuple_iterator
operator--(int)pqxx::const_reverse_tuple_iterator
operator-=(difference_type i)pqxx::const_reverse_tuple_iterator
operator->() const pqxx::const_tuple_iteratorprivate
operator<(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator<(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
operator<=(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator<=(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
operator=(const const_reverse_tuple_iterator &r)pqxx::const_reverse_tuple_iterator
operator==(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator==(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
pqxx::field::operator==(const field &) const pqxx::fieldprivate
operator>(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator>(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
operator>=(const const_reverse_tuple_iterator &rhs) const pqxx::const_reverse_tuple_iterator
pqxx::const_tuple_iterator::operator>=(const const_tuple_iterator &i) const pqxx::const_tuple_iteratorprivate
operator>>(T &Obj) const pqxx::fieldprivate
reference typedefpqxx::const_reverse_tuple_iterator
size() const pqxx::fieldprivate
size_type typedefpqxx::const_tuple_iteratorprivate
super typedefpqxx::const_reverse_tuple_iterator
table() const pqxx::fieldprivate
table_column() const pqxx::fieldprivate
to(T &Obj) const pqxx::fieldprivate
to(T &Obj, const T &Default) const pqxx::fieldprivate
to(const char *&Obj) const pqxx::fieldprivate
type() const pqxx::fieldprivate
libpqxx-4.0.1+dfsg/doc/html/Reference/a00298.html000066400000000000000000000110201224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00299.html000066400000000000000000000124061224474465600212640ustar00rootroot00000000000000 libpqxx: Member List
pqxx::items< T, CONT > Member List

This is the complete list of members for pqxx::items< T, CONT >, including all inherited members.

items()pqxx::items< T, CONT >
items(const T &t)pqxx::items< T, CONT >explicit
items(const T &t1, const T &t2)pqxx::items< T, CONT >
items(const T &t1, const T &t2, const T &t3)pqxx::items< T, CONT >
items(const T &t1, const T &t2, const T &t3, const T &t4)pqxx::items< T, CONT >
items(const T &t1, const T &t2, const T &t3, const T &t4, const T &t5)pqxx::items< T, CONT >
items(const CONT &c)pqxx::items< T, CONT >
operator()(const T &t)pqxx::items< T, CONT >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00300.html000066400000000000000000000102751224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00301.html000066400000000000000000000100601224474465600212360ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00302.html000066400000000000000000000250601224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::sql_cursor Member List

This is the complete list of members for pqxx::internal::sql_cursor, including all inherited members.

accesspolicy enum namepqxx::cursor_base
all()pqxx::cursor_basestatic
backward_all()pqxx::cursor_basestatic
close()pqxx::internal::sql_cursor
cursor_base(connection_base &, const std::string &Name, bool embellish_name=true)pqxx::cursor_baseprotected
difference_type typedefpqxx::cursor_base
empty_result() const pqxx::internal::sql_cursor
endpos() const pqxx::internal::sql_cursor
fetch(difference_type rows, difference_type &displacement)pqxx::internal::sql_cursor
fetch(difference_type rows)pqxx::internal::sql_cursor
forward_only enum valuepqxx::cursor_base
loose enum valuepqxx::cursor_base
m_namepqxx::cursor_baseprotected
move(difference_type rows, difference_type &displacement)pqxx::internal::sql_cursor
move(difference_type rows)pqxx::internal::sql_cursor
name() const pqxx::cursor_base
next()pqxx::cursor_basestatic
owned enum valuepqxx::cursor_base
ownershippolicy enum namepqxx::cursor_base
pos() const pqxx::internal::sql_cursor
prior()pqxx::cursor_basestatic
random_access enum valuepqxx::cursor_base
read_only enum valuepqxx::cursor_base
size_type typedefpqxx::cursor_base
sql_cursor(transaction_base &t, const std::string &query, const std::string &cname, cursor_base::accesspolicy ap, cursor_base::updatepolicy up, cursor_base::ownershippolicy op, bool hold)pqxx::internal::sql_cursor
sql_cursor(transaction_base &t, const std::string &cname, cursor_base::ownershippolicy op)pqxx::internal::sql_cursor
update enum valuepqxx::cursor_base
updatepolicy enum namepqxx::cursor_base
~sql_cursor()pqxx::internal::sql_cursor
libpqxx-4.0.1+dfsg/doc/html/Reference/a00303.html000066400000000000000000000116241224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::notify_listener_forwarder Member List

This is the complete list of members for pqxx::internal::notify_listener_forwarder, including all inherited members.

channel() const pqxx::notification_receiver
conn() const pqxx::notification_receiverprotected
notification_receiver(connection_base &c, const std::string &channel)pqxx::notification_receiver
notify_listener_forwarder(connection_base &c, const std::string &channel_name, notify_listener *wrappee)pqxx::internal::notify_listener_forwarder
operator()(const std::string &, int backend_pid)pqxx::internal::notify_listener_forwardervirtual
~notification_receiver()pqxx::notification_receivervirtual
libpqxx-4.0.1+dfsg/doc/html/Reference/a00304.html000066400000000000000000000073201224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::Escaper< IT > Member List

This is the complete list of members for pqxx::internal::Escaper< IT >, including all inherited members.

Escaper(const std::string &null)pqxx::internal::Escaper< IT >explicit
operator()(IT i) const pqxx::internal::Escaper< IT >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00305.html000066400000000000000000000135301224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::transactionfocus Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00306.html000066400000000000000000000120361224474465600212500ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::parameterized_invocation Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00307.html000066400000000000000000000066741224474465600212640ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::dereference< ITER > Member List

This is the complete list of members for pqxx::internal::dereference< ITER >, including all inherited members.

operator()(ITER i) const pqxx::internal::dereference< ITER >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00308.html000066400000000000000000000066531224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::deref_ptr< T > Member List

This is the complete list of members for pqxx::internal::deref_ptr< T >, including all inherited members.

operator()(T *i) const pqxx::internal::deref_ptr< T >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00309.html000066400000000000000000000100611224474465600212470ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::refcount Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00310.html000066400000000000000000000147521224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00311.html000066400000000000000000000133241224474465600212450ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00312.html000066400000000000000000000102211224474465600212370ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::namedclass Member List

This is the complete list of members for pqxx::internal::namedclass, including all inherited members.

classname() const pqxx::internal::namedclass
description() const pqxx::internal::namedclass
name() const pqxx::internal::namedclass
namedclass(const std::string &Classname, const std::string &Name="")pqxx::internal::namedclass
libpqxx-4.0.1+dfsg/doc/html/Reference/a00313.html000066400000000000000000000102041224474465600212410ustar00rootroot00000000000000 libpqxx: Member List
pqxx::internal::unique< GUEST > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00314.html000066400000000000000000000132021224474465600212430ustar00rootroot00000000000000 libpqxx: Member List
pqxx::prepare::invocation Member List

This is the complete list of members for pqxx::prepare::invocation, including all inherited members.

exec() const pqxx::prepare::invocation
exists() const pqxx::prepare::invocation
invocation(transaction_base &, const std::string &statement)pqxx::prepare::invocation
operator()()pqxx::prepare::invocation
operator()(const T &v)pqxx::prepare::invocation
operator()(const binarystring &v)pqxx::prepare::invocation
operator()(const T &v, bool nonnull)pqxx::prepare::invocation
operator()(const binarystring &v, bool nonnull)pqxx::prepare::invocation
operator()(T *v, bool nonnull=true)pqxx::prepare::invocation
operator()(const char *v, bool nonnull=true)pqxx::prepare::invocation
libpqxx-4.0.1+dfsg/doc/html/Reference/a00315.html000066400000000000000000000102651224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
pqxx::prepare::internal::prepared_def Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00316.html000066400000000000000000000101701224474465600212460ustar00rootroot00000000000000 libpqxx: Member List
std::numeric_limits< T > Member List

This is the complete list of members for std::numeric_limits< T >, including all inherited members.

max()std::numeric_limits< T >static
max()std::numeric_limits< T >
min()std::numeric_limits< T >static
min()std::numeric_limits< T >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00317.html000066400000000000000000000105601224474465600212520ustar00rootroot00000000000000 libpqxx: Member List
std::char_traits< char > Member List

This is the complete list of members for std::char_traits< char >, including all inherited members.

char_type typedefstd::char_traits< char >
eof()std::char_traits< char >static
int_type typedefstd::char_traits< char >
off_type typedefstd::char_traits< char >
pos_type typedefstd::char_traits< char >
libpqxx-4.0.1+dfsg/doc/html/Reference/a00318.html000066400000000000000000000106571224474465600212620ustar00rootroot00000000000000 libpqxx: Member List
std::char_traits< unsigned char > Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/a00319.html000066400000000000000000000115261224474465600212570ustar00rootroot00000000000000 libpqxx: Member List
libpqxx-4.0.1+dfsg/doc/html/Reference/annotated.html000066400000000000000000001322401224474465600224140ustar00rootroot00000000000000 libpqxx: Class List
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 1234]
oNpqxxThe home of all libpqxx classes, functions, templates, etc
|oNinternalPrivate namespace for libpqxx's internal use; do not access
|oNprepareDedicated namespace for helper types related to prepared statements
|oCbasic_connectionThe ultimate template that defines a connection type
|oCbinarystring
|oCconnect_directConnection policy; creates an immediate connection to a database
|oCconnect_lazyLazy connection policy; causes connection to be deferred until first use
|oCconnect_asyncAsynchronous connection policy; connects "in the background"
|oCconnect_nullNonfunctional, always-down connection policy for testing/debugging purposes
|oCconnection_baseConnection_base abstract base class; represents a connection to a database
|oCconnectionpolicy
|oCcursor_baseCommon definitions for cursor types
|oCstateless_cursor"Stateless cursor" class: easy API for retrieving parts of result sets
|oCicursorstreamSimple read-only cursor represented as a stream of results
|oCicursor_iteratorApproximate istream_iterator for icursorstream
|oCdbtransaction
|oCerrorhandlerBase class for error-handler callbacks
|oCquiet_errorhandlerAn error handler that suppresses any previously registered error handlers
|oCpqxx_exceptionMixin base class to identify libpqxx-specific exception types
|oCfailureRun-time failure encountered by libpqxx, similar to std::runtime_error
|oCbroken_connectionException class for lost or failed backend connection
|oCsql_errorException class for failed queries
|oCin_doubt_error"Help, I don't know whether transaction was committed successfully!"
|oCinternal_errorInternal error in libpqxx library
|oCusage_errorError in usage of libpqxx library, similar to std::logic_error
|oCargument_errorInvalid argument passed to libpqxx, similar to std::invalid_argument
|oCconversion_error
|oCrange_errorSomething is out of range, similar to std::out_of_range
|oCfeature_not_supportedDatabase feature not supported in current setup
|oCdata_exceptionError in data provided to SQL statement
|oCintegrity_constraint_violation
|oCrestrict_violation
|oCnot_null_violation
|oCforeign_key_violation
|oCunique_violation
|oCcheck_violation
|oCinvalid_cursor_state
|oCinvalid_sql_statement_name
|oCinvalid_cursor_name
|oCsyntax_error
|oCundefined_column
|oCundefined_function
|oCundefined_table
|oCinsufficient_privilege
|oCinsufficient_resourcesResource shortage on the server
|oCdisk_full
|oCout_of_memory
|oCtoo_many_connections
|oCplpgsql_errorPL/pgSQL error
|oCplpgsql_raiseException raised in PL/pgSQL procedure
|oCplpgsql_no_data_found
|oCplpgsql_too_many_rows
|oCfieldReference to a field in a result set
|oCfield_streambuf
|oCbasic_fieldstreamInput stream that gets its data from a result field
|oCisolation_traitsTraits class to describe an isolation level; primarly for libpqxx's own use
|oClargeobjectIdentity of a large object
|oClargeobjectaccessAccessor for large object's contents
|oClargeobject_streambufStreambuf to use large objects in standard I/O streams
|oCbasic_ilostreamInput stream that gets its data from a large object
|oCbasic_olostreamOutput stream that writes data back to a large object
|oCbasic_lostreamStream that reads and writes a large object
|oCnontransaction
|oCnotification_receiver
|oCnotify_listenerObsolete notification receiver
|oCpipelineProcesses several queries in FIFO manner, optimized for high throughput
|oCresultResult set containing data returned by a query or command
|oCconst_result_iteratorIterator for rows (tuples) in a result. Use as result::const_iterator
|oCconst_reverse_result_iteratorReverse iterator for result. Use as result::const_reverse_iterator
|oCbasic_robusttransaction
|oCrobusttransactionSlightly slower, better-fortified version of transaction
|oCstring_traitsTraits class for use in string conversions
|oCstring_traits< const char * >String traits for C-style string ("pointer to const char")
|oCstring_traits< char * >String traits for non-const C-style string ("pointer to char")
|oCstring_traits< char[N]>String traits for C-style string constant ("array of char")
|oCstring_traits< const char[N]>String traits for "array of const char."
|oCstring_traits< std::string >
|oCstring_traits< const std::string >
|oCstring_traits< std::stringstream >
|oCsubtransaction"Transaction" nested within another transaction
|oCtablereader
|oCtablestream
|oCtablewriter
|oCbasic_transaction
|oCtransactionStandard back-end transaction, templatized on isolation level
|oCtransaction_base
|oCtransactor
|oCtupleReference to one row in a result
|oCconst_tuple_iteratorIterator for fields in a tuple. Use as tuple::const_iterator
|oCconst_reverse_tuple_iteratorReverse iterator for a tuple. Use as tuple::const_reverse_iterator
|oCthread_safety_modelDescriptor of library's thread-safety model
|\CitemsContainer of items with easy contents initialization and string rendering
\NstdSTL namespace
 oCnumeric_limitsWork around lacking "limits" header
 oCchar_traitsWork around missing std::char_traits
 oCchar_traits< char >Work around missing std::char_traits<char>
 oCchar_traits< unsigned char >Work around missing std::char_traits<unsigned char>
 \Cback_insert_iterator< pqxx::tablewriter >
libpqxx-4.0.1+dfsg/doc/html/Reference/annotated.js000066400000000000000000000006111224474465600220600ustar00rootroot00000000000000var annotated = [ [ "pqxx", "a00176.html", "a00176" ], [ "std", null, [ [ "numeric_limits", "a00065.html", "a00065" ], [ "char_traits", "a00015.html", null ], [ "char_traits< char >", "a00016.html", "a00016" ], [ "char_traits< unsigned char >", "a00017.html", "a00017" ], [ "back_insert_iterator< pqxx::tablewriter >", "a00005.html", "a00005" ] ] ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/bc_s.png000066400000000000000000000012501224474465600211610ustar00rootroot00000000000000‰PNG  IHDR /ð9ÐoIDATxíMLAÇßìN»»¥ívKùPJik±R5^ŒChÂŃ!Dzƒ *U4VƒbÄD1~`8xà@ˆ^¿?ð𤡸Ý@јÝná`JLLÝØ¦ƒÜXi v«9ê)·}aV±&Ò0)›¼ð(‰zÛküNcFPÛù'@é¨KZK%!13§5£}Ý€ÒdÀã°’>´Åç´çhï¹G…ÉZ ïz×Ú—Éi£“ì–º=…@O¹«È‚1Ó¯¦3ãF«[ºä’d²¾JÒã`|^3˜Ý\›¿¡]²ó•'fçÓùyˆÄîçâÙ@¥Cos˧d:?$lhûnÝ× nm\†$cÔL6Ñý »Ì´x@N¦oPÀ®Î‘òÕ”€GÔ÷>9¹¨Q@ã±á“.‡qŠÜ´¼°Ø ”PCt(á«yŒQ$±°hÔNý8¤¥Ë MNjÿ$þßþŲo_ƒsLIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/bdwn.png000066400000000000000000000002231224474465600212040ustar00rootroot00000000000000‰PNG  IHDR5åZIDATxíË € DŸP–1ñlžmÀ r±j².e è†D[ØÉ¾ÙÏÔ¼µ¦ã´Þ|陣6€Všë3´Å?Ls'(}¬>+ žKó÷¥¿ch`‚ ^׃ÞnIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/classes.html000066400000000000000000000554631224474465600221070ustar00rootroot00000000000000 libpqxx: Class Index
Class Index
A | B | C | D | E | F | I | L | N | O | P | Q | R | S | T | U
  A  
const_reverse_tuple_iterator (pqxx)   integrity_constraint_violation (pqxx)   plpgsql_error (pqxx)   string_traits< const char[N]> (pqxx)   
const_tuple_iterator (pqxx)   internal_error (pqxx)   plpgsql_no_data_found (pqxx)   string_traits< const std::string > (pqxx)   
argument_error (pqxx)   conversion_error (pqxx)   invalid_cursor_name (pqxx)   plpgsql_raise (pqxx)   string_traits< std::string > (pqxx)   
  B  
cursor_base (pqxx)   invalid_cursor_state (pqxx)   plpgsql_too_many_rows (pqxx)   string_traits< std::stringstream > (pqxx)   
  D  
invalid_sql_statement_name (pqxx)   PQAlloc (pqxx::internal)   subtransaction (pqxx)   
back_insert_iterator< pqxx::tablewriter > (std)   invocation (pqxx::prepare)   pqxx_exception (pqxx)   syntax_error (pqxx)   
basic_connection (pqxx)   data_exception (pqxx)   isolation_traits (pqxx)   prepared_def (pqxx::prepare::internal)   
  T  
basic_fieldstream (pqxx)   dbtransaction (pqxx)   items (pqxx)   
  Q  
basic_ilostream (pqxx)   deref_ptr (pqxx::internal)   
  L  
tablereader (pqxx)   
basic_lostream (pqxx)   dereference (pqxx::internal)   quiet_errorhandler (pqxx)   tablestream (pqxx)   
basic_olostream (pqxx)   disk_full (pqxx)   largeobject (pqxx)   
  R  
tablewriter (pqxx)   
basic_robusttransaction (pqxx)   
  E  
largeobject_streambuf (pqxx)   thread_safety_model (pqxx)   
basic_transaction (pqxx)   largeobjectaccess (pqxx)   range_error (pqxx)   too_many_connections (pqxx)   
binarystring (pqxx)   errorhandler (pqxx)   
  N  
reactivation_avoidance_counter (pqxx::internal)   transaction (pqxx)   
broken_connection (pqxx)   Escaper (pqxx::internal)   reactivation_avoidance_exemption (pqxx::internal)   transaction_base (pqxx)   
  C  
  F  
namedclass (pqxx::internal)   refcount (pqxx::internal)   transactionfocus (pqxx::internal)   
nontransaction (pqxx)   restrict_violation (pqxx)   transactor (pqxx)   
char_traits (std)   failure (pqxx)   not_null_violation (pqxx)   result (pqxx)   tuple (pqxx)   
char_traits< char > (std)   feature_not_supported (pqxx)   notification_receiver (pqxx)   robusttransaction (pqxx)   
  U  
char_traits< unsigned char > (std)   field (pqxx)   notify_listener (pqxx)   
  S  
check_violation (pqxx)   field_streambuf (pqxx)   notify_listener_forwarder (pqxx::internal)   undefined_column (pqxx)   
connect_async (pqxx)   foreign_key_violation (pqxx)   numeric_limits (std)   scoped_array (pqxx::internal)   undefined_function (pqxx)   
connect_direct (pqxx)   
  I  
  O  
sql_cursor (pqxx::internal)   undefined_table (pqxx)   
connect_lazy (pqxx)   sql_error (pqxx)   unique (pqxx::internal)   
connect_null (pqxx)   icursor_iterator (pqxx)   out_of_memory (pqxx)   stateless_cursor (pqxx)   unique_violation (pqxx)   
connection_base (pqxx)   icursorstream (pqxx)   
  P  
string_traits (pqxx)   usage_error (pqxx)   
connectionpolicy (pqxx)   in_doubt_error (pqxx)   string_traits< char * > (pqxx)   
const_result_iterator (pqxx)   insufficient_privilege (pqxx)   parameterized_invocation (pqxx::internal)   string_traits< char[N]> (pqxx)   
const_reverse_result_iterator (pqxx)   insufficient_resources (pqxx)   pipeline (pqxx)   string_traits< const char * > (pqxx)   
A | B | C | D | E | F | I | L | N | O | P | Q | R | S | T | U
libpqxx-4.0.1+dfsg/doc/html/Reference/closed.png000066400000000000000000000002041224474465600215220ustar00rootroot00000000000000‰PNG  IHDR à‘KIDATxíÝm @!†ÑGk™É7À-`&séts¦Àñþòð@åk}ª2€… P%Á_Ëþ¿N² .:0Dk¥‹Â›x" Ö›)¡xÒ5õIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/dir_3d7cbfaf9a6edea0a348c9e21a88d076.html000066400000000000000000000265001224474465600261620ustar00rootroot00000000000000 libpqxx: include/pqxx/ Directory Reference
pqxx Directory Reference

Files

file  basic_connection.hxx [code]
file  binarystring.hxx [code]
file  compiler-internal-post.hxx [code]
file  compiler-internal-pre.hxx [code]
file  compiler-internal.hxx [code]
file  compiler-public.hxx [code]
file  config-internal-autotools.h [code]
file  config-internal-compiler.h [code]
file  config-internal-libpq.h [code]
file  config-public-compiler.h [code]
file  config.h [code]
file  connection.hxx [code]
file  connection_base.hxx [code]
file  connectionpolicy.hxx [code]
file  cursor.hxx [code]
file  dbtransaction.hxx [code]
file  errorhandler.hxx [code]
file  except.hxx [code]
file  field.hxx [code]
file  isolation.hxx [code]
file  largeobject.hxx [code]
file  nontransaction.hxx [code]
file  notification.hxx [code]
file  notify-listen.hxx [code]
file  performance.hxx [code]
file  pipeline.hxx [code]
file  prepared_statement.hxx [code]
file  result.hxx [code]
file  robusttransaction.hxx [code]
file  strconv.hxx [code]
file  subtransaction.hxx [code]
file  tablereader.hxx [code]
file  tablestream.hxx [code]
file  tablewriter.hxx [code]
file  transaction.hxx [code]
file  transaction_base.hxx [code]
file  transactor.hxx [code]
file  trigger.hxx [code]
file  tuple.hxx [code]
file  util.hxx [code]
file  version.hxx [code]
libpqxx-4.0.1+dfsg/doc/html/Reference/dir_68267d1309a1af8e8297ef4c3efbcdba.html000066400000000000000000000161341224474465600261110ustar00rootroot00000000000000 libpqxx: src/ Directory Reference
src Directory Reference

Files

file  binarystring.cxx
file  connection.cxx
file  connection_base.cxx
file  cursor.cxx
file  dbtransaction.cxx
file  errorhandler.cxx
file  except.cxx
file  field.cxx
file  largeobject.cxx
file  nontransaction.cxx
file  notification.cxx
file  notify-listen.cxx
file  pipeline.cxx
file  prepared_statement.cxx
file  result.cxx
file  robusttransaction.cxx
file  statement_parameters.cxx
file  strconv.cxx
file  subtransaction.cxx
file  tablereader.cxx
file  tablestream.cxx
file  tablewriter.cxx
file  transaction.cxx
file  transaction_base.cxx
file  tuple.cxx
file  util.cxx
libpqxx-4.0.1+dfsg/doc/html/Reference/dir_d44c64559bbebec7f509842c48db8b23.html000066400000000000000000000061321224474465600257500ustar00rootroot00000000000000 libpqxx: include/ Directory Reference
include Directory Reference

Directories

directory  pqxx
libpqxx-4.0.1+dfsg/doc/html/Reference/doxygen.css000066400000000000000000000470501224474465600217440ustar00rootroot00000000000000/* The standard CSS for doxygen */ body, table, div, p, dl { font: 400 14px/19px Roboto,sans-serif; } /* @group Heading Levels */ h1 { font-size: 150%; } .title { font-size: 150%; font-weight: bold; margin: 10px 2px; } h2 { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3 { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd, p.starttd { margin-top: 2px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited { color: #4665A2; } a.codeRef, a.codeRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 4px; margin: 4px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ /* .search { color: #003399; font-weight: bold; } form.search { margin-bottom: 0px; margin-top: 0px; } input.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-bottom: 1px solid #DEE4F0; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: bold; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; border-top-left-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; background-image:url('nav_g.png'); background-repeat:repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #728DC1; border-top:1px solid #5373B4; border-left:1px solid #5373B4; border-right:1px solid #C4CFE5; border-bottom:1px solid #C4CFE5; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; } /* @end */ /* these are for tree view when not used as main index */ div.directory { margin: 10px 0px; border-top: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; width: 100%; } .directory table { border-collapse:collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; } .directory td.entry a { outline:none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F7F8FB; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3D578C; } div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { width: 100%; margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; width: 100%; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } /* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left:4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#334975; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } div.toc { padding: 14px 25px; background-color: #F4F6FA; border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 20px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } } libpqxx-4.0.1+dfsg/doc/html/Reference/doxygen.png000066400000000000000000000073031224474465600217350ustar00rootroot00000000000000‰PNG  IHDRh ;ˆØŠIDATxí]y\•Õº~45%TL Q”PE"q–Û11±]8a„w*©¨(*â" ˆzÀè`8 ¨‰¢mÅ,’òà„p$%”œBó(8k†Ü÷ýÜû6lòö»§k÷Ç÷[ÏÞß·Ö;?k½ëßÕÕÕPxÑêÏ't´ÏùÈ€zÀÇÅ3_€Q4€g@œmÿ ¾ò‰âci‰ôçÿ{ ðÇð¬ù~½Á€4:õHcÂü ðŸÁ³„ª'ÕPÆæ P7^h،♠zb„cóP¨„ 3‚† Ò}çÿO²qÁºNkÝTÛ(É?d Ç~z<’«4Óǡ؞Þv­zµÙ¦õ¬ZâdÛ,Ë6Ók±]Fz< ¾ZçƒsÕ?ìƒsUø2SÉåwê1”c`[ì—}%ѽ.Ô¼6‚BLZ˜û!F8[ ¹…×TéÛ— »Þ#gó]å:vžu?‡vèbÙR˜?wùŽŸ¾ÊÐgbÑÉÌÕ$kF~Ê;عÆ•¢ïX®?ÉèlÆÙôõà»Nʪ¼­,ìHC§gAz•ÆlÓº­gÑú ]œjÎñåM…3ÓÚæoÒ³'=‘$Ò÷f}G•ŸS_‡öèco.Êȹ :ó£ Ãds®Ù:1=¼{ƒå9?÷ý…zqÛvîÓi‰D’p¿Ë šmÙíoÛâýaÖüEqÒµwÌ}¿~{òj€ç{ôºŸFNëí[ëOq·ÇOSúXO]°>‚‚muæÄ¾e¤“5Ë{¨JÕ¯£(›´«bÂçû’ÍlÓÅ}žïú`éUÞy„ac§Á†ÔCºŠóAkl‘±y¥†ô¢ùôs÷Aø¬7ÄõôoJ±äÄ ù.¥Be. Z¬Ð×ÇÈöå¹­ù'Ù-PëìŠyF.ž‚žÝÚ€lp&.êˆð•jò7’re’z19»ã§HGíø%œüq°ïüz׈c¬_k_")ŸHJnÐÑ~ˆÐÖ˜á´äÕ5 µÁq€ÿ5#¸·îà¶+9T‘‚ ðŽ÷Rܸrz“Ï´Ì =Ï…{ðáO£Èf ¡Íwg|Ž’Ü/¢Þ$÷¯¢ëðúÀ;¿à¨Ö™âÒÆ­]¯ÜW"Þ/< ‡÷DÏà°½üB}çyIEc^—ƒ=[V“Ýh²ëMä$l];Kû®¸ýr¦È*Åò ÿtÒõ$]•MŸ÷´;×I€1èó!‚œõ¸M õ¨(fÌæ<ÁÎÎò5~z¿ù¶ž mÌêÕ >–âÚ©âëˆIÎÞçz;ãu[i·eç^ÆÜÙÓ³NÞëF6B\}7†»+üŽÓ,Ã'a ½˜-yHY¿,‘^—ñfú~ß?Hcø¸…¸ñó{Z+4\såƒû·¯Ù·nߣð«íFÆ¡sغëû§D¾?ò<–Ævkx0ÅM±ælذÁIÓxÿd”žÜÉ÷EE»AªM«g*È£YEí7Û™^[uíý®v[wGå†=Ed¼n×¶ÆæÖÅl¡'¨pGÚk+‹æ¢À¬¨C8ªâš2 dz3H£ß ¡¨BÒûSÃÅù[wŘ ~xpçútÁæmö¤Å£¥iQæ­‰AB1ÉfÙ‰›4u¹ïìIÒ]Ë6äò%ÿ†† 1t.’NJph¬zÌ ÎR1Ž"3-"¸‡‹&ìó°1âüžìó[:‡ï„¼‘……N m–“W0®_èÜœ ×õ6ùò&»)Æìꦬýæ}¬ñ~»{múù]z½£M•ºP~^Îá:eQTÙ_*7ÕÄ9É8—·Ëï 3°¶47E•î¿u÷“SÉ»U¯ _ NíºôW¬e¸ÄNÓ|»;™¿;ŒæÅd"ȉôøòÞµõï¾®½"èÄ´ÖMM+bYµ‘_ÉæEÝüÎ]P»¹XKÐI½Þ¥oE<_¹(„EP±Œ|mÇÁ¡‘Ý,ŠÓ©ººZ±Îߺ§×kÝ,kÍMš`Äø…jzeU»æ ™Át3ÓÀ½˜6—ÒöùË·r¨¹Ñ}““wö:Χùë¼ ¿|‚TܵÉQˆKßç_ÁâÀ™œ”pÑÐóໃ¼Ydâ0!®àa –øöçW$ÃÁ‘Á$/\¬$ð 2ÞímÞLH‹Ÿ èd£HVÜ,:ò½»RÍZšJ­a„z*>‹_…NT(ù‚^SVF­U¹8ñEþôñ܈óùnd;«®8™\C]ø=Èêm¬Æ:‚´ÆbãDd=Áãßžˆ‹UU5O‹|]þð®Pèêv‰á\]2ßìÿ"yÈ[ïyʧz£g{Y«{„Ùø5©ÿ;w{N3é­nâĨw§Á¢ÍK¢Ý­ûÏ29Id¿’ì y)ìPÞò8ŒÅ©¯‰±@mPÔñwjl,6 áhWÕ˜d öà uõmÁp®.™á£Ç…twöR x­BδYcŒxg*vo  yò‘•“[¬?ÜVœ˜0ÒN¡O난~Žó’¯·h#´Hkýœ±8kÓß^Àq@]àÓ“ø,56´¯÷Í-κU»n…[>]@nîøÏœp›[œ6# €4tën¯:ŽÒþ}…—8äT9_žY$/´G’K™©ù†•(óÑ’Mø©`ŸÉdѺ;ùO‹B Ó&P{qöhJÉ+Úé–§¦l2«MïöÝ_1ÑÓ«’t¸½±l€ëØya ¦ô©«®½ÆL^¬žêñš¸ùy.¾Û½Š[ u/]½‹iS}øN>²e1™q‡jfÚ&¢©iT\=kÏ›ÀXô-.84V5ðu!TE˜ þ.ŒOH´¶4—zwTr.ï‰¦Ë xõµ·œÖ„HÆù£žÈHùg Ñhñ’T$ßyq¸zþ¨p¿´ë< q•ró÷š‰wÿÍÑð–I]´–æI²é²˜sÂ"×:Õ–bÕ¦“ÈÙL6¢9VÊÓWž§<æ;”3?ý©Mê3AV#µ±ËÞ¯‘ž K£UrÝ9!›qát¦H£Ù+6ÇV…/TS^pÃùqgLP'Ú5E ‚–ÀÞºîÄ Ën"2|Ÿ;®W»Îý"Ö¬TwÖâµtúŽO'› á+W Ã+¦âZÌ–<ÕÆ&nOÝ,IŠ£06.ÁZ.Çñúøh*INÚ’Oe½ÉgBXÐÔZóäøä9èü“hÒíDSš¥¡Ê µA¯/Ôc¸ö“`A§¯"zå|‘ €ÅŸ¨ú;HÍ#‚Î|%ÄOˆƒ«OàÌÉÐÜD ž mÜðâc–ƤÉÂqm¶uË&~÷núÒË £ÇÏ€ZÕj =«_n[‡‡÷nN§ÏÝ$_¾bE˜‚€Õ)ù8¾?6‘lú“ÍÙæÖ}#bW( œ³d-®•p&¡ý’œÖa”"9öõņÐ$’Ú›AÜ!ä;ÐÑõè{~á¹8‘ÛÞ£1ÛÓÉ0ž`²#´kÒuäNÅÖ Q¹bhæ ”8ûÓMáŽa›•¿”w±h²¢®qŠæ°(bK ‚’Z¾Ò%ÐÆémáãÖË(Éý‚ÛJ)@> þ›7% ï{y Á“¾ÆÒîohfòô>{pÿ.­_Î%±ÉèägëlZØ\B2B #™¸ÚüÒºp‚hÝšü®[¥Ü<‹#SpñÌA7’ãØHƒt4:Ÿ|g¨tÓL¶*($Æ©»ì…®ù’ó÷$;b›ÔÙ`=¶£¦M„MÌÄ5ò«·Ç¾“H·ÌH.¼žHeAîº5}r­dõ¨±)ÀT};€Q5iÖ2…O0ü…0óñÃ;óæ,Š´²µ냔}g‘£]‹7å9ˆà©_{üèîêžC>úhê{Ž .ÈìðIIð€?[Kswz6Òuíý¬;µ€ç§OåâJÉa˶zv°éd† ¤µâ‚l´é舊«Åüy¾c÷ÁèÖÍ'ràúÅ™TWÕôÓ°¡L €|ʽŒ¼ì­høBã ÝTëî'ò]Kø£ìâÏ(=¹Kx €¿ LÌ,Pý¤Êµu‡¹…׈ §Å¾÷à1Ý«Äý;¿pGDäxZYÛ kfæ6¸ùóæ7®œ®þ6·ÕoÚ¾ÔH~ò®Þ¸â 8Uø“p<ºw3¡a£ÏÑ’‘3èÏ"€bˆ-ÎܺÏ_ªÅ]+ËM©zü°s“f-êçhÇãÑýÊãôÿ5}ZQNb{Ó?å%ÿ\SUõعIÓæ}~}p[œoÔÄ„êÐMMZáNÅå@>Œ„²á6(?¡Åé âK½+ü?À%ÝÝ·/Ç1‚9áUø?B)”ÕèâÞlÈÒêÏ @=àùÄÞžk­®ÅIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/dynsections.js000066400000000000000000000041341224474465600224510ustar00rootroot00000000000000function toggleVisibility(linkObj) { var base = $(linkObj).attr('id'); var summary = $('#'+base+'-summary'); var content = $('#'+base+'-content'); var trigger = $('#'+base+'-trigger'); var src=$(trigger).attr('src'); if (content.is(':visible')===true) { content.hide(); summary.show(); $(linkObj).addClass('closed').removeClass('opened'); $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); } else { content.show(); summary.hide(); $(linkObj).removeClass('closed').addClass('opened'); $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); } return false; } function updateStripes() { $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } function toggleLevel(level) { $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (l°ùý¿ÏËÊÂ]–P€zØf| Íñ¯“+Ù´gð5…b  i5ümM³œ_æÍq,ÒcŽõèoÓd´ !¶äò©ô•,ôðÀ{¹¨µYß,€zTÍ8H]𤕘ï7¼»/òó8ËQæ !F€~6ãá?Y ÀA@ŨÁ.@ƒ¶TäÄYïŠËë±r‘µ8Ð*·é>€Šçÿ?€×þŸe[6«xÂIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2doc.png000066400000000000000000000013521224474465600216250ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆ±IDATxíMOS[…Ÿžsúa?-XZ(PD4‚ AWbu`b 77wäHFÆCËÔÂÿà/`vo„ˆAPòq‹P @ ­ûÝè980 îà¤+»§Ýy×^ïZï9SW¹\83g‰3'°Nâçl¹¸_b¯p ïåûÆVÜÖ¡€Ÿ×"¬Ö†X€d]Ðà3“ÉÃÄÌ™xŸ ßMàœ[<çSPkvc—hÈ'…™˜^Åm™hØ7 `Û™¦ èÀåráq›‘œ¾!daeKŸþÆÕ˜:Ì*³_דâèi?I–eP*B7Ÿ¿åô!¹Ýgr6Ër6oKbëþãðôrI”ËTˆüªŒ¨xóö=›ù¢&‰(e+ßóÄkýÇ`ëÁÜb.“¸ÐW×w0¥°jÑzN™¬|©WEãµ¢a¯6[öX†AkÓù*/œ¨‰€ÉY­ ÿV’§–u²jÂ>1W *½·°PGŽzÿ¨/Eg{ ŸÇâaoŠÁVú:è¿™¤1$ôR§W,–ªà¨@ŠË56¾ÀÔÜ-¾,mê¸Î/æè¹– òr5¥T*S(Vf8ö9u’ Õ£w›ùóa=Í<{Ò¡UŒ÷r¯+ÉådDÏF$è°…£é¿`zþ»ÎúöN‘µÜ®0Q3£~_^Ëóâ¯N=ˆvpTà±LžT}ˆîkq†Òm<¼ÎÓ?Zh¿X£ï_þÝ¥[)ƒ `gêÃa_Ô*äÔ2`'=õ´Fÿ2EâÁPú ÷»›l=8‹Wv°%THqÉ¿<"¤ïG¾ÆxH{#ÆÖ«aÔJÕÞ‡—m‹„ çñKsÿàñVŠØ¡°·MâÒ^ TÁ– Ý›r¥ß½ømüÿ_™?ªWİ÷#uIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2folderclosed.png000066400000000000000000000011501224474465600235210ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆ/IDATxí]MOÔ@~ÚúuØlp]ö¿#›Å]PYECˆ\9ù¼yÑß`ÖÄÿàÿÀÉxóâ¢C &=qÐÄ£—vZçv¶3m؃‡vžLûNç}Þ÷}Þ½ZA@n° OäNp ’xóþK°ññ€xÜj”°8sÑ€“ “€œ_¼[Âíæ§ïD'‚•yye+ø¼û 7#rNŸlïük* ¾0Ь_d«_(àñÖ±àôz=ñxõv§÷h©‰z¹€šØP-äóä’̪uý¼$»\DãJc—B4¯ãÝÖ.:£Ï-ÑÏß}µŠLEíºþ #—ûáºÀÏgN;BŠ€6ïýñ䬜…ö@’Ðåñp&™h>p9¤™EEά¨ÎÊ‘" u¥n€$R"?{¹<˜…ë…%PNtâ$‰ß¶±úá+^<é"§2 ªDq”q´\¬«Ò™a–Œ‘©Aÿ€"Ôµ ™êŸèP£}#Eàz{û.8i îp³ê(ADwD¦E<ê¬cE¦$ HdÊÄ ”.:Ù GŽ-`ŒL‚ý¾'¢‰Ä<¤CIª½;ÙÇTZd±i};>èôß‚z×;K×§8t ¤Ž q”:uvÿv•Ý›¬²ÙvEân{„M·FXg¼ÌfZÖ¨°¹‰*›ßÌß©±ù©:›j–YqèÜë#3çÏSøWøÿÿÑr'ø Ôùù‚ ©¡IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2folderopen.png000066400000000000000000000011251224474465600232130ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆIDATxí]?oÓPÿ9iš4i°;ii“¶‰ZЉ‘‰ÀÀ7`bèÔÙ¬Øù,HìU'ô$*Tµ]‚T¡DPÚÄ6wÏ}‰;¡C; a¿ÓߟûÝïîž¼jAÀ­InSþ}€9H“ÓŽ|?íÁ÷ =_ÊÆŠ­†¥Àue*;¯YEäsYäæB¢Ÿ¿þÄ—£sÙ½½ÙŒ† É«›©ÀYÇq !GÇ¿v̇¹ÑØ®š °Œ‚ÔF¹}q¥b]÷7í·0)Úd›¾ÿð-èº}Pfä£ÖY{4™ÑÂ@}úæôñ2ÛüÔ—ñúåNŒI‚ÁǃcçÁº%£¬UаI³mc±ô˜å¼ÔÆüÈ>é¸xþt9Æ$µý OæVE*õU´Ì‚ç#ž×ˆ•ïûr@l$øPÿrHaaÇ¥ ²›dZ®rè‘ãqI„o¼øT\Ž,tªj2FAxv-LŸp׌p TÄI/ \¥sfí½; jViTƒèú¤o^cpÅü¼ûû»Ïb]”€¢¤<†aþÕœ²“ßÓ˜y“£§9:Œîù+À³€ñà,E žf³6éNˆÄE£KU}Ü^;¶ØnZ¢uß­US4— ѬëbížN¶.Úk¦ØjTÄöº%µªâ i¯VÄÊÝò§™ Èù¸)ùÿG€™òºJ@T x”IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2lastnode.png000066400000000000000000000001261224474465600226670ustar00rootroot00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2link.png000066400000000000000000000013521224474465600220150ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆ±IDATxíMOS[…Ÿžsúa?-XZ(PD4‚ AWbu`b 77wäHFÆCËÔÂÿà/`vo„ˆAPòq‹P @ ­ûÝè980 îà¤+»§Ýy×^ïZï9SW¹\83g‰3'°Nâçl¹¸_b¯p ïåûÆVÜÖ¡€Ÿ×"¬Ö†X€d]Ðà3“ÉÃÄÌ™xŸ ßMàœ[<çSPkvc—hÈ'…™˜^Åm™hØ7 `Û™¦ èÀåráq›‘œ¾!daeKŸþÆÕ˜:Ì*³_דâèi?I–eP*B7Ÿ¿åô!¹Ýgr6Ër6oKbëþãðôrI”ËTˆüªŒ¨xóö=›ù¢&‰(e+ßóÄkýÇ`ëÁÜb.“¸ÐW×w0¥°jÑzN™¬|©WEãµ¢a¯6[öX†AkÓù*/œ¨‰€ÉY­ ÿV’§–u²jÂ>1W *½·°PGŽzÿ¨/Eg{ ŸÇâaoŠÁVú:è¿™¤1$ôR§W,–ªà¨@ŠË56¾ÀÔÜ-¾,mê¸Î/æè¹– òr5¥T*S(Vf8ö9u’ Õ£w›ùóa=Í<{Ò¡UŒ÷r¯+ÉådDÏF$è°…£é¿`zþ»ÎúöN‘µÜ®0Q3£~_^Ëóâ¯N=ˆvpTà±LžT}ˆîkq†Òm<¼ÎÓ?Zh¿X£ï_þÝ¥[)ƒ `gêÃa_Ô*äÔ2`'=õ´Fÿ2EâÁPú ÷»›l=8‹Wv°%THqÉ¿<"¤ïG¾ÆxH{#ÆÖ«aÔJÕÞ‡—m‹„ çñKsÿàñVŠØ¡°·MâÒ^ TÁ– Ý›r¥ß½ømüÿ_™?ªWİ÷#uIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2mlastnode.png000066400000000000000000000003661224474465600230520ustar00rootroot00000000000000‰PNG  IHDRɪ|½IDATxíÝ!NAÅñ¤‡à\ ÷à Um@`Ô5iÒ`ëh ‚ÅW7] b§ÝˆŠ&oföÍd¾YÔ4 üšcø ‡€´‹Åòù3v=¼]†§µ\B… I¿‹=B·™B¡®;¸k´µ W°ÍN@vyÍÑÖ4ãß÷]ÈâYìã§|M}]ÔÚx6a }ôdׇØYüú¨>¤||5?Ó>|žB"¡î'¡IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2mnode.png000066400000000000000000000003661224474465600221660ustar00rootroot00000000000000‰PNG  IHDRɪ|½IDATxíÝ!NAÅñ¤‡à\ ÷à Um@`Ô5iÒ`ëh ‚ÅW7] b§ÝˆŠ&oföÍd¾YÔ4 üšcø ‡€´‹Åòù3v=¼]†§µ\B… I¿‹=B·™B¡®;¸k´µ W°ÍN@vyÍÑÖ4ãß÷]ÈâYìã§|M}]ÔÚx6a }ôdׇØYüú¨>¤||5?Ó>|žB"¡î'¡IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2mo.png000066400000000000000000000006231224474465600214730ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆZIDATxí1Kû@ÆiƒØB…Ò¡(h¬"EÄI'ÁoàªèÚ©ßÀáâä 8ùçR-‚â B«TPˆï]z¥B’3 _Þã’»ç}ŸË]VÇ÷}€ÌÈdIæ®i쟯JØ–b¸šÍÃõ+º™|KÂ…°,[Pï\ʘMÆ¢#€ä…F`JݤìÛk³úA±àþè?ØY4ck6"¹Z)ê¸0SHM¨@ï㋺WÖmo¼4èHJ¨Àÿö+…QobŒút ¤ú’*Ð~êè8_+3Y-ñðÜå½÷ ˜PwA¶+^ý}ºì£+xìhÏ•MAE]€TD~EÞߴ^R)`ÖAùŸÏ9©pÔq-Û¾õÛ3tÝÊÆ›ˆÃTÐHÈ)€ ½Š’ICªxëd#1ôú§é€ m@Vüý?Zæßgo_½3-³\IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2node.png000066400000000000000000000001261224474465600220030ustar00rootroot00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2ns.png000066400000000000000000000006041224474465600214770ustar00rootroot00000000000000‰PNG  IHDRÚ}\ˆKIDATxíÝ1K1Àñ­ž ØG•â‚n‚Šà ‚âælÁE¿€‹“ (nºêââêäࢋƒÐMAá@°‹ µât¾ÄK¡à%Ü•Û ý]BIïå%áuÍ…a™€,e × v¯ç¥«ˆi‹º¨Õö–î\tòòuénÄ0ã æÜÉoV\Ì$G.&@Y=ÆË%$um·¢ûÛ6–'Úß«9Qó\bÙ)²º0Ðë-Zœ¥TèHÍ`pÀcsm µö5:>Áë‡Þ¦I µØ ‚F‹Çà]» ›jg—ìoÏáõ©[ œõ š­onë €Ô¬¨vqõ„?\Ðç”  6»øüÒTe ÃÉéŸeç ÀÅlQ ¡c”€ª¬ü3*d€ÅWTMÏ\rÿÿh6™ø1±F ‹°fžIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2plastnode.png000066400000000000000000000003451224474465600230520ustar00rootroot00000000000000‰PNG  IHDRɪ|¬IDATxí=QF‘Ø¥D«ÔkÄ:‰F©PK؃=V@§Õ³ Õ8SHxñÌ0bnrróŠ{ò½¿¾’$ ÀÏTŠP  ö¼X¬OÛd6êìòð"°²S´±O¥B€(¡àQé)š+YĈ ÒªËRÉÐ>VtÉsˆm9(ê„䜥k‚-@ȧ-Ü$ó b Ò[he ¿Kp-ôl|CùÿApRG'rÍ­aIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2pnode.png000066400000000000000000000003451224474465600221660ustar00rootroot00000000000000‰PNG  IHDRɪ|¬IDATxí=QF‘Ø¥D«ÔkÄ:‰F©PK؃=V@§Õ³ Õ8SHxñÌ0bnrróŠ{ò½¿¾’$ ÀÏTŠP  ö¼X¬OÛd6êìòð"°²S´±O¥B€(¡àQé)š+YĈ ÒªËRÉÐ>VtÉsˆm9(ê„䜥k‚-@ȧ-Ü$ó b Ò[he ¿Kp-ôl|CùÿApRG'rÍ­aIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2splitbar.png000066400000000000000000000004721224474465600227020ustar00rootroot00000000000000‰PNG  IHDRM¸¿IDATxíÝ¡JCa‡ñç(˜ ëƒ%±Ø4 b±È˜Í¶3˜v^Á±˜…ãó–ŽELƒõ…¥•³ ,ÿb;íç{Ã/¼ðÞÀaYÕ¯åóøq:¼º¹›\òIIIIIIIIIIIIIIIIII-Òçl¹›«õ抢è_t/Ï»ã£ÑíYQVõðêäíã÷´×ùY¬Úÿµ§¦ivók¾_íåýÛ£I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$I@$ýC[Vì=ü[„fÆIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/ftv2vertline.png000066400000000000000000000001261224474465600227060ustar00rootroot00000000000000‰PNG  IHDRɪ|IDATxíݱðøScOx@ –¨y}IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/functions.html000066400000000000000000000153551224474465600224560ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- a -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x62.html000066400000000000000000000177131224474465600232350ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- b -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x63.html000066400000000000000000000354461224474465600232410ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- c -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x64.html000066400000000000000000000223511224474465600232310ustar00rootroot00000000000000 libpqxx: Class Members
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x65.html000066400000000000000000000177751224474465600232500ustar00rootroot00000000000000 libpqxx: Class Members
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x66.html000066400000000000000000000162121224474465600232320ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- f -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x67.html000066400000000000000000000152711224474465600232370ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- g -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x68.html000066400000000000000000000147751224474465600232500ustar00rootroot00000000000000 libpqxx: Class Members
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x69.html000066400000000000000000000315271224474465600232430ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- i -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x6c.html000066400000000000000000000141741224474465600233140ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- l -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x6d.html000066400000000000000000000150771224474465600233200ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- m -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x6e.html000066400000000000000000000223011224474465600233050ustar00rootroot00000000000000 libpqxx: Class Members
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x6f.html000066400000000000000000000502151224474465600233130ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- o -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x70.html000066400000000000000000000250451224474465600232310ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- p -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x71.html000066400000000000000000000144521224474465600232320ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- q -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x72.html000066400000000000000000000227201224474465600232300ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- r -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x73.html000066400000000000000000000267271224474465600232440ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- s -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x74.html000066400000000000000000000225571224474465600232420ustar00rootroot00000000000000 libpqxx: Class Members
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x75.html000066400000000000000000000157361224474465600232440ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- u -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x76.html000066400000000000000000000127761224474465600232460ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- v -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x77.html000066400000000000000000000133171224474465600232370ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- w -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_0x7e.html000066400000000000000000000215011224474465600233070ustar00rootroot00000000000000 libpqxx: Class Members
Here is a list of all class members with links to the classes they belong to:

- ~ -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_dup.js000066400000000000000000000016561224474465600227750ustar00rootroot00000000000000var functions_dup = [ [ "a", "functions.html", null ], [ "b", "functions_0x62.html", null ], [ "c", "functions_0x63.html", null ], [ "d", "functions_0x64.html", null ], [ "e", "functions_0x65.html", null ], [ "f", "functions_0x66.html", null ], [ "g", "functions_0x67.html", null ], [ "h", "functions_0x68.html", null ], [ "i", "functions_0x69.html", null ], [ "l", "functions_0x6c.html", null ], [ "m", "functions_0x6d.html", null ], [ "n", "functions_0x6e.html", null ], [ "o", "functions_0x6f.html", null ], [ "p", "functions_0x70.html", null ], [ "q", "functions_0x71.html", null ], [ "r", "functions_0x72.html", null ], [ "s", "functions_0x73.html", null ], [ "t", "functions_0x74.html", null ], [ "u", "functions_0x75.html", null ], [ "v", "functions_0x76.html", null ], [ "w", "functions_0x77.html", null ], [ "~", "functions_0x7e.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/functions_enum.html000066400000000000000000000100541224474465600234710ustar00rootroot00000000000000 libpqxx: Class Members - Enumerations
 
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_eval.html000066400000000000000000000156561224474465600234710ustar00rootroot00000000000000 libpqxx: Class Members - Enumerator
 
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func.html000066400000000000000000000152361224474465600234670ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func.js000066400000000000000000000017561224474465600231410ustar00rootroot00000000000000var functions_func = [ [ "a", "functions_func.html", null ], [ "b", "functions_func_0x62.html", null ], [ "c", "functions_func_0x63.html", null ], [ "d", "functions_func_0x64.html", null ], [ "e", "functions_func_0x65.html", null ], [ "f", "functions_func_0x66.html", null ], [ "g", "functions_func_0x67.html", null ], [ "h", "functions_func_0x68.html", null ], [ "i", "functions_func_0x69.html", null ], [ "l", "functions_func_0x6c.html", null ], [ "m", "functions_func_0x6d.html", null ], [ "n", "functions_func_0x6e.html", null ], [ "o", "functions_func_0x6f.html", null ], [ "p", "functions_func_0x70.html", null ], [ "q", "functions_func_0x71.html", null ], [ "r", "functions_func_0x72.html", null ], [ "s", "functions_func_0x73.html", null ], [ "t", "functions_func_0x74.html", null ], [ "u", "functions_func_0x75.html", null ], [ "w", "functions_func_0x77.html", null ], [ "~", "functions_func_0x7e.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x62.html000066400000000000000000000176311224474465600242470ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x63.html000066400000000000000000000251461224474465600242500ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- c -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x64.html000066400000000000000000000177571224474465600242620ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x65.html000066400000000000000000000173351224474465600242530ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x66.html000066400000000000000000000154321224474465600242500ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x67.html000066400000000000000000000152071224474465600242510ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x68.html000066400000000000000000000143321224474465600242500ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x69.html000066400000000000000000000217441224474465600242560ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x6c.html000066400000000000000000000136761224474465600243350ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- l -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x6d.html000066400000000000000000000132441224474465600243250ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x6e.html000066400000000000000000000217761224474465600243370ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x6f.html000066400000000000000000000441211224474465600243250ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- o -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x70.html000066400000000000000000000175721224474465600242520ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x71.html000066400000000000000000000143561224474465600242500ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x72.html000066400000000000000000000206771224474465600242540ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- r -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x73.html000066400000000000000000000222011224474465600242360ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x74.html000066400000000000000000000205761224474465600242540ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x75.html000066400000000000000000000152551224474465600242530ustar00rootroot00000000000000 libpqxx: Class Members - Functions
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x77.html000066400000000000000000000132351224474465600242510ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- w -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_func_0x7e.html000066400000000000000000000214171224474465600243300ustar00rootroot00000000000000 libpqxx: Class Members - Functions
 

- ~ -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_rela.html000066400000000000000000000156471224474465600234650ustar00rootroot00000000000000 libpqxx: Class Members - Related Functions
 
libpqxx-4.0.1+dfsg/doc/html/Reference/functions_type.html000066400000000000000000000376521224474465600235230ustar00rootroot00000000000000 libpqxx: Class Members - Typedefs
 

- c -

- d -

- f -

- h -

- i -

- o -

- p -

- q -

- r -

- s -

- t -

- v -

libpqxx-4.0.1+dfsg/doc/html/Reference/functions_vars.html000066400000000000000000000126621224474465600235070ustar00rootroot00000000000000 libpqxx: Class Members - Variables
 
libpqxx-4.0.1+dfsg/doc/html/Reference/hierarchy.html000066400000000000000000001375521224474465600224300ustar00rootroot00000000000000 libpqxx: Class Hierarchy
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12345]
oCstd::back_insert_iterator< pqxx::tablewriter >
oCpqxx::basic_fieldstream< CHAR, TRAITS >Input stream that gets its data from a result field
oCpqxx::basic_ilostream< CHAR, TRAITS >Input stream that gets its data from a large object
oCpqxx::basic_lostream< CHAR, TRAITS >Stream that reads and writes a large object
oCpqxx::basic_olostream< CHAR, TRAITS >Output stream that writes data back to a large object
oCstd::char_traits< CHAR >Work around missing std::char_traits
oCstd::char_traits< char >Work around missing std::char_traits<char>
oCstd::char_traits< unsigned char >Work around missing std::char_traits<unsigned char>
oCpqxx::connection_baseConnection_base abstract base class; represents a connection to a database
|\Cpqxx::basic_connection< CONNECTPOLICY >The ultimate template that defines a connection type
oCpqxx::connectionpolicy
|oCpqxx::connect_asyncAsynchronous connection policy; connects "in the background"
|oCpqxx::connect_directConnection policy; creates an immediate connection to a database
|oCpqxx::connect_lazyLazy connection policy; causes connection to be deferred until first use
|\Cpqxx::connect_nullNonfunctional, always-down connection policy for testing/debugging purposes
oCpqxx::cursor_baseCommon definitions for cursor types
|\Cpqxx::internal::sql_cursorCursor with SQL positioning semantics
oCpqxx::internal::deref_ptr< T >
oCpqxx::internal::dereference< ITER >Functor: dereference iterator
oCpqxx::errorhandlerBase class for error-handler callbacks
|\Cpqxx::quiet_errorhandlerAn error handler that suppresses any previously registered error handlers
oCpqxx::internal::Escaper< IT >
oCpqxx::fieldReference to a field in a result set
|\Cpqxx::const_tuple_iteratorIterator for fields in a tuple. Use as tuple::const_iterator
| \Cpqxx::const_reverse_tuple_iteratorReverse iterator for a tuple. Use as tuple::const_reverse_iterator
oCpqxx::field_streambuf< CHAR, TRAITS >
oCpqxx::icursor_iteratorApproximate istream_iterator for icursorstream
oCpqxx::icursorstreamSimple read-only cursor represented as a stream of results
oCpqxx::prepare::invocationHelper class for passing parameters to, and executing, prepared statements
oCpqxx::isolation_traits< LEVEL >Traits class to describe an isolation level; primarly for libpqxx's own use
oCpqxx::items< T, CONT >Container of items with easy contents initialization and string rendering
oCpqxx::largeobjectIdentity of a large object
|\Cpqxx::largeobjectaccessAccessor for large object's contents
oCpqxx::largeobject_streambuf< CHAR, TRAITS >Streambuf to use large objects in standard I/O streams
oCpqxx::internal::namedclass
|oCpqxx::internal::transactionfocus
||oCpqxx::pipelineProcesses several queries in FIFO manner, optimized for high throughput
||oCpqxx::subtransaction"Transaction" nested within another transaction
||\Cpqxx::tablestream
|| oCpqxx::tablereader
|| \Cpqxx::tablewriter
|\Cpqxx::transaction_base
| oCpqxx::dbtransaction
| |oCpqxx::basic_robusttransaction
| |oCpqxx::basic_transaction
| |\Cpqxx::subtransaction"Transaction" nested within another transaction
| \Cpqxx::nontransaction
oCpqxx::notification_receiver
|\Cpqxx::internal::notify_listener_forwarderInternal helper class to support old-style, payloadless notifications
oCpqxx::notify_listenerObsolete notification receiver
oCstd::numeric_limits< T >Work around lacking "limits" header
oCpqxx::internal::parameterized_invocation
oCpqxx::internal::PQAlloc< T, DELETER >Reference-counted smart pointer to libpq-allocated object
oCpqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >
|\Cpqxx::resultResult set containing data returned by a query or command
oCpqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >
|\Cpqxx::binarystring
oCpqxx::pqxx_exceptionMixin base class to identify libpqxx-specific exception types
|oCpqxx::argument_errorInvalid argument passed to libpqxx, similar to std::invalid_argument
|oCpqxx::conversion_error
|oCpqxx::failureRun-time failure encountered by libpqxx, similar to std::runtime_error
||oCpqxx::broken_connectionException class for lost or failed backend connection
|||\Cpqxx::too_many_connections
||oCpqxx::in_doubt_error"Help, I don't know whether transaction was committed successfully!"
||\Cpqxx::sql_errorException class for failed queries
|| oCpqxx::data_exceptionError in data provided to SQL statement
|| oCpqxx::feature_not_supportedDatabase feature not supported in current setup
|| oCpqxx::insufficient_privilege
|| oCpqxx::insufficient_resourcesResource shortage on the server
|| oCpqxx::integrity_constraint_violation
|| oCpqxx::invalid_cursor_name
|| oCpqxx::invalid_cursor_state
|| oCpqxx::invalid_sql_statement_name
|| oCpqxx::plpgsql_errorPL/pgSQL error
|| \Cpqxx::syntax_error
|oCpqxx::internal_errorInternal error in libpqxx library
|oCpqxx::range_errorSomething is out of range, similar to std::out_of_range
|\Cpqxx::usage_errorError in usage of libpqxx library, similar to std::logic_error
oCpqxx::prepare::internal::prepared_defInternal representation of a prepared statement definition
oCpqxx::internal::reactivation_avoidance_counter
oCpqxx::internal::reactivation_avoidance_exemptionScoped exemption to reactivation avoidance
oCpqxx::internal::refcount
oCpqxx::internal::scoped_array< T >
oCpqxx::stateless_cursor< up, op >"Stateless cursor" class: easy API for retrieving parts of result sets
oCpqxx::string_traits< T >Traits class for use in string conversions
oCpqxx::string_traits< char * >String traits for non-const C-style string ("pointer to char")
oCpqxx::string_traits< char[N]>String traits for C-style string constant ("array of char")
oCpqxx::string_traits< const char * >String traits for C-style string ("pointer to const char")
oCpqxx::string_traits< const char[N]>String traits for "array of const char."
oCpqxx::string_traits< const std::string >
oCpqxx::string_traits< std::string >
oCpqxx::string_traits< std::stringstream >
oCpqxx::thread_safety_modelDescriptor of library's thread-safety model
oCpqxx::transactor< TRANSACTION >
oCpqxx::tupleReference to one row in a result
|\Cpqxx::const_result_iteratorIterator for rows (tuples) in a result. Use as result::const_iterator
| \Cpqxx::const_reverse_result_iteratorReverse iterator for result. Use as result::const_reverse_iterator
\Cpqxx::internal::unique< GUEST >Ensure proper opening/closing of GUEST objects related to a "host" object
libpqxx-4.0.1+dfsg/doc/html/Reference/hierarchy.js000066400000000000000000000161341224474465600220700ustar00rootroot00000000000000var hierarchy = [ [ "std::back_insert_iterator< pqxx::tablewriter >", "a00005.html", null ], [ "pqxx::basic_fieldstream< CHAR, TRAITS >", "a00007.html", null ], [ "pqxx::basic_ilostream< CHAR, TRAITS >", "a00008.html", null ], [ "pqxx::basic_lostream< CHAR, TRAITS >", "a00009.html", null ], [ "pqxx::basic_olostream< CHAR, TRAITS >", "a00010.html", null ], [ "std::char_traits< CHAR >", "a00015.html", null ], [ "std::char_traits< char >", "a00016.html", null ], [ "std::char_traits< unsigned char >", "a00017.html", null ], [ "pqxx::connection_base", "a00023.html", [ [ "pqxx::basic_connection< CONNECTPOLICY >", "a00006.html", null ] ] ], [ "pqxx::connectionpolicy", "a00024.html", [ [ "pqxx::connect_async", "a00019.html", null ], [ "pqxx::connect_direct", "a00020.html", null ], [ "pqxx::connect_lazy", "a00021.html", null ], [ "pqxx::connect_null", "a00022.html", null ] ] ], [ "pqxx::cursor_base", "a00030.html", [ [ "pqxx::internal::sql_cursor", "a00085.html", null ] ] ], [ "pqxx::internal::deref_ptr< T >", "a00033.html", null ], [ "pqxx::internal::dereference< ITER >", "a00034.html", null ], [ "pqxx::errorhandler", "a00036.html", [ [ "pqxx::quiet_errorhandler", "a00076.html", null ] ] ], [ "pqxx::internal::Escaper< IT >", "a00037.html", null ], [ "pqxx::field", "a00040.html", [ [ "pqxx::const_tuple_iterator", "a00028.html", [ [ "pqxx::const_reverse_tuple_iterator", "a00027.html", null ] ] ] ] ], [ "pqxx::field_streambuf< CHAR, TRAITS >", "a00041.html", null ], [ "pqxx::icursor_iterator", "a00043.html", null ], [ "pqxx::icursorstream", "a00044.html", null ], [ "pqxx::prepare::invocation", "a00053.html", null ], [ "pqxx::isolation_traits< LEVEL >", "a00054.html", null ], [ "pqxx::items< T, CONT >", "a00055.html", null ], [ "pqxx::largeobject", "a00056.html", [ [ "pqxx::largeobjectaccess", "a00058.html", null ] ] ], [ "pqxx::largeobject_streambuf< CHAR, TRAITS >", "a00057.html", null ], [ "pqxx::internal::namedclass", "a00059.html", [ [ "pqxx::internal::transactionfocus", "a00105.html", [ [ "pqxx::pipeline", "a00068.html", null ], [ "pqxx::subtransaction", "a00096.html", null ], [ "pqxx::tablestream", "a00099.html", [ [ "pqxx::tablereader", "a00098.html", null ], [ "pqxx::tablewriter", "a00100.html", null ] ] ] ] ], [ "pqxx::transaction_base", "a00104.html", [ [ "pqxx::dbtransaction", "a00032.html", [ [ "pqxx::basic_robusttransaction", "a00011.html", [ [ "pqxx::robusttransaction< ISOLATIONLEVEL >", "a00083.html", null ] ] ], [ "pqxx::basic_transaction", "a00012.html", [ [ "pqxx::transaction< ISOLATIONLEVEL, READWRITE >", "a00103.html", null ] ] ], [ "pqxx::subtransaction", "a00096.html", null ] ] ], [ "pqxx::nontransaction", "a00060.html", null ] ] ] ] ], [ "pqxx::notification_receiver", "a00062.html", [ [ "pqxx::internal::notify_listener_forwarder", "a00064.html", null ] ] ], [ "pqxx::notify_listener", "a00063.html", null ], [ "std::numeric_limits< T >", "a00065.html", null ], [ "pqxx::internal::parameterized_invocation", "a00067.html", null ], [ "pqxx::internal::PQAlloc< T, DELETER >", "a00073.html", null ], [ "pqxx::internal::PQAlloc< const internal::result_data, internal::freemem_result_data >", "a00073.html", [ [ "pqxx::result", "a00082.html", null ] ] ], [ "pqxx::internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated< unsigned char > >", "a00073.html", [ [ "pqxx::binarystring", "a00013.html", null ] ] ], [ "pqxx::pqxx_exception", "a00074.html", [ [ "pqxx::argument_error", "a00004.html", null ], [ "pqxx::conversion_error", "a00029.html", null ], [ "pqxx::failure", "a00038.html", [ [ "pqxx::broken_connection", "a00014.html", [ [ "pqxx::too_many_connections", "a00102.html", null ] ] ], [ "pqxx::in_doubt_error", "a00045.html", null ], [ "pqxx::sql_error", "a00086.html", [ [ "pqxx::data_exception", "a00031.html", null ], [ "pqxx::feature_not_supported", "a00039.html", null ], [ "pqxx::insufficient_privilege", "a00046.html", null ], [ "pqxx::insufficient_resources", "a00047.html", [ [ "pqxx::disk_full", "a00035.html", null ], [ "pqxx::out_of_memory", "a00066.html", null ] ] ], [ "pqxx::integrity_constraint_violation", "a00048.html", [ [ "pqxx::check_violation", "a00018.html", null ], [ "pqxx::foreign_key_violation", "a00042.html", null ], [ "pqxx::not_null_violation", "a00061.html", null ], [ "pqxx::restrict_violation", "a00081.html", null ], [ "pqxx::unique_violation", "a00112.html", null ] ] ], [ "pqxx::invalid_cursor_name", "a00050.html", null ], [ "pqxx::invalid_cursor_state", "a00051.html", null ], [ "pqxx::invalid_sql_statement_name", "a00052.html", null ], [ "pqxx::plpgsql_error", "a00069.html", [ [ "pqxx::plpgsql_no_data_found", "a00070.html", null ], [ "pqxx::plpgsql_raise", "a00071.html", null ], [ "pqxx::plpgsql_too_many_rows", "a00072.html", null ] ] ], [ "pqxx::syntax_error", "a00097.html", [ [ "pqxx::undefined_column", "a00108.html", null ], [ "pqxx::undefined_function", "a00109.html", null ], [ "pqxx::undefined_table", "a00110.html", null ] ] ] ] ] ] ], [ "pqxx::internal_error", "a00049.html", null ], [ "pqxx::range_error", "a00077.html", null ], [ "pqxx::usage_error", "a00113.html", null ] ] ], [ "pqxx::prepare::internal::prepared_def", "a00075.html", null ], [ "pqxx::internal::reactivation_avoidance_counter", "a00078.html", null ], [ "pqxx::internal::reactivation_avoidance_exemption", "a00079.html", null ], [ "pqxx::internal::refcount", "a00080.html", null ], [ "pqxx::internal::scoped_array< T >", "a00084.html", null ], [ "pqxx::stateless_cursor< up, op >", "a00087.html", null ], [ "pqxx::string_traits< T >", "a00088.html", null ], [ "pqxx::string_traits< char * >", "a00089.html", null ], [ "pqxx::string_traits< char[N]>", "a00090.html", null ], [ "pqxx::string_traits< const char * >", "a00091.html", null ], [ "pqxx::string_traits< const char[N]>", "a00092.html", null ], [ "pqxx::string_traits< const std::string >", "a00093.html", null ], [ "pqxx::string_traits< std::string >", "a00094.html", null ], [ "pqxx::string_traits< std::stringstream >", "a00095.html", null ], [ "pqxx::thread_safety_model", "a00101.html", null ], [ "pqxx::transactor< TRANSACTION >", "a00106.html", null ], [ "pqxx::tuple", "a00107.html", [ [ "pqxx::const_result_iterator", "a00025.html", [ [ "pqxx::const_reverse_result_iterator", "a00026.html", null ] ] ] ] ], [ "pqxx::internal::unique< GUEST >", "a00111.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/index.html000066400000000000000000000100011224474465600215340ustar00rootroot00000000000000 libpqxx: Main Page
libpqxx Documentation
Author
Jeroen T. Vermeulen jtv@x.nosp@m.s4al.nosp@m.l.nl

Welcome to libpqxx, the C++ API to the PostgreSQL database management system.

Compiling this package requires PostgreSQL to be installed–including the C headers for client development. The library builds on top of PostgreSQL's standard C API, libpq. The libpq headers are not needed to compile client programs, however.

For a quick introduction to installing and using libpqxx, see the README file; a more extensive tutorial is available in doc/html/Tutorial/index.html.

The latest information, as well as updates, a mailing list, and a bug reporting system can be found at http://pqxx.org/

Some links that should help you find your bearings:

See Also
http://pqxx.org/
libpqxx-4.0.1+dfsg/doc/html/Reference/modules.html000066400000000000000000000121571224474465600221130ustar00rootroot00000000000000 libpqxx: Modules
Modules
Here is a list of all modules:
oPerformance features
oPrepared statements
oString conversion
oUtility functions
oString escapingBinary data corresponding to PostgreSQL's "BYTEA" binary-string type
oConnection classes
oTransaction classesAbstract base class responsible for bracketing a backend transaction
oErrorhandler
oException classes
oNotifications and Receivers"Observer" base class for notifications
\Transactor frameworkWrapper for transactions that automatically restarts them on failure
libpqxx-4.0.1+dfsg/doc/html/Reference/modules.js000066400000000000000000000011411224474465600215520ustar00rootroot00000000000000var modules = [ [ "Performance features", "a00199.html", null ], [ "Prepared statements", "a00200.html", null ], [ "String conversion", "a00201.html", "a00201" ], [ "Utility functions", "a00202.html", "a00202" ], [ "String escaping", "a00203.html", "a00203" ], [ "Connection classes", "a00204.html", "a00204" ], [ "Transaction classes", "a00205.html", "a00205" ], [ "Errorhandler", "a00206.html", "a00206" ], [ "Exception classes", "a00207.html", "a00207" ], [ "Notifications and Receivers", "a00208.html", null ], [ "Transactor framework", "a00209.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers.html000066400000000000000000000257271224474465600237610ustar00rootroot00000000000000 libpqxx: Namespace Members
Here is a list of all namespace members with links to the namespace documentation for each member:

- a -

  • asyncconnection : pqxx

- c -

- d -

- e -

- f -

- i -

  • ilostream : pqxx
  • isolation_level : pqxx

- l -

- n -

- o -

- r -

- s -

- t -

- w -

libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers_enum.html000066400000000000000000000070021224474465600247670ustar00rootroot00000000000000 libpqxx: Namespace Members
 
  • isolation_level : pqxx
  • readwrite_policy : pqxx
libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers_eval.html000066400000000000000000000077171224474465600247670ustar00rootroot00000000000000 libpqxx: Namespace Members
 
  • read_committed : pqxx
  • read_only : pqxx
  • read_write : pqxx
  • repeatable_read : pqxx
  • serializable : pqxx
libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers_func.html000066400000000000000000000167671224474465600250000ustar00rootroot00000000000000 libpqxx: Namespace Members
 

- c -

- d -

- e -

- f -

- n -

- o -

- s -

- t -

- w -

libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers_type.html000066400000000000000000000116531224474465600250130ustar00rootroot00000000000000 libpqxx: Namespace Members
 
libpqxx-4.0.1+dfsg/doc/html/Reference/namespacemembers_vars.html000066400000000000000000000073511224474465600250050ustar00rootroot00000000000000 libpqxx: Namespace Members
 
libpqxx-4.0.1+dfsg/doc/html/Reference/namespaces.html000066400000000000000000000064661224474465600225700ustar00rootroot00000000000000 libpqxx: Namespace List
Namespace List
Here is a list of all namespaces with brief descriptions:
\NpqxxThe home of all libpqxx classes, functions, templates, etc
libpqxx-4.0.1+dfsg/doc/html/Reference/namespaces.js000066400000000000000000000000711224474465600222220ustar00rootroot00000000000000var namespaces = [ [ "pqxx", "a00176.html", null ] ];libpqxx-4.0.1+dfsg/doc/html/Reference/nav_f.png000066400000000000000000000002311224474465600213420ustar00rootroot00000000000000‰PNG  IHDR8³»`IDATxíÝK€ EÑ–·[†øBÑmkâÄÂH—prÓ¼.‚Žó‚ꎤR6Z VI±E‚5j³„lóš›iI˜¬ÞêçJ0ŒÑÑ/Žû›™uøñóÞ¿6sH ÝõyIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/nav_g.png000066400000000000000000000001361224474465600213470ustar00rootroot00000000000000‰PNG  IHDRô1%IDATxíÝ;±{¥3Â𯆓,1íIuäÁÃ<«—Q¬IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/nav_h.png000066400000000000000000000001421224474465600213450ustar00rootroot00000000000000‰PNG  IHDR ,é@)IDATxíÝA @BQ­³šÛ›Ð¢Žáà) )ëý éaÅèÜ¿Æo‡RlÐßIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/navtree.css000066400000000000000000000037641224474465600217370ustar00rootroot00000000000000#nav-tree .children_ul { margin:0; padding:4px; } #nav-tree ul { list-style:none outside none; margin:0px; padding:0px; } #nav-tree li { white-space:nowrap; margin:0px; padding:0px; } #nav-tree .plus { margin:0px; } #nav-tree .selected { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } #nav-tree img { margin:0px; padding:0px; border:0px; vertical-align: middle; } #nav-tree a { text-decoration:none; padding:0px; margin:0px; outline:none; } #nav-tree .label { margin:0px; padding:0px; font: 12px 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } #nav-tree .label a { padding:2px; } #nav-tree .selected a { text-decoration:none; color:#fff; } #nav-tree .children_ul { margin:0px; padding:0px; } #nav-tree .item { margin:0px; padding:0px; } #nav-tree { padding: 0px 0px; background-color: #FAFAFF; font-size:14px; overflow:auto; } #doc-content { overflow:auto; display:block; padding:0px; margin:0px; -webkit-overflow-scrolling : touch; /* iOS 5+ */ } #side-nav { padding:0 6px 0 0; margin: 0px; display:block; position: absolute; left: 0px; width: 300px; } .ui-resizable .ui-resizable-handle { display:block; } .ui-resizable-e { background:url("ftv2splitbar.png") repeat scroll right center transparent; cursor:e-resize; height:100%; right:0; top:0; width:6px; } .ui-resizable-handle { display:none; font-size:0.1px; position:absolute; z-index:1; } #nav-tree-contents { margin: 6px 0px 0px 0px; } #nav-tree { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; -webkit-overflow-scrolling : touch; /* iOS 5+ */ } #nav-sync { position:absolute; top:5px; right:24px; z-index:0; } #nav-sync img { opacity:0.3; } #nav-sync img:hover { opacity:0.9; } @media print { #nav-tree { display: none; } div.ui-resizable-handle { display: none; position: relative; } } libpqxx-4.0.1+dfsg/doc/html/Reference/navtree.js000066400000000000000000000362521224474465600215610ustar00rootroot00000000000000var NAVTREE = [ [ "libpqxx", "index.html", [ [ "Getting started", "a00001.html", null ], [ "Accessing results and result rows", "a00002.html", null ], [ "Thread safety", "a00003.html", null ], [ "Deprecated List", "a00210.html", null ], [ "Modules", "modules.html", "modules" ], [ "Namespaces", null, [ [ "Namespace List", "namespaces.html", "namespaces" ], [ "Namespace Members", "namespacemembers.html", [ [ "All", "namespacemembers.html", null ], [ "Functions", "namespacemembers_func.html", null ], [ "Variables", "namespacemembers_vars.html", null ], [ "Typedefs", "namespacemembers_type.html", null ], [ "Enumerations", "namespacemembers_enum.html", null ], [ "Enumerator", "namespacemembers_eval.html", null ] ] ] ] ], [ "Classes", null, [ [ "Class List", "annotated.html", "annotated" ], [ "Class Index", "classes.html", null ], [ "Class Hierarchy", "hierarchy.html", "hierarchy" ], [ "Class Members", "functions.html", [ [ "All", "functions.html", "functions_dup" ], [ "Functions", "functions_func.html", "functions_func" ], [ "Variables", "functions_vars.html", null ], [ "Typedefs", "functions_type.html", null ], [ "Enumerations", "functions_enum.html", null ], [ "Enumerator", "functions_eval.html", null ], [ "Related Functions", "functions_rela.html", null ] ] ] ] ] ] ] ]; var NAVTREEINDEX = [ ".html", "a00027.html", "a00057.html#a88bd4f870abd57d1ceeac65295e3138b", "a00091.html#a3385572be2064f973ae3ac4096a1793a", "a00203.html#ga98dee516d429520627fd94f5ccb2b023" ]; var navTreeSubIndices = new Array(); function getData(varName) { var i = varName.lastIndexOf('/'); var n = i>=0 ? varName.substring(i+1) : varName; return eval(n.replace(/\-/g,'_')); } function stripPath(uri) { return uri.substring(uri.lastIndexOf('/')+1); } function stripPath2(uri) { var i = uri.lastIndexOf('/'); var s = uri.substring(i+1); var m = uri.substring(0,i+1).match(/\/d\w\/d\w\w\/$/); return m ? uri.substring(i-6) : s; } function localStorageSupported() { return 'localStorage' in window && window['localStorage'] !== null; } function storeLink(link) { if (!$("#nav-sync").hasClass('sync') && localStorageSupported()) { window.localStorage.setItem('navpath',link); } } function deleteLink() { if (localStorageSupported()) { window.localStorage.setItem('navpath',''); } } function cachedLink() { if (localStorageSupported()) { return window.localStorage.getItem('navpath'); } else { return ''; } } function getScript(scriptName,func,show) { var head = document.getElementsByTagName("head")[0]; var script = document.createElement('script'); script.id = scriptName; script.type = 'text/javascript'; script.onload = func; script.src = scriptName+'.js'; if ($.browser.msie && $.browser.version<=8) { // script.onload does work with older versions of IE script.onreadystatechange = function() { if (script.readyState=='complete' || script.readyState=='loaded') { func(); if (show) showRoot(); } } } head.appendChild(script); } function createIndent(o,domNode,node,level) { if (node.parentNode && node.parentNode.parentNode) { createIndent(o,domNode,node.parentNode,level+1); } var imgNode = document.createElement("img"); imgNode.width = 16; imgNode.height = 22; if (level==0 && node.childrenData) { node.plus_img = imgNode; node.expandToggle = document.createElement("a"); node.expandToggle.href = "javascript:void(0)"; node.expandToggle.onclick = function() { if (node.expanded) { $(node.getChildrenUL()).slideUp("fast"); if (node.isLast) { node.plus_img.src = node.relpath+"ftv2plastnode.png"; } else { node.plus_img.src = node.relpath+"ftv2pnode.png"; } node.expanded = false; } else { expandNode(o, node, false, false); } } node.expandToggle.appendChild(imgNode); domNode.appendChild(node.expandToggle); } else { domNode.appendChild(imgNode); } if (level==0) { if (node.isLast) { if (node.childrenData) { imgNode.src = node.relpath+"ftv2plastnode.png"; } else { imgNode.src = node.relpath+"ftv2lastnode.png"; domNode.appendChild(imgNode); } } else { if (node.childrenData) { imgNode.src = node.relpath+"ftv2pnode.png"; } else { imgNode.src = node.relpath+"ftv2node.png"; domNode.appendChild(imgNode); } } } else { if (node.isLast) { imgNode.src = node.relpath+"ftv2blank.png"; } else { imgNode.src = node.relpath+"ftv2vertline.png"; } } imgNode.border = "0"; } function newNode(o, po, text, link, childrenData, lastNode) { var node = new Object(); node.children = Array(); node.childrenData = childrenData; node.depth = po.depth + 1; node.relpath = po.relpath; node.isLast = lastNode; node.li = document.createElement("li"); po.getChildrenUL().appendChild(node.li); node.parentNode = po; node.itemDiv = document.createElement("div"); node.itemDiv.className = "item"; node.labelSpan = document.createElement("span"); node.labelSpan.className = "label"; createIndent(o,node.itemDiv,node,0); node.itemDiv.appendChild(node.labelSpan); node.li.appendChild(node.itemDiv); var a = document.createElement("a"); node.labelSpan.appendChild(a); node.label = document.createTextNode(text); node.expanded = false; a.appendChild(node.label); if (link) { var url; if (link.substring(0,1)=='^') { url = link.substring(1); link = url; } else { url = node.relpath+link; } a.className = stripPath(link.replace('#',':')); if (link.indexOf('#')!=-1) { var aname = '#'+link.split('#')[1]; var srcPage = stripPath($(location).attr('pathname')); var targetPage = stripPath(link.split('#')[0]); a.href = srcPage!=targetPage ? url : '#'; a.onclick = function(){ storeLink(link); if (!$(a).parent().parent().hasClass('selected')) { $('.item').removeClass('selected'); $('.item').removeAttr('id'); $(a).parent().parent().addClass('selected'); $(a).parent().parent().attr('id','selected'); } var pos, anchor = $(aname), docContent = $('#doc-content'); if (anchor.parent().attr('class')=='memItemLeft') { pos = anchor.parent().position().top; } else if (anchor.position()) { pos = anchor.position().top; } if (pos) { var dist = Math.abs(Math.min( pos-docContent.offset().top, docContent[0].scrollHeight- docContent.height()-docContent.scrollTop())); docContent.animate({ scrollTop: pos + docContent.scrollTop() - docContent.offset().top },Math.max(50,Math.min(500,dist)),function(){ window.location.replace(aname); }); } }; } else { a.href = url; a.onclick = function() { storeLink(link); } } } else { if (childrenData != null) { a.className = "nolink"; a.href = "javascript:void(0)"; a.onclick = node.expandToggle.onclick; } } node.childrenUL = null; node.getChildrenUL = function() { if (!node.childrenUL) { node.childrenUL = document.createElement("ul"); node.childrenUL.className = "children_ul"; node.childrenUL.style.display = "none"; node.li.appendChild(node.childrenUL); } return node.childrenUL; }; return node; } function showRoot() { var headerHeight = $("#top").height(); var footerHeight = $("#nav-path").height(); var windowHeight = $(window).height() - headerHeight - footerHeight; (function (){ // retry until we can scroll to the selected item try { var navtree=$('#nav-tree'); navtree.scrollTo('#selected',0,{offset:-windowHeight/2}); } catch (err) { setTimeout(arguments.callee, 0); } })(); } function expandNode(o, node, imm, showRoot) { if (node.childrenData && !node.expanded) { if (typeof(node.childrenData)==='string') { var varName = node.childrenData; getScript(node.relpath+varName,function(){ node.childrenData = getData(varName); expandNode(o, node, imm, showRoot); }, showRoot); } else { if (!node.childrenVisited) { getNode(o, node); } if (imm || ($.browser.msie && $.browser.version>8)) { // somehow slideDown jumps to the start of tree for IE9 :-( $(node.getChildrenUL()).show(); } else { $(node.getChildrenUL()).slideDown("fast"); } if (node.isLast) { node.plus_img.src = node.relpath+"ftv2mlastnode.png"; } else { node.plus_img.src = node.relpath+"ftv2mnode.png"; } node.expanded = true; } } } function glowEffect(n,duration) { n.addClass('glow').delay(duration).queue(function(next){ $(this).removeClass('glow');next(); }); } function highlightAnchor() { var anchor = $($(location).attr('hash')); if (anchor.parent().attr('class')=='memItemLeft'){ var rows = $('.memberdecls tr[class$="'+ window.location.hash.substring(1)+'"]'); glowEffect(rows.children(),300); // member without details } else if (anchor.parents().slice(2).prop('tagName')=='TR') { glowEffect(anchor.parents('div.memitem'),1000); // enum value } else if (anchor.parent().attr('class')=='fieldtype'){ glowEffect(anchor.parent().parent(),1000); // struct field } else if (anchor.parent().is(":header")) { glowEffect(anchor.parent(),1000); // section header } else { glowEffect(anchor.next(),1000); // normal member } } function selectAndHighlight(hash,n) { var a; if (hash) { var link=stripPath($(location).attr('pathname'))+':'+hash.substring(1); a=$('.item a[class$="'+link+'"]'); } if (a && a.length) { a.parent().parent().addClass('selected'); a.parent().parent().attr('id','selected'); highlightAnchor(); } else if (n) { $(n.itemDiv).addClass('selected'); $(n.itemDiv).attr('id','selected'); } showRoot(); } function showNode(o, node, index, hash) { if (node && node.childrenData) { if (typeof(node.childrenData)==='string') { var varName = node.childrenData; getScript(node.relpath+varName,function(){ node.childrenData = getData(varName); showNode(o,node,index,hash); },true); } else { if (!node.childrenVisited) { getNode(o, node); } $(node.getChildrenUL()).show(); if (node.isLast) { node.plus_img.src = node.relpath+"ftv2mlastnode.png"; } else { node.plus_img.src = node.relpath+"ftv2mnode.png"; } node.expanded = true; var n = node.children[o.breadcrumbs[index]]; if (index+11) hash = '#'+parts[1]; else hash=''; } if (root==NAVTREE[0][1]) { $('#nav-sync').css('top','30px'); } else { $('#nav-sync').css('top','5px'); } if (hash.match(/^#l\d+$/)) { var anchor=$('a[name='+hash.substring(1)+']'); glowEffect(anchor.parent(),1000); // line number hash=''; // strip line number anchors //root=root.replace(/_source\./,'.'); // source link to doc link } var url=root+hash; var i=-1; while (NAVTREEINDEX[i+1]<=url) i++; if (navTreeSubIndices[i]) { gotoNode(o,i,root,hash,relpath) } else { getScript(relpath+'navtreeindex'+i,function(){ navTreeSubIndices[i] = eval('NAVTREEINDEX'+i); if (navTreeSubIndices[i]) { gotoNode(o,i,root,hash,relpath); } },true); } } function toggleSyncButton(relpath) { var navSync = $('#nav-sync'); if (navSync.hasClass('sync')) { navSync.removeClass('sync'); navSync.html(''); storeLink(stripPath2($(location).attr('pathname'))+$(location).attr('hash')); } else { navSync.addClass('sync'); navSync.html(''); deleteLink(); } } function initNavTree(toroot,relpath) { var o = new Object(); o.toroot = toroot; o.node = new Object(); o.node.li = document.getElementById("nav-tree-contents"); o.node.childrenData = NAVTREE; o.node.children = new Array(); o.node.childrenUL = document.createElement("ul"); o.node.getChildrenUL = function() { return o.node.childrenUL; }; o.node.li.appendChild(o.node.childrenUL); o.node.depth = 0; o.node.relpath = relpath; o.node.expanded = false; o.node.isLast = true; o.node.plus_img = document.createElement("img"); o.node.plus_img.src = relpath+"ftv2pnode.png"; o.node.plus_img.width = 16; o.node.plus_img.height = 22; if (localStorageSupported()) { var navSync = $('#nav-sync'); if (cachedLink()) { navSync.html(''); navSync.removeClass('sync'); } else { navSync.html(''); } navSync.click(function(){ toggleSyncButton(relpath); }); } navTo(o,toroot,window.location.hash,relpath); $(window).bind('hashchange', function(){ if (window.location.hash && window.location.hash.length>1){ var a; if ($(location).attr('hash')){ var clslink=stripPath($(location).attr('pathname'))+':'+ $(location).attr('hash').substring(1); a=$('.item a[class$="'+clslink+'"]'); } if (a==null || !$(a).parent().parent().hasClass('selected')){ $('.item').removeClass('selected'); $('.item').removeAttr('id'); } var link=stripPath2($(location).attr('pathname')); navTo(o,link,$(location).attr('hash'),relpath); } }) $(window).load(showRoot); } libpqxx-4.0.1+dfsg/doc/html/Reference/navtreeindex0.js000066400000000000000000000353241224474465600226700ustar00rootroot00000000000000var NAVTREEINDEX0 = { ".html":[6,0,1], "a00001.html":[0], "a00002.html":[1], "a00003.html":[2], "a00004.html":[6,0,0,24], "a00004.html#a1b68c0e492e7cb4f9458ca0de1b85862":[6,0,0,24,0], "a00005.html":[6,0,1,4], "a00005.html#a0b513557015fe5eda72c189dd488d5dd":[6,0,1,4,1], "a00005.html#a0b7adddc8406229b9c5a161302dffba5":[6,0,1,4,2], "a00005.html#a25f4372dfc9c449cae4572f01de65323":[6,0,1,4,0], "a00005.html#a2aaa8274759d9d84964e8235ec59bac0":[6,0,1,4,4], "a00005.html#a673f58eda786a37dd76ebcfd7bd5cd96":[6,0,1,4,5], "a00005.html#ad4658fc955fd5a74ece771106a7edee0":[6,0,1,4,3], "a00006.html":[6,0,0,2], "a00006.html#a0436a1271586987e97bdf5b59b96f607":[6,0,0,2,1], "a00006.html#a3abaa953e318c2dda1b61b3f5861140e":[6,0,0,2,3], "a00006.html#aa02e7329e13fdc9809c1215f224ab5fe":[6,0,0,2,0], "a00006.html#aa6c74a9abcfa2b13c2334d0c38f66305":[6,0,0,2,2], "a00006.html#af041bd491664d3d3c81e7ad9e701d593":[6,0,0,2,4], "a00007.html":[6,0,0,53], "a00007.html#a1f1918fb6cf893bb59e8b3e2921c22fd":[6,0,0,53,5], "a00007.html#a5f11dbcdcaf2c705935e099debb68cd8":[6,0,0,53,2], "a00007.html#a60c8c26735eb6e96fc915968ea13c7bc":[6,0,0,53,4], "a00007.html#a8f1cd9fcb08f673ef02776beb52ceefd":[6,0,0,53,1], "a00007.html#ab2bc41979cc1d0d8a349a6b82dd5077f":[6,0,0,53,3], "a00007.html#acb9db31f275560a165bb466555f30986":[6,0,0,53,0], "a00008.html":[6,0,0,58], "a00008.html#a1cffaceb7db5daf482bcb7f73aeaa0b0":[6,0,0,58,1], "a00008.html#a53f0bc4d9eed45617ae14bf553efa429":[6,0,0,58,5], "a00008.html#a8ef4183e4700b8859a1f0950e6dff8ee":[6,0,0,58,2], "a00008.html#a9b47ff8b4b3863983169e64b69cee6fa":[6,0,0,58,3], "a00008.html#ad94ea6936b6a5ee2983bdcbacdf364a9":[6,0,0,58,0], "a00008.html#af46e0f2cfe62a5c75b431e56065ad883":[6,0,0,58,6], "a00008.html#af70c033d70d77ee3e4942112ad9e54c2":[6,0,0,58,4], "a00009.html":[6,0,0,60], "a00009.html#a411cd2fbec4a9f5bfa07030d8a77b482":[6,0,0,60,3], "a00009.html#a57d98a1321d8f5d00027810bb811025c":[6,0,0,60,7], "a00009.html#a60e982e6fba23c8067404af0a4f5d05a":[6,0,0,60,6], "a00009.html#a6defd7dc017956dcda572ff9d54b394d":[6,0,0,60,0], "a00009.html#a7d45a1d6dc270b8a793a5e3cde0fb2c3":[6,0,0,60,1], "a00009.html#a82775c94f45b87a6b9e082900d2d9d2b":[6,0,0,60,5], "a00009.html#a94b75418ccf0801a3f7fd62d3f0897d7":[6,0,0,60,2], "a00009.html#ac41b5c92c32c7d99a86e887d8fc9f33e":[6,0,0,60,4], "a00010.html":[6,0,0,59], "a00010.html#a0e9bac94644a39ea5465d9b7aeba62dd":[6,0,0,59,1], "a00010.html#a472b319febd6757f32a06541ecb5fd99":[6,0,0,59,3], "a00010.html#a514945ec9aeaa6bdd455f21ccd9d3876":[6,0,0,59,7], "a00010.html#a5c09652a33d59854940ef5ad36522bef":[6,0,0,59,0], "a00010.html#a627ef8d2f00596a80104f81bac097f61":[6,0,0,59,5], "a00010.html#acd6a237e073930d1c9b52de0c4cc9ba7":[6,0,0,59,2], "a00010.html#af5a32597bd7cf509cb8593daf9e5f0f1":[6,0,0,59,6], "a00010.html#afa10568556220285b8f77e6bc6a65c63":[6,0,0,59,4], "a00011.html":[6,0,0,68], "a00011.html#a0761b12be4f64a7bccba1d2e7bf3d4a2":[6,0,0,68,2], "a00011.html#a4fa796f8dff9f236c36f292898eaeaad":[6,0,0,68,1], "a00011.html#aad0757a015b2ddfe476e3d83f812bbff":[6,0,0,68,0], "a00012.html":[6,0,0,82], "a00012.html#ac37eaf1787575f972034ddb87c496eb7":[6,0,0,82,0], "a00013.html":[6,0,0,3], "a00013.html#a065a1d5f2e87f640b57ce35580b11659":[6,0,0,3,18], "a00013.html#a121db85dcf088809bd4b95e617324971":[6,0,0,3,4], "a00013.html#a18e4f5fe0683c746f949db5d3c1c914c":[6,0,0,3,6], "a00013.html#a37efe53d810e83dc4894cb405ba31dfa":[6,0,0,3,17], "a00013.html#a47aa4553c316eeab7461c368e0ce2bac":[6,0,0,3,21], "a00013.html#a48d3b98f62d903bc99555d6c786d334a":[6,0,0,3,10], "a00013.html#a565339d41daf2278ac02ce543e715cd2":[6,0,0,3,16], "a00013.html#a569aac459e41d91ca04adcfcea5646fd":[6,0,0,3,8], "a00013.html#a56acf785f1c0a44c93d40f8b1bdc2921":[6,0,0,3,19], "a00013.html#a575ec98218f850b4c1b91a8edb677681":[6,0,0,3,7], "a00013.html#a5a3869fa04853d5ab14b6676953143be":[6,0,0,3,3], "a00013.html#a7cfccba27491d78841be64193dc556ab":[6,0,0,3,9], "a00013.html#a7ed7a9968baffb67dc5d2fde25cfa4c8":[6,0,0,3,20], "a00013.html#a8cee54a0d93f38368fd885d6ef3733a7":[6,0,0,3,12], "a00013.html#ab6642dd3f5147bc104c3cdf0c8d2cc9e":[6,0,0,3,23], "a00013.html#abadf5cc14e19fc0c1f8838d1518baefa":[6,0,0,3,0], "a00013.html#abcf73d6a9164ac4f0ffaf4012e774016":[6,0,0,3,2], "a00013.html#abf2511857a61d4835cf6d326bb539a19":[6,0,0,3,15], "a00013.html#acb7da4766d133d40e1f4b294c2dd14d9":[6,0,0,3,1], "a00013.html#ad6e5000885dd6f0b7bdf1f5d7f365dd9":[6,0,0,3,24], "a00013.html#ad9042fbae551a4404e175a431139ca8c":[6,0,0,3,13], "a00013.html#adfb2644b600416cb5eaf43cea64e99ab":[6,0,0,3,14], "a00013.html#af10f41451b711337a25cec42598229fb":[6,0,0,3,22], "a00013.html#af4269ef0ff7802a8bc5c5a0d54cca60d":[6,0,0,3,5], "a00013.html#af837e6e843633027fdfcfa5e68975edb":[6,0,0,3,11], "a00014.html":[6,0,0,19], "a00014.html#a003c1c85d2c6c40f6d5b985394aa34b2":[6,0,0,19,1], "a00014.html#abead818453c7c47646f924c0b6cbff7d":[6,0,0,19,0], "a00015.html":[6,0,1,1], "a00016.html":[6,0,1,2], "a00016.html#a1a64cbf69fea84c3ac667ff3b82f0f5b":[6,0,1,2,0], "a00016.html#a85661c90be7df5a4f32cb40fa63c4311":[6,0,1,2,2], "a00016.html#a905e17859fef67e93d7baeef86dee98b":[6,0,1,2,1], "a00016.html#ab17e48ba1fdbf06183149442e78cb1d0":[6,0,1,2,3], "a00016.html#af4835e096d911543121767d0402e212a":[6,0,1,2,4], "a00017.html":[6,0,1,3], "a00017.html#a36f5165a10ea513315f12ed9f31c573b":[6,0,1,3,0], "a00017.html#a4878de00d941c62fc466ef18b8327e95":[6,0,1,3,3], "a00017.html#a8f7c4801c946a458c3b909375e934e76":[6,0,1,3,2], "a00017.html#ae800195a00697cc19af347efb85911ae":[6,0,1,3,1], "a00017.html#aef731d39bc5048c2a417b6822fd125f6":[6,0,1,3,4], "a00018.html":[6,0,0,34], "a00018.html#a2d18d99434781303ae1099876049d623":[6,0,0,34,0], "a00018.html#a33fa66dcc36972c8afa2d17987fb391d":[6,0,0,34,1], "a00019.html":[6,0,0,6], "a00019.html#a36ed18e0528808b19df70dcf721da973":[6,0,0,6,2], "a00019.html#a48a470b67ec1adb0459b0e009b0a60d0":[6,0,0,6,4], "a00019.html#aa2b7f15be38163b46695c2739b59fb8b":[6,0,0,6,1], "a00019.html#adc14fc627579522b2284af143b8ac9ea":[6,0,0,6,3], "a00019.html#adcace783d423c5306fb72087d5171c31":[6,0,0,6,0], "a00020.html":[6,0,0,4], "a00020.html#a2b3538872ddbadb1e1a4aadc7724afb6":[6,0,0,4,1], "a00020.html#a3ae8ab240a1f152c64cd40493d92f846":[6,0,0,4,0], "a00021.html":[6,0,0,5], "a00021.html#a9d93b15b0681f3b4e25e9fab79adb8cd":[6,0,0,5,0], "a00021.html#ad5c2b3b6043ff998ad67cddc89e2669b":[6,0,0,5,1], "a00022.html":[6,0,0,7], "a00022.html#a0f3aae5285574af29d06abdcb7f2560c":[6,0,0,7,0], "a00023.html":[6,0,0,8], "a00023.html#a043e536c1923594c246f2ca8db31dffa":[6,0,0,8,10], "a00023.html#a04895c06c5ae1d8b0863a32a28beff51":[6,0,0,8,39], "a00023.html#a0e64dc314f291c6f81a948c59d94aa8a":[6,0,0,8,55], "a00023.html#a10b275082e18dbcb177a8871f92c7523":[6,0,0,8,11], "a00023.html#a120b9e03dcaa9b0c3ef7026afa64d954":[6,0,0,8,40], "a00023.html#a140578ed1e1c65c61deb0407ff25959f":[6,0,0,8,31], "a00023.html#a1aa330287775aa1ff83f94714f772673":[6,0,0,8,3], "a00023.html#a1d1c129c2c5797a82f251ee9dabec77e":[6,0,0,8,23], "a00023.html#a2247d8690958f634898bbf014a7d418c":[6,0,0,8,58], "a00023.html#a2d3fc0b15713b0bba8a6a286e4e67c10":[6,0,0,8,29], "a00023.html#a306a884246abc1051bab4fb06393ee71":[6,0,0,8,0], "a00023.html#a306a884246abc1051bab4fb06393ee71a01e68a67b6a3c92ce9b0c92fa73e90b2":[6,0,0,8,0,8], "a00023.html#a306a884246abc1051bab4fb06393ee71a1f2b785abe834490c33dc4cf19c932d2":[6,0,0,8,0,7], "a00023.html#a306a884246abc1051bab4fb06393ee71a366c98bc3385ecfb39496bf7240e5973":[6,0,0,8,0,11], "a00023.html#a306a884246abc1051bab4fb06393ee71a4a873c5d7e7fb0a9022cdd110181a7de":[6,0,0,8,0,13], "a00023.html#a306a884246abc1051bab4fb06393ee71a6b019128f2fdcfa9d316042342846e2f":[6,0,0,8,0,10], "a00023.html#a306a884246abc1051bab4fb06393ee71a8034abdbcd193f25d9d93cf79156e1fc":[6,0,0,8,0,3], "a00023.html#a306a884246abc1051bab4fb06393ee71a86380c8c083847ba3d16764784f5914f":[6,0,0,8,0,6], "a00023.html#a306a884246abc1051bab4fb06393ee71a8ab47c10b60d6bd6664f6e88f300edcb":[6,0,0,8,0,5], "a00023.html#a306a884246abc1051bab4fb06393ee71a973dc9e4f56818f82b86fb13a5bbc405":[6,0,0,8,0,2], "a00023.html#a306a884246abc1051bab4fb06393ee71aabb5fb3d6d43442107e04e0982300d6e":[6,0,0,8,0,12], "a00023.html#a306a884246abc1051bab4fb06393ee71aba8a02f6bb5d2304bfbf2110c6cd791a":[6,0,0,8,0,1], "a00023.html#a306a884246abc1051bab4fb06393ee71abefe533e379346c7b9644406c613eb02":[6,0,0,8,0,9], "a00023.html#a306a884246abc1051bab4fb06393ee71ad97556afc36aff4a62c61b67437c20c4":[6,0,0,8,0,4], "a00023.html#a306a884246abc1051bab4fb06393ee71af5a4754aea608aaf5fca6caa51c44ce0":[6,0,0,8,0,0], "a00023.html#a30ec51634479614b45106532e87e5dc7":[6,0,0,8,46], "a00023.html#a32efdc645566975851bfc7d6b82d214c":[6,0,0,8,30], "a00023.html#a33280d29c4db47c1e71eb82df921691a":[6,0,0,8,17], "a00023.html#a335ca1d83e65a9e57b907c431c3afbe1":[6,0,0,8,42], "a00023.html#a33700cc6d830d28c3dbd48eb9b7276ab":[6,0,0,8,2], "a00023.html#a36a26cf7e13f612749d49faf4f1654f8":[6,0,0,8,24], "a00023.html#a38dde9befa350a07a5ac093d13ee64e2":[6,0,0,8,21], "a00023.html#a3b9c5dc16f04600aa5415e06f6ff8fa6":[6,0,0,8,56], "a00023.html#a3c60c76e32687adce1e8c0dba0919773":[6,0,0,8,60], "a00023.html#a4344b95a9b950a0bc07dd1f2af7bb5f0":[6,0,0,8,20], "a00023.html#a4963aaba6da521d480c21c7ec01835cf":[6,0,0,8,4], "a00023.html#a5eac9840b79e7f1893d88b63f6d97b1d":[6,0,0,8,26], "a00023.html#a7179e32df28bd4bc81b85d99b36ad791":[6,0,0,8,7], "a00023.html#a826750f0f13ede4ac4e6ca8a84711b53":[6,0,0,8,27], "a00023.html#a84c1a28176815ab9103c7febec450755":[6,0,0,8,59], "a00023.html#a8ac078b1077fbe19ee1d713bb6b71e8f":[6,0,0,8,43], "a00023.html#a908a2ffdf56d8259492e9f3894e24f65":[6,0,0,8,19], "a00023.html#a9709e4738b1bfb1dba547381749908cb":[6,0,0,8,8], "a00023.html#a985f29750a981c8ba80bf91b22c2eee9":[6,0,0,8,1], "a00023.html#a985f29750a981c8ba80bf91b22c2eee9a3e74ba2b1506b7deb1fbea2834c574cf":[6,0,0,8,1,1], "a00023.html#a985f29750a981c8ba80bf91b22c2eee9af941ee6232e0e2704c00349b8b47feff":[6,0,0,8,1,0], "a00023.html#a985f29750a981c8ba80bf91b22c2eee9aff78876e731a924c5e25b06033fced2d":[6,0,0,8,1,2], "a00023.html#a9bd21013745b4454e248e637cdae1287":[6,0,0,8,12], "a00023.html#a9d64420154827b3572dcdb955a93bfff":[6,0,0,8,32], "a00023.html#aa423170b8ec82df685a1e739f53f2b14":[6,0,0,8,52], "a00023.html#aa839a066c0289a12f664e29c9dbafd38":[6,0,0,8,18], "a00023.html#aa9e66faad88a94857c0749b9bbc5d352":[6,0,0,8,6], "a00023.html#aafade6d46c029d62f7bb10451f7e733e":[6,0,0,8,45], "a00023.html#ab15ff67d81467d271dc713b2584f1328":[6,0,0,8,53], "a00023.html#ab5c24029bda3198d826d24757e49c746":[6,0,0,8,5], "a00023.html#ab63e45ad783d8adb8d4a9f03e03ef6ef":[6,0,0,8,33], "a00023.html#ab71d463277c017f695eed71cdd87afb2":[6,0,0,8,28], "a00023.html#ab8c7dd5e54493e18d5900dd70012d062":[6,0,0,8,49], "a00023.html#abbdbf8e505eb3c23680d83df6c575889":[6,0,0,8,54], "a00023.html#abf3b71372850f86e4f5e67eb4b7d56bd":[6,0,0,8,25], "a00023.html#ac2eff365ba0aa25ebbf5f903ac3c7a54":[6,0,0,8,57], "a00023.html#acdd295f691812773133147530aa6ff21":[6,0,0,8,38], "a00023.html#acfb05dee4b2d29c9a3d4925d194d5ab9":[6,0,0,8,41], "a00023.html#acfb8d53e6f105db280cd5d977c005bea":[6,0,0,8,50], "a00023.html#ae02522000400fc2782e892ac0387d85b":[6,0,0,8,47], "a00023.html#aedf7ac72658efa92e702a06b1964747a":[6,0,0,8,22], "a00023.html#aefdde864e05f88e84d748236b93659e7":[6,0,0,8,44], "a00023.html#af02016af0233bed748eb1ddab9685131":[6,0,0,8,9], "a00023.html#af3dfec559fe2305e57aba653abe4c8ad":[6,0,0,8,51], "a00023.html#af860fe4c418cfa4f573f34d73327d111":[6,0,0,8,48], "a00024.html":[6,0,0,9], "a00024.html#a0bbbedd08b7f579e5a2577e97b7e09b7":[6,0,0,9,3], "a00024.html#a15bb552a890c0fb28fab2413200dee18":[6,0,0,9,0], "a00024.html#a3358c5c2ab741a6fd798db538516a349":[6,0,0,9,5], "a00024.html#a5b4be97db7a8739e9f4fc7e1b7ab587c":[6,0,0,9,8], "a00024.html#a69870c553a2ea10b2f1fbd6073c2fb25":[6,0,0,9,2], "a00024.html#ab46be4bfe19a8a022f441d120b6b2f09":[6,0,0,9,1], "a00024.html#ab7c76ae54326197bcbe6d35b5bbb246f":[6,0,0,9,6], "a00024.html#ae3164a06f63e76709e17065bea2bf938":[6,0,0,9,9], "a00024.html#ae6c506b9822a94dffd7e58a917d5509e":[6,0,0,9,7], "a00024.html#ae74d43f05d575eb142e18ed0939de151":[6,0,0,9,4], "a00025.html":[6,0,0,66], "a00025.html#a07d2e2279fef3c1476cffd06a8eb91de":[6,0,0,66,21], "a00025.html#a0b197686648ddd4acb3c803d6a51fc8d":[6,0,0,66,2], "a00025.html#a1817b0a918bdf266d240ca5b4449ce6e":[6,0,0,66,14], "a00025.html#a2faa42822a70d1ad0dbf426b69ee8a69":[6,0,0,66,8], "a00025.html#a3321e9a66cc13e3455eeeeb23c9ce7a3":[6,0,0,66,9], "a00025.html#a381a166248dfc07a1cc3b9e840263a89":[6,0,0,66,23], "a00025.html#a45a6644ccdf8648196d310ec643414fb":[6,0,0,66,15], "a00025.html#a4f404cbf15b073e6f877dbc405edabe0":[6,0,0,66,13], "a00025.html#a5838760d8c9620674b3bc530f95ec6d5":[6,0,0,66,19], "a00025.html#a599088be998cb2998cd2cac6cd7bc9c6":[6,0,0,66,5], "a00025.html#a5a6e8b74cb15a24e923016d56cd74df5":[6,0,0,66,17], "a00025.html#a69a45f72ecd7d720ebdb830950df15ad":[6,0,0,66,4], "a00025.html#a757c8e7d196c2a9d4e69af70a4234620":[6,0,0,66,20], "a00025.html#a968c235eb6fecdf44b8f64827473c733":[6,0,0,66,22], "a00025.html#a9c831865874ab49c5a8e552503d8d6f8":[6,0,0,66,6], "a00025.html#a9eb6caf606fd73bd3bc0e0bbbcd3387a":[6,0,0,66,11], "a00025.html#aac919ac1130c456cac33c2fb977e8f49":[6,0,0,66,16], "a00025.html#ab58d13117556c7bbe935db018c4bbbd9":[6,0,0,66,7], "a00025.html#ab8d1a4aa2c488d516b766e811a33fb6c":[6,0,0,66,3], "a00025.html#ab92d7af9a2d9842cd5c1e12c99201893":[6,0,0,66,10], "a00025.html#abc4bdb24c31faff8986730cc418225c4":[6,0,0,66,18], "a00025.html#ac9149722b80a911706d9ad204417a69a":[6,0,0,66,24], "a00025.html#adfa0ccba45f501111664d5e0c4bfa766":[6,0,0,66,12], "a00025.html#af1bc6358a5c67e40dfca6acbbdee2eed":[6,0,0,66,0], "a00025.html#af545df126c49a8ad52fc58ee4833e7d9":[6,0,0,66,1], "a00026.html":[6,0,0,67], "a00026.html#a04258acb26509bcf495e7819de11d142":[6,0,0,67,16], "a00026.html#a0b197686648ddd4acb3c803d6a51fc8d":[6,0,0,67,3], "a00026.html#a248bd6095a955103131179b8b797a465":[6,0,0,67,9], "a00026.html#a26592398ebce2937d32420e4fbfbdd87":[6,0,0,67,20], "a00026.html#a31bfd0560cc60c2496c48cafc47aeb41":[6,0,0,67,17], "a00026.html#a3944431a48bc056755e618de31ccb101":[6,0,0,67,1], "a00026.html#a3f9fbd9b493b163a45b1c15d2e5ff6b7":[6,0,0,67,12], "a00026.html#a43793fc9e6cfcf3a400bcb9a3363dbf7":[6,0,0,67,19], "a00026.html#a6544eebac8fc1c8c7d8ea6d65a1332a8":[6,0,0,67,5], "a00026.html#a7b18a6e600a88ac9a5689b2cd9ee5c1b":[6,0,0,67,18], "a00026.html#a9791060c7f9c94370fccf4f2a053f451":[6,0,0,67,8], "a00026.html#a9f89dabdd47d46a7e86551788620914b":[6,0,0,67,4], "a00026.html#aa0aef3bc029f501703e2f941c85d03d5":[6,0,0,67,10], "a00026.html#aace3d30e02c3014d04cb1825dff7de6b":[6,0,0,67,23], "a00026.html#ab17e937b7d28ad346802a39d78a02af1":[6,0,0,67,14], "a00026.html#abd88da5b5bc0d9e63efba1a6ba9f14b3":[6,0,0,67,13], "a00026.html#ac0716cbc925a9250ac448c6cd35cd797":[6,0,0,67,6], "a00026.html#adeb96b3dd3de78f616e8ff6129cc8a26":[6,0,0,67,21], "a00026.html#af0afdb9600704e015047eefae139bd27":[6,0,0,67,7], "a00026.html#af1b380239968fd36cfb1b22f25fe3c67":[6,0,0,67,22], "a00026.html#af1bc6358a5c67e40dfca6acbbdee2eed":[6,0,0,67,0], "a00026.html#af545df126c49a8ad52fc58ee4833e7d9":[6,0,0,67,2], "a00026.html#af64ad7b0d03524e2631f06a7be70e918":[6,0,0,67,11], "a00026.html#af6c63db21df71be91a1cf1c2d9905c47":[6,0,0,67,15] }; libpqxx-4.0.1+dfsg/doc/html/Reference/navtreeindex1.js000066400000000000000000000345561224474465600226770ustar00rootroot00000000000000var NAVTREEINDEX1 = { "a00027.html":[6,0,0,88], "a00027.html#a036e91dab6151221c2713d1759c5a72c":[6,0,0,88,15], "a00027.html#a098f50ff4829f9ee993e886b5948583f":[6,0,0,88,7], "a00027.html#a11ca506e9cac97842a53ddb78f409fed":[6,0,0,88,12], "a00027.html#a19df3962a332430fb1b531f24959a05b":[6,0,0,88,11], "a00027.html#a260dbe03a79907ee06b15b22f4757b53":[6,0,0,88,19], "a00027.html#a31697aa746ed96aa03373faf6d2a56bf":[6,0,0,88,18], "a00027.html#a3303dbad6189d4c4eccac0e1bf6ede1e":[6,0,0,88,13], "a00027.html#a3ac4f8c6dfd71aacfafb2c2c9080bf1d":[6,0,0,88,14], "a00027.html#a55e6dceb8e406e684340e10de40e5a48":[6,0,0,88,17], "a00027.html#a5a6a65374213d98c1060687eac932a52":[6,0,0,88,1], "a00027.html#a5c99036c804619585245e453cd3788b2":[6,0,0,88,2], "a00027.html#a6070a748f0a316013cda5a36e55ae967":[6,0,0,88,4], "a00027.html#a801315de235f75a68367f998d928332a":[6,0,0,88,20], "a00027.html#a9155b63bbbed74b28fb7364fdcc17d99":[6,0,0,88,21], "a00027.html#a92227217585360e6d35cf40d3e632065":[6,0,0,88,10], "a00027.html#a9e2e8c01d5ad4477fa014ada68765bbd":[6,0,0,88,6], "a00027.html#aa2b622cb478e2423aba8013117483c41":[6,0,0,88,9], "a00027.html#abb4b905cf43a962fd80e2bbb3ebabb09":[6,0,0,88,8], "a00027.html#ac882fd1ecae81460033842c88aad95d3":[6,0,0,88,5], "a00027.html#acfeaa999bdc29d7a00dd3c7b441159c9":[6,0,0,88,3], "a00027.html#adf1e8d933ff2f633c68a10261bdec228":[6,0,0,88,0], "a00027.html#adfa94c0a489aae615a2d09e8bf10939d":[6,0,0,88,16], "a00027.html#af96d51ef06328f74e7b24e95f3831d9a":[6,0,0,88,22], "a00028.html":[6,0,0,87], "a00028.html#a03722072d600f9bb3c64f8d1040ab263":[6,0,0,87,13], "a00028.html#a0a3867bded7fc4181f57d516ef72f15f":[6,0,0,87,15], "a00028.html#a0a3aac40eb8627fc04b11e26c5a9311e":[6,0,0,87,16], "a00028.html#a0cfc38e184025a70632c77cf9ddab854":[6,0,0,87,14], "a00028.html#a0d40e819e0f26072ee3cb0bc8c680242":[6,0,0,87,17], "a00028.html#a11fc7f6bebd2ea49e39a32ee263646f7":[6,0,0,87,18], "a00028.html#a39885713e209d972d4a02a33af90487e":[6,0,0,87,8], "a00028.html#a433482a1750504705e650fa75eb37b66":[6,0,0,87,7], "a00028.html#a5c99036c804619585245e453cd3788b2":[6,0,0,87,1], "a00028.html#a71cc0a0b9010eb6d971631e32724922f":[6,0,0,87,10], "a00028.html#a9403d1f1aaf668c2434a2db8eeca0375":[6,0,0,87,5], "a00028.html#a947f588862432793167ace50bb0157c1":[6,0,0,87,11], "a00028.html#a9597eed7de8833d1663e13f293723e76":[6,0,0,87,20], "a00028.html#a97a72d87b07205861e619b356dbf6a13":[6,0,0,87,21], "a00028.html#a9829e1f6f8ba5f28ddbae08cddf183d6":[6,0,0,87,2], "a00028.html#aa6ecbe2f97164809e39b5d40c6a79c05":[6,0,0,87,12], "a00028.html#ab14a27f87b7d570b8340b484869a131e":[6,0,0,87,4], "a00028.html#ad69f1affcdcd3ba6e25f8544e53db4c9":[6,0,0,87,9], "a00028.html#ad809f99f770cd093a241718327b08fad":[6,0,0,87,6], "a00028.html#ada9be67072933135310c77b27e0f3540":[6,0,0,87,19], "a00028.html#adbd6662e08d026f79b1df56fe5d3d8e4":[6,0,0,87,3], "a00028.html#adf1e8d933ff2f633c68a10261bdec228":[6,0,0,87,0], "a00028.html#af4effac1b54014c657d45b40baa24094":[6,0,0,87,22], "a00029.html":[6,0,0,25], "a00029.html#aa26b38ec0b49d925597fb0924d34e5a2":[6,0,0,25,0], "a00030.html":[6,0,0,10], "a00030.html#a2a10af042c1ece1f5faf55479ada0319":[6,0,0,10,9], "a00030.html#a56b530ba6b18f3fcdb5b93a0087922c9":[6,0,0,10,6], "a00030.html#a591ac7d2302288890c04e6159eb6d30e":[6,0,0,10,2], "a00030.html#a591ac7d2302288890c04e6159eb6d30ea7f6c1ed7719885433353a78946b2c5f3":[6,0,0,10,2,1], "a00030.html#a591ac7d2302288890c04e6159eb6d30eaf440221f717464c87f043899cc117cbf":[6,0,0,10,2,0], "a00030.html#a732bb16c01dc3266d424267252d4f1b0":[6,0,0,10,1], "a00030.html#a746c725327e1dfd598708bfeb8834992":[6,0,0,10,0], "a00030.html#a8d5f8214ede2ab27dd588defc2847330":[6,0,0,10,3], "a00030.html#a8d5f8214ede2ab27dd588defc2847330a3ace6a7a5ca4ec3b486f2f35fd2420b0":[6,0,0,10,3,0], "a00030.html#a8d5f8214ede2ab27dd588defc2847330a4c37408c49492bfe9f012812226dd1fd":[6,0,0,10,3,1], "a00030.html#a92ebe0bfff015fc1d85ab30d1ac97ef4":[6,0,0,10,5], "a00030.html#a947b286d508fad4a1823f8b13a5ccef3":[6,0,0,10,11], "a00030.html#ab46d430e0ecfa545ff3764f867654caf":[6,0,0,10,8], "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212":[6,0,0,10,4], "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212a12fa229ee3e760f1ca86d66304554b63":[6,0,0,10,4,1], "a00030.html#aba6fa56f1ef2d25c3c73240de6b9c212a8122c0c4a5eb9c9dbf27ab40a2686eb0":[6,0,0,10,4,0], "a00030.html#ae1e1a28e596a78fa8ed8c4eeccbe6369":[6,0,0,10,7], "a00030.html#aed642c9d80cddf181853d36c6e8ccb93":[6,0,0,10,10], "a00031.html":[6,0,0,28], "a00031.html#a0e28cd5da6e6cd6fba5ade32b353e51a":[6,0,0,28,0], "a00031.html#a987ace354d0497c66d468ce18dc48487":[6,0,0,28,1], "a00032.html":[6,0,0,14], "a00032.html#a0b4da4b562a51ec0f03a9abf75acd14c":[6,0,0,14,4], "a00032.html#a12e833c152ed73fabe7c4c30020140e2":[6,0,0,14,2], "a00032.html#a38c5eb7ae19ad150f89e951261873aba":[6,0,0,14,3], "a00032.html#a49d5c0050ec02eba8440b1bdb20a1539":[6,0,0,14,1], "a00032.html#a4e35ec39c80f088ebe239b15a16488de":[6,0,0,14,7], "a00032.html#a601f599d9c5cca86ce84a77bdac941db":[6,0,0,14,8], "a00032.html#a9b3e988901d4bec05d414543314a945b":[6,0,0,14,6], "a00032.html#ace1dc32cc5ab0d51481518e659675b79":[6,0,0,14,0], "a00032.html#ae434c2ec625a55ec8c6c4f57d1cb0a54":[6,0,0,14,5], "a00033.html":[6,0,0,0,9], "a00033.html#a9709f1dbe1bc7599e96dd16b22e776bd":[6,0,0,0,9,0], "a00034.html":[6,0,0,0,8], "a00034.html#a4eb51db87ff14a4edf9787b5117ddd24":[6,0,0,0,8,0], "a00035.html":[6,0,0,44], "a00035.html#ab76e2e34539d0dec43ab1479a4847a86":[6,0,0,44,0], "a00035.html#ad5b1a57e3e37bb6df5d7605f14e4c9be":[6,0,0,44,1], "a00036.html":[6,0,0,15], "a00036.html#a08b329d18887eeb882ff0c80b8ae74ba":[6,0,0,15,3], "a00036.html#a102761e1ec70d1f2d339d250bcdc799c":[6,0,0,15,1], "a00036.html#a31238a2ce8999c76725a6d045dcc942f":[6,0,0,15,2], "a00036.html#a4627d71dc5156998ab1a8705fe5db974":[6,0,0,15,0], "a00037.html":[6,0,0,0,5], "a00037.html#aa93a0d1009d7900066cdb3893b4a25b2":[6,0,0,0,5,1], "a00037.html#ae038cf7f50b925680be254201b2cdeaa":[6,0,0,0,5,0], "a00038.html":[6,0,0,18], "a00038.html#a0e7e8831fed026375c499ee03f501f50":[6,0,0,18,0], "a00039.html":[6,0,0,27], "a00039.html#a499c62eac013b090a96ea3b402f48f0c":[6,0,0,27,0], "a00039.html#a72654b9a8eff8c728eae1d5fae9a0890":[6,0,0,27,1], "a00040.html":[6,0,0,51], "a00040.html#a07d5dacdf1abec9c1117d1bcaa4cfdc9":[6,0,0,51,11], "a00040.html#a0a194db2c97f08148c9bbef548b24cf8":[6,0,0,51,18], "a00040.html#a11b508641e461a25fdc6b78fb7a36acf":[6,0,0,51,17], "a00040.html#a2f9b005cdf98de2a1e7754744c75fbb7":[6,0,0,51,3], "a00040.html#a36b61c5c5aa0550c3b7472225fc64f77":[6,0,0,51,16], "a00040.html#a3c3c5212055fb098039b104c520b98f7":[6,0,0,51,6], "a00040.html#a5b5ee7fe78262f0d60efb6b9a12c8da7":[6,0,0,51,21], "a00040.html#a61903bbc795990ac21d2aaefd34626f4":[6,0,0,51,7], "a00040.html#a61b82f53f82924bc10d8c1b15dfca153":[6,0,0,51,20], "a00040.html#a7b7e65ff720f3b00b070c5608f9ac986":[6,0,0,51,12], "a00040.html#a812714c00006721cdf895980fa8154fb":[6,0,0,51,10], "a00040.html#a862c8028550be182c0104b48b3cf8399":[6,0,0,51,0], "a00040.html#a97781b0028cbfd2dca1106943a27afae":[6,0,0,51,4], "a00040.html#ab0fec98c5f61d8c572abbd13303419a9":[6,0,0,51,19], "a00040.html#ac4149686f6311d9fc74529f3646d9cfd":[6,0,0,51,5], "a00040.html#acf630db7dbdd828c56596b658c1f5b0a":[6,0,0,51,2], "a00040.html#ad0670dd5c8c32c3486a66c8c6199246d":[6,0,0,51,8], "a00040.html#ad46579d33a9105fecb94340d11a87b1d":[6,0,0,51,1], "a00040.html#ad79f68cfa43c8ce7a13af3525be3da43":[6,0,0,51,13], "a00040.html#ad8d3b3ef9308b577d178086e4b295ca5":[6,0,0,51,14], "a00040.html#ad969ff9b3f6f128713b867560ee06e12":[6,0,0,51,9], "a00040.html#adee313912a0d712eba34548454455988":[6,0,0,51,15], "a00041.html":[6,0,0,52], "a00041.html#a11be4abe1a7a982fa05d2ca80630c62c":[6,0,0,52,9], "a00041.html#a292655415eeb298c9b09ccb6ed8de959":[6,0,0,52,3], "a00041.html#a40a3219faec0d4870a24060bf66c1673":[6,0,0,52,4], "a00041.html#a434a97e522097934a05be09ddddcf86a":[6,0,0,52,6], "a00041.html#a4c3e5f527f44cdcd210968493bd0ea0a":[6,0,0,52,5], "a00041.html#a4faf4881aca250fd2ce0eb6a520149c4":[6,0,0,52,7], "a00041.html#a55e0069841487074956aa376a6e1d72c":[6,0,0,52,1], "a00041.html#a594d90685e6d986b1f2200792bd74b03":[6,0,0,52,2], "a00041.html#a8c7796f89ed8ea72203359ef1aeaa042":[6,0,0,52,10], "a00041.html#aa10890370d62085bde7c01e4e7ddcd92":[6,0,0,52,8], "a00041.html#ab1b72785be292cde0fa9ac2cf2b3f6a4":[6,0,0,52,0], "a00041.html#ac96fb117de93933fd4dd667cbe88a0b6":[6,0,0,52,12], "a00041.html#ae94ab8fb0c94bf4b100f85f80ff8a2b4":[6,0,0,52,11], "a00042.html":[6,0,0,32], "a00042.html#a63de30ac68704846bbe21c078d23be53":[6,0,0,32,1], "a00042.html#a6e1d093886e976b8e028d94daba4c16e":[6,0,0,32,0], "a00043.html":[6,0,0,13], "a00043.html#a059b39f4623c26af73cc865f3f8488ca":[6,0,0,13,4], "a00043.html#a0844bc4574d839c13d9ae6f2316a7286":[6,0,0,13,17], "a00043.html#a0abd27b596021390729199ddcb5a4baf":[6,0,0,13,18], "a00043.html#a14f91c8c6898670b29965c34d6166674":[6,0,0,13,3], "a00043.html#a260a8e31d364d7c8427741d0788c305e":[6,0,0,13,6], "a00043.html#a3faa6d72b2c16f3b36a27804c561bfcc":[6,0,0,13,5], "a00043.html#a4d6d50111eed016d1ce28bbdbbf96862":[6,0,0,13,1], "a00043.html#a50ae5821478a2398f50c8cf2c42a0343":[6,0,0,13,19], "a00043.html#a56c2d0b9aa14557cdf45555ea8a543f3":[6,0,0,13,15], "a00043.html#a595590e9f129925a1b447617b8d3b82a":[6,0,0,13,13], "a00043.html#a6afd533edcdf0e9f9667fdde547de63a":[6,0,0,13,14], "a00043.html#a7c416cd5efae357cce5f6dccf6d6fb58":[6,0,0,13,8], "a00043.html#a8b87babe29cf2797a624b2c8fa10d05f":[6,0,0,13,16], "a00043.html#acf5bea0afb3ae6a669bd40cd659a5921":[6,0,0,13,0], "a00043.html#ad0cda8bc84e80e331d2fcc973788d99a":[6,0,0,13,7], "a00043.html#ada9ee12818185a1ccd04c912601d9f6d":[6,0,0,13,9], "a00043.html#ae1f77541718ff048a67353dc07c87013":[6,0,0,13,11], "a00043.html#aed4a6029b7e88f2adef1c0c3508605aa":[6,0,0,13,10], "a00043.html#af2c977a93c27c468244f43733f7238c6":[6,0,0,13,12], "a00043.html#af82ad1f395b1ccef2f48e7a04e315ae2":[6,0,0,13,2], "a00044.html":[6,0,0,12], "a00044.html#a0602dd0f6ed2641bbb98ad584bcf60e7":[6,0,0,12,4], "a00044.html#a24212e9d6d97c744f5c4eed30d8d92a2":[6,0,0,12,3], "a00044.html#a255914b05d1f935922338eeebcb10144":[6,0,0,12,8], "a00044.html#a462bf00fed476b503116f1c769deeb2f":[6,0,0,12,6], "a00044.html#a6f29a9a658eeb39c09075bfc655c5d90":[6,0,0,12,1], "a00044.html#a777b5c8fe3f9e0160cea11ba00be5a27":[6,0,0,12,5], "a00044.html#a79c9e623be28567215d88087cd7e80d0":[6,0,0,12,0], "a00044.html#a7ac105c3e882661d8f1220ccf9164c27":[6,0,0,12,7], "a00044.html#a81bc68e9ddb56368929d58e0820e72f0":[6,0,0,12,10], "a00044.html#a89f9c7dc295e4befa9bdbd2bfedbe800":[6,0,0,12,9], "a00044.html#a9d23e2f3cdac465efb354e0ab689304c":[6,0,0,12,2], "a00045.html":[6,0,0,21], "a00045.html#a378d91b2f08324db0725a7c89f6dedcf":[6,0,0,21,0], "a00046.html":[6,0,0,42], "a00046.html#a288de88661b6c5094151d90975bb0531":[6,0,0,42,1], "a00046.html#a5cce5dbd2519b461a7c8064528999097":[6,0,0,42,0], "a00047.html":[6,0,0,43], "a00047.html#ab9c012d8591a9699677c8e3d2bfdf02a":[6,0,0,43,0], "a00047.html#af88552eb661d1bc459308d2ff8576840":[6,0,0,43,1], "a00048.html":[6,0,0,29], "a00048.html#a505ae8d71add1a4c19e69f5cf96cea9d":[6,0,0,29,1], "a00048.html#a9fa871a08c23b2722a42fa545cecd2ab":[6,0,0,29,0], "a00049.html":[6,0,0,22], "a00049.html#a4514fd8ae629c3e2524b1a8257abeb29":[6,0,0,22,0], "a00050.html":[6,0,0,37], "a00050.html#aa73214eba77d9c6cd048ea04f3f20c28":[6,0,0,37,1], "a00050.html#aaa48cdbce346a4c8e593a3dbe8d06fcd":[6,0,0,37,0], "a00051.html":[6,0,0,35], "a00051.html#a39081c92939fa3cca69441719eae3415":[6,0,0,35,0], "a00051.html#a98b63bef3455bdde8a791fbb49ca97f0":[6,0,0,35,1], "a00052.html":[6,0,0,36], "a00052.html#a733530a1cdef5f0c73c57ff4d46b3ae3":[6,0,0,36,0], "a00052.html#ab6cdfc77425f86d8f15af9726e079824":[6,0,0,36,1], "a00053.html":[6,0,0,1,1], "a00053.html#a06644bfe2c67479f5bcae0174cf8ae05":[6,0,0,1,1,2], "a00053.html#a10e6e640885617f52bf43d9e59477424":[6,0,0,1,1,3], "a00053.html#a38c217d6210b26006af97dc23a4c014e":[6,0,0,1,1,4], "a00053.html#a3aa04b5e67edcadea056c78ebd712e5f":[6,0,0,1,1,7], "a00053.html#a7d1afea38e1c822c02560331b82d8dfe":[6,0,0,1,1,6], "a00053.html#a7f15ffe53fbbeeafc0f4bc13c2981646":[6,0,0,1,1,0], "a00053.html#a8b4028561c5a19ec67b262310e948468":[6,0,0,1,1,5], "a00053.html#ac0b4fbda217ac490ed72c923d02cdef3":[6,0,0,1,1,9], "a00053.html#af937364fbb9bf4cead8c646220a4507d":[6,0,0,1,1,1], "a00053.html#afe3111c309189f822255744df4fa8bff":[6,0,0,1,1,8], "a00054.html":[6,0,0,54], "a00054.html#a5ea14e6598a2e7ac7b0ad7e1a9610873":[6,0,0,54,3], "a00054.html#a7257515292c662b6247844ddbbd5d37d":[6,0,0,54,0], "a00054.html#aa614c41bb7460c52684cbcc058a96ec3":[6,0,0,54,2], "a00054.html#aa70d28518dfd8e0021c76e50e19da150":[6,0,0,54,1], "a00054.html#ab448a03b23a8e86e12cb21f495d941fc":[6,0,0,54,4], "a00055.html":[6,0,0,90], "a00055.html#a1c4dad14844c77b90175e6ab0bc4a72b":[6,0,0,90,3], "a00055.html#a31b6a81ea8deee77375d25bce93099e2":[6,0,0,90,6], "a00055.html#a374e1532420a3b60b28dfc27dba994a7":[6,0,0,90,0], "a00055.html#a675386230923a7ceb4380cf880d05604":[6,0,0,90,4], "a00055.html#a806ffda069bc7790b213dbede7119051":[6,0,0,90,5], "a00055.html#a936efe3dfed125e4e61f3a76d460183a":[6,0,0,90,7], "a00055.html#aa9f1a5f279471ed644ab9ca78bdd78a3":[6,0,0,90,1], "a00055.html#acb295ee3294961c1dac99df59de64da9":[6,0,0,90,2], "a00056.html":[6,0,0,55], "a00056.html#a0357da0b565480de02030bf018a99e5a":[6,0,0,55,13], "a00056.html#a05267c2dfb94149e4f518c55fccf3748":[6,0,0,55,4], "a00056.html#a2d076b22c335557dbe91f4793c315e7d":[6,0,0,55,1], "a00056.html#a41efa409c912f937c51e31dc812f7a2e":[6,0,0,55,8], "a00056.html#a546f724f294272c84c85ab4b4b415419":[6,0,0,55,0], "a00056.html#a70fe02eba0ce7e8d83db9bc3340260af":[6,0,0,55,14], "a00056.html#a72405b8ff94fd3f44fe786f5001409a0":[6,0,0,55,12], "a00056.html#a7976bf34f68473dd51809bf25682aa03":[6,0,0,55,15], "a00056.html#a8467e3f29ce1f3748fd62737cfe63316":[6,0,0,55,9], "a00056.html#a8f0314b6756e5f246b1ea349820df64d":[6,0,0,55,5], "a00056.html#aa7d92ad25a5d4584dc8ff34041103ef2":[6,0,0,55,11], "a00056.html#abea8ecd17b1ca3db757bb0b148c20295":[6,0,0,55,7], "a00056.html#ad70e9d5356545289573e63f6272a7e52":[6,0,0,55,10], "a00056.html#ad84747d2fa7a02950b790ea2c1808309":[6,0,0,55,6], "a00056.html#ad97df88e75558320c89ea4f39c35afe2":[6,0,0,55,16], "a00056.html#ae3a035076692d93ef07ab636e47fcc81":[6,0,0,55,2], "a00056.html#af8257cb8d3c162acc233ae0fe9cef218":[6,0,0,55,3], "a00057.html":[6,0,0,57], "a00057.html#a0e8942a1a6e76067bf4c2a07320550ab":[6,0,0,57,13], "a00057.html#a1f2be3c1026e59be027445a60b46a416":[6,0,0,57,14], "a00057.html#a21db56eb011dadccf79d3a7b4b930162":[6,0,0,57,5], "a00057.html#a34194e8889862f6d05617de316caa69a":[6,0,0,57,6], "a00057.html#a4f43f50130c87e488d0d754816815db0":[6,0,0,57,10], "a00057.html#a553f2541bf0ecd55111057ff6de98252":[6,0,0,57,11], "a00057.html#a55637c6a2fe0266ebbea046d0fda8276":[6,0,0,57,12], "a00057.html#a861824ef8ee2abff9c36e9f01282752f":[6,0,0,57,7] }; libpqxx-4.0.1+dfsg/doc/html/Reference/navtreeindex2.js000066400000000000000000000342061224474465600226700ustar00rootroot00000000000000var NAVTREEINDEX2 = { "a00057.html#a88bd4f870abd57d1ceeac65295e3138b":[6,0,0,57,8], "a00057.html#a8bde7bf4689040a1b2176547d0e422a8":[6,0,0,57,2], "a00057.html#aa5e6a54ca2e756775d0fd025a5d804c3":[6,0,0,57,3], "a00057.html#ab6ebcd93944dd5daf158fe4f278273f9":[6,0,0,57,4], "a00057.html#abef9904baeab33e0a03b595c06993a46":[6,0,0,57,1], "a00057.html#ad2ab29818af1ce91be638affa38398e6":[6,0,0,57,0], "a00057.html#ad2e5df2bff74fcc60e7d68a083426189":[6,0,0,57,15], "a00057.html#ae2f637254f3e65276bdcf3ddc17fad73":[6,0,0,57,9], "a00058.html":[6,0,0,56], "a00058.html#a0e047fa337f4df3838e983ca922fa7a5":[6,0,0,56,13], "a00058.html#a2552356fe475dc48fb5f3badb39cccc6":[6,0,0,56,10], "a00058.html#a4adb675b5aed487e66d986fde3d54b4c":[6,0,0,56,18], "a00058.html#a546f724f294272c84c85ab4b4b415419":[6,0,0,56,4], "a00058.html#a56b79eb0d4019b7bfd63a914a530f2ca":[6,0,0,56,1], "a00058.html#a6a83ff716d73bdf627d8ad29405b297d":[6,0,0,56,5], "a00058.html#aa93b5a0de67a09ab92514670ebcca638":[6,0,0,56,8], "a00058.html#aaaad87ca613bccb90e5a8c61a45d83ef":[6,0,0,56,20], "a00058.html#aac375f66e0a9fb817e4e59a1e73f6ba7":[6,0,0,56,15], "a00058.html#abe93b38428b31cc1a533381f055fb3b8":[6,0,0,56,7], "a00058.html#ac984b12f6980c477bfd3d895576635a6":[6,0,0,56,9], "a00058.html#acb1cfe19cef8d7b46ecddaa5f2231e9a":[6,0,0,56,0], "a00058.html#ad04b47cf5b016f02e855f5e9c0bbccae":[6,0,0,56,19], "a00058.html#adaa7a89a1902ba3f13be9c7ed6c1fa0b":[6,0,0,56,3], "a00058.html#ae74922e23584d6410cf37f89f10c1a53":[6,0,0,56,16], "a00058.html#aea8ca1d1275b9a68f8b991ef253e9067":[6,0,0,56,2], "a00058.html#aef7bc42d2a46bbb09c19c802616fa559":[6,0,0,56,12], "a00058.html#af58cb0a2bfe6da7b3d17a572fd4ae573":[6,0,0,56,6], "a00058.html#af81ac99156f3a319e8c021ac2e12da42":[6,0,0,56,17], "a00058.html#afa13d389b11eac8063ade1febb7a4e2c":[6,0,0,56,11], "a00058.html#afb99c68925c9dad182c41036ead832ae":[6,0,0,56,14], "a00059.html":[6,0,0,0,13], "a00059.html#a79dcce75176eef9d2d80fdc2ec2827a7":[6,0,0,0,13,3], "a00059.html#a9c216366ea21f1c9cd03b39410185cbb":[6,0,0,0,13,1], "a00059.html#ab63de628429e771251ab8a2688ad407d":[6,0,0,0,13,2], "a00059.html#ad703d52d9d96025bf08d9da26f6829be":[6,0,0,0,13,0], "a00060.html":[6,0,0,61], "a00060.html#a0069617cbc84ba559bdcdfdf3cd97f3b":[6,0,0,61,1], "a00060.html#a8ed8b2f6aa96cef8508c84ee5369b390":[6,0,0,61,0], "a00061.html":[6,0,0,31], "a00061.html#a43eceacf51e6bb47d6bb90517a574c2a":[6,0,0,31,0], "a00061.html#a5372bb4e822109abf338516fa6b0733e":[6,0,0,31,1], "a00062.html":[6,0,0,62], "a00062.html#a8c675af7630284e6b919a8523595d1d7":[6,0,0,62,2], "a00062.html#a972d65eb33a24b044e9d5c2cb342cd14":[6,0,0,62,3], "a00062.html#ab1956501c582e41377bc54b4db377ded":[6,0,0,62,4], "a00062.html#ae4ed572d3a137b331d363bae82f4ce9b":[6,0,0,62,1], "a00062.html#af1f7329b7989d05272f6ac354fa1ac3e":[6,0,0,62,0], "a00063.html":[6,0,0,63], "a00063.html#a0f8b3a6f5183bc9466fba30bd760af85":[6,0,0,63,5], "a00063.html#a183d105d5bd011d45843526004bc0f40":[6,0,0,63,2], "a00063.html#a61fecb70ec917b3403dff4228b69a61a":[6,0,0,63,4], "a00063.html#a8a6592b38ed1c547266c05e1f3daadce":[6,0,0,63,0], "a00063.html#a9b6ca1f8939f82c391fecb7082364ec7":[6,0,0,63,3], "a00063.html#ac4593cefb4b75ef4373b2aa44d4bd061":[6,0,0,63,1], "a00064.html":[6,0,0,0,4], "a00064.html#aa09aa1f99cc15c8f9ffb8ff5478ecd01":[6,0,0,0,4,1], "a00064.html#ade491702e92e9e98b540c57d53b896db":[6,0,0,0,4,0], "a00065.html":[6,0,1,0], "a00065.html#a672ff8f843f277b741fef22594a1d78f":[6,0,1,0,2], "a00065.html#a9387cf870c1b7d0f6ced0db05614e494":[6,0,1,0,3], "a00065.html#ae5fc707d9d6ebbac808a5fb6e26690f8":[6,0,1,0,0], "a00065.html#af71385909ae48a64f6e88d19f940bcd1":[6,0,1,0,1], "a00066.html":[6,0,0,45], "a00066.html#a8e8d47b4cc8de8c9ebf4abcd39bee40b":[6,0,0,45,1], "a00066.html#ad9880e47615592429d5cb9e3fda467f3":[6,0,0,45,0], "a00067.html":[6,0,0,0,7], "a00067.html#a030eb77fb420df1890741417fbbb6213":[6,0,0,0,7,5], "a00067.html#a5fa125c4885b76bd9c250e1d0692ad13":[6,0,0,0,7,0], "a00067.html#a6fd084905f68c744bd791c601168103d":[6,0,0,0,7,6], "a00067.html#a88c8820f7c620e208795db4edcb178df":[6,0,0,0,7,3], "a00067.html#a96dd05cc41a36dcca337bd3971d354ab":[6,0,0,0,7,2], "a00067.html#abc61b203c68554dc43ccead818683b4a":[6,0,0,0,7,1], "a00067.html#ae8ef9f87245ddad0e4319357e82db670":[6,0,0,0,7,4], "a00068.html":[6,0,0,64], "a00068.html#a153e247a4f449ce8069379c4567738e9":[6,0,0,64,9], "a00068.html#a19c508710d0025993e41512f23de56be":[6,0,0,64,11], "a00068.html#a33a890c64efc37d76f3c649f145ff950":[6,0,0,64,6], "a00068.html#a3d89c57d7619430a3847595d8fb902bc":[6,0,0,64,8], "a00068.html#a41ad44c7f13ad198db938c84e25473a9":[6,0,0,64,1], "a00068.html#a5f5fe658349dcd9aed9c19faccf23ea4":[6,0,0,64,5], "a00068.html#a7808218284e98bb5dffaf110defd1b33":[6,0,0,64,4], "a00068.html#a839abbb0e60ac35e941a632027b4f917":[6,0,0,64,7], "a00068.html#a9edc9c6e50f25790c3707495ab9779dd":[6,0,0,64,12], "a00068.html#ab265dd1ed168022f92a207dd62bad5d1":[6,0,0,64,2], "a00068.html#ab375b0b4e02c7f1a48602c4186fbbbd7":[6,0,0,64,3], "a00068.html#ab53d0c0294ef3c3c7147be2ab55bab0e":[6,0,0,64,0], "a00068.html#af94a53d0eecb7485cb135155f912ce8e":[6,0,0,64,10], "a00069.html":[6,0,0,47], "a00069.html#a346ab5182768a7a9b25c03e45890c601":[6,0,0,47,1], "a00069.html#abb0f0e6d4eaebe63d7409c244ffa9b06":[6,0,0,47,0], "a00070.html":[6,0,0,49], "a00070.html#a97cfb947332b3e275e3437b5284de8ff":[6,0,0,49,1], "a00070.html#ab6013cc52171417e60008c1efebd4257":[6,0,0,49,0], "a00071.html":[6,0,0,48], "a00071.html#a7a51d15b2778ae1ec61f480482050690":[6,0,0,48,1], "a00071.html#acb8177c2b8060623f46fadfb82c621f8":[6,0,0,48,0], "a00072.html":[6,0,0,50], "a00072.html#a77fc4dece10e4aa3efffc7f4dcbeb81e":[6,0,0,50,1], "a00072.html#a8b2c0fa01d76add8d15f1024562521fe":[6,0,0,50,0], "a00073.html":[6,0,0,0,11], "a00073.html#a362f5103b150fb3913adb8923c7b1dbe":[6,0,0,0,11,9], "a00073.html#a402105c20c0fba99659dbea44fbd36b2":[6,0,0,0,11,2], "a00073.html#a43caacd4030a3dd949e9e44352c859dd":[6,0,0,0,11,4], "a00073.html#a4550cd53958a269ac8c2e4e7a02d2f02":[6,0,0,0,11,6], "a00073.html#a681827ee20603fab0019324494e78455":[6,0,0,0,11,12], "a00073.html#a7bb9fd9d80b38ddbed8128b33806900d":[6,0,0,0,11,11], "a00073.html#a7fe52ebd1d2533f298caa5ffc975be66":[6,0,0,0,11,0], "a00073.html#a8aded9ce9cf12f720f193ed303367bd1":[6,0,0,0,11,3], "a00073.html#a93b56fd3623e58c1aa6ceaaff54bbe11":[6,0,0,0,11,10], "a00073.html#ac8d570bb46f0831c42a5b3fc0f803040":[6,0,0,0,11,5], "a00073.html#adf8536b0ab651d81247809a673f3bf42":[6,0,0,0,11,1], "a00073.html#af32cad9f63309273527e4007a7d892ef":[6,0,0,0,11,7], "a00073.html#afaa858977fa3c7df8f6497afdf4f2803":[6,0,0,0,11,8], "a00074.html":[6,0,0,17], "a00074.html#a27f927cf3a5f478abc29337d02767144":[6,0,0,17,1], "a00074.html#a9386d73e8176de81de9b1fe38afa6952":[6,0,0,17,0], "a00075.html":[6,0,0,1,0,0], "a00075.html#a11ef3d1042c1711d30b6e376f4b77dc5":[6,0,0,1,0,0,3], "a00075.html#a3a8a05c0e9db9aa9423b99a62fc2b442":[6,0,0,1,0,0,0], "a00075.html#a52a320e063625faf69d1104d7dbfc13a":[6,0,0,1,0,0,1], "a00075.html#a7b418648fe35168c261073cae42da08e":[6,0,0,1,0,0,2], "a00076.html":[6,0,0,16], "a00076.html#a3870c438f09580a1b5414e0cdc687faf":[6,0,0,16,1], "a00076.html#ae440e24603c46ebdc8b981e22a54aacb":[6,0,0,16,0], "a00077.html":[6,0,0,26], "a00077.html#afe1f00814531af326e7fb11757f978e9":[6,0,0,26,0], "a00078.html":[6,0,0,0,1], "a00078.html#a1560ca3d205af226866a1e388dc505f2":[6,0,0,0,1,2], "a00078.html#a1cc2be7fd873ff9c6fa91e3efb3293dd":[6,0,0,0,1,3], "a00078.html#a4f2bdaaec1119d4a66efe42faa17a0dd":[6,0,0,0,1,1], "a00078.html#a87bd978d6269ea43fdcdf2f2eb278ef5":[6,0,0,0,1,0], "a00079.html":[6,0,0,0,2], "a00079.html#a3669e53c578ba7935d5b7bdaad0d5e0b":[6,0,0,0,2,1], "a00079.html#a8397728c755c1a8b4ade039406a4155c":[6,0,0,0,2,2], "a00079.html#ae0b6ca7a0a7d33b88a0e0a3fb61ac240":[6,0,0,0,2,0], "a00080.html":[6,0,0,0,10], "a00080.html#a02b194d1c4db0d3dd7d97351443bb7bd":[6,0,0,0,10,0], "a00080.html#a603b442ad845f46a19fa92970990a03e":[6,0,0,0,10,1], "a00080.html#a7cf6cdeea44ec32c1c8b9d02f4c2f83c":[6,0,0,0,10,3], "a00080.html#ad096a060aac9424435026f17b04d3772":[6,0,0,0,10,2], "a00081.html":[6,0,0,30], "a00081.html#a3c6a6fa4c970502389cded0863f83122":[6,0,0,30,1], "a00081.html#a595aad1240047206570109fb06936695":[6,0,0,30,0], "a00082.html":[6,0,0,65], "a00082.html#a137c5ab03f8e5975fe822571cfa796e4":[6,0,0,65,47], "a00082.html#a16732cbff5bf11cefd68471577344551":[6,0,0,65,5], "a00082.html#a1741df34f160c410d8d28dddc44e6015":[6,0,0,65,37], "a00082.html#a1d2df6fa727dd62239d98a0af8267cd2":[6,0,0,65,6], "a00082.html#a1d7279ca68e1d4da8da2829bb34e3b80":[6,0,0,65,11], "a00082.html#a21afe937e085a4b3346080c389a12fb7":[6,0,0,65,18], "a00082.html#a231cf3451b578e1a77a0e3ba5c5332c0":[6,0,0,65,0], "a00082.html#a2f3a766be0d57b86db847585ed1f2fc4":[6,0,0,65,41], "a00082.html#a33ab612efd39b727d6e1e151a6c354f6":[6,0,0,65,27], "a00082.html#a37086391f22470c7cdd386b12842f080":[6,0,0,65,28], "a00082.html#a38e72e44648e624333181233097e55ce":[6,0,0,65,19], "a00082.html#a3aac4e676b132a3499e70bb83bcc4bec":[6,0,0,65,36], "a00082.html#a4dccf162cd4081bbe2824ba29d546e90":[6,0,0,65,40], "a00082.html#a4e8a0b23393257bb8438323af622ab0b":[6,0,0,65,1], "a00082.html#a51879f289b45e502f320b34dbbe023ca":[6,0,0,65,16], "a00082.html#a5b614d6a33d0ce60282f6bf3cdf97409":[6,0,0,65,12], "a00082.html#a629baba71ae365f79232780e6f8ac3a7":[6,0,0,65,30], "a00082.html#a68dd2275bab0b4e254573ee664738904":[6,0,0,65,31], "a00082.html#a6e2e28a20a517c6c3f4e4c9407fbe288":[6,0,0,65,34], "a00082.html#a77542a235a4ca711267e30d84492ce3b":[6,0,0,65,17], "a00082.html#a78570b23f3d2daedf81429fe4ddddda1":[6,0,0,65,13], "a00082.html#a7a70138c10119663c29f81853ed21969":[6,0,0,65,21], "a00082.html#a7ee3d9e31a9f81b366cf04f1f73b5df2":[6,0,0,65,29], "a00082.html#a887f5867a4c241990ffb697097ddc2c9":[6,0,0,65,24], "a00082.html#a89aa2801e77f463d3598dac7ee2ecd11":[6,0,0,65,39], "a00082.html#a8f7e6221f552199a88b3cfb787bd03c2":[6,0,0,65,25], "a00082.html#a91a2dd4512530363cdf1240a0aeba46c":[6,0,0,65,23], "a00082.html#a939ae251d3e8435a113157ec1443b90e":[6,0,0,65,32], "a00082.html#a947c2ca5eff01d46475744c87eb00944":[6,0,0,65,15], "a00082.html#a95891ed8c127338b022f98365cce1e91":[6,0,0,65,7], "a00082.html#a9bd216b98399da242314f47e6c512986":[6,0,0,65,38], "a00082.html#a9c54931412fec6e7516cacff4fcdfcf3":[6,0,0,65,42], "a00082.html#a9e02bbf1126802fd7fd64df989e03940":[6,0,0,65,8], "a00082.html#a9fe15fed7d74b4ae0718cf9ae64427bf":[6,0,0,65,46], "a00082.html#aad8b1fd5e42dbfc4a4d75c0a1b0c6ddb":[6,0,0,65,10], "a00082.html#ab3bcc6d210c747335a9f86aef975dfa9":[6,0,0,65,3], "a00082.html#ab60d18b1e9d4666c28551da2ad0e37d5":[6,0,0,65,14], "a00082.html#abec7f7f4d7ed030f38b2a123b632b818":[6,0,0,65,2], "a00082.html#ac5027b980639d8d0304ab32fb3052d73":[6,0,0,65,22], "a00082.html#acddfe7ea1003815ef4e738bb6c84d221":[6,0,0,65,35], "a00082.html#aced900b0f7d44652107e4df89df9023f":[6,0,0,65,33], "a00082.html#ad7ebaaac4647f20a915fd6aa735cd1e5":[6,0,0,65,48], "a00082.html#ad8ecab8bcc022fe5a489e2d2fded14bd":[6,0,0,65,44], "a00082.html#ad928c2c47d1f6d890e4a97aa225ff9d5":[6,0,0,65,9], "a00082.html#adadfb3831c89409ff3ff74a49b5b5bdd":[6,0,0,65,43], "a00082.html#aea00d4ccd9783a65feb0c079c109c3e8":[6,0,0,65,45], "a00082.html#af56d00ec20a26b2dfeb3a83b481cf243":[6,0,0,65,26], "a00082.html#afa18f18140865290a1e7a3461cc604f4":[6,0,0,65,4], "a00082.html#afd40988f258ee059b0e76dac6480d8b3":[6,0,0,65,20], "a00083.html":[6,0,0,69], "a00083.html#a8fb228809bd42b2936ada9f9573d30d6":[6,0,0,69,0], "a00083.html#ae28452f4e178b6c548f6294fee803632":[6,0,0,69,1], "a00083.html#af1b175fd37479937c936f172803f40bb":[6,0,0,69,2], "a00084.html":[6,0,0,0,12], "a00084.html#a2a9085342769fddc1cc5a8c6287b0892":[6,0,0,0,12,0], "a00084.html#a38e241073d5b8b235f1d9d35980a8639":[6,0,0,0,12,2], "a00084.html#a92873171917fe692165825e4cc5d0b50":[6,0,0,0,12,5], "a00084.html#aada7488a2fb51e6d81cdd86469f43ada":[6,0,0,0,12,9], "a00084.html#ab139e833e327beb370470269e09e85a6":[6,0,0,0,12,4], "a00084.html#ac3891140f89ff6e3e43a818767431c23":[6,0,0,0,12,7], "a00084.html#ac5ba5559e184842746b13c9545c0ac73":[6,0,0,0,12,1], "a00084.html#af0349dcca1c6261e641eebf127324a41":[6,0,0,0,12,3], "a00084.html#af0ac2a40f4e23eb28cde185d629a2678":[6,0,0,0,12,8], "a00084.html#af8afa32de4971796d6d15d73b7590b0a":[6,0,0,0,12,6], "a00085.html":[6,0,0,0,3], "a00085.html#a2aefb76b1cea234cc687735a3f8bc51a":[6,0,0,0,3,8], "a00085.html#a31a9e2e6f5276c06120111df47f9ac5f":[6,0,0,0,3,9], "a00085.html#a3ae9feae24d5eab6cf30867351cee54e":[6,0,0,0,3,5], "a00085.html#a4e8540e040830b7834749c51d1eb39c0":[6,0,0,0,3,1], "a00085.html#a5957a76f8d79ad8eae5feee9722eff40":[6,0,0,0,3,2], "a00085.html#a5a8ff4f51d2a249f1e772e0953452684":[6,0,0,0,3,10], "a00085.html#a78ee80852828a1221357352ce77b9597":[6,0,0,0,3,0], "a00085.html#a7c17e5396e312c2f3e0f66db3d0e4a90":[6,0,0,0,3,7], "a00085.html#a866cc9ec5bc766135e80a38901833e37":[6,0,0,0,3,3], "a00085.html#ac356fb51140719a5703d8c5c6784ebb5":[6,0,0,0,3,6], "a00085.html#af02410eca37436cb84547357d0b5a38e":[6,0,0,0,3,4], "a00086.html":[6,0,0,20], "a00086.html#a7db2ae4924fda2aec297cfa1c8363ec7":[6,0,0,20,3], "a00086.html#ad2f7fa865d0410824b39ac27dab99d92":[6,0,0,20,0], "a00086.html#ae9e8799eed6ff45bbb44e481821cbfa2":[6,0,0,20,4], "a00086.html#af3e94ddc4c6428d5a1d7763936a5b781":[6,0,0,20,2], "a00086.html#affcbefe5ad9a1cae7073d170f85352d0":[6,0,0,20,1], "a00087.html":[6,0,0,11], "a00087.html#a20a0b658655a3b10543abd35717dd633":[6,0,0,11,4], "a00087.html#a8231490bf29aa7686c4daa3b1fc97ed1":[6,0,0,11,3], "a00087.html#a85ee6b4652b659565fede97bb00b4232":[6,0,0,11,1], "a00087.html#a97046479f709ae621473c48ed7a0932d":[6,0,0,11,6], "a00087.html#a9b99a8f9ef260f11a32b29e917bdacda":[6,0,0,11,5], "a00087.html#aa042b1c72b16911a4f2e1c73be3d8942":[6,0,0,11,2], "a00087.html#ae278f24bab98d3946061934a48992067":[6,0,0,11,7], "a00087.html#af9cfc40abd39a68880b0df6d618e41fb":[6,0,0,11,0], "a00088.html":[6,0,0,70], "a00089.html":[6,0,0,72], "a00089.html#a51d90ce760af54b3fb1fa08e3205f386":[6,0,0,72,3], "a00089.html#a552d464626e8e33a6f58089a2ad78cb0":[6,0,0,72,0], "a00089.html#a5e81eb017d2ae5e0dc0aabf7e8c0d07d":[6,0,0,72,1], "a00089.html#a68b55550446061fd956d8777c97ffffb":[6,0,0,72,4], "a00089.html#a7f786743db515467f7c88cb4eb4c3655":[6,0,0,72,2], "a00090.html":[6,0,0,73], "a00090.html#a3eb1069f8c250f8d19f20ce53cb200a9":[6,0,0,73,0], "a00090.html#a492de5b973073ced2b6df88ef2e2deb1":[6,0,0,73,2], "a00090.html#a758dc122ae4ab3926b0110baa7146cc5":[6,0,0,73,3], "a00090.html#adc93379fe5f2ddc78e1f8144c0f735ab":[6,0,0,73,1], "a00090.html#af1b0d4263b555e6a90dbf6a2e2e7b73e":[6,0,0,73,4], "a00091.html":[6,0,0,71], "a00091.html#a256159442e5ffa53fd9e8e08efbb8f95":[6,0,0,71,5] }; libpqxx-4.0.1+dfsg/doc/html/Reference/navtreeindex3.js000066400000000000000000000337471224474465600227020ustar00rootroot00000000000000var NAVTREEINDEX3 = { "a00091.html#a3385572be2064f973ae3ac4096a1793a":[6,0,0,71,2], "a00091.html#a5781caab7530905af3c4d03315af6622":[6,0,0,71,4], "a00091.html#aa2b58df8411416882fd615947f4b46c8":[6,0,0,71,0], "a00091.html#aace614dae201b284a833a71a0c22a085":[6,0,0,71,3], "a00091.html#ab0f7f0134b588e97fcaab7b97cb56e3c":[6,0,0,71,1], "a00092.html":[6,0,0,74], "a00092.html#a312f97129b9a90a8f46feb8a1eb9c463":[6,0,0,74,4], "a00092.html#a8b325e1e90d1b21d2109616183beb35b":[6,0,0,74,0], "a00092.html#a9c441bb5daeb31f13fafcec1ff436c60":[6,0,0,74,2], "a00092.html#ac02a0a7baae6ed014d8f3932f7f61528":[6,0,0,74,3], "a00092.html#ae1e26292a177f5ec0377ec0bc460f9dd":[6,0,0,74,1], "a00093.html":[6,0,0,76], "a00093.html#a2a8565fbc2819d0ae348df080d9d7d45":[6,0,0,76,3], "a00093.html#a8f32f29c6ff79aabb58e7daca55efdb1":[6,0,0,76,2], "a00093.html#aa120743b3bd1bd2143f7b042112a1100":[6,0,0,76,0], "a00093.html#aee488ad2b0284dc58feb87cf7d4ec0e2":[6,0,0,76,4], "a00093.html#afdab04a864d400d282546595c4447be3":[6,0,0,76,1], "a00094.html":[6,0,0,75], "a00094.html#a042390d6d2b08a908b78bc7741e8dc55":[6,0,0,75,2], "a00094.html#a0c8b270690a4e950acfd0670c8705cb4":[6,0,0,75,1], "a00094.html#a2b582fcdd58e83012f111d2c6daa4bb6":[6,0,0,75,3], "a00094.html#a6465318808c87143b12749de6049f615":[6,0,0,75,0], "a00094.html#a766e009cf12622f50242fe6a6577280f":[6,0,0,75,5], "a00094.html#ade264b724da3d0a7e05fe78cb3e4220f":[6,0,0,75,4], "a00095.html":[6,0,0,77], "a00095.html#a628dc63f6f52e68ac01324cbe980019a":[6,0,0,77,2], "a00095.html#a6a04f64b953a11ca660727a1586cbe8a":[6,0,0,77,5], "a00095.html#acde79ea60c125524dd0373798da9c246":[6,0,0,77,0], "a00095.html#ad692793979ca664813f93e907b1b6508":[6,0,0,77,1], "a00095.html#aeda8297c0d566194c18f6ab91adf6124":[6,0,0,77,4], "a00095.html#affca0f8d647300fa83fadf6fbcbda597":[6,0,0,77,3], "a00096.html":[6,0,0,78], "a00096.html#a3ade245fa2c0acff69af7f648a6983a6":[6,0,0,78,1], "a00096.html#aae82c1f8ef12d5c780313a0528825372":[6,0,0,78,0], "a00097.html":[6,0,0,38], "a00097.html#ac6344fdccdc0e166ff7fcbe53bcc27ef":[6,0,0,38,1], "a00097.html#ae489a0cf604c668f9dbaa89a3df9dedd":[6,0,0,38,2], "a00097.html#afae8be4ad0815338687d765729f09fd4":[6,0,0,38,0], "a00098.html":[6,0,0,79], "a00098.html#a07a03ef6630e8e5e0e8103b9b9bce6d5":[6,0,0,79,1], "a00098.html#a235d3894806c150e2db680ebe5c766d1":[6,0,0,79,9], "a00098.html#a4010de33fe9ec72cbbc19c3dd81c8959":[6,0,0,79,6], "a00098.html#a4028c87ef2895f34a824f09970476e24":[6,0,0,79,4], "a00098.html#a84da29cd4c12724f74891631ade8f1d5":[6,0,0,79,3], "a00098.html#aa70c070397bcd38df197b05c33614100":[6,0,0,79,5], "a00098.html#aae84e7e743e090f9c29220f37074cf40":[6,0,0,79,7], "a00098.html#abdaa2d21ae6f3bbb52b8cb6c75870ff5":[6,0,0,79,0], "a00098.html#ad233a53fdc5622adf57f353794a3c62f":[6,0,0,79,2], "a00098.html#adbb71a08559825b55b801771b6161d56":[6,0,0,79,8], "a00099.html":[6,0,0,80], "a00099.html#a0241100d03b034b8e7b59201a6a1b88f":[6,0,0,80,4], "a00099.html#a48f61b76226df70a8eaa334b6f53575a":[6,0,0,80,5], "a00099.html#a5cfaacb3b52d957c8df94b91f3f1fe40":[6,0,0,80,0], "a00099.html#a6d024cd5f02bb5c2a6eb00ca11bde772":[6,0,0,80,1], "a00099.html#a8206b4b9b8dc8139e7b9be97d3c91d95":[6,0,0,80,2], "a00099.html#ae36c9e2bd18b6ed8a6c942ba616154b2":[6,0,0,80,3], "a00099.html#afdac33bb17371652a6328b689d29a411":[6,0,0,80,6], "a00100.html":[6,0,0,81], "a00100.html#a0a312200fceabbd9b81c3db4169e06ec":[6,0,0,81,9], "a00100.html#a0cba43b103518b8e01c4d2f099a6d6dd":[6,0,0,81,2], "a00100.html#a219cfed40ab2c1858b89e630e140e984":[6,0,0,81,0], "a00100.html#a2fbc9559232987cab54d30add357a2cb":[6,0,0,81,14], "a00100.html#a3332310804e226da6d83c33f932290cc":[6,0,0,81,4], "a00100.html#a3f3bbf204195b04a00ea942c5f298c94":[6,0,0,81,6], "a00100.html#a471da19c2f19ee8a205428a8e4c338ed":[6,0,0,81,11], "a00100.html#a4cf8a6eb3e06f010ab153666d645d6d1":[6,0,0,81,8], "a00100.html#a4dd97d641c5ccb16e2abbeaa2f0a50bc":[6,0,0,81,5], "a00100.html#a6686c385a22f6790a1962584a1b09d79":[6,0,0,81,13], "a00100.html#aa77830abd7d255e513940092e68bcbb0":[6,0,0,81,12], "a00100.html#ab99429233e750f61fac91dbb205c6676":[6,0,0,81,10], "a00100.html#ac4b1eaf8b157f40e377cdcaa5d07e233":[6,0,0,81,15], "a00100.html#af491ceeea1fb81f185c4460176ef594a":[6,0,0,81,1], "a00100.html#af975d6cde30bbff394e88229448d8019":[6,0,0,81,3], "a00100.html#aff6a89343e60c12a55b1d6e6346b6dc2":[6,0,0,81,7], "a00101.html":[6,0,0,89], "a00101.html#a3fe3fa8e530712e5228d2b5379871540":[6,0,0,89,3], "a00101.html#a76f2924aaefac243d3770f1f4b698211":[6,0,0,89,1], "a00101.html#abe3528c0d2e42d6e98d80f0b45d79002":[6,0,0,89,2], "a00101.html#ace2546ec39e30e8793cc4a296216f259":[6,0,0,89,4], "a00101.html#adb5c47ea21c35c73432de0d0b7e80bdb":[6,0,0,89,5], "a00101.html#adddd2eaf6dbc5feca29ce00f91b4d648":[6,0,0,89,0], "a00102.html":[6,0,0,46], "a00102.html#ad613a4a06c35fc29cdb838427250d727":[6,0,0,46,0], "a00103.html":[6,0,0,83], "a00103.html#a01e7ecea76d7d12c295e6979759eb754":[6,0,0,83,0], "a00103.html#a028f5dc23672e38c82a8fd91cd4e4ee0":[6,0,0,83,3], "a00103.html#a5ad879f746d13f51e469c67665b5d3f9":[6,0,0,83,1], "a00103.html#a664bdb9c889f946c162cac14bdbe6b7b":[6,0,0,83,2], "a00104.html":[6,0,0,84], "a00104.html#a02ad6878f438fc51b297b32e7512e244":[6,0,0,84,33], "a00104.html#a1357ac4f6330284129c91882a169276d":[6,0,0,84,22], "a00104.html#a1d2a8554499cbd93ff8c2bf5c15843ff":[6,0,0,84,4], "a00104.html#a241ccb51d6d6a399164e7478adcd6157":[6,0,0,84,21], "a00104.html#a475695c55439007cd2438fb184ed8be3":[6,0,0,84,10], "a00104.html#a6f587ae3bda7a32c8828984e7c4aa16e":[6,0,0,84,11], "a00104.html#a84df458282939ef38cfddfaa07bea1d8":[6,0,0,84,29], "a00104.html#a87f5147f2dc2dfbcc3b5aef4b461be86":[6,0,0,84,20], "a00104.html#a8fc9a363bcf7defb3c829a633c04ae6c":[6,0,0,84,8], "a00104.html#a92fc088d2f2c3e1e5992b4e14c703684":[6,0,0,84,2], "a00104.html#a938732e87f924fee764cddd8390de20f":[6,0,0,84,19], "a00104.html#a955f2497216d9eae268ac662b46d5a45":[6,0,0,84,3], "a00104.html#a99f99eb85906a7541119c9098a36d799":[6,0,0,84,23], "a00104.html#aa80a7816f63c425c28cd4037aaa8cf8f":[6,0,0,84,9], "a00104.html#aa90bc6e1219ff68ef11e1d04b76c205c":[6,0,0,84,24], "a00104.html#ab2cf42c4821aff7ff1cd906af9165725":[6,0,0,84,5], "a00104.html#ab7510be596a5a14014064c884a10fd93":[6,0,0,84,30], "a00104.html#ac80f81e53c31f3a2052dc24fc6bbb7ee":[6,0,0,84,7], "a00104.html#acf16920b6582767aae17d6c57770e853":[6,0,0,84,34], "a00104.html#ad5ddea378795d92908af4b65e59d585a":[6,0,0,84,1], "a00104.html#adc48441869caf6a4b84911cd6984c36a":[6,0,0,84,35], "a00104.html#ae689290143788842755389246915b9f2":[6,0,0,84,31], "a00104.html#aed167261c4d76876241b5f615b9b8c7a":[6,0,0,84,6], "a00104.html#aed91d0b8029795b477470e854c907c4b":[6,0,0,84,18], "a00104.html#af2ddcd7f1def9dfd3f15c0f3242b9136":[6,0,0,84,12], "a00104.html#af5e1900b64239bac292f5505f7799654":[6,0,0,84,0], "a00104.html#afbc1622f03aeb05c34ac44f1c5c179dc":[6,0,0,84,32], "a00105.html":[6,0,0,0,6], "a00105.html#a267f75f541c85a38605fb6b8c66d1e0a":[6,0,0,0,6,2], "a00105.html#a474a6ca017e7a313bc33e7b2b5a2d1d7":[6,0,0,0,6,3], "a00105.html#a53309d8e6bb85774cb16bf6a340cb558":[6,0,0,0,6,4], "a00105.html#a9924dff8ce3203ca9fb9e584800ef9f4":[6,0,0,0,6,5], "a00105.html#ac1ad1a201cacde2cd35182dd3bfb66fa":[6,0,0,0,6,0], "a00105.html#adae9df5aee401ccb6f1d77024d524322":[6,0,0,0,6,1], "a00106.html":[6,0,0,85], "a00106.html#a11e2fe0df76ccba33e0c6cd7b8f6da2d":[6,0,0,85,2], "a00106.html#a326761951cbf1a7b38ee912a4ca3556f":[6,0,0,85,0], "a00106.html#aa6045f47cf10d83a2d3d221813d7d53c":[6,0,0,85,1], "a00106.html#aacc3fb9eb7993788cafe66aa88d87d6b":[6,0,0,85,3], "a00106.html#ab02770d55fdda6bc4e5b4323aa53e4e8":[6,0,0,85,5], "a00106.html#ade15ec930b8c4baee2c22ceec5af9c2d":[6,0,0,85,4], "a00107.html":[6,0,0,86], "a00107.html#a00b39ba19194ab4ed39a66db5d706bdf":[6,0,0,86,1], "a00107.html#a015c73dac6acc99a6b28be2a5c0c58d7":[6,0,0,86,26], "a00107.html#a039d07211fbc47ca5dbb8d1134a41ca6":[6,0,0,86,12], "a00107.html#a07445c00ef5336b58ae6ed0111ea7eb1":[6,0,0,86,30], "a00107.html#a151caf9b33bc5f6e3a3210a0a9850be2":[6,0,0,86,36], "a00107.html#a161202f7f52589b5c00446e7c497ade0":[6,0,0,86,22], "a00107.html#a1b2e60c035ce44465903da29d2b9073b":[6,0,0,86,35], "a00107.html#a1cf7ff6980433ae25d4438b792039e71":[6,0,0,86,28], "a00107.html#a1d6a03419766400fb89bd9c574e6c5b3":[6,0,0,86,27], "a00107.html#a2804eeb76741f665a976405678a56b2b":[6,0,0,86,13], "a00107.html#a2ba69a8ed5d72f6a2c8c4e44959c3754":[6,0,0,86,4], "a00107.html#a2caabd2c88c96db279a31477392f0dee":[6,0,0,86,5], "a00107.html#a32b661539c164b767b0b90179df91b80":[6,0,0,86,31], "a00107.html#a396da22c05b8841636602333fa49055d":[6,0,0,86,40], "a00107.html#a3ba92ea4db8924603f8b7d9fe05a419c":[6,0,0,86,20], "a00107.html#a45283ce03e2ed9642b0407124155980b":[6,0,0,86,48], "a00107.html#a5744c5e000bb73a068ad2515c1158472":[6,0,0,86,25], "a00107.html#a5ce82cef5ce0c07188307c0e734a2cc8":[6,0,0,86,19], "a00107.html#a619a58bbca87bfbc98c98aa2f5095500":[6,0,0,86,6], "a00107.html#a6a24050891ea1955bd1f1353db56d1d6":[6,0,0,86,11], "a00107.html#a702fb7ee202de0c4d303aa86c6700ec7":[6,0,0,86,46], "a00107.html#a740b31ef6d306b4a6fe88b720f0b9edd":[6,0,0,86,14], "a00107.html#a7ecb5e742835c2b2c45f19fc3e8c95f5":[6,0,0,86,43], "a00107.html#a83ced5b92cf759526acb1e3f61886c35":[6,0,0,86,42], "a00107.html#a862f927c5fcf486ac801fa182f2b3b3b":[6,0,0,86,17], "a00107.html#a8aae05132a22bc73c5310935ae1e6a39":[6,0,0,86,21], "a00107.html#a8fff40c4046b2b183229a423b036c295":[6,0,0,86,2], "a00107.html#a97a80dea1c26f652161f82f18931eb4a":[6,0,0,86,8], "a00107.html#a9e4e5bc2702da6058b8bf679a86e6253":[6,0,0,86,45], "a00107.html#aa29b77ecf936a1ff5d28e27cb6282f77":[6,0,0,86,10], "a00107.html#aa3815a9bb105e74635472a15538784a3":[6,0,0,86,9], "a00107.html#aa4bbc0682c7966082d952b68c4e2a088":[6,0,0,86,18], "a00107.html#aae56e5f3e7f68f16408ba7c876e364f3":[6,0,0,86,3], "a00107.html#ab3ea1af4e6c962a57ae9c280fd022b84":[6,0,0,86,29], "a00107.html#ab788fa8e6231991a743a4bfdab6b79c1":[6,0,0,86,32], "a00107.html#abb8219326beee6e2d04cdc186c948b28":[6,0,0,86,0], "a00107.html#ac38d058ad7f5cc73c6a645136d7bba1e":[6,0,0,86,23], "a00107.html#ac641388403460c8bc2ba5d340693d4be":[6,0,0,86,7], "a00107.html#acd53905ae10cba58b4337aefe648aec6":[6,0,0,86,44], "a00107.html#ad5234f6faf0360b0d6f5b44d970323f6":[6,0,0,86,15], "a00107.html#ad7a7f22ebcf73da265c7572a8abbbc81":[6,0,0,86,33], "a00107.html#add3b3950f875cc68334a62e5c15dd34d":[6,0,0,86,37], "a00107.html#add93ece18a68e9f3cf4697861511f624":[6,0,0,86,47], "a00107.html#adf67f0634d187421841bbe7d78abc0f9":[6,0,0,86,24], "a00107.html#ae21cedae764c516074261dbc3f360671":[6,0,0,86,41], "a00107.html#ae68a37e2db5b44e1521d8c0156a3c4f9":[6,0,0,86,38], "a00107.html#aef33d07890dfee76b579e545276127d7":[6,0,0,86,16], "a00107.html#af16492e8b29383c548553f78e55f2ca6":[6,0,0,86,34], "a00107.html#afbe1a4b84afca1f448d169c169d936bf":[6,0,0,86,39], "a00108.html":[6,0,0,39], "a00108.html#a21df53ad96763c63ad6bc691848b68b5":[6,0,0,39,1], "a00108.html#a2cef7f04b77370c1744fdefbd68cf254":[6,0,0,39,0], "a00109.html":[6,0,0,40], "a00109.html#ad7beff0f4d7b7353da9e675e899bb350":[6,0,0,40,0], "a00109.html#af634ee86c8bbeffb1db85a10c611e99b":[6,0,0,40,1], "a00110.html":[6,0,0,41], "a00110.html#a639bf511f48a2eb3715f857fd91f1bce":[6,0,0,41,0], "a00110.html#af1f3774f9f8b5cf656a9e6f442e2aea8":[6,0,0,41,1], "a00111.html":[6,0,0,0,14], "a00111.html#a20d41d4090254a82c02f1d7e30af9d04":[6,0,0,0,14,2], "a00111.html#a7dce0951d8eff0a8d156ff1b73e2c878":[6,0,0,0,14,0], "a00111.html#a9a6ace7374f5ed24d77d6e760e186d8b":[6,0,0,0,14,1], "a00111.html#afd6cf65f79200733565eb68f9085611a":[6,0,0,0,14,3], "a00112.html":[6,0,0,33], "a00112.html#a704dbc98b56d620ec131498b77578261":[6,0,0,33,1], "a00112.html#aadb2cddaf2f72188f118784495e60720":[6,0,0,33,0], "a00113.html":[6,0,0,23], "a00113.html#ac13c13a650ab45684355682a98655f5b":[6,0,0,23,0], "a00176.html":[6,0,0], "a00176.html":[5,0,0], "a00194.html":[6,0,0,0], "a00195.html":[6,0,0,0,0], "a00196.html":[6,0,0,1], "a00197.html":[6,0,0,1,0], "a00199.html":[4,0], "a00200.html":[4,1], "a00201.html":[4,2], "a00201.html#ga069ea52c5d8cc7916922932c587f350d":[4,2,14], "a00201.html#ga215c8af5887e32a2830f692b5d046a2c":[4,2,16], "a00201.html#ga58ff00a3552facca2cc34bea4e2faff2":[4,2,10], "a00201.html#ga9c0b6d727ce7535938d64a819cf527b0":[4,2,9], "a00201.html#gaa57d02e03b8b7d8b91dec45e22abe0eb":[4,2,13], "a00201.html#gaba8ca5ae8abde63e86fd1bba156404f0":[4,2,11], "a00201.html#gac0605a68479f665fdb45ce21127c8fc8":[4,2,15], "a00201.html#gaf46637e8067239ca82a8fa6ec1fa3ccd":[4,2,12], "a00202.html":[4,3], "a00202.html#ga17dcbbfd542677b5b7ccd810dc8dd7f2":[4,3,2], "a00202.html#ga5123fc11695c56a283bf5d748c04f4ed":[4,3,0], "a00202.html#gab10091fa8ffba17cf84c8583838e501e":[4,3,1], "a00203.html":[4,4], "a00203.html#ga1147c3174b747009783b65981d4707f0":[4,4,16], "a00203.html#ga1147c3174b747009783b65981d4707f0":[6,0,0,3,28], "a00203.html#ga263a180c5d0decf645aca3fc1ed4d6ff":[6,0,0,84,25], "a00203.html#ga263a180c5d0decf645aca3fc1ed4d6ff":[4,4,19], "a00203.html#ga38cc55d0d7637dd53a6508e2bc4beadb":[4,4,1], "a00203.html#ga38cc55d0d7637dd53a6508e2bc4beadb":[6,0,0,84,14], "a00203.html#ga489c7438da9241486297a451a8579dc1":[4,4,7], "a00203.html#ga489c7438da9241486297a451a8579dc1":[6,0,0,84,17], "a00203.html#ga5a9191cb199f2b67350de847e468e38b":[4,4,10], "a00203.html#ga5b230e243d4ebbe8085a8048e912601e":[4,4,12], "a00203.html#ga5b230e243d4ebbe8085a8048e912601e":[6,0,0,3,26], "a00203.html#ga6048218f7af70cd0423429d54203749c":[4,4,6], "a00203.html#ga6048218f7af70cd0423429d54203749c":[6,0,0,84,16], "a00203.html#ga67d0543fc753d81b490cb7c77205a283":[4,4,13], "a00203.html#ga6a8c83d3dcea7114a00c188fe6a92779":[6,0,0,8,16], "a00203.html#ga6a8c83d3dcea7114a00c188fe6a92779":[4,4,8], "a00203.html#ga787364a7ae884b781b58ac248ff0925c":[6,0,0,3,27], "a00203.html#ga787364a7ae884b781b58ac248ff0925c":[4,4,14], "a00203.html#ga7e10c6bf1796584c0949383cb25541c2":[6,0,0,8,35], "a00203.html#ga7e10c6bf1796584c0949383cb25541c2":[4,4,21], "a00203.html#ga80a4bfe9b1c1b88c29d16ba06102370b":[4,4,17], "a00203.html#ga80bbd3626005768e0d39bdfb6930e244":[4,4,2], "a00203.html#ga80bbd3626005768e0d39bdfb6930e244":[6,0,0,84,15], "a00203.html#ga81fe65fbb9561af7c5f0b33a9fe27e5a":[6,0,0,8,34], "a00203.html#ga81fe65fbb9561af7c5f0b33a9fe27e5a":[4,4,20], "a00203.html#ga8978ff727c03a1aaaa3a9d3fd3268abf":[4,4,3], "a00203.html#ga8978ff727c03a1aaaa3a9d3fd3268abf":[6,0,0,8,13], "a00203.html#ga8b59e512bedb3e8a69f3aa7e557daab7":[4,4,26], "a00203.html#ga8b59e512bedb3e8a69f3aa7e557daab7":[6,0,0,8,37] }; libpqxx-4.0.1+dfsg/doc/html/Reference/navtreeindex4.js000066400000000000000000000074171224474465600226760ustar00rootroot00000000000000var NAVTREEINDEX4 = { "a00203.html#ga98dee516d429520627fd94f5ccb2b023":[4,4,0], "a00203.html#ga98dee516d429520627fd94f5ccb2b023":[6,0,0,84,13], "a00203.html#ga9c1a379cd2ba4eea395fb79df463eb98":[4,4,9], "a00203.html#ga9c1a379cd2ba4eea395fb79df463eb98":[6,0,0,3,25], "a00203.html#gaa10d27c49fd2089fe55ebc7ef060b65a":[4,4,25], "a00203.html#gaa10d27c49fd2089fe55ebc7ef060b65a":[6,0,0,84,28], "a00203.html#gac62a687a3367d500a54d0e0a722880c6":[4,4,24], "a00203.html#gac62a687a3367d500a54d0e0a722880c6":[6,0,0,84,27], "a00203.html#gaca9ba750fd096cfd652a4323dab3a653":[6,0,0,8,15], "a00203.html#gaca9ba750fd096cfd652a4323dab3a653":[4,4,5], "a00203.html#gad1faeced6ee13b17fbc3aca21712cc7c":[4,4,15], "a00203.html#gad40c643f4f483941c07c7f25d9091abc":[4,4,11], "a00203.html#gad943d244673a97eef6c7a927f4f412c0":[6,0,0,84,26], "a00203.html#gad943d244673a97eef6c7a927f4f412c0":[4,4,22], "a00203.html#gae68c4661843dcf695585f6e1b6011788":[4,4,23], "a00203.html#gae68c4661843dcf695585f6e1b6011788":[6,0,0,8,36], "a00203.html#gae711f65dd793a70629f97a2e0e54d8db":[4,4,4], "a00203.html#gae711f65dd793a70629f97a2e0e54d8db":[6,0,0,8,14], "a00203.html#gaeb5da84878d4ea8f902f956b8240e73e":[6,0,0,3,29], "a00203.html#gaeb5da84878d4ea8f902f956b8240e73e":[4,4,18], "a00204.html":[4,5], "a00204.html#ga26edb910e4563d1115e22c627914e98b":[4,5,6], "a00204.html#ga710db2d58482a4ea8ebbb822c2b0d417":[4,5,5], "a00204.html#ga830f18f804ec3e4cc8bab713169fb529":[4,5,8], "a00204.html#ga8911912522c75dd0b154fefdde735272":[4,5,7], "a00205.html":[4,6], "a00205.html#ga82685329d6fd91f5ab30772d266fe5f0":[4,6,5], "a00205.html#gab81d0f16865bb70a79d4acb0d0657259":[4,6,4], "a00206.html":[4,7], "a00207.html":[4,8], "a00208.html":[4,9], "a00209.html":[4,10], "a00210.html":[3], "annotated.html":[6,0], "classes.html":[6,1], "functions.html":[6,3,0,0], "functions.html":[6,3,0], "functions_0x62.html":[6,3,0,1], "functions_0x63.html":[6,3,0,2], "functions_0x64.html":[6,3,0,3], "functions_0x65.html":[6,3,0,4], "functions_0x66.html":[6,3,0,5], "functions_0x67.html":[6,3,0,6], "functions_0x68.html":[6,3,0,7], "functions_0x69.html":[6,3,0,8], "functions_0x6c.html":[6,3,0,9], "functions_0x6d.html":[6,3,0,10], "functions_0x6e.html":[6,3,0,11], "functions_0x6f.html":[6,3,0,12], "functions_0x70.html":[6,3,0,13], "functions_0x71.html":[6,3,0,14], "functions_0x72.html":[6,3,0,15], "functions_0x73.html":[6,3,0,16], "functions_0x74.html":[6,3,0,17], "functions_0x75.html":[6,3,0,18], "functions_0x76.html":[6,3,0,19], "functions_0x77.html":[6,3,0,20], "functions_0x7e.html":[6,3,0,21], "functions_enum.html":[6,3,4], "functions_eval.html":[6,3,5], "functions_func.html":[6,3,1,0], "functions_func.html":[6,3,1], "functions_func_0x62.html":[6,3,1,1], "functions_func_0x63.html":[6,3,1,2], "functions_func_0x64.html":[6,3,1,3], "functions_func_0x65.html":[6,3,1,4], "functions_func_0x66.html":[6,3,1,5], "functions_func_0x67.html":[6,3,1,6], "functions_func_0x68.html":[6,3,1,7], "functions_func_0x69.html":[6,3,1,8], "functions_func_0x6c.html":[6,3,1,9], "functions_func_0x6d.html":[6,3,1,10], "functions_func_0x6e.html":[6,3,1,11], "functions_func_0x6f.html":[6,3,1,12], "functions_func_0x70.html":[6,3,1,13], "functions_func_0x71.html":[6,3,1,14], "functions_func_0x72.html":[6,3,1,15], "functions_func_0x73.html":[6,3,1,16], "functions_func_0x74.html":[6,3,1,17], "functions_func_0x75.html":[6,3,1,18], "functions_func_0x77.html":[6,3,1,19], "functions_func_0x7e.html":[6,3,1,20], "functions_rela.html":[6,3,6], "functions_type.html":[6,3,3], "functions_vars.html":[6,3,2], "hierarchy.html":[6,2], "index.html":[], "modules.html":[4], "namespacemembers.html":[5,1,0], "namespacemembers_enum.html":[5,1,4], "namespacemembers_eval.html":[5,1,5], "namespacemembers_func.html":[5,1,1], "namespacemembers_type.html":[5,1,3], "namespacemembers_vars.html":[5,1,2], "namespaces.html":[5,0], "pages.html":[] }; libpqxx-4.0.1+dfsg/doc/html/Reference/open.png000066400000000000000000000001731224474465600212170ustar00rootroot00000000000000‰PNG  IHDR à‘BIDATxíÝÁ €0 Ð׬ՙ\Àº€39—b!©9{|ðI>$#Àß´ý8/¨ÄØzƒ/Ï>2À[ÎgiU,/¬~¼Ï\ Ä9Ù¸IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/pages.html000066400000000000000000000070301224474465600215340ustar00rootroot00000000000000 libpqxx: Related Pages
Related Pages
Here is a list of all related documentation pages:
libpqxx-4.0.1+dfsg/doc/html/Reference/resize.js000066400000000000000000000051651224474465600214150ustar00rootroot00000000000000var cookie_namespace = 'doxygen'; var sidenav,navtree,content,header; function readCookie(cookie) { var myCookie = cookie_namespace+"_"+cookie+"="; if (document.cookie) { var index = document.cookie.indexOf(myCookie); if (index != -1) { var valStart = index + myCookie.length; var valEnd = document.cookie.indexOf(";", valStart); if (valEnd == -1) { valEnd = document.cookie.length; } var val = document.cookie.substring(valStart, valEnd); return val; } } return 0; } function writeCookie(cookie, val, expiration) { if (val==undefined) return; if (expiration == null) { var date = new Date(); date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week expiration = date.toGMTString(); } document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; } function resizeWidth() { var windowWidth = $(window).width() + "px"; var sidenavWidth = $(sidenav).width(); content.css({marginLeft:parseInt(sidenavWidth)+6+"px"}); //account for 6px-wide handle-bar writeCookie('width',sidenavWidth, null); } function restoreWidth(navWidth) { var windowWidth = $(window).width() + "px"; content.css({marginLeft:parseInt(navWidth)+6+"px"}); sidenav.css({width:navWidth + "px"}); } function resizeHeight() { var headerHeight = header.height(); var footerHeight = footer.height(); var windowHeight = $(window).height() - headerHeight - footerHeight; content.css({height:windowHeight + "px"}); navtree.css({height:windowHeight + "px"}); sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); } function initResizable() { header = $("#top"); sidenav = $("#side-nav"); content = $("#doc-content"); navtree = $("#nav-tree"); footer = $("#nav-path"); $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); $(window).resize(function() { resizeHeight(); }); var width = readCookie('width'); if (width) { restoreWidth(width); } else { resizeWidth(); } resizeHeight(); var url = location.href; var i=url.indexOf("#"); if (i>=0) window.location.hash=url.substr(i); var _preventDefault = function(evt) { evt.preventDefault(); }; $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); $(document).bind('touchmove',function(e){ try { var target = e.target; while (target) { if ($(target).css('-webkit-overflow-scrolling')=='touch') return; target = target.parentNode; } e.preventDefault(); } catch(err) { e.preventDefault(); } }); } libpqxx-4.0.1+dfsg/doc/html/Reference/sync_off.png000066400000000000000000000015251224474465600220660ustar00rootroot00000000000000‰PNG  IHDRàw=øIDATxíÝKhTWÀñÿä1I&3™8M¦Iš™†I3Ú©b$cÌ I1V1±-(Tö±±Ð.* t!‚K[¥Ä¥ˆ„¨´f£`l(øl©"Y”¤6ÆgÌTú}·sgîܹ ±d{8?æÌ¹÷;çÜuíÚ`:!±F¬¢BäŠ?ŰÄm'yÊÅ>ÑlU¯½üý‰è_‹?€Œê ]€Y(ŠNñ±8fý1°Öqún-eâ¨øtºmâÈ Ó0}b›ù%·©µ×Œ®=Ÿ0´³?Š1sŸ‹0€¯8À‘;_ ‹W|%\ Zð— >舽ln¨p©.aÇ{ )t;Ú b nŸš¯›65°¢¡2çÅÔ?Žž>Oдàuönm¤¢Ì`×­Z¬WjC~>‘Ö¾0+á {{©fÝ×Mæ·æÅ•ìÙ¼˜` Ý›%uA6´½ÅÆö¨Á,]k¢ÄW¼™u±›]‹ˆ7§¯iòh€ ¶¶¬ÏÖu1 ló —Ҷ̺–:ÞÍ\ÄcãÏxøhR²Êè‡Qt$¿ß§¨ ª fdºü<4BÿÙ[•f¸d7=.Mé9/—éªÃëù/ÿO Üaàò}€,‘j?Ÿõ.5Úšm?œÿŸ®ŽXÿ2¬#¸d píæ(£?cÛú¼!½›a1¥Þ—ŽòØ©ܾ7dÔK:‚ùÒ‰ì)Ê3‚Ü™àÌà]€,±H€µ+køöäu<|`·LhC7¹ÔeÍ Ÿ×Ÿ˜tÜ‹ óH$^2%l.êaeÐäýE”ÌÉ|ÅÜìî‰Ýsä }¸ýDû^hzé~ðR›¦Ã¡¿]|#ü¯@×—Ö‡[k¹–<|š(Ç*€Ý¹dÇtMé:Ýñø«Ø,êÅû¢]”' øXÓ_nò¡Æ|Øý /c§fžâOIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/sync_on.png000066400000000000000000000015151224474465600217270ustar00rootroot00000000000000‰PNG  IHDRàw=øIDATxíÝ_HTYÀñï8ã¤ó§i§4-g6ÆËÕ&kQ)¨Ô!Š0ÒURKÚ…„ê¡/»PEÁ>ìK-+KÁ²Ñ.Y”¾dEPaA‰ø°¥¶›ZSÓïÜ;3wºŠ–¯—߯gfîïœsçœWKÇñ.€ÉøD­¨a‘'¬âq_ôˆk¢ÀŒ ÀDŽøQ´ÄïC¨¶åñÏÿgÅ ñ 0„Y‚:qZ¦Á)~õâ€èLý0HVñ× žz-¿‰C“%¨g¦˜6€é8%Úõ¬ëwêÙUÏ¿˜ª³Ä }? ?€·3ÀÀž©Š À”K• @hà a±ðaÇæUe‹ sù~ë2²ì“&Ú&B*AÄljæºììi*˨,Ëçí»÷oÆ£T”,d[˜¼3-*ÁÀ…>å‡Ë çLÉŸçfk˜Ò éw#*AEjKUy>ûšËÉõ&{µ¢8—m5Ki¬ jjƒD*¿NŽÖigwÃ7Dª’mz骹úKÛ¾±ˆ¶M!æ¤ÍkÐ?šoý¬_åÓlXí#Ò~–¸¬ê×ÒÑXŠÓ‘ùRÙ*Eû‚ՂדðEÜ;6«e"Q(²Ù=–¿Ezæ5Kؼָ_ 1òzBªJë ±XŒì96åªjL^7{ùãJÑ÷1½i@%8'7M©_\Qœ#ÓUŒËñýÿyõ Wo Éx8¼s¥v¯ªì|×SnÜ q_m Ýé î>bèÕí[JX,½4[Tú{R£ë¼ôˆ¾þa€tÝjjzzÅ'ÅìȶiIžŽòwÏs ¡€—ÕKøõâC^ŽŒ˜Y­¨µÉ%6¨´êˆº]vÛðhâ½iWv–hôëê°Ò¨¾'æÌ‚·ñ|[ßìúÅ^€YrD=<ýDû]äÇ÷s€Ïõ‹8™ºCì? À ¨—t4õᩎ¡Jã‡W‹É± îr¼cjMɘìx| šE©øNÔ‰œøA¢þ«–€Z¼ñ‡jó î#™§¢¢4gIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/tab_a.png000066400000000000000000000002161224474465600213220ustar00rootroot00000000000000‰PNG  IHDR$ÇÇ[UIDATxíK €0C'o¤(Šˆ[Žà%Üxÿ#Ù©­ç ùÁöó¦W¦e# 3t I 3+¼øEã~\D½9¯Ûàè’wM·¿öÿ}Yõ_êA4Yžã}IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/tab_b.png000066400000000000000000000002471224474465600213270ustar00rootroot00000000000000‰PNG  IHDR$ÇÇ[nIDATxíÝQ Â0„áàœR¥Xc±I7IÓ¨g|òÕÙœäãgY˜3˜Ï÷‡u{£ÔW—ÊSíŒ1Ü ¼CjˆiC†G¬ýççJ+| ÖÝs7ùŒ+Ù›`t‚3Ü‚a¢K¤Gq°ûQÍZÝT=@*éC݇LIEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/tab_h.png000066400000000000000000000003001224474465600213230ustar00rootroot00000000000000‰PNG  IHDR$ÇÇ[‡IDATxíÝË ‚@EÑ 7êÂX’Ñø AADùjGü€ Z€e؈£ ë8¹›—Wƒx¾ÞìUK.µ%„0mɤ&+4iÑ$džÈt“׿ÍzWf5AZá'w¼øÆ"2¶Wœðòg%öªdæ)æþ™ÉR15F®dìž ÉБßO«×Áô»C"à@¯g=IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/tab_s.png000066400000000000000000000002701224474465600213440ustar00rootroot00000000000000‰PNG  IHDR$ÇÇ[IDATxíÝ ‚@@Ñ£?Q…¤"š¢%¦I‘—Šf–6[´HÃäQƒ<Þâõþ]ždr Í’s?ˆO=Ñññw'ÌF‡Ž íðö-~rÃ[œèŠ­ì¬mƒÖ¬ƒݯнŠÕF)Yº% §`nÌ,9B ™’©!ÑŒ\ý<Å#üîî•IEND®B`‚libpqxx-4.0.1+dfsg/doc/html/Reference/tabs.css000066400000000000000000000022131224474465600212100ustar00rootroot00000000000000.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } libpqxx-4.0.1+dfsg/doc/html/Tutorial/000077500000000000000000000000001224474465600174545ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch01.html000066400000000000000000000215251224474465600211020ustar00rootroot00000000000000 Chapter 1. About libpqxx

Chapter 1. About libpqxx

libpqxxâ„¢ is a C++ API to PostgreSQLâ„¢. It replaces the earlier libpq++â„¢ with a more Standard Template Library (STL)-conformant interface and makes more extensive use of C++ language features such as exceptions, templates, and strings.

Since libpqxxâ„¢ builds on top of the C frontend libpqâ„¢, you will need a working libpqâ„¢ library on your system prior to getting started with libpqxxâ„¢. This is similar to the situation with the older libpq++â„¢ interface.

See the libpqxxâ„¢ website for more information.

Why another C++ SQL library?

Several open-source C++ wrapper libraries are available for various databases, as well as some database-independent ones; there's libpql++â„¢, libpq++â„¢, libsqlxxâ„¢ and so on.

So was libpqxxâ„¢ really necessary?

I think it is. The C++ Standard, and its standard library in particular, have stabilized over the mid-1990s; compilers and standard library implementations are still following suit at the time of writing. As a result, most older third-party libraries suffer from symptoms such as:

  • Not using exceptions. Many libraries return a status code and expect callers to check for errors "if they're interested." Of course they're interested. But checking each and every call is tedious and error prone.

  • Ad-hoc exception classes. Programs using C++ libraries need to deal with various incompatible exception class hierarchies, and error handling becomes a total nightmare with multiple essentially identical catch clauses for every try block.

  • Ad-hoc string classes. As one member of the C++ standards committee put it, if the C++ wasn't going to have a standard string class, "there will be blood in the streets." Luckily the committee saw the wisdom in this, and civilization was spared.

  • "A Better C." Using only the oldest features of C++ as extensions to the C language really only complicates things, but there was a time when this was the only way to write portable C++.

  • Ad-hoc containers and algorithms. Inventing your own container APIs, interesting as it may be, in most cases is wasted development effort. Besides that, there's also the redundant effort of having to learn how they work.

For these reasons, third-party libraries have tended to grow into intrusive frameworks. Third-party code, and class libraries in particular, need to be rewritten to replace such ad-hockery with the rich and standardized functionality now provided by C++. This is what libpqxxâ„¢ intends to do for PostgreSQLâ„¢. The library was designed to be a forward-looking one, which means that ports to vendor X's compiler Y may have to wait until X improves its support of the Standard.

But there were other reasons to design a new SQL frontend from scratch. C++ is a complex language, and the only things stopping library writers from shooting themselves in the feet are years of experience and an extensive idiom of good practices. To name a few typical symptoms of foot-shooting:

  • Poor language integration. Users need to learn myriads of function names when standard C++ operators can be overloaded instead to make code fit in more naturally with the core language.

  • Overdoing overloading. It's also easy to go overboard with operator or function overloading, and many classes do. Some programmers use identical function names to mean very different things, or define operators whose semantics are not clearly derived from their conventional meanings.

  • Resource management. In the complex world of C++, what the user really needs from a library is a little help in ensuring that objects are deleted at the proper time, pointers don't go off into never-never land, and so on. Perhaps the most compelling aspect of C++ is the "resource acquisition is initialization" paradigm, but too few libraries apply it as yet.

  • Convoluted family trees. Class derivation is a beautiful thing, but it can be overused. Some libraries construe far-fetched relations between classes, or needlessly expose "convenience" relations using public inheritance.

  • Overweight classes. Some classes lump together different pieces of functionality with different lifetimes. For instance, some C++ SQL libraries integrate transaction bracketing into a connection class. Yet it is not unreasonable for an application to perform multiple consecutive transactions using the same connection.

  • Exposure of low-level interfaces. Some C++ wrappers for C-level SQL interface libraries (including libpq++â„¢) don't hide the ugly details of the underlying API. Worse, some only provide "utility" classes that the user can mix in freely with C-level function calls.

Again, libpqxxâ„¢ is an attempt to do better. Hopefully this has resulted in a library that is easier to use than most alternatives while giving you more flexibility, that helps you avoid common pitfalls and reduces the need for debugging.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch02.html000066400000000000000000000403211224474465600210760ustar00rootroot00000000000000 Chapter 2. Class overview

Chapter 2. Class overview

To work with libpqxxâ„¢, you need to be aware of at least the following classes. These are all introduced in a dedicated namespace, pqxx:

  • connection represents a connection from your program to a PostgreSQLâ„¢ back-end server. Naturally your program may open multiple connections, simultaneous or not, to any number of databases.

  • work, actually a typedef for the transaction class template, represents a transaction being executed in the context of a connection. This is a unit of work that must be completed as a whole by the database backend. If execution fails, everything done within that transaction is undone by the backend as if it had never happened. [1] You may execute any number of transactions on a single connection, but only one at a time.

    I recommend that you do not set up your own transactions however, but have them managed for you by a transactor instead (see below).

  • A result is a container holding the resulting data coming out of a query or command executed in a transaction. It behaves just like a standard C++ container as found in the STL, although its contents can't be modified in any way. (You can assign or copy it cheaply though; it's basically a smart pointer). The tuples held in the result in turn behave much like non-modifiable containers themselves.

I would also like to use this opportunity to plug the invaluable esc function, which you should use whenever you want to include a variable as a string in your SQL (eg. insert it into a text field in a table). See below.

There are other classes that may be of interest to you; these are either not essential to writing a simple program using libpqxxâ„¢, or are used in such a way that knowledge of them is not immediately necessary. You will probably want to look them up at some point when it becomes necessary to understand complex compiler warnings. Unfortunately C++ compilers are not yet very good at unravelling template-related errors and making them readable, so you may find some long and strange names when they happen.

Some of the classes you may become interested in fairly quickly are:

  • broken_connection is an exception class that is thrown if libpqxxâ„¢ loses its connection to the back-end. It is derived from the standard C++ exception std::runtime_error, and can generally be treated as such.

  • sql_error is an exception class that is thrown if a query to the back-end fails. Like broken_connection it is derived from std::runtime_error, but it also carries information about the failed query. This may be useful for debugging.

  • icursorstream is a way of iterating over a query result using an SQL cursor. This can be useful for selectively retrieving parts of a query, or for retrieving and processing results in chunks so your program can do useful work on one chunk while the next is still coming in over a network connection. Or you may want to use this to give progress reports to the user between chunk transfers.

  • in_doubt_error is an exception class to indicate a rare and difficult error condition. Explaining this is a bit painful, since it invalidates some of what was said above (and is commonly said in the database world).

    In theory, a "transaction" is an integral, atomic unit of work that either fails or succeeds. This is a beautiful idea, but in practice there is nothing that cannot be broken. In practice there is a tiny risk that, like Schroedinger's Cat, the transaction ends up in a third, indeterminate state. This happens when the connection to the backend is lost just when you were waiting for confirmation after completing your transaction. Your transaction may have succeeded (in fact it probably has), but if the connection is lost during just this small time window, it has no way to confirm this to your application.

    When this happens, libpqxx throws an in_doubt_error on the client side, which you may want to catch as a special case. If you do, make sure all alarm bells go off!

    See also the description for robusttransaction, which sacrifices some performance to minimize this risk.

  • nontransaction is just like a regular transaction as far your code is concerned (except that it's not a template). The big difference is that where the latter opens a back-end transaction to keep your view and modifications of the database atomic, the former does nothing to maintain integrity. It just passes your queries directly to the database, with no enclosing transaction. This difference is expressed by the fact that the other transaction classes are derived from dbtransaction, an abstract class that expresses the presence of a real backend transaction, whereas nontransaction is not.

    This may give you better performance if your transaction does not modify the database, but if it does, may have unforeseen implications if you expect certain levels of consistency in the database--especially if other programs (perhaps even other instances of your own) may be modifying the database at the same time. You'll probably only want to use this in the following cases:

    • If you only want to read from the database, not modify it, and you know that the data is not going to be updated while your program is running.

    • If you are interested in always getting the very latest information out of your database, even if that means that you may not get a temporally consistent view of the database.

    • When making changes to the database schema; some operations may not be supported by the backend inside backend transactions.

  • robusttransaction (a template just like transaction) is essentially the same as a transaction, ie. an atomic unit of work, except that it works harder to prevent in_doubt_errors from happening. This comes at the cost of some performance, which is one reason why this behaviour isn't the default. It also creates some extra tables in your database to keep track of what's happening.

    Use this class instead of plain old transaction if you get in_doubt_errors in your application--but only after thoroughly inspecting your code for bugs that might be causing the problem, or you'll only be hiding glitches that should be fixed instead.

  • transaction_base defines the common public interface for the transaction-like classes: nontransaction, robusttransaction, and transaction itself. To look up methods available in these classes, see the definition (or documentation) for transaction_base instead.

    You'll usually want to refer to the default transaction type as work, a typedef that means "transaction with default (read-committed) isolation level."

  • transactor<> provides a framework that makes it easier for you to write correct, robust transaction code to be executed in a transaction. You should generally try to write your code as a class derived from transactor<>, but this is not required.

    A transactor-derived class may select its own "quality of service" in transactional integrity by choosing a transaction type as its template argument, e.g. transactor<robusttransaction<> >. The default transactor<> is equivalent to transactor<work>. Within your class you can refer to the transaction type used as argument_type.

  • notification_receiver is an instance of the Observer design pattern. Any code connected to a backend may flag an event using the PostgreSQLâ„¢ NOTIFY command. Frontends connected to that same backend database may be listening for an event of that name to occur. A frontend using libpqxxâ„¢ does this by registering an observer object derived from notification_receiver, which will be invoked by libpqxxâ„¢ to handle the event when it occurs.

    Something every programmer using notification receivers in PostgreSQL should know, by the way, is that notifications are not delivered to your program while it is inside a back-end transaction. Nor are they sent until the notifying process has committed any transaction it may be in. This makes sense from a correctness point of view (otherwise your processing of the event might get rolled back just because the transaction you're in happens to fail), but may be a little confusing to the unaware programmer.

  • result::tuple is a nested class defined within result. It refers to a tuple of data within a result object.

  • result::field, also nested within result, refers to one field within a tuple. A field contains one retrieved value such as a number or a string, and can be read into variables of various types such as ints or strings.

  • result::const_iterator allows you to enumerate the tuples in a result in a similar way to the iterators defined by any standard C++ container.

  • result::tuple::const_iterator similarly iterates over the fields in a tuple.

Finally, there are also some functions that you may want to know about, that live alone in the pqxx namespace without being part of any class:

  • esc, found in the transaction classes, is the canonical way to use strings in your SQL. This function escapes any quotes, backslashes, and other characters in your input string that would otherwise cause syntax errors (or worse, security holes) in your queries when included directly.

    Use these functions whenever you want to have a variable string in your SQL queries. If you don't, you'll be left with annoying bugs or possibly even security holes in your program. Use this function, use this function, use this function. Please. Make me proud.

  • to_string knows how to render many types of values as strings. This is used internally by libpqxx to convert values coming out of or going into the backend, and doesn't respect locale settings.

  • from_string is the inverse of to_string. It is used by eg. result::field::to() to convert the incoming field data (which is in text format) to the desired C++ type.



[1] Actually libpqxxâ„¢ provides three classes doing this at various levels of reliability, called nontransaction, transaction, and robusttransaction for no, standard, and best reliability respectively. You probably shouldn't mess with robusttransaction though, because it comes with complications.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03.html000066400000000000000000000153201224474465600211000ustar00rootroot00000000000000 Chapter 3. Tutorial

Chapter 3. Tutorial

Before we begin programming

This document

This frontend library is built on top of the libpq frontend library, which defines PostgreSQLâ„¢'s C API. Therefore this manual will sometimes refer to the libpq documentation rather than repeat what is said there. This was not done to annoy you, but to ensure that the libpqxxâ„¢ documentation remains up-to-date with any changes in the C frontend. Please bear with us.

Furthermore, if you're ever in doubt about how to use the basic features of libpqxxâ„¢, take a look at the example programs provided; they're called test000, test001 etc. Those should help give you an idea of how simple the library can be in practice. Don't let that keep you from submitting a request for improved documentation though; your questions define what this tutorial needs to say!

C++ conventions

All definitions made by libpqxxâ„¢ reside in a namespace pqxx. If you're not familiar with C++ namespaces, you have two options:

  • Always import the whole of the pqxx namespace in your programs.

    This tells the compiler to always look in the pqxx namespace when trying to resolve a name that doesn't occur in the global (ie. the "default") namespace). To do this, include the directive

    		using namespace pqxx;
    	      

    near the top of each source file that uses libpqxxâ„¢. This is typically best for your source files (you're probably doing it already for the std namespace), though it is not considered good practice in header files.

  • Explicitly qualify each libpqxxâ„¢ name with the pqxx namespace.

    This will tell the compiler exactly which names are supposed to be in the pqxx namespace, avoiding any confusion over multiple classes or functions used in your program possibly having the same name. As long as they're in different namespaces, the compiler will be able to tell them apart without trouble. To do this, write pqxx::connection instead of connection, pqxx::result::const_iterator instead of result::const_iterator, and so on.

    This is the mode of address you will typically want to use in header files, to avoid polluting the namespaces of the actual source files with the definitions of the extra namespace.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s02.html000066400000000000000000000076221224474465600214330ustar00rootroot00000000000000 Setting up a connection

Setting up a connection

The very first thing to do before we can begin working with a database, is actually connect to one. We do this by creating a connection object that will serve as our "handle" on the connection:

	connection Conn("dbname=test");
      

This gives us a connection object called Conn.

The connection constructor here takes one argument, the "connect string." This string may be used to specify which host on the network runs the database backend we wish to connect to, which database we're interested in, which user name we'll be using to log in, etc. Refer to the libpq connect call for a complete definition of what may go into the connect string. In this case we're connecting to a database test residing on the local machine. By default the client will try to connect to a server running on the local machine.

If no connection could be established, the connection constructor may throw an exception immediately; or it may decide to retry the connection later in case the problem is only temporary. In the latter case, an exception may occur at some later point if the problem turns out not to be so temporary after all.

The connection can now act as a "service counter" for our database; your client will use it to perform one or more transactions related to the database.

Connections cannot be copied or assigned. Any attempt to do so will be met with a compiler error.

Caution

As a matter of design, libpqxxâ„¢ will not allow you to perform queries on the connection directly. You will need to open a transaction instead.

See the section on transactions below.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s03.html000066400000000000000000000117131224474465600214300ustar00rootroot00000000000000 Performing a transaction

Performing a transaction

What's a Transaction?

A transaction demarcates a "unit of work" operating on the database, ie. a series of operations that must either complete successfully, or if it is aborted at any stage, must not affect the data in the database at all. Hence the process of completing a transaction is called the "commit" operation, and the process of aborting it and undoing any changes it may have made is called "rollback."

All access to the database in libpqxxâ„¢ must go through a transaction object, so familiarity with this class family's interface is essential.

Creating a transaction object

Creating a transaction object is not normally something you will have to do. The transactor class, discussed below, will take care of that and some other red tape besides. Still, there are cases where creating the object is unavoidable (when acting on multiple database connections simultaneously) or just plain easier to do. Please consider using a transactor whereever possible.

When creating a transaction, pass it the connection object it is to act on, and optionally an identifying name for your transaction. The name, which need not be unique but should begin with a letter and may contain only letters, digits and underscores, can be used by libpqxxâ„¢ to make some error messages more specific.

	    transaction<> Xaction(Conn, "DemoTransaction");
	  

Or, alternatively (once you get fed up with typing transaction<>):

	    work Xaction(Conn, "DemoTransaction");
	  

The lifetime of the transaction object demarcates the unit of work. Its construction marks the beginning of the transaction, and its destruction means that the transaction is ended--whether through commit or rollback.

The transaction class hierarchy is built on the principle of "explicit commit," ie. the commit operation must always be explicit in the code. If the transaction is destroyed before a commit was given, the transaction is implicitly aborted (rolled back). If your transaction makes no changes to the database, however, there is nothing to commit or roll back and the commit may safely be omitted.

Destroying the connection object while the transaction still exists is an error that may result in a program crash, although the library will try to log an error message. Transactions cannot be copied, nor assigned, nor constructed without a connection (default-constructed); attempts to do any of these will result in compile errors.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s04.html000066400000000000000000000143541224474465600214350ustar00rootroot00000000000000 Ending a transaction

Ending a transaction

A transaction ends either successfully through an explicit commit command, or unsuccessfully in any of a number of ways. The following are the ways to end a transaction:

  • The transaction may be committed through its commit member function:

    	    Xaction.commit();
    	  

    The commit operation is sent to the backend at the point where the commit call occurs. Any exceptions generated by the database transaction will be thrown from here at the latest. The only exceptions that may be generated by Xaction beyond this point are related to incorrect handling of the transaction object, eg. if an attempt is made to abort Xaction after it has been committed, or runtime errors such as memory running out.

    As a consequence, any streams or cursors nested within the transaction (to be discussed later) must have been closed before the commit(). To do otherwise could possibly allow a transaction to be committed before all related actions had completed. The library will throw an exception if any streams are still open when the transaction is ended.

  • A transaction is aborted if it is destroyed without having been explicitly committed:

    • 		{
      		work Xaction(Conn, "DemoTransaction");
      
      		// (Queries)
      
      		} // Xaction destroyed here
      	      
    • 		work *XactionP = new work(Conn, "DemoTransaction");
      
      		// (Queries)
      
      		delete XactionP; // Xaction destroyed here
      	      
    • 		try
      		{
      		work Xaction(Conn, "DemoTransaction");
      
      		// (Queries)
      
      		Xaction.commit();
      		// If we get here, Xaction is committed
      		}
      		catch (...)
      		{
      		// If we get here, Xaction has been rolled back
      		}
      	      

    No matter where exactly the decision to abort is made, the actual abort operation is sent to the backend when the transaction's destructor is called. If the abort fails, eg. because the network connection has been lost, no error is reported [2] and the transaction will die of natural causes (either it has been closed by the backend already, or it soon will be if the connection is lost).

  • If a database error occurs during the transaction, such as an SQL syntax error or lost connection to the backend, the transaction is aborted.

    	    work Xaction(Conn, "DemoTransaction");
    	    try
    	    {
    	    // (Queries)
    	    Xaction.exec("SELECT !?^H^H^H^H");	// Fails: SQL syntax error
    	    }
    	    catch (...)
    	    {
    	    }
    	    Xaction.commit(); // ERROR: Xaction has already aborted!
    	  

    For this reason, it is recommended always to include the "commit" operation inside the try block (if any) surrounding the transaction code, not after the catch block.

    Think of it as a natural extension of structural programming: the transaction is "nested" within the connection, and the transaction code can be "nested" in a try/catch block.

No more queries may be issued to the transaction regardless of how it ended; an exception will be thrown if the application attempts to continue the transaction after that time. Ending a transaction more than once is an error, except that aborting it multiple times is tolerated to facilitate error handling.



[2] Throwing an exception from a destructor to report the error would have serious effects on program correctness. Never throw exceptions from a destructor.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s05.html000066400000000000000000000054601224474465600214340ustar00rootroot00000000000000 Executing queries

Executing queries

So let's execute an actual query. There is no "query class" in libpqxxâ„¢; we really do try to keep your life simple.

A query is executed within a transaction by passing the query string to the transaction object's exec method. If the query fails to complete successfully, this method will throw the appropriate exception.

The query itself is a standard C string in this case, ie. a const char * but you'll frequently want to use a C++ string to make it easy to include variables:

	void DeleteEntry(work &T, string Table, long ID)
	{
	T.exec("DELETE FROM " + Table + " WHERE ID=" + to_string(ID));
	}
      

In some places, even stringstreams will work, so you can use the full stream formatting capabilities, locales etc. in the standard C++ library to compose your SQL queries.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s06.html000066400000000000000000000226221224474465600214340ustar00rootroot00000000000000 Getting query results

Getting query results

Obviously not all queries are commands--the more common kind actually returns useful data. Result data in libpqxxâ„¢ are encapsulated in a result object, which acts as a container similar to the STL's vector template.

	result R = T.exec("SELECT firstname FROM employee WHERE lastname='Ng'");
      

This executes a query on the database, collects all matching data, and stores it in the form of a result.

Two ways are provided to get at individual rows in a result: first, through indexing with the array index operator [] or the at member function, and second, through random-access iterators. Either will give you a result::tuple object that in turn can be addressed with the array index operator (or the at member function) or using iterators to get at its individual fields [3].

Thus, R[0] will return the first ("zeroth") tuple in R. You won't normally want to bother with tuples though; they don't contain the actual data, but rather serve as placeholders to later tell result which fields to fetch when field values from the tuple are requested. The class exists mostly for technical reasons related to the array index operators [4]. What you'll usually do is index the row directly to get at the field you want, e.g. R[0][0] to get the first field of the first row.

Array indexing of tuples also works with the fields' names instead of their numbers, eg.:

	// Process employees' names one by one.  ProcessNames() doesn't know exactly
	// what columns are going to be in R, but there must be one called "lastname".
	void ProcessNames(result R)
	{
	for (result::size_type i = 0; i != R.size(); ++i)
	Process(R[i]["lastname"]);
	}
      

As for the alternative, accessing the result tuples through an iterator, only const iterators are provided so the contents of the result cannot be modified. Use these iterators as random-access iterators like with any STL-like container:

	for (result::const_iterator i = R.begin(); i != R.end(); ++i)
	Process(*i);
      

Iterators may be incremented or decremented (whether pre- or post-), they may be added to or subtracted from to jump through the result tuples; their positions may be compared (provided they point into the same result), and they may be dereferenced through the * or -> operators.

Finally, the iterated tuples' fields may be addressed using the array index operator on the iterator directly, eg. R.begin()[0] gets you the first field of R's first row, just like R[0][0] would [5].

Either way, once you've indexed the result::tuple you get a result::field--which is another placeholder, but this time encapsulates an actual field value in our query result. A field F also knows its column name, which can be obtained as F.Name().

Again, there is more than one way to read the field's value. Let's start out with the easy one, c_str, which reads the value as a C string:

	cout << "Name: " << F.c_str() << endl;
      

This will return the empty string ("") if field F has the null value. Use is_null to see if this is the case:

	if (!F.is_null())
	cout << "Name: " << F.c_str() << endl;
      

In practice of course, not all data is going to consist of strings. Many fields will be integer values, or decimals, or Booleans. To convert the field's value to one of these, use its to method. This adapts itself to the type of variable you pass it, expecting the field value to be of an appropriate form for that type. For convenience, to returns false if the field had the null value, and true otherwise. In the former case, the variable will retain the value it had before the call.

	// Pay an employee his salary.  Add bonus for managers.
	// The employee tuple must contain the fields
	void PaySalary(result::const_iterator empl)
	{
	long id;
	float salary;
	bool is_manager=false;

	// Get id.  Must never be null.
	if (!empl[0].to(id)) throw runtime_error("No id!");

	// Get salary.  If this employee has no salary, skip payment.
	if (!empl[1].to(salary)) return;

	// Get manager status.  If field is null, variable's original value (false)
	// will be preserved.
	empl[2].to(is_manager);

	if (is_manager) salary += Bonus;

	TransferMoney(id, salary);
	}
      

If conversion fails, e.g. when trying to convert a floating-point value to an integer variable, to will throw a runtime_error reporting the problem in its what message.



[3] The difference between [] and at is that the latter is guaranteed to perform bounds-checking, throwing an exception if you pass it an illegal index value. With the array index operator you may get slightly better performance, but attempting to address a nonexistant row or field will result in undefined behaviour such as program crashes or inexplicably strange results.

[4] This is an instance of the Proxy implementation pattern, needed to allow a result to be indexed as if it were a two-dimensional array. C++'s array index operator doesn't allow this usage directly, but the operator can be applied to the result of a previous use of the same operator. The "result in the middle" needs to have a type of its own, though, and that's what tuple is for.

[5] Or (*R.begin())[0]. It may seem quirky to have R.begin() and *R.begin() mean the same thing, but it makes practical use of iterators a lot easier. In fact it matches how arrays and pointers work in C and C++.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/ch03s07.html000066400000000000000000000241711224474465600214360ustar00rootroot00000000000000 Doing Transactions Right: Transactors

Doing Transactions Right: Transactors

Writing database code can be tricky. One of the most complicated areas is dealing with unexpected error conditions, such as losing one's connection to the database server. For long-running processes you'll frequently find yourself rewriting code for a simple transaction to make it:

  • Attempt to perform the transaction.

  • Check for "connection lost" errors.

  • Attempt to restore the connection.

  • Repeat until the transaction succeeds.

This is bad for the heart, and clutters up your code besides. The transactor framework will take this work out of your hands if you let it.

Functors

The mechanism is based on the concept of Functors, a powerful object-oriented design pattern that replaces the older practice of passing callback functions (or hooks, as they're sometimes called, or exits) to foreign code. Unlike classic callback functions, Functors provide an elegant way of maintaining custom state in your callback code, when the exact form or size of that state was not known in advance to the writer of the foreign code that will eventually invoke your callback.

Functors in C++ are simple objects that can be invoked just like functions or function pointers can, by virtue of providing the function invocation operator, operator().

A simple functor could look like this:

	  struct HelloFunctor
	  {
	  void operator()() { cout << "Hello World" << endl; }
	  };
	

...And once an object of this functor type has been created, it can be "invoked" just as if it were a function:

	  HelloFunctor Hi;
	  Hi();
	

But the invoking code may also be foreign code knowing nothing about the type of your functor. The foreign code is usually a template, so it automatically becomes "specialized" to your type of functor when the one meets the other:

	  template<typename FUNCTOR> void DoFunctor(const FUNCTOR &Hi)
	  {
	  Hi();
	  }
	

The great thing about functors is that they can carry state. This is most useful when you need to pass a functor object to foreign code like DoFunctor above, but you need certain extra parameters to be passed to your functor that the foreign code isn't going to pass. The classic C solution to this problem is to let you pass both a function pointer and a pointer-to-void as a method of letting you provide any type of data of your liking to it. This generally makes programs a little harder to read, and is not very safe or convenient.

With functors, there is a better way to do the same thing. Let's say you want to adapt the HelloFunctor class to print its output to a different output stream. What you'd really like to do is add a parameter to your () operator to indicate which stream to print to:

	  void operator()(ostream &Stream)
	  {
	  Stream << "Hello World" << endl;
	  }
	

Unfortunately, DoFunctor doesn't know about this new parameter, let alone what argument to pass! So instead, let's make this Stream a class member:

	  struct HelloFunctor
	  {
	  ostream &Stream;

	  // Set Stream when creating a HelloFunctor
	  explicit HelloFunctor(ostream &S) : Stream(S) { }

	  // Print to output stream selected at construction time
	  void operator()()
	  {
	  Stream << "Hello World" << endl;
	  }
	  };
	

We can now provide the necessary information (ie., which stream to print to) to our HelloFunctor before we pass it to DoFunctor:

	  HelloFunctor Hi1(cout), Hi2(cerr);

	  DoFunctor(Hi1);  // Print to cout
	  DoFunctor(Hi2);  // Print to cerr
	

Naturally a functor's () operator may also return some other type than void, and it may take arguments just like any other function. This mechanism is used extensively by the STL to sort containers, to find items in sorted containers like set or map, and so on.

How Transactors Work

A transactor is a functor derived from an instantiation of libpqxx's transactor class template. Instead of writing your database transaction inline with the rest of your code, you encapsulate it in your functor's () operator. When the time comes to execute your transaction, you create an object of your functor type and pass it to the perform method of your connection to the database.

perform will make a copy of your transactor (which means it needs to be copy-constructible, by the way). It will also create a transaction object and invoke your transactor's () operator, passing the transaction object to it. All your transactor needs to do is perform its queries on this object and return, after which perform will commit the transaction. If your () operator throws an exception instead, perform will discard the copy of your original transactor, and try again with a new copy until it either succeeds or eventually gives up [6]. If the connection is lost, the transaction will fail but perform will restore it transparently and simply try again.

To make all this work, your transactor's () operator must make no changes to the rest of your program's state. Any intermediate results, data to be processed, and so on, must stay within your transactor, and be destroyed when the transactor is. That is the magic trick that allows perform to create copies of your transactor and use them to rerun the transaction as many times as needed, without your program noticing.

So how does your transactor pass query results back to the outside world once it's done? For this purpose, you may redefine transactor's on_commit member function to pass any data back to the rest of your program. This member function will be called only if your transaction succeeded.

(You may also wish to go the other route, storing data to variables outside the transactor right away, and override the on_abort and on_doubt functions to remove the data again if the transaction failed, but this is much more likely to cause subtle bugs.)

Please refer to the reference manual, the source code, and the test programs that come with libpqxx to learn more about how transactors work.



[6] perform gives up if the transaction fails too many times in succession. The maximum number of attempts that are made can be passed to perform as an optional second argument.

libpqxx-4.0.1+dfsg/doc/html/Tutorial/index.html000066400000000000000000000071231224474465600214540ustar00rootroot00000000000000 libpqxx tutorial libpqxx-4.0.1+dfsg/doc/libpqxx.xml000066400000000000000000001445601224474465600171300ustar00rootroot00000000000000 libpqxx tutorial Jeroen T. Vermeulen
jtv@xs4all.nl
2002—2008 Jeroen T. Vermeulen
About libpqxx libpqxx is a C++ API to PostgreSQL. It replaces the earlier libpq++ with a more Standard Template Library (STL)-conformant interface and makes more extensive use of C++ language features such as exceptions, templates, and strings. Since libpqxx builds on top of the C frontend libpq, you will need a working libpq library on your system prior to getting started with libpqxx. This is similar to the situation with the older libpq++ interface. See the libpqxx website for more information.
Why another C++ SQL library? Several open-source C++ wrapper libraries are available for various databases, as well as some database-independent ones; there's libpql++, libpq++, libsqlxx and so on. So was libpqxx really necessary? I think it is. The C++ Standard, and its standard library in particular, have stabilized over the mid-1990s; compilers and standard library implementations are still following suit at the time of writing. As a result, most older third-party libraries suffer from symptoms such as: Not using exceptions. Many libraries return a status code and expect callers to check for errors "if they're interested." Of course they're interested. But checking each and every call is tedious and error prone. Ad-hoc exception classes. Programs using C++ libraries need to deal with various incompatible exception class hierarchies, and error handling becomes a total nightmare with multiple essentially identical catch clauses for every try block. Ad-hoc string classes. As one member of the C++ standards committee put it, if the C++ wasn't going to have a standard string class, "there will be blood in the streets." Luckily the committee saw the wisdom in this, and civilization was spared. "A Better C." Using only the oldest features of C++ as extensions to the C language really only complicates things, but there was a time when this was the only way to write portable C++. Ad-hoc containers and algorithms. Inventing your own container APIs, interesting as it may be, in most cases is wasted development effort. Besides that, there's also the redundant effort of having to learn how they work. For these reasons, third-party libraries have tended to grow into intrusive frameworks. Third-party code, and class libraries in particular, need to be rewritten to replace such ad-hockery with the rich and standardized functionality now provided by C++. This is what libpqxx intends to do for PostgreSQL. The library was designed to be a forward-looking one, which means that ports to vendor X's compiler Y may have to wait until X improves its support of the Standard. But there were other reasons to design a new SQL frontend from scratch. C++ is a complex language, and the only things stopping library writers from shooting themselves in the feet are years of experience and an extensive idiom of good practices. To name a few typical symptoms of foot-shooting: Poor language integration. Users need to learn myriads of function names when standard C++ operators can be overloaded instead to make code fit in more naturally with the core language. Overdoing overloading. It's also easy to go overboard with operator or function overloading, and many classes do. Some programmers use identical function names to mean very different things, or define operators whose semantics are not clearly derived from their conventional meanings. Resource management. In the complex world of C++, what the user really needs from a library is a little help in ensuring that objects are deleted at the proper time, pointers don't go off into never-never land, and so on. Perhaps the most compelling aspect of C++ is the "resource acquisition is initialization" paradigm, but too few libraries apply it as yet. Convoluted family trees. Class derivation is a beautiful thing, but it can be overused. Some libraries construe far-fetched relations between classes, or needlessly expose "convenience" relations using public inheritance. Overweight classes. Some classes lump together different pieces of functionality with different lifetimes. For instance, some C++ SQL libraries integrate transaction bracketing into a connection class. Yet it is not unreasonable for an application to perform multiple consecutive transactions using the same connection. Exposure of low-level interfaces. Some C++ wrappers for C-level SQL interface libraries (including libpq++) don't hide the ugly details of the underlying API. Worse, some only provide "utility" classes that the user can mix in freely with C-level function calls. Again, libpqxx is an attempt to do better. Hopefully this has resulted in a library that is easier to use than most alternatives while giving you more flexibility, that helps you avoid common pitfalls and reduces the need for debugging.
Class overview To work with libpqxx, you need to be aware of at least the following classes. These are all introduced in a dedicated namespace, pqxx: connection represents a connection from your program to a PostgreSQL back-end server. Naturally your program may open multiple connections, simultaneous or not, to any number of databases. work, actually a typedef for the transaction class template, represents a transaction being executed in the context of a connection. This is a unit of work that must be completed as a whole by the database backend. If execution fails, everything done within that transaction is undone by the backend as if it had never happened. Actually libpqxx provides three classes doing this at various levels of reliability, called nontransaction, transaction, and robusttransaction for no, standard, and best reliability respectively. You probably shouldn't mess with robusttransaction though, because it comes with complications. You may execute any number of transactions on a single connection, but only one at a time. I recommend that you do not set up your own transactions however, but have them managed for you by a transactor instead (see below). A result is a container holding the resulting data coming out of a query or command executed in a transaction. It behaves just like a standard C++ container as found in the STL, although its contents can't be modified in any way. (You can assign or copy it cheaply though; it's basically a smart pointer). The tuples held in the result in turn behave much like non-modifiable containers themselves. I would also like to use this opportunity to plug the invaluable esc function, which you should use whenever you want to include a variable as a string in your SQL (eg. insert it into a text field in a table). See below. There are other classes that may be of interest to you; these are either not essential to writing a simple program using libpqxx, or are used in such a way that knowledge of them is not immediately necessary. You will probably want to look them up at some point when it becomes necessary to understand complex compiler warnings. Unfortunately C++ compilers are not yet very good at unravelling template-related errors and making them readable, so you may find some long and strange names when they happen. Some of the classes you may become interested in fairly quickly are: broken_connection is an exception class that is thrown if libpqxx loses its connection to the back-end. It is derived from the standard C++ exception std::runtime_error, and can generally be treated as such. sql_error is an exception class that is thrown if a query to the back-end fails. Like broken_connection it is derived from std::runtime_error, but it also carries information about the failed query. This may be useful for debugging. icursorstream is a way of iterating over a query result using an SQL cursor. This can be useful for selectively retrieving parts of a query, or for retrieving and processing results in chunks so your program can do useful work on one chunk while the next is still coming in over a network connection. Or you may want to use this to give progress reports to the user between chunk transfers. in_doubt_error is an exception class to indicate a rare and difficult error condition. Explaining this is a bit painful, since it invalidates some of what was said above (and is commonly said in the database world). In theory, a "transaction" is an integral, atomic unit of work that either fails or succeeds. This is a beautiful idea, but in practice there is nothing that cannot be broken. In practice there is a tiny risk that, like Schroedinger's Cat, the transaction ends up in a third, indeterminate state. This happens when the connection to the backend is lost just when you were waiting for confirmation after completing your transaction. Your transaction may have succeeded (in fact it probably has), but if the connection is lost during just this small time window, it has no way to confirm this to your application. When this happens, libpqxx throws an in_doubt_error on the client side, which you may want to catch as a special case. If you do, make sure all alarm bells go off! See also the description for robusttransaction, which sacrifices some performance to minimize this risk. nontransaction is just like a regular transaction as far your code is concerned (except that it's not a template). The big difference is that where the latter opens a back-end transaction to keep your view and modifications of the database atomic, the former does nothing to maintain integrity. It just passes your queries directly to the database, with no enclosing transaction. This difference is expressed by the fact that the other transaction classes are derived from dbtransaction, an abstract class that expresses the presence of a real backend transaction, whereas nontransaction is not. This may give you better performance if your transaction does not modify the database, but if it does, may have unforeseen implications if you expect certain levels of consistency in the database--especially if other programs (perhaps even other instances of your own) may be modifying the database at the same time. You'll probably only want to use this in the following cases: If you only want to read from the database, not modify it, and you know that the data is not going to be updated while your program is running. If you are interested in always getting the very latest information out of your database, even if that means that you may not get a temporally consistent view of the database. When making changes to the database schema; some operations may not be supported by the backend inside backend transactions. robusttransaction (a template just like transaction) is essentially the same as a transaction, ie. an atomic unit of work, except that it works harder to prevent in_doubt_errors from happening. This comes at the cost of some performance, which is one reason why this behaviour isn't the default. It also creates some extra tables in your database to keep track of what's happening. Use this class instead of plain old transaction if you get in_doubt_errors in your application--but only after thoroughly inspecting your code for bugs that might be causing the problem, or you'll only be hiding glitches that should be fixed instead. transaction_base defines the common public interface for the transaction-like classes: nontransaction, robusttransaction, and transaction itself. To look up methods available in these classes, see the definition (or documentation) for transaction_base instead. You'll usually want to refer to the default transaction type as work, a typedef that means "transaction with default (read-committed) isolation level." transactor<> provides a framework that makes it easier for you to write correct, robust transaction code to be executed in a transaction. You should generally try to write your code as a class derived from transactor<>, but this is not required. A transactor-derived class may select its own "quality of service" in transactional integrity by choosing a transaction type as its template argument, e.g. transactor<robusttransaction<> >. The default transactor<> is equivalent to transactor<work>. Within your class you can refer to the transaction type used as argument_type. notification_receiver is an instance of the Observer design pattern. Any code connected to a backend may flag an event using the PostgreSQL NOTIFY command. Frontends connected to that same backend database may be listening for an event of that name to occur. A frontend using libpqxx does this by registering an observer object derived from notification_receiver, which will be invoked by libpqxx to handle the event when it occurs. Something every programmer using notification receivers in PostgreSQL should know, by the way, is that notifications are not delivered to your program while it is inside a back-end transaction. Nor are they sent until the notifying process has committed any transaction it may be in. This makes sense from a correctness point of view (otherwise your processing of the event might get rolled back just because the transaction you're in happens to fail), but may be a little confusing to the unaware programmer. result::tuple is a nested class defined within result. It refers to a tuple of data within a result object. result::field, also nested within result, refers to one field within a tuple. A field contains one retrieved value such as a number or a string, and can be read into variables of various types such as ints or strings. result::const_iterator allows you to enumerate the tuples in a result in a similar way to the iterators defined by any standard C++ container. result::tuple::const_iterator similarly iterates over the fields in a tuple. Finally, there are also some functions that you may want to know about, that live alone in the pqxx namespace without being part of any class: esc, found in the transaction classes, is the canonical way to use strings in your SQL. This function escapes any quotes, backslashes, and other characters in your input string that would otherwise cause syntax errors (or worse, security holes) in your queries when included directly. Use these functions whenever you want to have a variable string in your SQL queries. If you don't, you'll be left with annoying bugs or possibly even security holes in your program. Use this function, use this function, use this function. Please. Make me proud. to_string knows how to render many types of values as strings. This is used internally by libpqxx to convert values coming out of or going into the backend, and doesn't respect locale settings. from_string is the inverse of to_string. It is used by eg. result::field::to() to convert the incoming field data (which is in text format) to the desired C++ type. Tutorial
Before we begin programming
This document This frontend library is built on top of the libpq frontend library, which defines PostgreSQL's C API. Therefore this manual will sometimes refer to the libpq documentation rather than repeat what is said there. This was not done to annoy you, but to ensure that the libpqxx documentation remains up-to-date with any changes in the C frontend. Please bear with us. Furthermore, if you're ever in doubt about how to use the basic features of libpqxx, take a look at the example programs provided; they're called test000, test001 etc. Those should help give you an idea of how simple the library can be in practice. Don't let that keep you from submitting a request for improved documentation though; your questions define what this tutorial needs to say!
C++ conventions All definitions made by libpqxx reside in a namespace pqxx. If you're not familiar with C++ namespaces, you have two options: Always import the whole of the pqxx namespace in your programs. This tells the compiler to always look in the pqxx namespace when trying to resolve a name that doesn't occur in the global (ie. the "default") namespace). To do this, include the directive using namespace pqxx; near the top of each source file that uses libpqxx. This is typically best for your source files (you're probably doing it already for the std namespace), though it is not considered good practice in header files. Explicitly qualify each libpqxx name with the pqxx namespace. This will tell the compiler exactly which names are supposed to be in the pqxx namespace, avoiding any confusion over multiple classes or functions used in your program possibly having the same name. As long as they're in different namespaces, the compiler will be able to tell them apart without trouble. To do this, write pqxx::connection instead of connection, pqxx::result::const_iterator instead of result::const_iterator, and so on. This is the mode of address you will typically want to use in header files, to avoid polluting the namespaces of the actual source files with the definitions of the extra namespace.
Setting up a connection The very first thing to do before we can begin working with a database, is actually connect to one. We do this by creating a connection object that will serve as our "handle" on the connection: connection Conn("dbname=test"); This gives us a connection object called Conn. The connection constructor here takes one argument, the "connect string." This string may be used to specify which host on the network runs the database backend we wish to connect to, which database we're interested in, which user name we'll be using to log in, etc. Refer to the libpq connect call for a complete definition of what may go into the connect string. In this case we're connecting to a database test residing on the local machine. By default the client will try to connect to a server running on the local machine. If no connection could be established, the connection constructor may throw an exception immediately; or it may decide to retry the connection later in case the problem is only temporary. In the latter case, an exception may occur at some later point if the problem turns out not to be so temporary after all. The connection can now act as a "service counter" for our database; your client will use it to perform one or more transactions related to the database. Connections cannot be copied or assigned. Any attempt to do so will be met with a compiler error. As a matter of design, libpqxx will not allow you to perform queries on the connection directly. You will need to open a transaction instead. See the section on transactions below.
Performing a transaction
What's a Transaction? A transaction demarcates a "unit of work" operating on the database, ie. a series of operations that must either complete successfully, or if it is aborted at any stage, must not affect the data in the database at all. Hence the process of completing a transaction is called the "commit" operation, and the process of aborting it and undoing any changes it may have made is called "rollback." All access to the database in libpqxx must go through a transaction object, so familiarity with this class family's interface is essential.
Creating a transaction object Creating a transaction object is not normally something you will have to do. The transactor class, discussed below, will take care of that and some other red tape besides. Still, there are cases where creating the object is unavoidable (when acting on multiple database connections simultaneously) or just plain easier to do. Please consider using a transactor whereever possible. When creating a transaction, pass it the connection object it is to act on, and optionally an identifying name for your transaction. The name, which need not be unique but should begin with a letter and may contain only letters, digits and underscores, can be used by libpqxx to make some error messages more specific. transaction<> Xaction(Conn, "DemoTransaction"); Or, alternatively (once you get fed up with typing transaction<>): work Xaction(Conn, "DemoTransaction"); The lifetime of the transaction object demarcates the unit of work. Its construction marks the beginning of the transaction, and its destruction means that the transaction is ended--whether through commit or rollback. The transaction class hierarchy is built on the principle of "explicit commit," ie. the commit operation must always be explicit in the code. If the transaction is destroyed before a commit was given, the transaction is implicitly aborted (rolled back). If your transaction makes no changes to the database, however, there is nothing to commit or roll back and the commit may safely be omitted. Destroying the connection object while the transaction still exists is an error that may result in a program crash, although the library will try to log an error message. Transactions cannot be copied, nor assigned, nor constructed without a connection (default-constructed); attempts to do any of these will result in compile errors.
Ending a transaction A transaction ends either successfully through an explicit commit command, or unsuccessfully in any of a number of ways. The following are the ways to end a transaction: The transaction may be committed through its commit member function: Xaction.commit(); The commit operation is sent to the backend at the point where the commit call occurs. Any exceptions generated by the database transaction will be thrown from here at the latest. The only exceptions that may be generated by Xaction beyond this point are related to incorrect handling of the transaction object, eg. if an attempt is made to abort Xaction after it has been committed, or runtime errors such as memory running out. As a consequence, any streams or cursors nested within the transaction (to be discussed later) must have been closed before the commit(). To do otherwise could possibly allow a transaction to be committed before all related actions had completed. The library will throw an exception if any streams are still open when the transaction is ended. A transaction is aborted if it is destroyed without having been explicitly committed: { work Xaction(Conn, "DemoTransaction"); // (Queries) } // Xaction destroyed here work *XactionP = new work(Conn, "DemoTransaction"); // (Queries) delete XactionP; // Xaction destroyed here try { work Xaction(Conn, "DemoTransaction"); // (Queries) Xaction.commit(); // If we get here, Xaction is committed } catch (...) { // If we get here, Xaction has been rolled back } No matter where exactly the decision to abort is made, the actual abort operation is sent to the backend when the transaction's destructor is called. If the abort fails, eg. because the network connection has been lost, no error is reported Throwing an exception from a destructor to report the error would have serious effects on program correctness. Never throw exceptions from a destructor. and the transaction will die of natural causes (either it has been closed by the backend already, or it soon will be if the connection is lost). If a database error occurs during the transaction, such as an SQL syntax error or lost connection to the backend, the transaction is aborted. work Xaction(Conn, "DemoTransaction"); try { // (Queries) Xaction.exec("SELECT !?^H^H^H^H"); // Fails: SQL syntax error } catch (...) { } Xaction.commit(); // ERROR: Xaction has already aborted! For this reason, it is recommended always to include the "commit" operation inside the try block (if any) surrounding the transaction code, not after the catch block. Think of it as a natural extension of structural programming: the transaction is "nested" within the connection, and the transaction code can be "nested" in a try/catch block. No more queries may be issued to the transaction regardless of how it ended; an exception will be thrown if the application attempts to continue the transaction after that time. Ending a transaction more than once is an error, except that aborting it multiple times is tolerated to facilitate error handling.
Executing queries So let's execute an actual query. There is no "query class" in libpqxx; we really do try to keep your life simple. A query is executed within a transaction by passing the query string to the transaction object's exec method. If the query fails to complete successfully, this method will throw the appropriate exception. The query itself is a standard C string in this case, ie. a const char * but you'll frequently want to use a C++ string to make it easy to include variables: void DeleteEntry(work &T, string Table, long ID) { T.exec("DELETE FROM " + Table + " WHERE ID=" + to_string(ID)); } In some places, even stringstreams will work, so you can use the full stream formatting capabilities, locales etc. in the standard C++ library to compose your SQL queries.
Getting query results Obviously not all queries are commands--the more common kind actually returns useful data. Result data in libpqxx are encapsulated in a result object, which acts as a container similar to the STL's vector template. result R = T.exec("SELECT firstname FROM employee WHERE lastname='Ng'"); This executes a query on the database, collects all matching data, and stores it in the form of a result. Two ways are provided to get at individual rows in a result: first, through indexing with the array index operator [] or the at member function, and second, through random-access iterators. Either will give you a result::tuple object that in turn can be addressed with the array index operator (or the at member function) or using iterators to get at its individual fields The difference between [] and at is that the latter is guaranteed to perform bounds-checking, throwing an exception if you pass it an illegal index value. With the array index operator you may get slightly better performance, but attempting to address a nonexistant row or field will result in undefined behaviour such as program crashes or inexplicably strange results. . Thus, R[0] will return the first ("zeroth") tuple in R. You won't normally want to bother with tuples though; they don't contain the actual data, but rather serve as placeholders to later tell result which fields to fetch when field values from the tuple are requested. The class exists mostly for technical reasons related to the array index operators This is an instance of the Proxy implementation pattern, needed to allow a result to be indexed as if it were a two-dimensional array. C++'s array index operator doesn't allow this usage directly, but the operator can be applied to the result of a previous use of the same operator. The "result in the middle" needs to have a type of its own, though, and that's what tuple is for. . What you'll usually do is index the row directly to get at the field you want, e.g. R[0][0] to get the first field of the first row. Array indexing of tuples also works with the fields' names instead of their numbers, eg.: // Process employees' names one by one. ProcessNames() doesn't know exactly // what columns are going to be in R, but there must be one called "lastname". void ProcessNames(result R) { for (result::size_type i = 0; i != R.size(); ++i) Process(R[i]["lastname"]); } As for the alternative, accessing the result tuples through an iterator, only const iterators are provided so the contents of the result cannot be modified. Use these iterators as random-access iterators like with any STL-like container: for (result::const_iterator i = R.begin(); i != R.end(); ++i) Process(*i); Iterators may be incremented or decremented (whether pre- or post-), they may be added to or subtracted from to jump through the result tuples; their positions may be compared (provided they point into the same result), and they may be dereferenced through the * or -> operators. Finally, the iterated tuples' fields may be addressed using the array index operator on the iterator directly, eg. R.begin()[0] gets you the first field of R's first row, just like R[0][0] would Or (*R.begin())[0]. It may seem quirky to have R.begin() and *R.begin() mean the same thing, but it makes practical use of iterators a lot easier. In fact it matches how arrays and pointers work in C and C++. . Either way, once you've indexed the result::tuple you get a result::field--which is another placeholder, but this time encapsulates an actual field value in our query result. A field F also knows its column name, which can be obtained as F.Name(). Again, there is more than one way to read the field's value. Let's start out with the easy one, c_str, which reads the value as a C string: cout << "Name: " << F.c_str() << endl; This will return the empty string ("") if field F has the null value. Use is_null to see if this is the case: if (!F.is_null()) cout << "Name: " << F.c_str() << endl; In practice of course, not all data is going to consist of strings. Many fields will be integer values, or decimals, or Booleans. To convert the field's value to one of these, use its to method. This adapts itself to the type of variable you pass it, expecting the field value to be of an appropriate form for that type. For convenience, to returns false if the field had the null value, and true otherwise. In the former case, the variable will retain the value it had before the call. // Pay an employee his salary. Add bonus for managers. // The employee tuple must contain the fields void PaySalary(result::const_iterator empl) { long id; float salary; bool is_manager=false; // Get id. Must never be null. if (!empl[0].to(id)) throw runtime_error("No id!"); // Get salary. If this employee has no salary, skip payment. if (!empl[1].to(salary)) return; // Get manager status. If field is null, variable's original value (false) // will be preserved. empl[2].to(is_manager); if (is_manager) salary += Bonus; TransferMoney(id, salary); } If conversion fails, e.g. when trying to convert a floating-point value to an integer variable, to will throw a runtime_error reporting the problem in its what message.
Doing Transactions Right: Transactors Writing database code can be tricky. One of the most complicated areas is dealing with unexpected error conditions, such as losing one's connection to the database server. For long-running processes you'll frequently find yourself rewriting code for a simple transaction to make it: Attempt to perform the transaction. Check for "connection lost" errors. Attempt to restore the connection. Repeat until the transaction succeeds. This is bad for the heart, and clutters up your code besides. The transactor framework will take this work out of your hands if you let it.
Functors The mechanism is based on the concept of Functors, a powerful object-oriented design pattern that replaces the older practice of passing callback functions (or hooks, as they're sometimes called, or exits) to foreign code. Unlike classic callback functions, Functors provide an elegant way of maintaining custom state in your callback code, when the exact form or size of that state was not known in advance to the writer of the foreign code that will eventually invoke your callback. Functors in C++ are simple objects that can be invoked just like functions or function pointers can, by virtue of providing the function invocation operator, operator(). A simple functor could look like this: struct HelloFunctor { void operator()() { cout << "Hello World" << endl; } }; ...And once an object of this functor type has been created, it can be "invoked" just as if it were a function: HelloFunctor Hi; Hi(); But the invoking code may also be foreign code knowing nothing about the type of your functor. The foreign code is usually a template, so it automatically becomes "specialized" to your type of functor when the one meets the other: template<typename FUNCTOR> void DoFunctor(const FUNCTOR &Hi) { Hi(); } The great thing about functors is that they can carry state. This is most useful when you need to pass a functor object to foreign code like DoFunctor above, but you need certain extra parameters to be passed to your functor that the foreign code isn't going to pass. The classic C solution to this problem is to let you pass both a function pointer and a pointer-to-void as a method of letting you provide any type of data of your liking to it. This generally makes programs a little harder to read, and is not very safe or convenient. With functors, there is a better way to do the same thing. Let's say you want to adapt the HelloFunctor class to print its output to a different output stream. What you'd really like to do is add a parameter to your () operator to indicate which stream to print to: void operator()(ostream &Stream) { Stream << "Hello World" << endl; } Unfortunately, DoFunctor doesn't know about this new parameter, let alone what argument to pass! So instead, let's make this Stream a class member: struct HelloFunctor { ostream &Stream; // Set Stream when creating a HelloFunctor explicit HelloFunctor(ostream &S) : Stream(S) { } // Print to output stream selected at construction time void operator()() { Stream << "Hello World" << endl; } }; We can now provide the necessary information (ie., which stream to print to) to our HelloFunctor before we pass it to DoFunctor: HelloFunctor Hi1(cout), Hi2(cerr); DoFunctor(Hi1); // Print to cout DoFunctor(Hi2); // Print to cerr Naturally a functor's () operator may also return some other type than void, and it may take arguments just like any other function. This mechanism is used extensively by the STL to sort containers, to find items in sorted containers like set or map, and so on.
How Transactors Work A transactor is a functor derived from an instantiation of libpqxx's transactor class template. Instead of writing your database transaction inline with the rest of your code, you encapsulate it in your functor's () operator. When the time comes to execute your transaction, you create an object of your functor type and pass it to the perform method of your connection to the database. perform will make a copy of your transactor (which means it needs to be copy-constructible, by the way). It will also create a transaction object and invoke your transactor's () operator, passing the transaction object to it. All your transactor needs to do is perform its queries on this object and return, after which perform will commit the transaction. If your () operator throws an exception instead, perform will discard the copy of your original transactor, and try again with a new copy until it either succeeds or eventually gives up perform gives up if the transaction fails too many times in succession. The maximum number of attempts that are made can be passed to perform as an optional second argument. . If the connection is lost, the transaction will fail but perform will restore it transparently and simply try again. To make all this work, your transactor's () operator must make no changes to the rest of your program's state. Any intermediate results, data to be processed, and so on, must stay within your transactor, and be destroyed when the transactor is. That is the magic trick that allows perform to create copies of your transactor and use them to rerun the transaction as many times as needed, without your program noticing. So how does your transactor pass query results back to the outside world once it's done? For this purpose, you may redefine transactor's on_commit member function to pass any data back to the rest of your program. This member function will be called only if your transaction succeeded. (You may also wish to go the other route, storing data to variables outside the transactor right away, and override the on_abort and on_doubt functions to remove the data again if the transaction failed, but this is much more likely to cause subtle bugs.) Please refer to the reference manual, the source code, and the test programs that come with libpqxx to learn more about how transactors work.
libpqxx-4.0.1+dfsg/doc/reference-stamp000066400000000000000000000000001224474465600176760ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/doc/tutorial-stamp000066400000000000000000000000001224474465600176030ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/include/000077500000000000000000000000001224474465600155635ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/include/Makefile.am000066400000000000000000000052541224474465600176250ustar00rootroot00000000000000SUBDIRS = pqxx nobase_include_HEADERS= pqxx/pqxx \ pqxx/basic_connection pqxx/basic_connection.hxx \ pqxx/binarystring pqxx/binarystring.hxx \ pqxx/compiler-public.hxx \ pqxx/compiler-internal-pre.hxx pqxx/compiler-internal-post.hxx \ pqxx/connection pqxx/connection.hxx \ pqxx/connection_base pqxx/connection_base.hxx \ pqxx/connectionpolicy pqxx/connectionpolicy.hxx \ pqxx/cursor pqxx/cursor.hxx \ pqxx/dbtransaction pqxx/dbtransaction.hxx \ pqxx/errorhandler pqxx/errorhandler.hxx \ pqxx/except pqxx/except.hxx \ pqxx/field pqxx/field.hxx \ pqxx/isolation pqxx/isolation.hxx \ pqxx/largeobject pqxx/largeobject.hxx \ pqxx/nontransaction pqxx/nontransaction.hxx \ pqxx/notification pqxx/notification.hxx \ pqxx/notify-listen pqxx/notify-listen.hxx \ pqxx/performance.hxx \ pqxx/pipeline pqxx/pipeline.hxx \ pqxx/prepared_statement pqxx/prepared_statement.hxx \ pqxx/result pqxx/result.hxx \ pqxx/robusttransaction pqxx/robusttransaction.hxx \ pqxx/strconv pqxx/strconv.hxx \ pqxx/subtransaction pqxx/subtransaction.hxx \ pqxx/tablereader pqxx/tablereader.hxx \ pqxx/tablestream pqxx/tablestream.hxx \ pqxx/tablewriter pqxx/tablewriter.hxx \ pqxx/transaction pqxx/transaction.hxx \ pqxx/transaction_base pqxx/transaction_base.hxx \ pqxx/transactor pqxx/transactor.hxx \ pqxx/trigger pqxx/trigger.hxx \ pqxx/tuple pqxx/tuple.hxx \ pqxx/util pqxx/util.hxx \ pqxx/version pqxx/version.hxx \ pqxx/internal/callgate.hxx \ pqxx/internal/libpq-forward.hxx \ pqxx/internal/statement_parameters.hxx \ pqxx/internal/result_data.hxx \ pqxx/internal/gates/connection-dbtransaction.hxx \ pqxx/internal/gates/connection-errorhandler.hxx \ pqxx/internal/gates/connection-largeobject.hxx \ pqxx/internal/gates/connection-notification_receiver.hxx \ pqxx/internal/gates/connection-parameterized_invocation.hxx \ pqxx/internal/gates/connection-pipeline.hxx \ pqxx/internal/gates/connection-prepare-invocation.hxx \ pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx \ pqxx/internal/gates/connection-sql_cursor.hxx \ pqxx/internal/gates/connection-transaction.hxx \ pqxx/internal/gates/errorhandler-connection.hxx \ pqxx/internal/gates/icursorstream-icursor_iterator.hxx \ pqxx/internal/gates/icursor_iterator-icursorstream.hxx \ pqxx/internal/gates/result-connection.hxx \ pqxx/internal/gates/result-creation.hxx \ pqxx/internal/gates/result-sql_cursor.hxx \ pqxx/internal/gates/transaction-subtransaction.hxx \ pqxx/internal/gates/transaction-tablereader.hxx \ pqxx/internal/gates/transaction-tablewriter.hxx \ pqxx/internal/gates/transaction-transactionfocus.hxx nobase_nodist_include_HEADERS = \ pqxx/config-public-compiler.h EXTRA_DIST = pqxx/version.hxx.template libpqxx-4.0.1+dfsg/include/Makefile.in000066400000000000000000000603341224474465600176360ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) $(nobase_nodist_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ SUBDIRS = pqxx nobase_include_HEADERS = pqxx/pqxx \ pqxx/basic_connection pqxx/basic_connection.hxx \ pqxx/binarystring pqxx/binarystring.hxx \ pqxx/compiler-public.hxx \ pqxx/compiler-internal-pre.hxx pqxx/compiler-internal-post.hxx \ pqxx/connection pqxx/connection.hxx \ pqxx/connection_base pqxx/connection_base.hxx \ pqxx/connectionpolicy pqxx/connectionpolicy.hxx \ pqxx/cursor pqxx/cursor.hxx \ pqxx/dbtransaction pqxx/dbtransaction.hxx \ pqxx/errorhandler pqxx/errorhandler.hxx \ pqxx/except pqxx/except.hxx \ pqxx/field pqxx/field.hxx \ pqxx/isolation pqxx/isolation.hxx \ pqxx/largeobject pqxx/largeobject.hxx \ pqxx/nontransaction pqxx/nontransaction.hxx \ pqxx/notification pqxx/notification.hxx \ pqxx/notify-listen pqxx/notify-listen.hxx \ pqxx/performance.hxx \ pqxx/pipeline pqxx/pipeline.hxx \ pqxx/prepared_statement pqxx/prepared_statement.hxx \ pqxx/result pqxx/result.hxx \ pqxx/robusttransaction pqxx/robusttransaction.hxx \ pqxx/strconv pqxx/strconv.hxx \ pqxx/subtransaction pqxx/subtransaction.hxx \ pqxx/tablereader pqxx/tablereader.hxx \ pqxx/tablestream pqxx/tablestream.hxx \ pqxx/tablewriter pqxx/tablewriter.hxx \ pqxx/transaction pqxx/transaction.hxx \ pqxx/transaction_base pqxx/transaction_base.hxx \ pqxx/transactor pqxx/transactor.hxx \ pqxx/trigger pqxx/trigger.hxx \ pqxx/tuple pqxx/tuple.hxx \ pqxx/util pqxx/util.hxx \ pqxx/version pqxx/version.hxx \ pqxx/internal/callgate.hxx \ pqxx/internal/libpq-forward.hxx \ pqxx/internal/statement_parameters.hxx \ pqxx/internal/result_data.hxx \ pqxx/internal/gates/connection-dbtransaction.hxx \ pqxx/internal/gates/connection-errorhandler.hxx \ pqxx/internal/gates/connection-largeobject.hxx \ pqxx/internal/gates/connection-notification_receiver.hxx \ pqxx/internal/gates/connection-parameterized_invocation.hxx \ pqxx/internal/gates/connection-pipeline.hxx \ pqxx/internal/gates/connection-prepare-invocation.hxx \ pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx \ pqxx/internal/gates/connection-sql_cursor.hxx \ pqxx/internal/gates/connection-transaction.hxx \ pqxx/internal/gates/errorhandler-connection.hxx \ pqxx/internal/gates/icursorstream-icursor_iterator.hxx \ pqxx/internal/gates/icursor_iterator-icursorstream.hxx \ pqxx/internal/gates/result-connection.hxx \ pqxx/internal/gates/result-creation.hxx \ pqxx/internal/gates/result-sql_cursor.hxx \ pqxx/internal/gates/transaction-subtransaction.hxx \ pqxx/internal/gates/transaction-tablereader.hxx \ pqxx/internal/gates/transaction-tablewriter.hxx \ pqxx/internal/gates/transaction-transactionfocus.hxx nobase_nodist_include_HEADERS = \ pqxx/config-public-compiler.h EXTRA_DIST = pqxx/version.hxx.template all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-nobase_nodist_includeHEADERS: $(nobase_nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/include/pqxx/000077500000000000000000000000001224474465600165635ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/include/pqxx/Makefile.am000066400000000000000000000005321224474465600206170ustar00rootroot00000000000000MAINTAINERCLEANFILES=Makefile.in stamp-h.in noinst_HEADERS = \ compiler-internal.hxx \ config-internal-autotools.h nodist_noinst_HEADERS = \ config.h \ config-internal-compiler.h \ config-internal-libpq.h DISTCLEANFILES = \ config-internal-autotools.h \ config-internal-compiler.h \ config-internal-libpq.h \ config-public-compiler.h libpqxx-4.0.1+dfsg/include/pqxx/Makefile.in000066400000000000000000000330311224474465600206300ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include/pqxx DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(nodist_noinst_HEADERS) $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ MAINTAINERCLEANFILES = Makefile.in stamp-h.in noinst_HEADERS = \ compiler-internal.hxx \ config-internal-autotools.h nodist_noinst_HEADERS = \ config.h \ config-internal-compiler.h \ config-internal-libpq.h DISTCLEANFILES = \ config-internal-autotools.h \ config-internal-compiler.h \ config-internal-libpq.h \ config-public-compiler.h all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/pqxx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/pqxx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/pqxx/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) config.h installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/include/pqxx/basic_connection000066400000000000000000000012541224474465600220100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/basic_connection * * DESCRIPTION * connection class template. * Combines the components of a connection into something usable * * Copyright (c) 2005-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/basic_connection.hxx" libpqxx-4.0.1+dfsg/include/pqxx/basic_connection.hxx000066400000000000000000000056201224474465600226170ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/basic_connection.hxx * * DESCRIPTION * definition of the pqxx::basic_connection class template * Instantiations of basic_connection bring connections and policies together * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/basic_connection instead. * * Copyright (c) 2006-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_BASIC_CONNECTION #define PQXX_H_BASIC_CONNECTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include #include "pqxx/connection_base" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif namespace pqxx { // TODO: Also mix in thread synchronization policy here! /// The ultimate template that defines a connection type /** Combines connection_base (the highly complex class implementing essentially * all connection-related functionality) with a connection policy (a simpler * helper class determining the rules that govern the process of setting up the * underlying connection to the backend). * * The pattern used to combine these classes is the same as for * basic_transaction. Through use of the template mechanism, the policy object * is embedded in the basic_connection object so that it does not need to be * allocated separately. At the same time this construct avoids the need for * any virtual functions in this class, which reduces risks of bugs in * construction and destruction; as well as any need to templatize the larger * body of code in the connection_base class which might otherwise lead to * unacceptable code duplication. */ template class basic_connection : public connection_base { public: basic_connection() : connection_base(m_policy), m_options(PGSTD::string()), m_policy(m_options) { init(); } explicit basic_connection(const PGSTD::string &opt) : connection_base(m_policy), m_options(opt), m_policy(m_options) {init();} explicit basic_connection(const char opt[]) : connection_base(m_policy), m_options(opt?opt:PGSTD::string()), m_policy(m_options) { init(); } ~basic_connection() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(*this); #endif close(); } const PGSTD::string &options() const throw () //[t1] {return m_policy.options();} private: /// Connect string. @warn Must be initialized before the connector! PGSTD::string m_options; /// Connection policy. @warn Must be initialized after the connect string! CONNECTPOLICY m_policy; }; } // namespace #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/binarystring000066400000000000000000000011511224474465600212170ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/binarystring * * DESCRIPTION * bytea (binary string) conversions * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/binarystring.hxx" libpqxx-4.0.1+dfsg/include/pqxx/binarystring.hxx000066400000000000000000000150311224474465600220270ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/binarystring.hxx * * DESCRIPTION * Representation for raw, binary data. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/binarystring instead. * * Copyright (c) 2003-2013, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_BINARYSTRING #define PQXX_H_BINARYSTRING #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include "pqxx/result" namespace pqxx { /// Binary data corresponding to PostgreSQL's "BYTEA" binary-string type. /** @addtogroup escaping String escaping * * This class represents a binary string as stored in a field of type bytea. * The raw value returned by a bytea field contains escape sequences for certain * characters, which are filtered out by binarystring. * * Internally a binarystring is zero-terminated, but it may also contain zero * bytes, just like any other byte value. So don't assume that it can be * treated as a C-style string unless you've made sure of this yourself. * * The binarystring retains its value even if the result it was obtained from is * destroyed, but it cannot be copied or assigned. * * \relatesalso transaction_base::esc_raw * * To convert the other way, i.e. from a raw series of bytes to a string * suitable for inclusion as bytea values in your SQL, use the transaction's * esc_raw() functions. * * @warning This class is implemented as a reference-counting smart pointer. * Copying, swapping, and destroying binarystring objects that refer to the same * underlying data block is not thread-safe. If you wish to pass * binarystrings around between threads, make sure that each of these operations * is protected against concurrency with similar operations on the same object, * or other objects pointing to the same data block. */ class PQXX_LIBEXPORT binarystring : internal::PQAlloc< unsigned char, pqxx::internal::freemallocmem_templated > { public: typedef content_type char_type; typedef PGSTD::char_traits::char_type value_type; typedef size_t size_type; typedef long difference_type; typedef const value_type &const_reference; typedef const value_type *const_pointer; typedef const_pointer const_iterator; #ifdef PQXX_HAVE_REVERSE_ITERATOR typedef PGSTD::reverse_iterator const_reverse_iterator; #endif private: typedef internal::PQAlloc< value_type, pqxx::internal::freemallocmem_templated > super; public: /// Read and unescape bytea field /** The field will be zero-terminated, even if the original bytea field isn't. * @param F the field to read; must be a bytea field */ explicit binarystring(const field &); //[t62] /// Copy binary data from std::string. explicit binarystring(const PGSTD::string &); /// Copy binary data of given length straight out of memory. binarystring(const void *, size_t); /// Size of converted string in bytes size_type size() const throw () { return m_size; } //[t62] /// Size of converted string in bytes size_type length() const throw () { return size(); } //[t62] bool empty() const throw () { return size()==0; } //[t62] const_iterator begin() const throw () { return data(); } //[t62] const_iterator end() const throw () { return data()+m_size; } //[t62] const_reference front() const throw () { return *begin(); } //[t62] const_reference back() const throw () { return *(data()+m_size-1); } //[t62] #ifdef PQXX_HAVE_REVERSE_ITERATOR const_reverse_iterator rbegin() const //[t62] { return const_reverse_iterator(end()); } const_reverse_iterator rend() const //[t62] { return const_reverse_iterator(begin()); } #endif /// Unescaped field contents const value_type *data() const throw () {return super::get();} //[t62] const_reference operator[](size_type i) const throw () //[t62] { return data()[i]; } bool PQXX_PURE operator==(const binarystring &) const throw (); //[t62] bool operator!=(const binarystring &rhs) const throw () //[t62] { return !operator==(rhs); } /// Index contained string, checking for valid index const_reference at(size_type) const; //[t62] /// Swap contents with other binarystring void swap(binarystring &); //[t62] /// Raw character buffer (no terminating zero is added) /** @warning No terminating zero is added! If the binary data did not end in * a null character, you will not find one here. */ const char *get() const throw () //[t62] { return reinterpret_cast(super::get()); } /// Read as regular C++ string (may include null characters) /** @warning libpqxx releases before 3.1 stored the string and returned a * reference to it. This is no longer the case! It now creates and returns * a new string object. Avoid repeated use of this function; retrieve your * string once and keep it in a local variable. Also, do not expect to be * able to compare the string's address to that of an earlier invocation. */ PGSTD::string str() const; //[t62] private: size_type m_size; }; /** * @addtogroup escaping String escaping * * @{ */ /// Escape binary string for inclusion in SQL /** * @deprecated Use the transaction's esc_raw() functions instead * \relatesalso binarystring */ PGSTD::string PQXX_LIBEXPORT escape_binary(const PGSTD::string &bin); /// Escape binary string for inclusion in SQL /** * @deprecated Use the transaction's esc_raw() functions instead * \relatesalso binarystring */ PGSTD::string PQXX_LIBEXPORT escape_binary(const char bin[]); /// Escape binary string for inclusion in SQL /** * @deprecated Use the transaction's esc_raw() functions instead * \relatesalso binarystring */ PGSTD::string PQXX_LIBEXPORT escape_binary(const char bin[], size_t len); /// Escape binary string for inclusion in SQL /** * @deprecated Use the transaction's esc_raw() functions instead * \relatesalso binarystring */ PGSTD::string PQXX_LIBEXPORT escape_binary(const unsigned char bin[]); /// Escape binary string for inclusion in SQL /** * @deprecated Use the transaction's esc_raw() functions instead * \relatesalso binarystring */ PGSTD::string PQXX_LIBEXPORT escape_binary(const unsigned char bin[], size_t len); /** * @} */ } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/compiler-internal-post.hxx000066400000000000000000000015051224474465600237240ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/compiler-internal-post.hxx * * DESCRIPTION * Compiler deficiency workarounds for compiling libpqxx headers. * To be called at the end of each libpqxx header, in order to * restore the client program's settings. * * Copyright (c) 2006, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // NO GUARDS HERE! This code should be executed every time! #ifdef _WIN32 #ifdef _MSC_VER #pragma warning (pop) // Restore client program's warning state #endif #endif libpqxx-4.0.1+dfsg/include/pqxx/compiler-internal-pre.hxx000066400000000000000000000032471224474465600235320ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/compiler-internal-pre.hxx * * DESCRIPTION * Compiler deficiency workarounds for compiling libpqxx headers. * To be called at the start of each libpqxx header, in order to * push the client program's settings and apply libpqxx's settings. * Must be balanced by an include of -header-post.hxx at the end * of the header. * * Copyright (c) 2006,2007, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // NO GUARDS HERE! This code should be executed every time! #ifdef _WIN32 #ifdef _MSC_VER // Save client program warning state, and set warning level 4. // Setting the warning level explicitly ensures that libpqxx // headers will work with this warning level as well. #pragma warning (push,4) #pragma warning (disable: 4251) #pragma warning (disable: 4258) // Complains that for-scope usage is correct #pragma warning (disable: 4273) #pragma warning (disable: 4275) #pragma warning (disable: 4290) #pragma warning (disable: 4355) #pragma warning (disable: 4511) // Copy constructor could not be generated #pragma warning (disable: 4512) // Assignment operator could not be generated #pragma warning (disable: 4786) #pragma warning (disable: 4800) // Performance warning for boolean conversions #pragma warning (disable: 4996) // Complaint that strncpy() "may" be unsafe #endif // _MSC_VER #endif // _WIN32 libpqxx-4.0.1+dfsg/include/pqxx/compiler-internal.hxx000066400000000000000000000043741224474465600227500ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/compiler-internal.hxx * * DESCRIPTION * Compiler deficiency workarounds for compiling libpqxx itself. * DO NOT INCLUDE THIS FILE when building client programs. * * Copyright (c) 2002-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_COMPILER_INTERNAL #define PQXX_H_COMPILER_INTERNAL // Workarounds & definitions needed to compile libpqxx into a library #include "pqxx/config-internal-compiler.h" // Library-private configuration related to libpq version #include "pqxx/config-internal-libpq.h" #ifdef _WIN32 #ifdef PQXX_SHARED #undef PQXX_LIBEXPORT #define PQXX_LIBEXPORT __declspec(dllexport) // TODO: Does Windows have a way to "unexport" a symbol in an exported class? #define PQXX_PRIVATE __declspec() #endif // PQXX_SHARED #ifdef _MSC_VER #pragma warning (disable: 4251 4275 4273) #pragma warning (disable: 4258) // Complains that for-scope usage is correct. #pragma warning (disable: 4290) #pragma warning (disable: 4351) #pragma warning (disable: 4355) #pragma warning (disable: 4786) #pragma warning (disable: 4800) // Performance warning for boolean conversions. #pragma warning (disable: 4996) // Complains that strncpy() "may" be unsafe. #endif #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32 #define PQXX_LIBEXPORT __attribute__ ((visibility("default"))) #define PQXX_PRIVATE __attribute__ ((visibility("hidden"))) #endif // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY #include "pqxx/compiler-public.hxx" #include #ifdef PQXX_HAVE_LIMITS #include #else // PQXX_HAVE_LIMITS #include namespace PGSTD { /// Work around lacking "limits" header template struct numeric_limits { static T max() throw (); static T min() throw (); }; template<> inline long numeric_limits::max() throw () {return LONG_MAX;} template<> inline long numeric_limits::min() throw () {return LONG_MIN;} } #endif // PQXX_HAVE_LIMITS #endif libpqxx-4.0.1+dfsg/include/pqxx/compiler-public.hxx000066400000000000000000000170321224474465600224050ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/compiler-public.hxx * * DESCRIPTION * Compiler deficiency workarounds for libpqxx clients * * Copyright (c) 2002-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_COMPILER_PUBLIC #define PQXX_H_COMPILER_PUBLIC #ifdef PQXX_HAVE_BOOST_SMART_PTR #include #endif #ifdef PQXX_HAVE_MOVE #include #define PQXX_MOVE(value) (PGSTD::move(value)) #else #define PQXX_MOVE(value) (value) #endif #ifdef _MSC_VER /* Work around a particularly pernicious and deliberate bug in Visual C++: * min() and max() are defined as macros, which can have some very nasty * consequences. This compiler bug can be switched off by defining NOMINMAX. * * We don't like making choices for the user and defining environmental macros * of our own accord, but in this case it's the only way to compile without * incurring a significant risk of bugs--and there doesn't appear to be any * downside. One wonders why this compiler wart is being maintained at all, * since the introduction of inline functions back in the 20th century. */ #if defined(min) || defined(max) #error "Oops: min() and/or max() are defined as preprocessor macros.\ Define NOMINMAX macro before including any system headers!" #endif #ifndef NOMINMAX #define NOMINMAX #endif // Suppress vtables on abstract classes. #define PQXX_NOVTABLE __declspec(novtable) #endif // _MSC_VER // Workarounds & definitions that need to be included even in library's headers #include "pqxx/config-public-compiler.h" #ifdef PQXX_BROKEN_ITERATOR #include #include /// Alias for the std namespace to accomodate nonstandard C++ implementations /** The PGSTD name will almost always be defined to mean std. The exception are * third-party C++ standard library implementations that use a different * namespace to avoid conflicts with the standard library that came with the * compiler. * * Some definitions that appear missing in the standard library of the host * system may be added to get libpqxx working. */ namespace PGSTD { /// Work around lacking iterator template definition in template struct iterator { typedef Cat iterator_category; typedef T value_type; typedef Dist difference_type; typedef Ptr pointer; typedef Ref reference; }; } #else #include #endif // PQXX_BROKEN_ITERATOR #ifndef PQXX_HAVE_CHAR_TRAITS #include namespace PGSTD { /// Work around missing std::char_traits template struct char_traits {}; /// Work around missing std::char_traits template<> struct char_traits { typedef int int_type; typedef size_t pos_type; typedef long off_type; typedef char char_type; static int_type eof() { return -1; } }; /// Work around missing std::char_traits template<> struct char_traits { typedef int int_type; typedef size_t pos_type; typedef long off_type; typedef unsigned char char_type; static int_type eof() { return -1; } }; } #endif // Workarounds for SUN Workshop 6 #if defined(__SUNPRO_CC) #if __SUNPRO_CC_COMPAT < 5 #error "This compiler version is not capable of building libpqxx." #endif // __SUNPRO_CC_COMPAT < 5 #define PQXX_PRIVATE __hidden #endif // __SUNPRO_CC // Workarounds for Compaq C++ for Alpha #if defined(__DECCXX_VER) #define __USE_STD_IOSTREAM #endif // __DECCXX_VER #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_CONST) #define PQXX_CONST __attribute__ ((const)) #else #define PQXX_CONST #endif #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_DEPRECATED) #define PQXX_DEPRECATED __attribute__ ((deprecated)) #else #define PQXX_DEPRECATED #endif #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_NORETURN) #define PQXX_NORETURN __attribute__ ((noreturn)) #else #define PQXX_NORETURN #endif #if defined(__GNUC__) && defined(PQXX_HAVE_GCC_PURE) #define PQXX_PURE __attribute__ ((pure)) #else #define PQXX_PURE #endif // Workarounds for Windows #ifdef _WIN32 /* For now, export DLL symbols if _DLL is defined. This is done automatically * by the compiler when linking to the dynamic version of the runtime library, * according to "gzh" */ // TODO: Define custom macro to govern how libpqxx will be linked to client #if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED) #define PQXX_LIBEXPORT __declspec(dllimport) #endif // !PQXX_LIBEXPORT && PQXX_SHARED // Workarounds for Microsoft Visual C++ #ifdef _MSC_VER #if _MSC_VER < 1300 #error If you're using Visual C++, you'll need at least version 7 (.NET) #elif _MSC_VER < 1310 // Workarounds for pre-2003 Visual C++.NET #undef PQXX_HAVE_REVERSE_ITERATOR #define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION #define PQXX_TYPENAME #endif // _MSC_VER < 1310 // Automatically link with the appropriate libpq (static or dynamic, debug or // release). The default is to use the release DLL. Define PQXX_PQ_STATIC to // link to a static version of libpq, and _DEBUG to link to a debug version. // The two may be combined. #if defined(PQXX_AUTOLINK) #if defined(PQXX_PQ_STATIC) #ifdef _DEBUG #pragma comment(lib, "libpqd") #else #pragma comment(lib, "libpq") #endif #else #ifdef _DEBUG #pragma comment(lib, "libpqddll") #else #pragma comment(lib, "libpqdll") #endif #endif #endif // If we're not compiling libpqxx itself, automatically link with the correct // libpqxx library. To link with the libpqxx DLL, define PQXX_SHARED; the // default is to link with the static library. This is also the recommended // practice. // Note that the preprocessor macro PQXX_INTERNAL is used to detect whether we // are compiling the libpqxx library itself. When you compile the library // yourself using your own project file, make sure to include this define. #if defined(PQXX_AUTOLINK) && !defined(PQXX_INTERNAL) #ifdef PQXX_SHARED #ifdef _DEBUG #pragma comment(lib, "libpqxxD") #else #pragma comment(lib, "libpqxx") #endif #else // !PQXX_SHARED #ifdef _DEBUG #pragma comment(lib, "libpqxx_staticD") #else #pragma comment(lib, "libpqxx_static") #endif #endif #endif /// Apparently Visual C++.NET 2003 breaks on stdout/stderr output in destructors /** Defining this macro will disable all error or warning messages whenever a * destructor of a libpqxx-defined class is being executed. This may cause * important messages to be lost, but I'm told the code will crash without it. * Of course it's only a partial solution; the client code may still do bad * things from destructors and run into the same problem. * * If this workaround does solve the crashes, we may have to work out some * system of deferred messages that will remember the messages and re-issue them * after all known active destructors has finished. But that could be * error-prone: what if memory ran out while trying to queue a message, for * instance? The only solution may be for the vendor to fix the compiler. */ #define PQXX_QUIET_DESTRUCTORS #endif // _MSC_VER #endif // _WIN32 #ifndef PQXX_LIBEXPORT #define PQXX_LIBEXPORT #endif #ifndef PQXX_PRIVATE #define PQXX_PRIVATE #endif // Some compilers (well, VC) stumble over some required cases of "typename" #ifndef PQXX_TYPENAME #define PQXX_TYPENAME typename #endif #ifndef PQXX_NOVTABLE #define PQXX_NOVTABLE #endif #endif libpqxx-4.0.1+dfsg/include/pqxx/config-internal-autotools.h000066400000000000000000000005021224474465600240370ustar00rootroot00000000000000/* Automatically generated from config.h: internal/autotools config. */ #define PACKAGE "libpqxx" #define PACKAGE_BUGREPORT "Jeroen T. Vermeulen " #define PACKAGE_NAME "libpqxx" #define PACKAGE_STRING "libpqxx 4.0.1" #define PACKAGE_TARNAME "libpqxx" #define PACKAGE_VERSION "4.0.1" #define VERSION "4.0.1" libpqxx-4.0.1+dfsg/include/pqxx/config.h.in000066400000000000000000000133721224474465600206140ustar00rootroot00000000000000/* include/pqxx/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `pq' library (-lpq). */ #undef HAVE_LIBPQ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* name of standard library namespace (normally "std") */ #undef PGSTD /* namespace of TR1 standard extensions (e.g. "std" or "std::tr1") */ #undef PQXXTR1 /* Define if lacks an iterator template definition */ #undef PQXX_BROKEN_ITERATOR /* Define if function overloading using "using" breaks */ #undef PQXX_BROKEN_USING_DECL /* Define if compiler has auto_ptr */ #undef PQXX_HAVE_AUTO_PTR /* Define if you have the header */ #undef PQXX_HAVE_BOOST_SMART_PTR /* Define if std provides the char_traits template and specialization */ #undef PQXX_HAVE_CHAR_TRAITS /* Define if count_if() works according to the standard */ #undef PQXX_HAVE_COUNT_IF /* Define if preprocessor supports pragma "message" */ #undef PQXX_HAVE_CPP_PRAGMA_MESSAGE /* Define if preprocessor supports nonstandard "warning" directive */ #undef PQXX_HAVE_CPP_WARNING /* Define if math.h defines C99 isinf() */ #undef PQXX_HAVE_C_ISINF /* Define if math.h defines C99 isnan() */ #undef PQXX_HAVE_C_ISNAN /* Define if C math header defines NAN */ #undef PQXX_HAVE_C_NAN /* Define if distance() works according to the standard */ #undef PQXX_HAVE_DISTANCE /* Define if g++ supports const attribute */ #undef PQXX_HAVE_GCC_CONST /* Define if g++ supports deprecated attribute, as in g++ 4.0 */ #undef PQXX_HAVE_GCC_DEPRECATED /* Define if g++ supports noreturn attribute */ #undef PQXX_HAVE_GCC_NORETURN /* Define if g++ supports pure attribute */ #undef PQXX_HAVE_GCC_PURE /* Define if g++ supports visibility attribute, as in g++ 4.0 */ #undef PQXX_HAVE_GCC_VISIBILITY /* Define if stringstream::imbue works */ #undef PQXX_HAVE_IMBUE /* Define if you have the header */ #undef PQXX_HAVE_IOS /* Define if exists */ #undef PQXX_HAVE_LIMITS /* Define if you have the header */ #undef PQXX_HAVE_LOCALE /* Define if the compiler supports the standard "long double" type */ #undef PQXX_HAVE_LONG_DOUBLE /* Define if the compiler supports "long long" types */ #undef PQXX_HAVE_LONG_LONG /* Define if libpq has lo_tell() */ #undef PQXX_HAVE_LO_TELL /* Define if compiler has move(). */ #undef PQXX_HAVE_MOVE /* Define if C99 fnan()/nan()/lnan() are available */ #undef PQXX_HAVE_NAN /* Define if the system has the poll() function (mainly GNU/Linux) */ #undef PQXX_HAVE_POLL /* Define if libpq has PQcancel() and friends */ #undef PQXX_HAVE_PQCANCEL /* Define if libpq has PQclientEncoding() */ #undef PQXX_HAVE_PQCLIENTENCODING /* Define if libpq has PQdescribePortal() */ #undef PQXX_HAVE_PQDESCRIBEPORTAL /* Define if libpq has PQencryptPassword() */ #undef PQXX_HAVE_PQENCRYPTPASSWORD /* Define if libpq has PQescapeIdentifier() */ #undef PQXX_HAVE_PQESCAPEIDENTIFIER /* Define if libpq has PQescapeLiteral() */ #undef PQXX_HAVE_PQESCAPELITERAL /* Define if libpq has PQisthreadsafe() */ #undef PQXX_HAVE_PQISTHREADSAFE /* Define if libpq has PQmblen() */ #undef PQXX_HAVE_PQMBLEN /* Define if PQunescapeBytea() supports hex escape format */ #undef PQXX_HAVE_PQUNESCAPEBYTEA_9 /* Define if std::numeric_limits has quiet_NaN() */ #undef PQXX_HAVE_QUIET_NAN /* Define if reverse_iterator template works as expected */ #undef PQXX_HAVE_REVERSE_ITERATOR /* Define if compiler has shared_ptr */ #undef PQXX_HAVE_SHARED_PTR /* Define if POSIX sleep() exists */ #undef PQXX_HAVE_SLEEP /* Define if you have the header; if not, is used */ #undef PQXX_HAVE_STREAMBUF /* Define if strerror_r exists */ #undef PQXX_HAVE_STRERROR_R /* Define for GNU-style strerror_r */ #undef PQXX_HAVE_STRERROR_R_GNU /* Define if string class has the clear() function */ #undef PQXX_HAVE_STRING_CLEAR /* Define if strlcpy exists */ #undef PQXX_HAVE_STRLCPY /* Define if strnlen exists */ #undef PQXX_HAVE_STRNLEN /* Define if the sys/select.h header defines a working select() and friends, as per POSIX 1003.1-2001 */ #undef PQXX_HAVE_SYS_SELECT_H /* Define if compiler has unique_ptr */ #undef PQXX_HAVE_UNIQUE_PTR /* Define if select() accepts NULL fd_set arguments */ #undef PQXX_SELECT_ACCEPTS_NULL /* Define if headers for TR1 extension to standard live in tr1/ */ #undef PQXX_TR1_HEADERS /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION libpqxx-4.0.1+dfsg/include/pqxx/connection000066400000000000000000000012561224474465600206510ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connection * * DESCRIPTION * pqxx::connection and pqxx::lazyconnection classes. * Different ways of setting up a backend connection. * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/connection.hxx" libpqxx-4.0.1+dfsg/include/pqxx/connection.hxx000066400000000000000000000140641224474465600214600ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connection.hxx * * DESCRIPTION * definition of the pqxx::connection and pqxx::lazyconnection classes. * Different ways of setting up a backend connection. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_CONNECTION #define PQXX_H_CONNECTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/connectionpolicy" #include "pqxx/basic_connection" namespace pqxx { /** * @addtogroup connection Connection classes * * The connection classes are where the use of a database begins. You must * connect to a database in order to access it. Your connection represents a * session with the database. In the context of that connection you can create * transactions, which in turn you can use to execute SQL. A connection can * have only one regular transaction open at a time, but you can break your work * down into any number of consecutive transactions and there is also some * support for transaction nesting (using the subtransaction class). * * Many things come together in the connection classes. Handling of error and * warning messages, for example, is defined by @e errorhandlers in the context * of a connection. Prepared statements are also defined here. * * Several types of connections are available, including plain connection and * lazyconnection. These types are typedefs combining a derivative of the * connection_base class (where essentially all connection-related functionality * is defined) with a policy class which governs how the connection is to be * established. You pass details such as the database you wish to connect to, * username and password, and so on as as PostgreSQL "connection string" and * certain environment variables that you can learn more about from the core * postgres documentation. * * See the connection_base documentation for a full list of features inherited * by all connection classes. Connections can be deactivated and reactivated if * needed (within reason, of course--you can't do this in the middle of a * transaction), and where possible, disabled or broken connections are * transparently re-enabled when you use them again. This is called * "reactivation," and you may need to understand it because you'll want it * disabled in certain situations. * * You can also set certain variables defined by the backend to influence its * behaviour for the duration of your session, such as the applicable text * encoding. You can query the connection's capabilities (because some features * will depend on the versions of libpq and of the server backend that you're * using) and parameters that you set in your connection string and/or * environment variables. * * @{ */ /// Connection policy; creates an immediate connection to a database. /** This is the policy you typically need when you work with a database through * libpqxx. It connects to the database immediately. Another option is to * defer setting up the underlying connection to the database until it's * actually needed; the connect_lazy policy implements such "lazy" * behaviour. * * The advantage of having an "immediate" connection (as this policy gives you) * is that any errors in setting up the connection will occur during * construction of the connection object, rather than at some later point * further down your program. */ class PQXX_LIBEXPORT connect_direct : public connectionpolicy { public: explicit connect_direct(const PGSTD::string &opts) : connectionpolicy(opts) {} virtual handle do_startconnect(handle); }; /// The "standard" connection type: connect to database right now typedef basic_connection connection; /// Lazy connection policy; causes connection to be deferred until first use. /** This is connect_direct's lazy younger brother. It does not attempt to open * a connection right away; the connection is only created when it is actually * used. */ class PQXX_LIBEXPORT connect_lazy : public connectionpolicy { public: explicit connect_lazy(const PGSTD::string &opts) : connectionpolicy(opts) {} virtual handle do_completeconnect(handle); }; /// A "lazy" connection type: connect to database only when needed typedef basic_connection lazyconnection; /// Asynchronous connection policy; connects "in the background" /** Connection is initiated immediately, but completion is deferred until the * connection is actually needed. * * This may help performance by allowing the client to do useful work while * waiting for an answer from the server. */ class PQXX_LIBEXPORT connect_async : public connectionpolicy { public: explicit connect_async(const PGSTD::string &opts); virtual handle do_startconnect(handle); virtual handle do_completeconnect(handle); virtual handle do_dropconnect(handle) throw (); virtual bool is_ready(handle) const throw (); private: /// Is a connection attempt in progress? bool m_connecting; }; /// "Asynchronous" connection type: start connecting, but don't wait for it typedef basic_connection asyncconnection; /// Nonfunctional, always-down connection policy for testing/debugging purposes /** @warning You don't want to use this policy in normal code. * Written for debugging and testing, this "connection policy" always fails to * connect, and the internal connection pointer always remains null. */ class PQXX_LIBEXPORT connect_null : public connectionpolicy { public: explicit connect_null(const PGSTD::string &opts) : connectionpolicy(opts) {} }; /// A "dummy" connection type: don't connect to any database at all typedef basic_connection nullconnection; /** * @} */ } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/connection_base000066400000000000000000000013011224474465600216320ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connection_base * * DESCRIPTION * pqxx::connection_base abstract base class. * pqxx::connection_base encapsulates a frontend to backend connection * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/connection_base.hxx" libpqxx-4.0.1+dfsg/include/pqxx/connection_base.hxx000066400000000000000000001143001224474465600224440ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connection_base.hxx * * DESCRIPTION * definition of the pqxx::connection_base abstract base class. * pqxx::connection_base encapsulates a frontend to backend connection * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_CONNECTION_BASE #define PQXX_H_CONNECTION_BASE #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include #include #include #include "pqxx/errorhandler" #include "pqxx/except" #include "pqxx/prepared_statement" #include "pqxx/strconv" #include "pqxx/util" /* Use of the libpqxx library starts here. * * Everything that can be done with a database through libpqxx must go through * a connection object derived from connection_base. */ /* Methods tested in eg. self-test program test1 are marked with "//[t1]" */ namespace pqxx { class binarystring; class connectionpolicy; class notification_receiver; class result; class transaction_base; namespace internal { class reactivation_avoidance_exemption; class sql_cursor; class reactivation_avoidance_counter { public: reactivation_avoidance_counter() : m_counter(0) {} void add(int n) throw () { m_counter += n; } void clear() throw () { m_counter = 0; } int get() const throw () { return m_counter; } private: int m_counter; }; } /// Encrypt password for given user. Requires libpq 8.2 or better. /** Use this when setting a new password for the user if password encryption is * enabled. Inputs are the username the password is for, and the plaintext * password. * * @return encrypted version of the password, suitable for encrypted PostgreSQL * authentication. * * Thus the password for a user can be changed with: * @code * void setpw(transaction_base &t, const string &user, const string &pw) * { * t.exec("ALTER USER " + user + " " * "PASSWORD '" + encrypt_password(user,pw) + "'"); * } * @endcode * * @since libpq 8.2 */ PGSTD::string PQXX_LIBEXPORT encrypt_password( //[t0] const PGSTD::string &user, const PGSTD::string &password); namespace internal { namespace gate { class connection_dbtransaction; class connection_errorhandler; class connection_largeobject; class connection_notification_receiver; class connection_parameterized_invocation; class connection_pipeline; class connection_prepare_invocation; class connection_reactivation_avoidance_exemption; class connection_sql_cursor; class connection_transaction; } // namespace pqxx::internal::gate } // namespace pqxx::internal /// connection_base abstract base class; represents a connection to a database. /** This is the first class to look at when you wish to work with a database * through libpqxx. Depending on the implementing concrete child class, a * connection can be automatically opened when it is constructed, or when it is * first used, or somewhere inbetween. The connection is automatically closed * upon destruction (if it hasn't been closed already). * * To query or manipulate the database once connected, use one of the * transaction classes (see pqxx/transaction_base.hxx) or preferably the * transactor framework (see pqxx/transactor.hxx). * * If a network connection to the database server fails, the connection will be * restored automatically (although any transaction going on at the time will * have to be aborted). This also means that any information set in previous * transactions that is not stored in the database, such as temp tables or * connection-local variables defined with PostgreSQL's SET command, will be * lost. Whenever you create such state, either keept it local to one * transaction, where possible, or inhibit automatic reactivation of the * connection using the inhibit_reactivation() method. * * When a connection breaks, you will typically get a broken_connection * exception. This can happen at almost any point, and the details may depend * on which connection class (all derived from this one) you use. * * As a general rule, always avoid raw queries if libpqxx offers a dedicated * function for the same purpose. There may be hidden logic to hide certain * complications from you, such as reinstating session variables when a * broken or disabled connection is reactivated. * * @warning On Unix-like systems, including GNU and BSD systems, your program * may receive the SIGPIPE signal when the connection to the backend breaks. By * default this signal will abort your program. Use "signal(SIGPIPE, SIG_IGN)" * if you want your program to continue running after a connection fails. */ class PQXX_LIBEXPORT connection_base { public: /// Explicitly close connection. void disconnect() throw (); //[t2] /// Is this connection open at the moment? /** @warning This function is @b not needed in most code. Resist the * temptation to check it after opening a connection; instead, rely on the * broken_connection exception that will be thrown on connection failure. */ bool PQXX_PURE is_open() const throw (); //[t1] /** * @name Activation * * Connections can be temporarily deactivated, or they can break because of * overly impatient firewalls dropping TCP connections. Where possible, * libpqxx will try to re-activate these when resume using them, or you can * wake them up explicitly. You probably won't need this feature, but you * should be aware of it. */ //@{ /// Explicitly activate deferred or deactivated connection. /** Use of this method is entirely optional. Whenever a connection is used * while in a deferred or deactivated state, it will transparently try to * bring itself into an activated state. This function is best viewed as an * explicit hint to the connection that "if you're not in an active state, now * would be a good time to get into one." Whether a connection is currently * in an active state or not makes no real difference to its functionality. * There is also no particular need to match calls to activate() with calls to * deactivate(). A good time to call activate() might be just before you * first open a transaction on a lazy connection. */ void activate(); //[t12] /// Explicitly deactivate connection. /** Like its counterpart activate(), this method is entirely optional. * Calling this function really only makes sense if you won't be using this * connection for a while and want to reduce the number of open connections on * the database server. * There is no particular need to match or pair calls to deactivate() with * calls to activate(), but calling deactivate() during a transaction is an * error. */ void deactivate(); //[t12] /// Disallow (or permit) connection recovery /** A connection whose underlying socket is not currently connected to the * server will normally (re-)establish communication with the server whenever * needed, or when the client program requests it (although for reasons of * integrity, never inside a transaction; but retrying the whole transaction * may implicitly cause the connection to be restored). In normal use this is * quite a convenient thing to have and presents a simple, safe, predictable * interface. * * There is at least one situation where this feature is not desirable, * however. Although most session state (prepared statements, session * variables) is automatically restored to its working state upon connection * reactivation, temporary tables and so-called WITH HOLD cursors (which can * live outside transactions) are not. * * Cursors that live outside transactions are automatically handled, and the * library will quietly ignore requests to deactivate or reactivate * connections while they exist; it does not want to give you the illusion of * being back in your transaction when in reality you just dropped a cursor. * With temporary tables this is not so easy: there is no easy way for the * library to detect their creation or track their lifetimes. * * So if your program uses temporary tables, and any part of this use happens * outside of any database transaction (or spans multiple transactions), some * of the work you have done on these tables may unexpectedly be undone if the * connection is broken or deactivated while any of these tables exists, and * then reactivated or implicitly restored before you are finished with it. * * If this describes any part of your program, guard it against unexpected * reconnections by inhibiting reconnection at the beginning. And if you want * to continue doing work on the connection afterwards that no longer requires * the temp tables, you can permit it again to get the benefits of connection * reactivation for the remainder of the program. * * @param inhibit should reactivation be inhibited from here on? * * @warning Some connection types (the lazy and asynchronous types) defer * completion of the socket-level connection until it is actually needed by * the client program. Inhibiting reactivation before this connection is * really established will prevent these connection types from doing their * work. For those connection types, if you are sure that reactivation needs * to be inhibited before any query goes across the connection, activate() the * connection first. This will ensure that definite activation happens before * you inhibit it. */ void inhibit_reactivation(bool inhibit) //[t86] { m_inhibit_reactivation=inhibit; } /// Make the connection fail. @warning Do not use this except for testing! /** Breaks the connection in some unspecified, horrible, dirty way to enable * failure testing. * * Do not use this in normal programs. This is only meant for testing. */ void simulate_failure(); //[t94] //@} /// Invoke notice processor function. The message should end in newline. void process_notice(const char[]) throw (); //[t14] /// Invoke notice processor function. Newline at end is recommended. void process_notice(const PGSTD::string &) throw (); //[t14] /// Enable tracing to a given output stream, or NULL to disable. void trace(PGSTD::FILE *) throw (); //[t3] /** * @name Connection properties * * These are probably not of great interest, since most are derived from * information supplied by the client program itself, but they are included * for completeness. */ //@{ /// Name of database we're connected to, if any. /** @warning This activates the connection, which may fail with a * broken_connection exception. */ const char *dbname(); //[t1] /// Database user ID we're connected under, if any. /** @warning This activates the connection, which may fail with a * broken_connection exception. */ const char *username(); //[t1] /// Address of server, or NULL if none specified (i.e. default or local) /** @warning This activates the connection, which may fail with a * broken_connection exception. */ const char *hostname(); //[t1] /// Server port number we're connected to. /** @warning This activates the connection, which may fail with a * broken_connection exception. */ const char *port(); //[t1] /// Process ID for backend process. /** Use with care: connections may be lost and automatically re-established * without your knowledge, in which case this process ID may no longer be * correct. You may, however, assume that this number remains constant and * reliable within the span of a successful backend transaction. If the * transaction fails, which may be due to a lost connection, then this number * will have become invalid at some point within the transaction. * * @return Process identifier, or 0 if not currently connected. */ int PQXX_PURE backendpid() const throw (); //[t1] /// Socket currently used for connection, or -1 for none. Use with care! /** Query the current socket number. This is intended for event loops based * on functions such as select() or poll(), where multiple file descriptors * are watched. * * Please try to stay away from this function. It is really only meant for * event loops that need to wait on more than one file descriptor. If all you * need is to block until a notification arrives, for instance, use * await_notification(). If you want to issue queries and retrieve results in * nonblocking fashion, check out the pipeline class. * * @warning Don't store this value anywhere, and always be prepared for the * possibility that there is no socket. The socket may change or even go away * during any invocation of libpqxx code, no matter how trivial. */ int PQXX_PURE sock() const throw (); //[t87] /** * @name Capabilities * * Some functionality is only available in certain versions of the backend, * or only when speaking certain versions of the communications protocol that * connects us to the backend. This includes clauses for SQL statements that * were not accepted in older database versions, but are required in newer * versions to get the same behaviour. */ //@{ /// Session capabilities enum capability { /// Does the backend support prepared statements? (If not, we emulate them) cap_prepared_statements, /// Can we specify WITH OIDS with CREATE TABLE? cap_create_table_with_oids, /// Can transactions be nested in other transactions? cap_nested_transactions, /// Can cursors be declared SCROLL? cap_cursor_scroll, /// Can cursors be declared WITH HOLD? cap_cursor_with_hold, /// Can cursors be updateable? cap_cursor_update, /// Can cursors fetch zero elements? (Used to trigger a "fetch all") cap_cursor_fetch_0, /// Can we ask what table column a result column came from? cap_table_column, /// Can transactions be READ ONLY? cap_read_only_transactions, /// Do prepared statements support varargs? cap_statement_varargs, /// Is the unnamed prepared statement supported? cap_prepare_unnamed_statement, /// Can this connection execute parameterized statements? cap_parameterized_statements, /// Can notifications carry payloads? cap_notify_payload, /// Not a capability value; end-of-enumeration marker cap_end }; /// Does this connection seem to support the given capability? /** Don't try to be smart by caching this information anywhere. Obtaining it * is quite fast (especially after the first time) and what's more, a * capability may "suddenly" appear or disappear if the connection is broken * or deactivated, and then restored. This may happen silently any time no * backend transaction is active; if it turns out that the server was upgraded * or restored from an older backup, or the new connection goes to a different * backend, then the restored session may have different capabilities than * were available previously. * * Some guesswork is involved in establishing the presence of any capability; * try not to rely on this function being exactly right. * * @warning Make sure your connection is active before calling this function, * or the answer will always be "no." In particular, if you are using this * function on a newly-created lazyconnection, activate the connection first. */ bool supports(capability c) const throw () { return m_caps.test(c); } //[t88] /// What version of the PostgreSQL protocol is this connection using? /** The answer can be 0 (when there is no connection, or the libpq version * being used is too old to obtain the information); 2 for protocol 2.0; 3 for * protocol 3.0; and possibly higher values as newer protocol versions are * taken into use. * * If the connection is broken and restored, the restored connection could * possibly a different server and protocol version. This would normally * happen if the server is upgraded without shutting down the client program, * for example. * * Requires libpq version from PostgreSQL 7.4 or better. */ int PQXX_PURE protocol_version() const throw (); //[t1] /// What version of the PostgreSQL server are we connected to? /** The result is a bit complicated: each of the major, medium, and minor * release numbers is written as a two-digit decimal number, and the three * are then concatenated. Thus server version 7.4.2 will be returned as the * decimal number 70402. If there is no connection to the server, of if the * libpq version is too old to obtain the information, zero is returned. * * @warning When writing version numbers in your code, don't add zero at the * beginning! Numbers beginning with zero are interpreted as octal (base-8) * in C++. Thus, 070402 is not the same as 70402, and 080000 is not a number * at all because there is no digit "8" in octal notation. Use strictly * decimal notation when it comes to these version numbers. */ int PQXX_PURE server_version() const throw (); //[t1] //@} /// Set client-side character encoding /** Search the PostgreSQL documentation for "multibyte" or "character set * encodings" to find out more about the available encodings, how to extend * them, and how to use them. Not all server-side encodings are compatible * with all client-side encodings or vice versa. * @param Encoding Name of the character set encoding to use */ void set_client_encoding(const PGSTD::string &Encoding) //[t7] { set_variable("CLIENT_ENCODING", Encoding); } /// Set session variable /** Set a session variable for this connection, using the SET command. If the * connection to the database is lost and recovered, the last-set value will * be restored automatically. See the PostgreSQL documentation for a list of * variables that can be set and their permissible values. * If a transaction is currently in progress, aborting that transaction will * normally discard the newly set value. Known exceptions are nontransaction * (which doesn't start a real backend transaction) and PostgreSQL versions * prior to 7.3. * @warning Do not mix the set_variable interface with manual setting of * variables by executing the corresponding SQL commands, and do not get or * set variables while a tablestream or pipeline is active on the same * connection. * @param Var Variable to set * @param Value Value vor Var to assume: an identifier, a quoted string, or a * number. */ void set_variable(const PGSTD::string &Var, const PGSTD::string &Value); //[t60] /// Read session variable /** Will try to read the value locally, from the list of variables set with * the set_variable function. If that fails, the database is queried. * @warning Do not mix the set_variable interface with manual setting of * variables by executing the corresponding SQL commands, and do not get or * set variables while a tablestream or pipeline is active on the same * connection. */ PGSTD::string get_variable(const PGSTD::string &); //[t60] //@} /** * @name Notifications and Receivers */ //@{ /// Check for pending notifications and take appropriate action. /** * All notifications found pending at call time are processed by finding * any matching receivers and invoking those. If no receivers matched the * notification string, none are invoked but the notification is considered * processed. * * Exceptions thrown by client-registered receivers are reported using the * connection's errorhandlers, but the exceptions themselves are not passed * on outside this function. * * @return Number of notifications processed */ int get_notifs(); //[t4] /// Wait for a notification to come in /** The wait may also be terminated by other events, such as the connection * to the backend failing. Any pending or received notifications are * processed as part of the call. * * @return Number of notifications processed */ int await_notification(); //[t78] /// Wait for a notification to come in, or for given timeout to pass /** The wait may also be terminated by other events, such as the connection * to the backend failing. Any pending or received notifications are * processed as part of the call. * @return Number of notifications processed */ int await_notification(long seconds, long microseconds); //[t79] //@} /** * @name Prepared statements * * PostgreSQL supports prepared SQL statements, i.e. statements that can be * registered under a client-provided name, optimized once by the backend, and * executed any number of times under the given name. * * Prepared statement definitions are not sensitive to transaction boundaries; * a statement defined inside a transaction will remain defined outside that * transaction, even if the transaction itself is subsequently aborted. Once * a statement has been prepared, only closing the connection or explicitly * "unpreparing" it can make it go away. * * Use the transaction classes' @c prepared().exec() function to execute a * prepared statement. Use @c prepared().exists() to find out whether a * statement has been prepared under a given name. * * A special case is the nameless prepared statement. You may prepare a * statement without a name. The unnamed statement can be redefined at any * time, without un-preparing it first. * * @warning Prepared statements are not necessarily defined on the backend * right away; libpqxx generally does that lazily. This means that you can * prepare statements before the connection is fully established, and that * it's relatively cheap to pre-prepare lots of statements that you may or may * not use during the session. On the other hand, it also means that errors * in a prepared statement may not show up until you first try to invoke it. * Such an error may then break the transaction it occurs in. * * @warning Never try to prepare, execute, or unprepare a prepared statement * manually using direct SQL queries. Always use the functions provided by * libpqxx. * * @{ */ /// Define a prepared statement /** * The statement's definition can refer to a parameter using the parameter's * positional number n in the definition. For example, the first parameter * can be used as a variable "$1", the second as "$2" and so on. * * Here's an example of how to use prepared statements. Note the unusual * syntax for passing parameters: every new argument is a parenthesized * expression that is simply tacked onto the end of the statement! * * @code * using namespace pqxx; * void foo(connection_base &C) * { * C.prepare("findtable", "select * from pg_tables where name=$1"); * work W(C); * result R = W.prepared("findtable")("mytable").exec(); * if (R.empty()) throw runtime_error("mytable not found!"); * } * @endcode * * To save time, prepared statements aren't really registered with the backend * until they are first used. If this is not what you want, e.g. because you * have very specific realtime requirements, you can use the @c prepare_now() * function to force immediate preparation. * * @warning The statement may not be registered with the backend until it is * actually used. So if, for example, the statement is syntactically * incorrect, you may see a syntax_error here, or later when you try to call * the statement, or in a prepare_now() call. * * @param name unique name for the new prepared statement. * @param definition SQL statement to prepare. */ void prepare(const PGSTD::string &name, const PGSTD::string &definition); /// Define a nameless prepared statement. /** * This can be useful if you merely want to pass large binary parameters to a * statement without otherwise wishing to prepare it. If you use this * feature, always keep the definition and the use close together to avoid * the nameless statement being redefined unexpectedly by code somewhere else. */ void prepare(const PGSTD::string &definition); /// Drop prepared statement void unprepare(const PGSTD::string &name); /// Request that prepared statement be registered with the server /** If the statement had already been fully prepared, this will do nothing. * * If the connection should break and be transparently restored, then the new * connection will again defer registering the statement with the server. * Since connections are never restored inside backend transactions, doing * this once at the beginning of your transaction ensures that the statement * will not be re-registered during that transaction. In most cases, however, * it's probably better not to use this and let the connection decide when and * whether to register prepared statements that you've defined. */ void prepare_now(const PGSTD::string &name); /** * @} */ /** * @name Transactor framework * * See the transactor class template for more about transactors. To use the * transactor framework, encapsulate your transaction code in a class derived * from an instantiation of the pqxx::transactor template. Then, to execute * it, create an object of your transactor class and pass it to one of the * perform() functions here. * * The perform() functions may create and execute several copies of the * transactor before succeeding or ultimately giving up. If there is any * doubt over whether execution succeeded (this can happen if the connection * to the server is lost just before the backend can confirm success), it is * no longer retried and an in_doubt_error is thrown. * * Take care: no member functions will ever be invoked on the transactor * object you pass into perform(). The object you pass in only serves as a * "prototype" for the job to be done. The perform() function will * copy-construct transactors from the original you passed in, executing the * copies only. The original object remains "clean" in its original state. * * @{ */ /// Perform the transaction defined by a transactor-based object. /** * Invokes the given transactor, making at most Attempts attempts to perform * the encapsulated code. If the code throws any exception other than * broken_connection, it will be aborted right away. * * @param T The transactor to be executed. * @param Attempts Maximum number of attempts to be made to execute T. */ template void perform(const TRANSACTOR &T, int Attempts); //[t4] /// Perform the transaction defined by a transactor-based object. /** * @param T The transactor to be executed. */ template void perform(const TRANSACTOR &T) { perform(T, 3); } /** * @} */ /// Suffix unique number to name to make it unique within session context /** Used internally to generate identifiers for SQL objects (such as cursors * and nested transactions) based on a given human-readable base name. */ PGSTD::string adorn_name(const PGSTD::string &); //[90] /** * @addtogroup escaping String escaping * * Use these functions to "groom" user-provided strings before using them in * your SQL statements. This reduces the chance of failures when users type * unexpected characters, but more importantly, it helps prevent so-called SQL * injection attacks. * * To understand what SQL injection vulnerabilities are and why they should be * prevented, imagine you use the following SQL statement somewhere in your * program: * * @code * TX.exec("SELECT number,amount " * "FROM accounts " * "WHERE allowed_to_see('" + userid + "','" + password + "')"); * @endcode * * This shows a logged-in user important information on all accounts he is * authorized to view. The userid and password strings are variables entered * by the user himself. * * Now, if the user is actually an attacker who knows (or can guess) the * general shape of this SQL statement, imagine he enters the following * password: * * @code * x') OR ('x' = 'x * @endcode * * Does that make sense to you? Probably not. But if this is inserted into * the SQL string by the C++ code above, the query becomes: * * @code * SELECT number,amount * FROM accounts * WHERE allowed_to_see('user','x') OR ('x' = 'x') * @endcode * * Is this what you wanted to happen? Probably not! The neat * allowed_to_see() clause is completely circumvented by the * "OR ('x' = 'x')" clause, which is always @c true. Therefore, the * attacker will get to see all accounts in the database! * * To prevent this from happening, use the transaction's esc() function: * * @code * TX.exec("SELECT number,amount " * "FROM accounts " * "WHERE allowed_to_see('" + TX.esc(userid) + "', " * "'" + TX.esc(password) + "')"); * @endcode * * Now, the quotes embedded in the attacker's string will be neatly escaped so * they can't "break out" of the quoted SQL string they were meant to go into: * * @code * SELECT number,amount * FROM accounts * WHERE allowed_to_see('user', 'x'') OR (''x'' = ''x') * @endcode * * If you look carefully, you'll see that thanks to the added escape * characters (a single-quote is escaped in SQL by doubling it) all we get is * a very strange-looking password string--but not a change in the SQL * statement. */ //@{ /// Escape string for use as SQL string literal on this connection PGSTD::string esc(const char str[]); /// Escape string for use as SQL string literal on this connection PGSTD::string esc(const char str[], size_t maxlen); /// Escape string for use as SQL string literal on this connection PGSTD::string esc(const PGSTD::string &str); /// Escape binary string for use as SQL string literal on this connection PGSTD::string esc_raw(const unsigned char str[], size_t len); /// Escape and quote a string of binary data. PGSTD::string quote_raw(const unsigned char str[], size_t len); /// Escape and quote an SQL identifier for use in a query. PGSTD::string quote_name(const PGSTD::string &identifier); /// Represent object as SQL string, including quoting & escaping. /** Nulls are recognized and represented as SQL nulls. */ template PGSTD::string quote(const T &t) { if (string_traits::is_null(t)) return "NULL"; return "'" + this->esc(to_string(t)) + "'"; } PGSTD::string quote(const binarystring &); //@} /// Attempt to cancel the ongoing query, if any. void cancel_query(); /// Error verbosity levels. enum error_verbosity { // These values must match those in libpq's PGVerbosity enum. terse=0, normal=1, verbose=2 }; /// Set session verbosity. /** Set the verbosity of error messages to "terse", "normal" (i.e. default) or * "verbose." * * If "terse", returned messages include severity, primary text, and position * only; this will normally fit on a single line. "normal" produces messages * that include the above plus any detail, hint, or context fields (these * might span multiple lines). "verbose" includes all available fields. */ void set_verbosity(error_verbosity verbosity) throw(); /// Retrieve current error verbosity error_verbosity get_verbosity() const throw() {return m_verbosity;} /// Return pointers to the active errorhandlers. /** The entries are ordered from oldest to newest handler. * * You may use this to find errorhandlers that your application wants to * delete when destroying the connection. Be aware, however, that libpqxx * may also add errorhandlers of its own, and those will be included in the * list. If this is a problem for you, derive your errorhandlers from a * custom base class derived from pqxx::errorhandler. Then use dynamic_cast * to find which of the error handlers are yours. * * The pointers point to the real errorhandlers. The container it returns * however is a copy of the one internal to the connection, not a reference. */ PGSTD::vector get_errorhandlers() const; protected: explicit connection_base(connectionpolicy &); void init(); void close() throw (); void wait_read() const; void wait_read(long seconds, long microseconds) const; void wait_write() const; private: result make_result(internal::pq::PGresult *rhs, const PGSTD::string &query); void PQXX_PRIVATE clearcaps() throw (); void PQXX_PRIVATE SetupState(); void PQXX_PRIVATE check_result(const result &); void PQXX_PRIVATE InternalSetTrace() throw (); int PQXX_PRIVATE PQXX_PURE Status() const throw (); const char * PQXX_PURE ErrMsg() const throw (); void PQXX_PRIVATE Reset(); void PQXX_PRIVATE RestoreVars(); PGSTD::string PQXX_PRIVATE RawGetVar(const PGSTD::string &); void PQXX_PRIVATE process_notice_raw(const char msg[]) throw (); void read_capabilities() throw (); prepare::internal::prepared_def &find_prepared(const PGSTD::string &); prepare::internal::prepared_def ®ister_prepared(const PGSTD::string &); friend class internal::gate::connection_prepare_invocation; result prepared_exec(const PGSTD::string &, const char *const[], const int[], const int[], int); bool prepared_exists(const PGSTD::string &) const; /// Connection handle. internal::pq::PGconn *m_Conn; connectionpolicy &m_policy; /// Active transaction on connection, if any. internal::unique m_Trans; PGSTD::list m_errorhandlers; /// File to trace to, if any PGSTD::FILE *m_Trace; typedef PGSTD::multimap receiver_list; /// Notification receivers. receiver_list m_receivers; /// Variables set in this session PGSTD::map m_Vars; typedef PGSTD::map PSMap; /// Prepared statements existing in this section PSMap m_prepared; /// Server version int m_serverversion; /// Stacking counter: known objects that can't be auto-reactivated internal::reactivation_avoidance_counter m_reactivation_avoidance; /// Unique number to use as suffix for identifiers (see adorn_name()) int m_unique_id; /// Have we successfully established this connection? bool m_Completed; /// Is reactivation currently inhibited? bool m_inhibit_reactivation; /// Set of session capabilities PGSTD::bitset m_caps; /// Current verbosity level error_verbosity m_verbosity; friend class internal::gate::connection_errorhandler; void PQXX_PRIVATE register_errorhandler(errorhandler *); void PQXX_PRIVATE unregister_errorhandler(errorhandler *) throw (); friend class internal::gate::connection_transaction; result PQXX_PRIVATE Exec(const char[], int Retries); void PQXX_PRIVATE RegisterTransaction(transaction_base *); void PQXX_PRIVATE UnregisterTransaction(transaction_base *) throw (); bool PQXX_PRIVATE ReadCopyLine(PGSTD::string &); void PQXX_PRIVATE WriteCopyLine(const PGSTD::string &); void PQXX_PRIVATE EndCopyWrite(); void PQXX_PRIVATE RawSetVar(const PGSTD::string &, const PGSTD::string &); void PQXX_PRIVATE AddVariables(const PGSTD::map &); friend class internal::gate::connection_largeobject; internal::pq::PGconn *RawConnection() const { return m_Conn; } friend class internal::gate::connection_notification_receiver; void add_receiver(notification_receiver *); void remove_receiver(notification_receiver *) throw (); friend class internal::gate::connection_pipeline; void PQXX_PRIVATE start_exec(const PGSTD::string &); bool PQXX_PRIVATE consume_input() throw (); bool PQXX_PRIVATE is_busy() const throw (); int PQXX_PRIVATE encoding_code(); internal::pq::PGresult *get_result(); friend class internal::gate::connection_dbtransaction; friend class internal::gate::connection_sql_cursor; void add_reactivation_avoidance_count(int); friend class internal::gate::connection_reactivation_avoidance_exemption; friend class internal::gate::connection_parameterized_invocation; result parameterized_exec( const PGSTD::string &query, const char *const params[], const int paramlengths[], const int binaries[], int nparams); // Not allowed: connection_base(const connection_base &); connection_base &operator=(const connection_base &); }; #ifdef PQXX_HAVE_AUTO_PTR /// @deprecated Create an @c errorhandler instead. struct PQXX_LIBEXPORT PQXX_NOVTABLE noticer : PGSTD::unary_function { virtual ~noticer() throw () {} virtual void operator()(const char[]) throw () =0; }; /// @deprecated Use @c quiet_errorhandler instead. struct PQXX_LIBEXPORT nonnoticer : noticer { virtual void operator()(const char[]) throw () {} }; /// @deprecated Create an @c errorhandler instead. class PQXX_LIBEXPORT scoped_noticer : errorhandler { public: scoped_noticer(connection_base &c, PGSTD::auto_ptr t) throw () : errorhandler(c), m_noticer(t.release()) {} protected: scoped_noticer(connection_base &c, noticer *t) throw () : errorhandler(c), m_noticer(t) {} virtual bool operator()(const char msg[]) throw () { (*m_noticer)(msg); return false; } private: PGSTD::auto_ptr m_noticer; }; /// @deprecated Create a @c quiet_errorhandler instead. class PQXX_LIBEXPORT disable_noticer : scoped_noticer { public: explicit disable_noticer(connection_base &c) : scoped_noticer(c, new nonnoticer) {} }; #endif namespace internal { /// Scoped exemption to reactivation avoidance class PQXX_LIBEXPORT reactivation_avoidance_exemption { public: explicit reactivation_avoidance_exemption(connection_base &C); ~reactivation_avoidance_exemption(); void close_connection() throw () { m_open = false; } private: connection_base &m_home; int m_count; bool m_open; }; void wait_read(const internal::pq::PGconn *); void wait_read(const internal::pq::PGconn *, long seconds, long microseconds); void wait_write(const internal::pq::PGconn *); } // namespace pqxx::internal } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/connectionpolicy000066400000000000000000000012341224474465600220650ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connectionpolicy * * DESCRIPTION * base connection policy class * Interface for defining connection policies * * Copyright (c) 2005-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/connectionpolicy.hxx" libpqxx-4.0.1+dfsg/include/pqxx/connectionpolicy.hxx000066400000000000000000000031021224474465600226670ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connectionpolicy.hxx * * DESCRIPTION * definition of the connection policy classes * Interface for defining connection policies * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead. * * Copyright (c) 2005-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_CONNECTIONPOLICY #define PQXX_H_CONNECTIONPOLICY #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include "pqxx/internal/libpq-forward.hxx" namespace pqxx { /** * @addtogroup connection Connection classes */ //@{ class PQXX_LIBEXPORT connectionpolicy { public: typedef internal::pq::PGconn *handle; explicit connectionpolicy(const PGSTD::string &opts); virtual ~connectionpolicy() throw (); const PGSTD::string &options() const throw () { return m_options; } virtual handle do_startconnect(handle orig); virtual handle do_completeconnect(handle orig); virtual handle do_dropconnect(handle orig) throw (); virtual handle do_disconnect(handle orig) throw (); virtual bool is_ready(handle) const throw (); protected: handle normalconnect(handle); private: PGSTD::string m_options; }; //@} } // namespace #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/cursor000066400000000000000000000012351224474465600200240ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/cursor * * DESCRIPTION * definition of the iterator/container-style cursor classes * C++-style wrappers for SQL cursors * * Copyright (c) 2004-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/cursor.hxx" libpqxx-4.0.1+dfsg/include/pqxx/cursor.hxx000066400000000000000000000465671224474465600206530ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/cursor.hxx * * DESCRIPTION * definition of the iterator/container-style cursor classes * C++-style wrappers for SQL cursors * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/cursor instead. * * Copyright (c) 2004-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_CURSOR #define PQXX_H_CURSOR #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #ifdef PQXX_HAVE_LIMITS #include #endif #include "pqxx/result" #include "pqxx/transaction_base" namespace pqxx { class dbtransaction; /// Common definitions for cursor types /** In C++ terms, fetches are always done in pre-increment or pre-decrement * fashion--i.e. the result does not include the row the cursor is on at the * beginning of the fetch, and the cursor ends up being positioned on the last * row in the result. * * There are singular positions akin to @c end() at both the beginning and the * end of the cursor's range of movement, although these fit in so naturally * with the semantics that one rarely notices them. The cursor begins at the * first of these, but any fetch in the forward direction will move the cursor * off this position and onto the first row before returning anything. */ class PQXX_LIBEXPORT cursor_base { public: typedef result::size_type size_type; typedef result::difference_type difference_type; /// Cursor access-pattern policy /** Allowing a cursor to move forward only can result in better performance, * so use this access policy whenever possible. */ enum accesspolicy { /// Cursor can move forward only forward_only, /// Cursor can move back and forth random_access }; /// Cursor update policy /** * @warning Not all PostgreSQL versions support updatable cursors. */ enum updatepolicy { /// Cursor can be used to read data but not to write read_only, /// Cursor can be used to update data as well as read it update }; /// Cursor destruction policy /** The normal thing to do is to make a cursor object the owner of the SQL * cursor it represents. There may be cases, however, where a cursor needs to * persist beyond the end of the current transaction (and thus also beyond the * lifetime of the cursor object that created it!), where it can be "adopted" * into a new cursor object. See the basic_cursor documentation for an * explanation of cursor adoption. * * If a cursor is created with "loose" ownership policy, the object * representing the underlying SQL cursor will not take the latter with it * when its own lifetime ends, nor will its originating transaction. * * @warning Use this feature with care and moderation. Only one cursor object * should be responsible for any one underlying SQL cursor at any given time. * * @warning Don't "leak" cursors! As long as any "loose" cursor exists, * any attempts to deactivate or reactivate the connection, implicitly or * explicitly, are quietly ignored. */ enum ownershippolicy { /// Destroy SQL cursor when cursor object is closed at end of transaction owned, /// Leave SQL cursor in existence after close of object and transaction loose }; /** * @name Special movement distances */ //@{ /// Special value: read until end /** @return Maximum value for result::difference_type, so the cursor will * attempt to read the largest possible result set. */ static difference_type all() throw (); //[t81] /// Special value: read one row only /** @return Unsurprisingly, 1 */ static difference_type next() throw () { return 1; } //[t81] /// Special value: read backwards, one row only /** @return Unsurprisingly, -1 */ static difference_type prior() throw () { return -1; } //[t0] /// Special value: read backwards from current position back to origin /** @return Minimum value for result::difference_type */ static difference_type backward_all() throw (); //[t0] //@} /// Name of underlying SQL cursor /** * @returns Name of SQL cursor, which may differ from original given name. * @warning Don't use this to access the SQL cursor directly without going * through the provided wrapper classes! */ const PGSTD::string &name() const throw () { return m_name; } //[t81] protected: cursor_base(connection_base &, const PGSTD::string &Name, bool embellish_name=true); const PGSTD::string m_name; private: /// Not allowed cursor_base(); /// Not allowed cursor_base(const cursor_base &); /// Not allowed cursor_base &operator=(const cursor_base &); }; inline cursor_base::difference_type cursor_base::all() throw () { #ifdef PQXX_HAVE_LIMITS return PGSTD::numeric_limits::max()-1; #else return INT_MAX-1; #endif } inline cursor_base::difference_type cursor_base::backward_all() throw () { #ifdef PQXX_HAVE_LIMITS return PGSTD::numeric_limits::min()+1; #else return INT_MIN+1; #endif } namespace internal { /// Cursor with SQL positioning semantics /** Thin wrapper around an SQL cursor, with SQL's ideas of positioning. * * SQL cursors have pre-increment/pre-decrement semantics, with on either end of * the result set a special position that does not repesent a row. This class * models SQL cursors for the purpose of implementing more C++-like semantics on * top. * * Positions of actual rows are numbered starting at 1. Position 0 exists but * does not refer to a row. There is a similar non-row position at the end of * the result set. * * Don't use this at home. You deserve better. Use the stateles_cursor * instead. */ class PQXX_LIBEXPORT sql_cursor : public cursor_base { public: sql_cursor(transaction_base &t, const PGSTD::string &query, const PGSTD::string &cname, cursor_base::accesspolicy ap, cursor_base::updatepolicy up, cursor_base::ownershippolicy op, bool hold); sql_cursor(transaction_base &t, const PGSTD::string &cname, cursor_base::ownershippolicy op); ~sql_cursor() throw () { close(); } result fetch(difference_type rows, difference_type &displacement); result fetch(difference_type rows) { difference_type d=0; return fetch(rows, d); } difference_type move(difference_type rows, difference_type &displacement); difference_type move(difference_type rows) { difference_type d=0; return move(rows, d); } /// Current position, or -1 for unknown /** * The starting position, just before the first row, counts as position zero. * * Position may be unknown if (and only if) this cursor was adopted, and has * never hit its starting position (position zero). */ difference_type pos() const throw () { return m_pos; } /// End position, or -1 for unknown /** * Returns the final position, just after the last row in the result set. The * starting position, just before the first row, counts as position zero. * * End position is unknown until it is encountered during use. */ difference_type endpos() const throw () { return m_endpos; } /// Return zero-row result for this cursor const result &empty_result() const throw () { return m_empty_result; } void close() throw (); private: difference_type adjust(difference_type hoped, difference_type actual); static PGSTD::string stridestring(difference_type); /// Initialize cached empty result. Call only at beginning or end! void init_empty_result(transaction_base &); /// Connection this cursor lives in connection_base &m_home; /// Zero-row result from this cursor (or plain empty one if cursor is adopted) result m_empty_result; result m_cached_current_row; /// Is this cursor adopted (as opposed to created by this cursor object)? bool m_adopted; /// Will this cursor object destroy its SQL cursor when it dies? cursor_base::ownershippolicy m_ownership; /// At starting position (-1), somewhere in the middle (0), or past end (1) int m_at_end; /// Position, or -1 for unknown difference_type m_pos; /// End position, or -1 for unknown difference_type m_endpos; }; result::size_type PQXX_LIBEXPORT obtain_stateless_cursor_size(sql_cursor &); result PQXX_LIBEXPORT stateless_cursor_retrieve( sql_cursor &, result::difference_type size, result::difference_type begin_pos, result::difference_type end_pos); } // namespace internal /// "Stateless cursor" class: easy API for retrieving parts of result sets /** This is a front-end for SQL cursors, but with a more C++-like API. * * Actually, stateless_cursor feels entirely different from SQL cursors. You * don't keep track of positions, fetches, and moves; you just say which rows * you want. See the retrieve() member function. */ template class stateless_cursor { public: typedef result::size_type size_type; typedef result::difference_type difference_type; /// Create cursor. stateless_cursor( transaction_base &trans, const PGSTD::string &query, const PGSTD::string &cname, bool hold) : m_cur(trans, query, cname, cursor_base::random_access, up, op, hold) { } /// Adopt existing scrolling SQL cursor. stateless_cursor( transaction_base &trans, const PGSTD::string adopted_cursor) : m_cur(trans, adopted_cursor, op) { // Put cursor in known position m_cur.move(cursor_base::backward_all()); } void close() throw () { m_cur.close(); } /// Number of rows in cursor's result set /** @note This function is not const; it may need to scroll to find the size * of the result set. */ size_type size() { return internal::obtain_stateless_cursor_size(m_cur); } /// Retrieve rows from begin_pos (inclusive) to end_pos (exclusive) /** Rows are numbered starting from 0 to size()-1. * * @param begin_pos First row to retrieve. May be one row beyond the end of * the result set, to avoid errors for empty result sets. Otherwise, must be * a valid row number in the result set. * @param end_pos Row up to which to fetch. Rows are returned ordered from * begin_pos to end_pos, i.e. in ascending order if begin_pos < end_pos but * in descending order if begin_pos > end_pos. The end_pos may be arbitrarily * inside or outside the result set; only existing rows are included in the * result. */ result retrieve(difference_type begin_pos, difference_type end_pos) { return internal::stateless_cursor_retrieve( m_cur, result::difference_type(size()), begin_pos, end_pos); } const PGSTD::string &name() const throw () { return m_cur.name(); } private: internal::sql_cursor m_cur; }; class icursor_iterator; namespace internal { namespace gate { class icursor_iterator_icursorstream; class icursorstream_icursor_iterator; } // namespace internal::gate } // namespace internal /// Simple read-only cursor represented as a stream of results /** SQL cursors can be tricky, especially in C++ since the two languages seem to * have been designed on different planets. An SQL cursor has two singular * positions akin to @c end() on either side of the underlying result set. * * These cultural differences are hidden from view somewhat by libpqxx, which * tries to make SQL cursors behave more like familiar C++ entities such as * iterators, sequences, streams, and containers. * * Data is fetched from the cursor as a sequence of result objects. Each of * these will contain the number of rows defined as the stream's stride, except * of course the last block of data which may contain fewer rows. * * This class can create or adopt cursors that live outside any backend * transaction, which your backend version may not support. */ class PQXX_LIBEXPORT icursorstream { public: typedef cursor_base::size_type size_type; typedef cursor_base::difference_type difference_type; /// Set up a read-only, forward-only cursor /** Roughly equivalent to a C++ Standard Library istream, this cursor type * supports only two operations: reading a block of rows while moving forward, * and moving forward without reading any data. * * @param context Transaction context that this cursor will be active in * @param query SQL query whose results this cursor shall iterate * @param basename Suggested name for the SQL cursor; a unique code will be * appended by the library to ensure its uniqueness * @param sstride Number of rows to fetch per read operation; must be a * positive number */ icursorstream(transaction_base &context, const PGSTD::string &query, const PGSTD::string &basename, difference_type sstride=1); //[t81] /// Adopt existing SQL cursor. Use with care. /** Forms a cursor stream around an existing SQL cursor, as returned by e.g. a * server-side function. The SQL cursor will be cleaned up by the stream's * destructor as if it had been created by the stream; cleaning it up by hand * or adopting the same cursor twice is an error. * * Passing the name of the cursor as a string is not allowed, both to avoid * confusion with the other constructor and to discourage unnecessary use of * adopted cursors. * * @warning It is technically possible to adopt a "WITH HOLD" cursor, i.e. a * cursor that stays alive outside its creating transaction. However, any * cursor stream (including the underlying SQL cursor, naturally) must be * destroyed before its transaction context object is destroyed. Therefore * the only way to use SQL's WITH HOLD feature is to adopt the cursor, but * defer doing so until after entering the transaction context that will * eventually destroy it. * * @param context Transaction context that this cursor will be active in. * @param cname Result field containing the name of the SQL cursor to adopt. * @param sstride Number of rows to fetch per read operation; must be a * positive number. * @param op Ownership policy. Determines whether the cursor underlying this * stream will be destroyed when the stream is closed. */ icursorstream(transaction_base &context, const field &cname, difference_type sstride=1, cursor_base::ownershippolicy op=cursor_base::owned); //[t84] operator bool() const throw () { return !m_done; } /// Read new value into given result object; same as operator >> /** The result set may continue any number of rows from zero to the chosen * stride, inclusive. An empty result will only be returned if there are no * more rows to retrieve. * @return Reference to this very stream, to facilitate "chained" invocations * ("C.get(r1).get(r2);") */ icursorstream &get(result &res) { res = fetchblock(); return *this; } //[t81] /// Read new value into given result object; same as get(result &) /** The result set may continue any number of rows from zero to the chosen * stride, inclusive. An empty result will only be returned if there are no * more rows to retrieve. * @return Reference to this very stream, to facilitate "chained" invocations * ("C >> r1 >> r2;") */ icursorstream &operator>>(result &res) { return get(res); } //[t81] /// Move given number of rows forward (ignoring stride) without reading data /** * @return Reference to this very stream, to facilitate "chained" invocations * ("C.ignore(2).get(r).ignore(4);") */ icursorstream &ignore(PGSTD::streamsize n=1); //[t81] /// Change stride, i.e. the number of rows to fetch per read operation /** * @param stride Must be a positive number */ void set_stride(difference_type stride); //[t81] difference_type stride() const throw () { return m_stride; } //[t81] private: result fetchblock(); friend class internal::gate::icursorstream_icursor_iterator; size_type forward(size_type n=1); void insert_iterator(icursor_iterator *) throw (); void remove_iterator(icursor_iterator *) const throw (); void service_iterators(difference_type); internal::sql_cursor m_cur; difference_type m_stride; difference_type m_realpos, m_reqpos; mutable icursor_iterator *m_iterators; bool m_done; }; /// Approximate istream_iterator for icursorstream /** Intended as an implementation of an input_iterator (as defined by the C++ * Standard Library), this class supports only two basic operations: reading the * current element, and moving forward. In addition to the minimal guarantees * for istream_iterators, this class supports multiple successive reads of the * same position (the current result set is cached in the iterator) even after * copying and even after new data have been read from the stream. This appears * to be a requirement for input_iterators. Comparisons are also supported in * the general case. * * The iterator does not care about its own position, however. Moving an * iterator forward moves the underlying stream forward and reads the data from * the new stream position, regardless of the iterator's old position in the * stream. * * The stream's stride defines the granularity for all iterator movement or * access operations, i.e. "ici += 1" advances the stream by one stride's worth * of tuples, and "*ici++" reads one stride's worth of tuples from the stream. * * @warning Do not read from the underlying stream or its cursor, move its read * position, or change its stride, between the time the first icursor_iterator * on it is created and the time its last icursor_iterator is destroyed. * * @warning Manipulating these iterators within the context of a single cursor * stream is not thread-safe. Creating a new iterator, copying one, or * destroying one affects the stream as a whole. */ class PQXX_LIBEXPORT icursor_iterator : public PGSTD::iterator { public: typedef icursorstream istream_type; typedef istream_type::size_type size_type; typedef istream_type::difference_type difference_type; icursor_iterator() throw (); //[t84] explicit icursor_iterator(istream_type &) throw (); //[t84] icursor_iterator(const icursor_iterator &) throw (); //[t84] ~icursor_iterator() throw (); const result &operator*() const { refresh(); return m_here; } //[t84] const result *operator->() const { refresh(); return &m_here; } //[t84] icursor_iterator &operator++(); //[t84] icursor_iterator operator++(int); //[t84] icursor_iterator &operator+=(difference_type); //[t84] icursor_iterator &operator=(const icursor_iterator &) throw (); //[t84] bool operator==(const icursor_iterator &rhs) const; //[t84] bool operator!=(const icursor_iterator &rhs) const throw () //[t84] { return !operator==(rhs); } bool operator<(const icursor_iterator &rhs) const; //[t84] bool operator>(const icursor_iterator &rhs) const //[t84] { return rhs < *this; } bool operator<=(const icursor_iterator &rhs) const //[t84] { return !(*this > rhs); } bool operator>=(const icursor_iterator &rhs) const //[t84] { return !(*this < rhs); } private: void refresh() const; friend class internal::gate::icursor_iterator_icursorstream; difference_type pos() const throw () { return m_pos; } void fill(const result &); icursorstream *m_stream; result m_here; difference_type m_pos; icursor_iterator *m_prev, *m_next; }; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/dbtransaction000066400000000000000000000012651224474465600213450ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/dbtransaction * * DESCRIPTION * pqxx::dbtransaction abstract base class. * pqxx::dbransaction defines a real transaction on the database * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/dbtransaction.hxx" libpqxx-4.0.1+dfsg/include/pqxx/dbtransaction.hxx000066400000000000000000000102051224474465600221450ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/dbtransaction.hxx * * DESCRIPTION * definition of the pqxx::dbtransaction abstract base class. * pqxx::dbransaction defines a real transaction on the database * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead. * * Copyright (c) 2004-2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_DBTRANSACTION #define PQXX_H_DBTRANSACTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/transaction_base" namespace pqxx { enum readwrite_policy { read_only, read_write }; /// Abstract base class responsible for bracketing a backend transaction /** * @addtogroup transaction Transaction classes * * Use a dbtransaction-derived object such as "work" (transaction<>) to enclose * operations on a database in a single "unit of work." This ensures that the * whole series of operations either succeeds as a whole or fails completely. * In no case will it leave half-finished work behind in the database. * * Once processing on a transaction has succeeded and any changes should be * allowed to become permanent in the database, call commit(). If something * has gone wrong and the changes should be forgotten, call abort() instead. * If you do neither, an implicit abort() is executed at destruction time. * * It is an error to abort a transaction that has already been committed, or to * commit a transaction that has already been aborted. Aborting an already * aborted transaction or committing an already committed one has been allowed * to make errors easier to deal with. Repeated aborts or commits have no * effect after the first one. * * Database transactions are not suitable for guarding long-running processes. * If your transaction code becomes too long or too complex, please consider * ways to break it up into smaller ones. There's no easy, general way to do * this since application-specific considerations become important at this * point. * * The actual operations for beginning and committing/aborting the backend * transaction are implemented by a derived class. The implementing concrete * class must also call Begin() and End() from its constructors and destructors, * respectively, and implement do_exec(). * * @warning Read-only transactions require backend version 8.0 or better. On * older backends, these transactions will be able to modify the database. * Even if you have a newer server version, it is not wise to rely on read-only * transactions alone to enforce a security model. */ class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base { public: virtual ~dbtransaction(); protected: dbtransaction( connection_base &, const PGSTD::string &IsolationString, readwrite_policy rw=read_write); explicit dbtransaction( connection_base &, bool direct=true, readwrite_policy rw=read_write); /// Start a transaction on the backend and set desired isolation level void start_backend_transaction(); /// Sensible default implemented here: begin backend transaction virtual void do_begin(); //[t1] /// Sensible default implemented here: perform query virtual result do_exec(const char Query[]); /// To be implemented by derived class: commit backend transaction virtual void do_commit() =0; /// Sensible default implemented here: abort backend transaction /** Default implementation does two things: *
    *
  1. Clears the "connection reactivation avoidance counter"
  2. *
  3. Executes a ROLLBACK statement
  4. *
*/ virtual void do_abort(); //[t13] static PGSTD::string fullname(const PGSTD::string &ttype, const PGSTD::string &isolation); private: /// Precomputed SQL command to run at start of this transaction PGSTD::string m_StartCmd; }; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/errorhandler000066400000000000000000000012141224474465600211730ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/errorhandler * * DESCRIPTION * pqxx::errorhandler class. * Callbacks for handling errors and warnings. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/errorhandler.hxx" libpqxx-4.0.1+dfsg/include/pqxx/errorhandler.hxx000066400000000000000000000052011224474465600220010ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/errorhandler.hxx * * DESCRIPTION * definition of the pqxx::errorhandler class. * pqxx::errorhandler handlers errors and warnings in a database session. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_ERRORHANDLER #define PQXX_H_ERRORHANDLER #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include namespace pqxx { class connection_base; namespace internal { namespace gate { class errorhandler_connection_base; } } /** * @addtogroup errorhandler * @{ */ /// Base class for error-handler callbacks. /** To receive errors and warnings from a connection, subclass this with your * own error-handler functor, and instantiate it for the connection. Destroying * the handler un-registers it. * * A connection can have multiple error handlers at the same time. When the * database connection emits an error or warning message, it passes the message * to each error handler, starting with the most recently registered one and * progressing towards the oldest one. However an error handler may also * instruct the connection not to pass the message to further handlers by * returning "false." */ class PQXX_LIBEXPORT errorhandler : public PGSTD::unary_function { public: explicit errorhandler(connection_base &); virtual ~errorhandler(); /// Define in subclass: receive an error or warning message from the database. /** * @return Whether the same error message should also be passed to the * remaining, older errorhandlers. */ virtual bool operator()(const char msg[]) throw () =0; private: connection_base *m_home; friend class internal::gate::errorhandler_connection_base; void unregister() throw (); // Not allowed: errorhandler(); errorhandler(const errorhandler &); errorhandler &operator=(const errorhandler &); }; /// An error handler that suppresses any previously registered error handlers. class quiet_errorhandler : public errorhandler { public: quiet_errorhandler(connection_base &conn) : errorhandler(conn) {} virtual bool operator()(const char[]) throw () { return false; } }; /** * @} */ } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/except000066400000000000000000000012311224474465600177730ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/except * * DESCRIPTION * libpqxx exception classes * pqxx::sql_error, pqxx::broken_connection, pqxx::in_doubt_error, ... * * Copyright (c) 2003, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/except.hxx" libpqxx-4.0.1+dfsg/include/pqxx/except.hxx000066400000000000000000000322601224474465600206070ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/except.hxx * * DESCRIPTION * definition of libpqxx exception classes * pqxx::sql_error, pqxx::broken_connection, pqxx::in_doubt_error, ... * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/except instead. * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_EXCEPT #define PQXX_H_EXCEPT #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include "pqxx/util" namespace pqxx { /** * @addtogroup exception Exception classes * * These exception classes follow, roughly, the two-level hierarchy defined by * the PostgreSQL error codes (see Appendix A of the PostgreSQL documentation * corresponding to your server version). The hierarchy given here is, as yet, * not a complete mirror of the error codes. There are some other differences * as well, e.g. the error code statement_completion_unknown has a separate * status in libpqxx as in_doubt_error, and too_many_connections is classified * as a broken_connection rather than a subtype of insufficient_resources. * * @see http://www.postgresql.org/docs/8.1/interactive/errcodes-appendix.html * * @{ */ /// Mixin base class to identify libpqxx-specific exception types /** * If you wish to catch all exception types specific to libpqxx for some reason, * catch this type. All of libpqxx's exception classes are derived from it * through multiple-inheritance (they also fit into the standard library's * exception hierarchy in more fitting places). * * This class is not derived from std::exception, since that could easily lead * to exception classes with multiple std::exception base-class objects. As * Bart Samwel points out, "catch" is subject to some nasty fineprint in such * cases. */ class PQXX_LIBEXPORT PQXX_NOVTABLE pqxx_exception { public: /// Support run-time polymorphism, and keep this class abstract virtual ~pqxx_exception() throw () =0; /// Return std::exception base-class object /** Use this to get at the exception's what() function, or to downcast to a * more specific type using dynamic_cast. * * Casting directly from pqxx_exception to a specific exception type is not * likely to work since pqxx_exception is not (and could not safely be) * derived from std::exception. * * For example, to test dynamically whether an exception is an sql_error: * * @code * try * { * // ... * } * catch (const pqxx::pqxx_exception &e) * { * std::cerr << e.base().what() << std::endl; * const pqxx::sql_error *s=dynamic_cast(&e.base()); * if (s) std::cerr << "Query was: " << s->query() << std::endl; * } * @endcode */ virtual const PQXX_CONST PGSTD::exception &base() const throw () =0; //[t0] }; /// Run-time failure encountered by libpqxx, similar to std::runtime_error class PQXX_LIBEXPORT failure : public pqxx_exception, public PGSTD::runtime_error { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit failure(const PGSTD::string &); }; /// Exception class for lost or failed backend connection. /** * @warning When this happens on Unix-like systems, you may also get a SIGPIPE * signal. That signal aborts the program by default, so if you wish to be able * to continue after a connection breaks, be sure to disarm this signal. * * If you're working on a Unix-like system, see the manual page for * @c signal (2) on how to deal with SIGPIPE. The easiest way to make this * signal harmless is to make your program ignore it: * * @code * #include * * int main() * { * signal(SIGPIPE, SIG_IGN); * // ... * @endcode */ class PQXX_LIBEXPORT broken_connection : public failure { public: broken_connection(); explicit broken_connection(const PGSTD::string &); }; /// Exception class for failed queries. /** Carries a copy of the failed query in addition to a regular error message */ class PQXX_LIBEXPORT sql_error : public failure { PGSTD::string m_Q; public: sql_error(); explicit sql_error(const PGSTD::string &); sql_error(const PGSTD::string &, const PGSTD::string &Q); virtual ~sql_error() throw (); /// The query whose execution triggered the exception const PGSTD::string & PQXX_PURE query() const throw (); //[t56] }; // TODO: should this be called statement_completion_unknown!? /// "Help, I don't know whether transaction was committed successfully!" /** Exception that might be thrown in rare cases where the connection to the * database is lost while finishing a database transaction, and there's no way * of telling whether it was actually executed by the backend. In this case * the database is left in an indeterminate (but consistent) state, and only * manual inspection will tell which is the case. */ class PQXX_LIBEXPORT in_doubt_error : public failure { public: explicit in_doubt_error(const PGSTD::string &); }; /// Internal error in libpqxx library class PQXX_LIBEXPORT internal_error : public pqxx_exception, public PGSTD::logic_error { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit internal_error(const PGSTD::string &); }; /// Error in usage of libpqxx library, similar to std::logic_error class PQXX_LIBEXPORT usage_error : public pqxx_exception, public PGSTD::logic_error { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit usage_error(const PGSTD::string &); }; /// Invalid argument passed to libpqxx, similar to std::invalid_argument class PQXX_LIBEXPORT argument_error : public pqxx_exception, public PGSTD::invalid_argument { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit argument_error(const PGSTD::string &); }; class PQXX_LIBEXPORT conversion_error : public pqxx_exception, public PGSTD::domain_error { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit conversion_error(const PGSTD::string &); }; /// Something is out of range, similar to std::out_of_range class PQXX_LIBEXPORT range_error : public pqxx_exception, public PGSTD::out_of_range { virtual const PGSTD::exception &base() const throw () { return *this; } public: explicit range_error(const PGSTD::string &); }; /// Database feature not supported in current setup class PQXX_LIBEXPORT feature_not_supported : public sql_error { public: explicit feature_not_supported(const PGSTD::string &err) : sql_error(err) {} feature_not_supported(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; /// Error in data provided to SQL statement class PQXX_LIBEXPORT data_exception : public sql_error { public: explicit data_exception(const PGSTD::string &err) : sql_error(err) {} data_exception(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; class PQXX_LIBEXPORT integrity_constraint_violation : public sql_error { public: explicit integrity_constraint_violation(const PGSTD::string &err) : sql_error(err) {} integrity_constraint_violation(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err, Q) {} }; class PQXX_LIBEXPORT restrict_violation : public integrity_constraint_violation { public: explicit restrict_violation(const PGSTD::string &err) : integrity_constraint_violation(err) {} restrict_violation(const PGSTD::string &err, const PGSTD::string &Q) : integrity_constraint_violation(err, Q) {} }; class PQXX_LIBEXPORT not_null_violation : public integrity_constraint_violation { public: explicit not_null_violation(const PGSTD::string &err) : integrity_constraint_violation(err) {} not_null_violation(const PGSTD::string &err, const PGSTD::string &Q) : integrity_constraint_violation(err, Q) {} }; class PQXX_LIBEXPORT foreign_key_violation : public integrity_constraint_violation { public: explicit foreign_key_violation(const PGSTD::string &err) : integrity_constraint_violation(err) {} foreign_key_violation(const PGSTD::string &err, const PGSTD::string &Q) : integrity_constraint_violation(err, Q) {} }; class PQXX_LIBEXPORT unique_violation : public integrity_constraint_violation { public: explicit unique_violation(const PGSTD::string &err) : integrity_constraint_violation(err) {} unique_violation(const PGSTD::string &err, const PGSTD::string &Q) : integrity_constraint_violation(err, Q) {} }; class PQXX_LIBEXPORT check_violation : public integrity_constraint_violation { public: explicit check_violation(const PGSTD::string &err) : integrity_constraint_violation(err) {} check_violation(const PGSTD::string &err, const PGSTD::string &Q) : integrity_constraint_violation(err, Q) {} }; class PQXX_LIBEXPORT invalid_cursor_state : public sql_error { public: explicit invalid_cursor_state(const PGSTD::string &err) : sql_error(err) {} invalid_cursor_state(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; class PQXX_LIBEXPORT invalid_sql_statement_name : public sql_error { public: explicit invalid_sql_statement_name(const PGSTD::string &err) : sql_error(err) {} invalid_sql_statement_name(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; class PQXX_LIBEXPORT invalid_cursor_name : public sql_error { public: explicit invalid_cursor_name(const PGSTD::string &err) : sql_error(err) {} invalid_cursor_name(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; class PQXX_LIBEXPORT syntax_error : public sql_error { public: /// Approximate position in string where error occurred, or -1 if unknown. const int error_position; explicit syntax_error(const PGSTD::string &err, int pos=-1) : sql_error(err), error_position(pos) {} syntax_error(const PGSTD::string &err, const PGSTD::string &Q, int pos=-1) : sql_error(err,Q), error_position(pos) {} }; class PQXX_LIBEXPORT undefined_column : public syntax_error { public: explicit undefined_column(const PGSTD::string &err) : syntax_error(err) {} undefined_column(const PGSTD::string &err, const PGSTD::string &Q) : syntax_error(err, Q) {} }; class PQXX_LIBEXPORT undefined_function : public syntax_error { public: explicit undefined_function(const PGSTD::string &err) : syntax_error(err) {} undefined_function(const PGSTD::string &err, const PGSTD::string &Q) : syntax_error(err, Q) {} }; class PQXX_LIBEXPORT undefined_table : public syntax_error { public: explicit undefined_table(const PGSTD::string &err) : syntax_error(err) {} undefined_table(const PGSTD::string &err, const PGSTD::string &Q) : syntax_error(err, Q) {} }; class PQXX_LIBEXPORT insufficient_privilege : public sql_error { public: explicit insufficient_privilege(const PGSTD::string &err) : sql_error(err) {} insufficient_privilege(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; /// Resource shortage on the server class PQXX_LIBEXPORT insufficient_resources : public sql_error { public: explicit insufficient_resources(const PGSTD::string &err) : sql_error(err) {} insufficient_resources(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err,Q) {} }; class PQXX_LIBEXPORT disk_full : public insufficient_resources { public: explicit disk_full(const PGSTD::string &err) : insufficient_resources(err) {} disk_full(const PGSTD::string &err, const PGSTD::string &Q) : insufficient_resources(err,Q) {} }; class PQXX_LIBEXPORT out_of_memory : public insufficient_resources { public: explicit out_of_memory(const PGSTD::string &err) : insufficient_resources(err) {} out_of_memory(const PGSTD::string &err, const PGSTD::string &Q) : insufficient_resources(err,Q) {} }; class PQXX_LIBEXPORT too_many_connections : public broken_connection { public: explicit too_many_connections(const PGSTD::string &err) : broken_connection(err) {} }; /// PL/pgSQL error /** Exceptions derived from this class are errors from PL/pgSQL procedures. */ class PQXX_LIBEXPORT plpgsql_error : public sql_error { public: explicit plpgsql_error(const PGSTD::string &err) : sql_error(err) {} plpgsql_error(const PGSTD::string &err, const PGSTD::string &Q) : sql_error(err, Q) {} }; /// Exception raised in PL/pgSQL procedure class PQXX_LIBEXPORT plpgsql_raise : public plpgsql_error { public: explicit plpgsql_raise(const PGSTD::string &err) : plpgsql_error(err) {} plpgsql_raise(const PGSTD::string &err, const PGSTD::string &Q) : plpgsql_error(err, Q) {} }; class PQXX_LIBEXPORT plpgsql_no_data_found : public plpgsql_error { public: explicit plpgsql_no_data_found(const PGSTD::string &err) : plpgsql_error(err) {} plpgsql_no_data_found(const PGSTD::string &err, const PGSTD::string &Q) : plpgsql_error(err, Q) {} }; class PQXX_LIBEXPORT plpgsql_too_many_rows : public plpgsql_error { public: explicit plpgsql_too_many_rows(const PGSTD::string &err) : plpgsql_error(err) {} plpgsql_too_many_rows(const PGSTD::string &err, const PGSTD::string &Q) : plpgsql_error(err, Q) {} }; /** * @} */ } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/field000066400000000000000000000011741224474465600175740ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/field * * DESCRIPTION * pqxx::field class. * pqxx::field refers to a field in a query result. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/field.hxx" libpqxx-4.0.1+dfsg/include/pqxx/field.hxx000066400000000000000000000212771224474465600204100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/field.hxx * * DESCRIPTION * definitions for the pqxx::field class. * pqxx::field refers to a field in a query result. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/field instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_FIELD #define PQXX_H_FIELD #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/strconv" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { class result; class tuple; typedef unsigned int tuple_size_type; typedef signed int tuple_difference_type; /// Reference to a field in a result set. /** A field represents one entry in a tuple. It represents an actual value * in the result set, and can be converted to various types. */ class PQXX_LIBEXPORT field { public: typedef size_t size_type; /// Constructor. /** Create field as reference to a field in a result set. * @param T Tuple that this field is part of. * @param C Column number of this field. */ field(const tuple &T, tuple_size_type C) throw (); //[t1] /** * @name Comparison */ //@{ /// Byte-by-byte comparison of two fields (all nulls are considered equal) /** @warning null handling is still open to discussion and change! * * Handling of null values differs from that in SQL where a comparison * involving a null value yields null, so nulls are never considered equal * to one another or even to themselves. * * Null handling also probably differs from the closest equivalent in C++, * which is the NaN (Not-a-Number) value, a singularity comparable to * SQL's null. This is because the builtin == operator demands that a == a. * * The usefulness of this operator is questionable. No interpretation * whatsoever is imposed on the data; 0 and 0.0 are considered different, * as are null vs. the empty string, or even different (but possibly * equivalent and equally valid) encodings of the same Unicode character * etc. */ bool operator==(const field &) const; //[t75] /// Byte-by-byte comparison (all nulls are considered equal) /** @warning See operator==() for important information about this operator */ bool operator!=(const field &rhs) const //[t82] {return !operator==(rhs);} //@} /** * @name Column information */ //@{ /// Column name const char *name() const; //[t11] /// Column type oid type() const; //[t7] /// What table did this column come from? oid table() const; //[t2] tuple_size_type num() const { return col(); } //[t82] /// What column number in its originating table did this column come from? tuple_size_type table_column() const; //[t93] //@} /** * @name Content access */ //@{ /// Read as plain C string /** Since the field's data is stored internally in the form of a * zero-terminated C string, this is the fastest way to read it. Use the * to() or as() functions to convert the string to other types such as * @c int, or to C++ strings. */ const char *c_str() const; //[t2] /// Read value into Obj; or leave Obj untouched and return @c false if null template bool to(T &Obj) const //[t3] { const char *const bytes = c_str(); if (!bytes[0] && is_null()) return false; from_string(bytes, Obj); return true; } /// Read value into Obj; or leave Obj untouched and return @c false if null template bool operator>>(T &Obj) const //[t7] { return to(Obj); } #ifdef PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION /// Specialization: to(string &) template<> bool to(PGSTD::string &Obj) const; /// Specialization: to(const char *&). /** The buffer has the same lifetime as the result, so take care not to * use it after the result is destroyed. */ template<> bool to(const char *&Obj) const; #endif /// Read value into Obj; or use Default & return @c false if null template bool to(T &Obj, const T &Default) const //[t12] { const bool NotNull = to(Obj); if (!NotNull) Obj = Default; return NotNull; } /// Return value as object of given type, or Default if null /** Note that unless the function is instantiated with an explicit template * argument, the Default value's type also determines the result type. */ template T as(const T &Default) const //[t1] { T Obj; to(Obj, Default); return Obj; } /// Return value as object of given type, or throw exception if null template T as() const //[t45] { T Obj; const bool NotNull = to(Obj); if (!NotNull) Obj = string_traits::null(); return Obj; } bool is_null() const throw (); //[t12] size_type size() const throw (); //[t11] //@} protected: const result *home() const throw () { return m_home; } size_t idx() const throw () { return m_row; } tuple_size_type col() const throw () { return m_col; } tuple_size_type m_col; private: const result *m_home; size_t m_row; }; /// Specialization: to(string &). template<> inline bool field::to(PGSTD::string &Obj) const { const char *const bytes = c_str(); if (!bytes[0] && is_null()) return false; Obj = PGSTD::string(bytes, size()); return true; } /// Specialization: to(const char *&). /** The buffer has the same lifetime as the data in this result (i.e. of this * result object, or the last remaining one copied from it etc.), so take care * not to use it after the last result object referring to this query result is * destroyed. */ template<> inline bool field::to(const char *&Obj) const { if (is_null()) return false; Obj = c_str(); return true; } template > class field_streambuf : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_streambuf #else public PGSTD::streambuf #endif { public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; #ifdef PQXX_HAVE_STREAMBUF typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; #else typedef streamoff off_type; typedef streampos pos_type; #endif typedef PGSTD::ios::openmode openmode; typedef PGSTD::ios::seekdir seekdir; explicit field_streambuf(const field &F) : //[t74] m_Field(F) { initialize(); } #ifdef PQXX_HAVE_STREAMBUF protected: #endif virtual int sync() { return traits_type::eof(); } protected: virtual pos_type seekoff(off_type, seekdir, openmode) { return traits_type::eof(); } virtual pos_type seekpos(pos_type, openmode) {return traits_type::eof();} virtual int_type overflow(int_type) { return traits_type::eof(); } virtual int_type underflow() { return traits_type::eof(); } private: const field &m_Field; int_type initialize() { char_type *G = reinterpret_cast(const_cast(m_Field.c_str())); this->setg(G, G, G + m_Field.size()); return int_type(m_Field.size()); } }; /// Input stream that gets its data from a result field /** Use this class exactly as you would any other istream to read data from a * field. All formatting and streaming operations of @c std::istream are * supported. What you'll typically want to use, however, is the fieldstream * typedef (which defines a basic_fieldstream for @c char). This is similar to * how e.g. @c std::ifstream relates to @c std::basic_ifstream. * * This class has only been tested for the char type (and its default traits). */ template > class basic_fieldstream : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_istream #else public PGSTD::istream #endif { #ifdef PQXX_HAVE_STREAMBUF typedef PGSTD::basic_istream super; #else typedef PGSTD::istream super; #endif public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; basic_fieldstream(const field &F) : super(0), m_Buf(F) { super::init(&m_Buf); } private: field_streambuf m_Buf; }; typedef basic_fieldstream fieldstream; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/internal/000077500000000000000000000000001224474465600203775ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/include/pqxx/internal/callgate.hxx000066400000000000000000000044051224474465600227070ustar00rootroot00000000000000#ifndef PQXX_H_CALLGATE #define PQXX_H_CALLGATE /* Here's what a typical gate class definition looks like: #include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE @gateclass@ : callgate<@host@> { friend class @client@; @gateclass@(reference x) : super(x) {} // Methods here. Use home() to access the host-class object. }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx */ namespace pqxx { namespace internal { /// Base class for call gates. /** * A call gate defines a limited, private interface on the host class that * specified client classes can access. * * The metaphor works as follows: the gate stands in front of a "home," which is * really a class, and only lets specific friends in. * * To implement a call gate that gives client C access to host H, * - derive a gate class from callgate; * - make the gate class a friend of H; * - make C a friend of the gate class; and * - implement "stuff C can do with H" as private members in the gate class. * * This special kind of "gated" friendship gives C private access to H, but only * through an expressly limited interface. The gate class can access its host * object as home(). * * Keep gate classes entirely stateless. They should be ultra-lightweight * wrappers for their host classes, and be optimized away as much as possible by * the compiler. Once you start adding state, you're on a slippery slope away * from the pure, clean, limited interface pattern that gate classes are meant * to implement. * * Ideally, all member functions of the gate class should be one-liners passing * calls straight on to the host class. It can be useful however to break this * rule temporarily during inter-class refactoring. */ template class PQXX_PRIVATE callgate { protected: /// This class, to keep constructors easy. typedef callgate super; /// A reference to the host class. Helps keep constructors easy. typedef HOME &reference; callgate(reference x) : m_home(x) {} /// The home object. The gate class has full "private" access. reference home() const throw () { return m_home; } private: reference m_home; }; } // namespace pqxx::internal } // namespace pqxx #endif libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/000077500000000000000000000000001224474465600215025ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-dbtransaction.hxx000066400000000000000000000007361224474465600272310ustar00rootroot00000000000000#include namespace pqxx { class dbtransaction; namespace internal { namespace gate { class PQXX_PRIVATE connection_dbtransaction : callgate { friend class pqxx::dbtransaction; connection_dbtransaction(reference x) : super(x) {} int get_reactivation_avoidance_count() const throw () { return home().m_reactivation_avoidance.get(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-errorhandler.hxx000066400000000000000000000011001224474465600270470ustar00rootroot00000000000000#include namespace pqxx { class connection_base; class errorhandler; namespace internal { namespace gate { class PQXX_PRIVATE connection_errorhandler : callgate { friend class pqxx::errorhandler; connection_errorhandler(reference x) : super(x) {} void register_errorhandler(errorhandler *h) { home().register_errorhandler(h); } void unregister_errorhandler(errorhandler *h) { home().unregister_errorhandler(h); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-largeobject.hxx000066400000000000000000000007351224474465600266560ustar00rootroot00000000000000#include #include namespace pqxx { class largeobject; namespace internal { namespace gate { class PQXX_PRIVATE connection_largeobject : callgate { friend class pqxx::largeobject; connection_largeobject(reference x) : super(x) {} pq::PGconn *RawConnection() const { return home().RawConnection(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-notification_receiver.hxx000066400000000000000000000011661224474465600307460ustar00rootroot00000000000000#include #include namespace pqxx { class notification_receiver; namespace internal { namespace gate { class PQXX_PRIVATE connection_notification_receiver : callgate { friend class pqxx::notification_receiver; connection_notification_receiver(reference x) : super(x) {} void add_receiver(notification_receiver *receiver) { home().add_receiver(receiver); } void remove_receiver(notification_receiver *receiver) throw () { home().remove_receiver(receiver); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-parameterized_invocation.hxx000066400000000000000000000012351224474465600314560ustar00rootroot00000000000000#include namespace pqxx { class connection_base; namespace internal { namespace gate { class PQXX_PRIVATE connection_parameterized_invocation : callgate { friend class pqxx::internal::parameterized_invocation; connection_parameterized_invocation(reference x) : super(x) {} result parameterized_exec( const PGSTD::string &query, const char *const params[], const int paramlengths[], const int binaries[], int nparams) { return home().parameterized_exec( query, params, paramlengths, binaries, nparams); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-pipeline.hxx000066400000000000000000000013761224474465600262040ustar00rootroot00000000000000#include #include "pqxx/internal/libpq-forward.hxx" namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE connection_pipeline : callgate { friend class pqxx::pipeline; connection_pipeline(reference x) : super(x) {} void start_exec(const PGSTD::string &query) { home().start_exec(query); } pqxx::internal::pq::PGresult *get_result() { return home().get_result(); } void cancel_query() { home().cancel_query(); } bool consume_input() throw () { return home().consume_input(); } bool is_busy() const throw () { return home().is_busy(); } int encoding_code() { return home().encoding_code(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-prepare-invocation.hxx000066400000000000000000000014231224474465600301750ustar00rootroot00000000000000#include namespace pqxx { namespace prepare { class invocation; } // namespace pqxx::prepare namespace internal { namespace gate { class PQXX_PRIVATE connection_prepare_invocation : callgate { friend class pqxx::prepare::invocation; connection_prepare_invocation(reference x) : super(x) {} result prepared_exec( const PGSTD::string &statement, const char *const params[], const int paramlengths[], const int binary[], int nparams) { return home().prepared_exec( statement, params, paramlengths, binary, nparams); } bool prepared_exists(const PGSTD::string &statement) const { return home().prepared_exists(statement); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx000066400000000000000000000012471224474465600331650ustar00rootroot00000000000000#include namespace pqxx { namespace internal { class reactivation_avoidance_exemption; namespace gate { class PQXX_PRIVATE connection_reactivation_avoidance_exemption : callgate { friend class pqxx::internal::reactivation_avoidance_exemption; connection_reactivation_avoidance_exemption(reference x) : super(x) {} int get_counter() const { return home().m_reactivation_avoidance.get(); } void add_counter(int x) const { home().m_reactivation_avoidance.add(x); } void clear_counter() { home().m_reactivation_avoidance.clear(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-sql_cursor.hxx000066400000000000000000000010521224474465600265620ustar00rootroot00000000000000#include namespace pqxx { namespace internal { class sql_cursor; namespace gate { class PQXX_PRIVATE connection_sql_cursor : callgate { friend class pqxx::internal::sql_cursor; connection_sql_cursor(reference x) : super(x) {} result Exec(const char query[], int retries) { return home().Exec(query, retries); } void add_reactivation_avoidance_count(int n) { home().add_reactivation_avoidance_count(n); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/connection-transaction.hxx000066400000000000000000000031131224474465600267130ustar00rootroot00000000000000#include namespace pqxx { class connection_base; namespace internal { namespace gate { class PQXX_PRIVATE connection_transaction : callgate { friend class pqxx::transaction_base; connection_transaction(reference x) : super(x) {} result Exec(const char query[], int retries) { return home().Exec(query, retries); } void RegisterTransaction(transaction_base *t) { home().RegisterTransaction(t); } void UnregisterTransaction(transaction_base *t) throw () { home().UnregisterTransaction(t); } bool ReadCopyLine(PGSTD::string &line) { return home().ReadCopyLine(line); } void WriteCopyLine(const PGSTD::string &line) { home().WriteCopyLine(line); } void EndCopyWrite() { home().EndCopyWrite(); } PGSTD::string RawGetVar(const PGSTD::string &var) { return home().RawGetVar(var); } void RawSetVar(const PGSTD::string &var, const PGSTD::string &value) { home().RawSetVar(var, value); } void AddVariables(const PGSTD::map &vars) { home().AddVariables(vars); } result prepared_exec( const PGSTD::string &statement, const char *const params[], const int paramlengths[], const int binaries[], int nparams) { return home().prepared_exec( statement, params, paramlengths, binaries, nparams); } bool prepared_exists(const PGSTD::string &statement) const { return home().prepared_exists(statement); } void take_reactivation_avoidance(int counter) { home().m_reactivation_avoidance.add(counter); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/errorhandler-connection.hxx000066400000000000000000000006321224474465600270600ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE errorhandler_connection_base : callgate { friend class pqxx::connection_base; errorhandler_connection_base(reference x) : super(x) {} void unregister() throw () { home().unregister(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx000066400000000000000000000013331224474465600305320ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE icursor_iterator_icursorstream : callgate { friend class pqxx::icursorstream; icursor_iterator_icursorstream(reference x) : super(x) {} icursor_iterator::difference_type pos() const throw () { return home().pos(); } icursor_iterator *get_prev() { return home().m_prev; } void set_prev(icursor_iterator *i) { home().m_prev = i; } icursor_iterator *get_next() { return home().m_next; } void set_next(icursor_iterator *i) { home().m_next = i; } void fill(const result &r) { home().fill(r); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/icursorstream-icursor_iterator.hxx000066400000000000000000000014321224474465600305320ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE icursorstream_icursor_iterator : callgate { friend class pqxx::icursor_iterator; icursorstream_icursor_iterator(reference x) : super(x) {} void insert_iterator(icursor_iterator *i) throw () { home().insert_iterator(i); } void remove_iterator(icursor_iterator *i) const throw () { home().remove_iterator(i); } icursorstream::size_type forward() { return home().forward(); } icursorstream::size_type forward(icursorstream::size_type n) { return home().forward(n); } void service_iterators(icursorstream::difference_type p) { home().service_iterators(p); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/result-connection.hxx000066400000000000000000000006541224474465600257130ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE result_connection : callgate { friend class pqxx::connection_base; result_connection(reference x) : super(x) {} operator bool() const { return bool(home()); } bool operator!() const { return !home(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/result-creation.hxx000066400000000000000000000011341224474465600253520ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE result_creation : callgate { friend class pqxx::connection_base; friend class pqxx::pipeline; result_creation(reference x) : super(x) {} static result create( internal::pq::PGresult *rhs, int protocol, const PGSTD::string &query, int encoding_code) { return result(rhs, protocol, query, encoding_code); } void CheckStatus() const { return home().CheckStatus(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/result-sql_cursor.hxx000066400000000000000000000006331224474465600257450ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE result_sql_cursor : callgate { friend class pqxx::internal::sql_cursor; result_sql_cursor(reference x) : super(x) {} const char *CmdStatus() const throw () { return home().CmdStatus(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/transaction-subtransaction.hxx000066400000000000000000000006771224474465600276270ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE transaction_subtransaction : callgate { friend class pqxx::subtransaction; transaction_subtransaction(reference x) : super(x) {} void add_reactivation_avoidance_count(int n) { home().m_reactivation_avoidance.add(n); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/transaction-tablereader.hxx000066400000000000000000000010441224474465600270270ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE transaction_tablereader : callgate { friend class pqxx::tablereader; transaction_tablereader(reference x) : super(x) {} void BeginCopyRead(const PGSTD::string &table, const PGSTD::string &columns) { home().BeginCopyRead(table, columns); } bool ReadCopyLine(PGSTD::string &line) { return home().ReadCopyLine(line); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/transaction-tablewriter.hxx000066400000000000000000000011561224474465600271050ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE transaction_tablewriter : callgate { friend class pqxx::tablewriter; transaction_tablewriter(reference x) : super(x) {} void BeginCopyWrite( const PGSTD::string &table, const PGSTD::string &columns = PGSTD::string()) { home().BeginCopyWrite(table, columns); } void WriteCopyLine(const PGSTD::string &line) { home().WriteCopyLine(line); } void EndCopyWrite() { home().EndCopyWrite(); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/gates/transaction-transactionfocus.hxx000066400000000000000000000012001224474465600301340ustar00rootroot00000000000000#include namespace pqxx { namespace internal { namespace gate { class PQXX_PRIVATE transaction_transactionfocus : callgate { friend class pqxx::internal::transactionfocus; transaction_transactionfocus(reference x) : super(x) {} void RegisterFocus(transactionfocus *focus) { home().RegisterFocus(focus); } void UnregisterFocus(transactionfocus *focus) throw () { home().UnregisterFocus(focus); } void RegisterPendingError(const PGSTD::string &error) { home().RegisterPendingError(error); } }; } // namespace pqxx::internal::gate } // namespace pqxx::internal } // namespace pqxx libpqxx-4.0.1+dfsg/include/pqxx/internal/libpq-forward.hxx000066400000000000000000000017741224474465600237120ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/internal/libpq-forward.hxx * * DESCRIPTION * Minimal forward declarations of libpq types needed in libpqxx headers * DO NOT INCLUDE THIS FILE when building client programs. * * Copyright (c) 2005-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ extern "C" { struct pg_conn; struct pg_result; struct pgNotify; } namespace pqxx { namespace internal { /// Forward declarations of libpq types as needed in libpqxx headers namespace pq { typedef pg_conn PGconn; typedef pg_result PGresult; typedef pgNotify PGnotify; typedef void (*PQnoticeProcessor)(void *, const char *); } } /// PostgreSQL database row identifier typedef unsigned int oid; } libpqxx-4.0.1+dfsg/include/pqxx/internal/result_data.hxx000066400000000000000000000016361224474465600234450ustar00rootroot00000000000000#ifndef PQXX_H_RESULT_DATA #define PQXX_H_RESULT_DATA #include #include "pqxx/internal/libpq-forward.hxx" namespace pqxx { namespace internal { /// Information shared between all copies of a result set struct PQXX_PRIVATE result_data { /// Underlying libpq-managed result set /** @warning This member is duplicated in the result object as a performance * shortcut. */ pqxx::internal::pq::PGresult *data; /// Frontend/backend protocol version int protocol; /// Query string that yielded this result PGSTD::string query; int encoding_code; // TODO: Locking for result copy-construction etc. also goes here result_data(); result_data(pqxx::internal::pq::PGresult *, int protocol, const PGSTD::string &, int encoding_code); ~result_data(); }; void PQXX_LIBEXPORT freemem_result_data(const result_data *) throw (); } // namespace pqxx::internal } // namespace pqxx #endif libpqxx-4.0.1+dfsg/include/pqxx/internal/statement_parameters.hxx000066400000000000000000000040061224474465600253570ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/statement_parameters.hxx * * DESCRIPTION * Common implementation for statement parameter lists. * These are used for both prepared statements and parameterized statements. * DO NOT INCLUDE THIS FILE DIRECTLY. Other headers include it for you. * * Copyright (c) 2009-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_STATEMENT_PARAMETER #define PQXX_H_STATEMENT_PARAMETER #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include #include #include "pqxx/binarystring" #include "pqxx/strconv" #include "pqxx/util" namespace pqxx { namespace internal { class PQXX_LIBEXPORT statement_parameters { protected: statement_parameters(); void add_param() { this->add_checked_param("", false, false); } template void add_param(const T &v, bool nonnull) { nonnull = (nonnull && !pqxx::string_traits::is_null(v)); this->add_checked_param( (nonnull ? pqxx::to_string(v) : ""), nonnull, false); } void add_binary_param(const binarystring &b, bool nonnull) { this->add_checked_param(b.str(), nonnull, true); } /// Marshall parameter values into C-style arrays for passing to libpq. int marshall( scoped_array &values, scoped_array &lengths, scoped_array &binaries) const; private: // Not allowed statement_parameters &operator=(const statement_parameters &); void add_checked_param(const PGSTD::string &, bool nonnull, bool binary); PGSTD::vector m_values; PGSTD::vector m_nonnull; PGSTD::vector m_binary; }; } // namespace pqxx::internal } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/isolation000066400000000000000000000012431224474465600205070ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/isolation * * DESCRIPTION * transaction isolation levels * Policies and traits describing SQL transaction isolation levels * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/isolation.hxx" libpqxx-4.0.1+dfsg/include/pqxx/isolation.hxx000066400000000000000000000061741224474465600213250ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/isolation.hxx * * DESCRIPTION * definitions of transaction isolation levels * Policies and traits describing SQL transaction isolation levels * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/isolation instead. * * Copyright (c) 2003-2013, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_ISOLATION #define PQXX_H_ISOLATION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/util" namespace pqxx { /// Transaction isolation levels. /** These are as defined in the SQL standard. But there are a few notes * specific to PostgreSQL. * * First, postgres does not support "read uncommitted." The lowest level you * can get is "read committed," which is better. PostgreSQL is built on the * MVCC paradigm, which guarantees "read committed" isolation without any * additional performance overhead, so there was no point in providing the * lower level. * * Second, "repeatable read" also makes more isolation guarantees than the * standard requires. According to the standard, this level prevents "dirty * reads" and "nonrepeatable reads," but not "phantom reads." In postgres, * it actually prevents all three. * * Third, "serializable" is only properly supported starting at postgres 9.1. * If you request "serializable" isolation on an older backend, you will get * the same isolation as in "repeatable read." It's better than the "repeatable * read" defined in the SQL standard, but not a complete implementation of the * standard's "serializable" isolation level. * * In general, a lower isolation level will allow more surprising interactions * between ongoing transactions, but improve performance. A higher level * gives you more protection from subtle concurrency bugs, but sometimes it * may not be possible to complete your transaction without avoiding paradoxes * in the data. In that case a transaction may fail, and the application will * have to re-do the whole thing based on the latest state of the database. * * Study the levels and design your application with the right level in mind. */ enum isolation_level { // read_uncommitted, read_committed, repeatable_read, serializable }; /// Traits class to describe an isolation level; primarly for libpqxx's own use template struct isolation_traits { static isolation_level level() throw () { return LEVEL; } static const char *name() throw (); }; template<> inline const char *isolation_traits::name() throw () { return "READ COMMITTED"; } template<> inline const char *isolation_traits::name() throw () { return "REPEATABLE READ"; } template<> inline const char *isolation_traits::name() throw () { return "SERIALIZABLE"; } } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/largeobject000066400000000000000000000012541224474465600207710ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/largeobject * * DESCRIPTION * libpqxx's Large Objects interface * Allows access to large objects directly, or through I/O streams * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/largeobject.hxx" libpqxx-4.0.1+dfsg/include/pqxx/largeobject.hxx000066400000000000000000000553611224474465600216070ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/largeobject.hxx * * DESCRIPTION * libpqxx's Large Objects interface * Allows access to large objects directly, or through I/O streams * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/largeobject instead. * * Copyright (c) 2003-2012, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_LARGEOBJECT #define PQXX_H_LARGEOBJECT #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #ifdef PQXX_HAVE_STREAMBUF #include #else #include #endif #include "pqxx/dbtransaction" namespace pqxx { class largeobjectaccess; /// Identity of a large object /** This class encapsulates the identity of a large object. To access the * contents of the object, create a largeobjectaccess, a largeobject_streambuf, * or an ilostream, an olostream or a lostream around the largeobject. * * A largeobject must be accessed only from within a backend transaction, but * the object's identity remains valid as long as the object exists. */ class PQXX_LIBEXPORT largeobject { public: typedef long size_type; /// Refer to a nonexistent large object (similar to what a null pointer does) largeobject() throw (); //[t48] /// Create new large object /** @param T Backend transaction in which the object is to be created */ explicit largeobject(dbtransaction &T); //[t48] /// Wrap object with given oid /** Convert combination of a transaction and object identifier into a * large object identity. Does not affect the database. * @param O Object identifier for the given object */ explicit largeobject(oid O) throw () : m_ID(O) {} //[t48] /// Import large object from a local file /** Creates a large object containing the data found in the given file. * @param T Backend transaction in which the large object is to be created * @param File A filename on the client program's filesystem */ largeobject(dbtransaction &T, const PGSTD::string &File); //[t53] /// Take identity of an opened large object /** Copy identity of already opened large object. Note that this may be done * as an implicit conversion. * @param O Already opened large object to copy identity from */ largeobject(const largeobjectaccess &O) throw (); //[t50] /// Object identifier /** The number returned by this function identifies the large object in the * database we're connected to (or oid_none is returned if we refer to the * null object). */ oid id() const throw () { return m_ID; } //[t48] /** * @name Identity comparisons * * These operators compare the object identifiers of large objects. This has * nothing to do with the objects' actual contents; use them only for keeping * track of containers of references to large objects and such. */ //@{ /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator==(const largeobject &other) const //[t51] { return m_ID == other.m_ID; } /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator!=(const largeobject &other) const //[t51] { return m_ID != other.m_ID; } /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator<=(const largeobject &other) const //[t51] { return m_ID <= other.m_ID; } /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator>=(const largeobject &other) const //[t51] { return m_ID >= other.m_ID; } /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator<(const largeobject &other) const //[t51] { return m_ID < other.m_ID; } /// Compare object identities /** @warning Only valid between large objects in the same database. */ bool operator>(const largeobject &other) const //[t51] { return m_ID > other.m_ID; } //@} /// Export large object's contents to a local file /** Writes the data stored in the large object to the given file. * @param T Transaction in which the object is to be accessed * @param File A filename on the client's filesystem */ void to_file(dbtransaction &T, const PGSTD::string &File) const; //[t52] /// Delete large object from database /** Unlike its low-level equivalent cunlink, this will throw an exception if * deletion fails. * @param T Transaction in which the object is to be deleted */ void remove(dbtransaction &T) const; //[t48] protected: static internal::pq::PGconn * PQXX_PURE RawConnection(const dbtransaction &T); PGSTD::string Reason(int err) const; private: oid m_ID; }; // TODO: New hierarchy with separate read / write / mixed-mode access /// Accessor for large object's contents. class PQXX_LIBEXPORT largeobjectaccess : private largeobject { public: using largeobject::size_type; typedef long off_type; typedef size_type pos_type; /// Open mode: @c in, @c out (can be combined with the "or" operator) /** According to the C++ standard, these should be in @c std::ios_base. We * take them from @c std::ios instead, which should be safe because it * inherits the same definition, to accommodate gcc 2.95 & 2.96. */ typedef PGSTD::ios::openmode openmode; /// Seek direction: @c beg, @c cur, @c end /** According to the C++ standard, these should be in @c std::ios_base. We * take them from @c std::ios instead, which should be safe because it * inherits the same definition, to accommodate gcc 2.95 & 2.96. */ typedef PGSTD::ios::seekdir seekdir; /// Create new large object and open it /** * @param T Backend transaction in which the object is to be created * @param mode Access mode, defaults to ios_base::in | ios_base::out */ explicit largeobjectaccess(dbtransaction &T, openmode mode = PGSTD::ios::in | PGSTD::ios::out); //[t51] /// Open large object with given oid /** Convert combination of a transaction and object identifier into a * large object identity. Does not affect the database. * @param T Transaction in which the object is to be accessed * @param O Object identifier for the given object * @param mode Access mode, defaults to ios_base::in | ios_base::out */ largeobjectaccess(dbtransaction &T, oid O, openmode mode = PGSTD::ios::in | PGSTD::ios::out); //[t52] /// Open given large object /** Open a large object with the given identity for reading and/or writing * @param T Transaction in which the object is to be accessed * @param O Identity for the large object to be accessed * @param mode Access mode, defaults to ios_base::in | ios_base::out */ largeobjectaccess(dbtransaction &T, largeobject O, openmode mode = PGSTD::ios::in | PGSTD::ios::out); //[t50] /// Import large object from a local file and open it /** Creates a large object containing the data found in the given file. * @param T Backend transaction in which the large object is to be created * @param File A filename on the client program's filesystem * @param mode Access mode, defaults to ios_base::in | ios_base::out */ largeobjectaccess(dbtransaction &T, const PGSTD::string &File, openmode mode = PGSTD::ios::in | PGSTD::ios::out); //[t55] ~largeobjectaccess() throw () { close(); } /// Object identifier /** The number returned by this function uniquely identifies the large object * in the context of the database we're connected to. */ using largeobject::id; /// Export large object's contents to a local file /** Writes the data stored in the large object to the given file. * @param File A filename on the client's filesystem */ void to_file(const PGSTD::string &File) const //[t54] { largeobject::to_file(m_Trans, File); } #ifdef PQXX_BROKEN_USING_DECL /// Export large object's contents to a local file /** Writes the data stored in the large object to the given file. * @param T Transaction in which the object is to be accessed * @param File A filename on the client's filesystem */ void to_file(dbtransaction &T, const PGSTD::string &F) const { largeobject::to_file(T, F); } #else using largeobject::to_file; #endif /** * @name High-level access to object contents */ //@{ /// Write data to large object /** If not all bytes could be written, an exception is thrown. * @param Buf Data to write * @param Len Number of bytes from Buf to write */ void write(const char Buf[], size_type Len); //[t51] /// Write string to large object /** If not all bytes could be written, an exception is thrown. * @param Buf Data to write; no terminating zero is written */ void write(const PGSTD::string &Buf) //[t50] { write(Buf.c_str(), static_cast(Buf.size())); } /// Read data from large object /** Throws an exception if an error occurs while reading. * @param Buf Location to store the read data in * @param Len Number of bytes to try and read * @return Number of bytes read, which may be less than the number requested * if the end of the large object is reached */ size_type read(char Buf[], size_type Len); //[t50] /// Seek in large object's data stream /** Throws an exception if an error occurs. * @return The new position in the large object */ size_type seek(size_type dest, seekdir dir); //[t51] /// Report current position in large object's data stream /** Throws an exception if an error occurs. * @return The current position in the large object */ size_type tell() const; //[t50] //@} /** * @name Low-level access to object contents * * These functions provide a more "C-like" access interface, returning special * values instead of throwing exceptions on error. These functions are * generally best avoided in favour of the high-level access functions, which * behave more like C++ functions should. */ //@{ /// Seek in large object's data stream /** Does not throw exception in case of error; inspect return value and * @c errno instead. * @param dest Offset to go to * @param dir Origin to which dest is relative: ios_base::beg (from beginning * of the object), ios_base::cur (from current access position), or * ios_base;:end (from end of object) * @return New position in large object, or -1 if an error occurred. */ pos_type cseek(off_type dest, seekdir dir) throw (); //[t50] /// Write to large object's data stream /** Does not throw exception in case of error; inspect return value and * @c errno instead. * @param Buf Data to write * @param Len Number of bytes to write * @return Number of bytes actually written, or -1 if an error occurred. */ off_type cwrite(const char Buf[], size_type Len) throw (); //[t50] /// Read from large object's data stream /** Does not throw exception in case of error; inspect return value and * @c errno instead. * @param Buf Area where incoming bytes should be stored * @param Len Number of bytes to read * @return Number of bytes actually read, or -1 if an error occurred. */ off_type cread(char Buf[], size_type Len) throw (); //[t50] /// Report current position in large object's data stream /** Does not throw exception in case of error; inspect return value and * @c errno instead. * @return Current position in large object, of -1 if an error occurred. */ pos_type ctell() const throw (); //[t50] //@} /** * @name Error/warning output */ //@{ /// Issue message to transaction's notice processor void process_notice(const PGSTD::string &) throw (); //[t50] //@} using largeobject::remove; using largeobject::operator==; using largeobject::operator!=; using largeobject::operator<; using largeobject::operator<=; using largeobject::operator>; using largeobject::operator>=; private: PGSTD::string PQXX_PRIVATE Reason(int err) const; internal::pq::PGconn *RawConnection() const { return largeobject::RawConnection(m_Trans); } void open(openmode mode); void close() throw (); dbtransaction &m_Trans; int m_fd; // Not allowed: largeobjectaccess(); largeobjectaccess(const largeobjectaccess &); largeobjectaccess operator=(const largeobjectaccess &); }; /// Streambuf to use large objects in standard I/O streams /** The standard streambuf classes provide uniform access to data storage such * as files or string buffers, so they can be accessed using standard input or * output streams. This streambuf implementation provides similar access to * large objects, so they can be read and written using the same stream classes. * * @warning This class may not work properly in compiler environments that don't * fully support Standard-compliant streambufs, such as g++ 2.95 or older. */ template > class largeobject_streambuf : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_streambuf #else public PGSTD::streambuf #endif { typedef long size_type; public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; #ifdef PQXX_HAVE_STREAMBUF typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; #else typedef streamoff off_type; typedef streampos pos_type; #endif typedef largeobjectaccess::openmode openmode; typedef largeobjectaccess::seekdir seekdir; largeobject_streambuf(dbtransaction &T, largeobject O, openmode mode = PGSTD::ios::in | PGSTD::ios::out, size_type BufSize=512) : //[t48] m_BufSize(BufSize), m_Obj(T, O, mode), m_G(0), m_P(0) { initialize(mode); } largeobject_streambuf(dbtransaction &T, oid O, openmode mode = PGSTD::ios::in | PGSTD::ios::out, size_type BufSize=512) : //[t48] m_BufSize(BufSize), m_Obj(T, O, mode), m_G(0), m_P(0) { initialize(mode); } virtual ~largeobject_streambuf() throw () { delete [] m_P; delete [] m_G; } /// For use by large object stream classes void process_notice(const PGSTD::string &s) { m_Obj.process_notice(s); } #ifdef PQXX_HAVE_STREAMBUF protected: #endif virtual int sync() { // setg() sets eback, gptr, egptr this->setg(this->eback(), this->eback(), this->egptr()); return overflow(EoF()); } protected: virtual pos_type seekoff(off_type offset, seekdir dir, openmode) { return AdjustEOF(m_Obj.cseek(largeobjectaccess::off_type(offset), dir)); } virtual pos_type seekpos(pos_type pos, openmode) { const largeobjectaccess::pos_type newpos = m_Obj.cseek( largeobjectaccess::off_type(pos), PGSTD::ios::beg); return AdjustEOF(newpos); } virtual int_type overflow(int_type ch = EoF()) { char *const pp = this->pptr(); if (!pp) return EoF(); char *const pb = this->pbase(); int_type res = 0; if (pp > pb) res = int_type(AdjustEOF(m_Obj.cwrite(pb, pp-pb))); this->setp(m_P, m_P + m_BufSize); // Write that one more character, if it's there. if (ch != EoF()) { *this->pptr() = char(ch); this->pbump(1); } return res; } virtual int_type underflow() { if (!this->gptr()) return EoF(); char *const eb = this->eback(); const int_type res(static_cast( AdjustEOF(m_Obj.cread(this->eback(), m_BufSize)))); this->setg(eb, eb, eb + ((res==EoF()) ? 0 : res)); return (!res || (res == EoF())) ? EoF() : *eb; } private: /// Shortcut for traits_type::eof() static int_type EoF() { return traits_type::eof(); } /// Helper: change error position of -1 to EOF (probably a no-op) template static PGSTD::streampos AdjustEOF(INTYPE pos) { return (pos==-1) ? PGSTD::streampos(EoF()) : PGSTD::streampos(pos); } void initialize(openmode mode) { if (mode & PGSTD::ios::in) { m_G = new char_type[unsigned(m_BufSize)]; this->setg(m_G, m_G, m_G); } if (mode & PGSTD::ios::out) { m_P = new char_type[unsigned(m_BufSize)]; this->setp(m_P, m_P + m_BufSize); } } const size_type m_BufSize; largeobjectaccess m_Obj; // Get & put buffers char_type *m_G, *m_P; }; /// Input stream that gets its data from a large object /** Use this class exactly as you would any other istream to read data from a * large object. All formatting and streaming operations of @c std::istream are * supported. What you'll typically want to use, however, is the ilostream * typedef (which defines a basic_ilostream for @c char). This is similar to * how e.g. @c std::ifstream relates to @c std::basic_ifstream. * * Currently only works for >. */ template > class basic_ilostream : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_istream #else public PGSTD::istream #endif { #ifdef PQXX_HAVE_STREAMBUF typedef PGSTD::basic_istream super; #else typedef PGSTD::istream super; #endif public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; /// Create a basic_ilostream /** * @param T Transaction in which this stream is to exist * @param O Large object to access * @param BufSize Size of buffer to use internally (optional) */ basic_ilostream(dbtransaction &T, largeobject O, largeobject::size_type BufSize=512) : //[t57] super(0), m_Buf(T, O, PGSTD::ios::in, BufSize) { super::init(&m_Buf); } /// Create a basic_ilostream /** * @param T Transaction in which this stream is to exist * @param O Identifier of a large object to access * @param BufSize Size of buffer to use internally (optional) */ basic_ilostream(dbtransaction &T, oid O, largeobject::size_type BufSize=512) : //[t48] super(0), m_Buf(T, O, PGSTD::ios::in, BufSize) { super::init(&m_Buf); } private: largeobject_streambuf m_Buf; }; typedef basic_ilostream ilostream; /// Output stream that writes data back to a large object /** Use this class exactly as you would any other ostream to write data to a * large object. All formatting and streaming operations of @c std::ostream are * supported. What you'll typically want to use, however, is the olostream * typedef (which defines a basic_olostream for @c char). This is similar to * how e.g. @c std::ofstream is related to @c std::basic_ofstream. * * Currently only works for >. */ template > class basic_olostream : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_ostream #else public PGSTD::ostream #endif { #ifdef PQXX_HAVE_STREAMBUF typedef PGSTD::basic_ostream super; #else typedef PGSTD::ostream super; #endif public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; /// Create a basic_olostream /** * @param T transaction in which this stream is to exist * @param O a large object to access * @param BufSize size of buffer to use internally (optional) */ basic_olostream(dbtransaction &T, largeobject O, largeobject::size_type BufSize=512) : //[t48] super(0), m_Buf(T, O, PGSTD::ios::out, BufSize) { super::init(&m_Buf); } /// Create a basic_olostream /** * @param T transaction in which this stream is to exist * @param O a large object to access * @param BufSize size of buffer to use internally (optional) */ basic_olostream(dbtransaction &T, oid O, largeobject::size_type BufSize=512) : //[t57] super(0), m_Buf(T, O, PGSTD::ios::out, BufSize) { super::init(&m_Buf); } ~basic_olostream() { try { #ifdef PQXX_HAVE_STREAMBUF m_Buf.pubsync(); m_Buf.pubsync(); #else m_Buf.sync(); m_Buf.sync(); #endif } catch (const PGSTD::exception &e) { m_Buf.process_notice(e.what()); } } private: largeobject_streambuf m_Buf; }; typedef basic_olostream olostream; /// Stream that reads and writes a large object /** Use this class exactly as you would a std::iostream to read data from, or * write data to a large object. All formatting and streaming operations of * @c std::iostream are supported. What you'll typically want to use, however, * is the lostream typedef (which defines a basic_lostream for @c char). This * is similar to how e.g. @c std::fstream is related to @c std::basic_fstream. * * Currently only works for >. */ template > class basic_lostream : #ifdef PQXX_HAVE_STREAMBUF public PGSTD::basic_iostream #else public PGSTD::iostream #endif { #ifdef PQXX_HAVE_STREAMBUF typedef PGSTD::basic_iostream super; #else typedef PGSTD::iostream super; #endif public: typedef CHAR char_type; typedef TRAITS traits_type; typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; /// Create a basic_lostream /** * @param T Transaction in which this stream is to exist * @param O Large object to access * @param BufSize Size of buffer to use internally (optional) */ basic_lostream(dbtransaction &T, largeobject O, largeobject::size_type BufSize=512) : //[t59] super(0), m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize) { super::init(&m_Buf); } /// Create a basic_lostream /** * @param T Transaction in which this stream is to exist * @param O Large object to access * @param BufSize Size of buffer to use internally (optional) */ basic_lostream(dbtransaction &T, oid O, largeobject::size_type BufSize=512) : //[t59] super(0), m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize) { super::init(&m_Buf); } ~basic_lostream() { try { #ifdef PQXX_HAVE_STREAMBUF m_Buf.pubsync(); m_Buf.pubsync(); #else m_Buf.sync(); m_Buf.sync(); #endif } catch (const PGSTD::exception &e) { m_Buf.process_notice(e.what()); } } private: largeobject_streambuf m_Buf; }; typedef basic_lostream lostream; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/nontransaction000066400000000000000000000012531224474465600215470ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/nontransaction * * DESCRIPTION * pqxx::nontransaction class. * pqxx::nontransaction provides nontransactional database access * * Copyright (c) 2002-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/nontransaction.hxx" libpqxx-4.0.1+dfsg/include/pqxx/nontransaction.hxx000066400000000000000000000062131224474465600223560ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/nontransaction.hxx * * DESCRIPTION * definition of the pqxx::nontransaction class. * pqxx::nontransaction provides nontransactional database access * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction instead. * * Copyright (c) 2002-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_NONTRANSACTION #define PQXX_H_NONTRANSACTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/connection_base" #include "pqxx/result" #include "pqxx/transaction_base" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { /// Simple "transaction" class offering no transactional integrity. /** * @addtogroup transaction Transaction classes * * nontransaction, like transaction or any other transaction_base-derived class, * provides access to a database through a connection. Unlike its siblings, * however, nontransaction does not maintain any kind of transactional * integrity. This may be useful eg. for read-only access to the database that * does not require a consistent, atomic view on its data; or for operations * that are not allowed within a backend transaction, such as creating tables. * * For queries that update the database, however, a real transaction is likely * to be faster unless the transaction consists of only a single record update. * * Also, you can keep a nontransaction open for as long as you like. Actual * back-end transactions are limited in lifespan, and will sometimes fail just * because they took too long to execute or were left idle for too long. This * will not happen with a nontransaction (although the connection may still time * out, e.g. when the network is unavailable for a very long time). * * Any query executed in a nontransaction is committed immediately, and neither * commit() nor abort() has any effect. * * Database features that require a backend transaction, such as cursors or * large objects, will not work in a nontransaction. */ class PQXX_LIBEXPORT nontransaction : public transaction_base { public: /// Constructor. /** Create a "dummy" transaction. * @param C Connection that this "transaction" will operate on. * @param Name Optional name for the transaction, beginning with a letter * and containing only letters and digits. */ explicit nontransaction(connection_base &C, const PGSTD::string &Name=PGSTD::string()) : //[t14] namedclass("nontransaction", Name), transaction_base(C) { Begin(); } virtual ~nontransaction(); //[t14] private: virtual void do_begin() {} //[t14] virtual result do_exec(const char C[]); //[t14] virtual void do_commit() {} //[t14] virtual void do_abort() {} //[t14] }; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/notification000066400000000000000000000012611224474465600211740ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notification * * DESCRIPTION * pqxx::notification_receiver functor interface. * pqxx::notification_receiver handles incoming notifications. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/notification.hxx" libpqxx-4.0.1+dfsg/include/pqxx/notification.hxx000066400000000000000000000074411224474465600220100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notification.hxx * * DESCRIPTION * definition of the pqxx::notification_receiver functor interface. * pqxx::notification_receiver handles incoming notifications. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/notification instead. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_NOTIFICATION #define PQXX_H_NOTIFICATION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" namespace pqxx { class connection_base; /// "Observer" base class for notifications. /** @addtogroup notification Notifications and Receivers * * To listen on a notification issued using the NOTIFY command, derive your own * class from notification_receiver and define its function-call operator to * perform whatever action you wish to take when the given notification arrives. * Then create an object of that class and pass it to your connection. DO NOT * use raw SQL to listen for notifications, or your attempts to listen won't be * resumed when a connection fails--and you'll have no way to notice. * * Notifications never arrive inside a transaction, not even in a * nontransaction. Therefore, you are free to open a transaction of your own * inside your receiver's function invocation operator. * * Notifications you are listening for may arrive anywhere within libpqxx code, * but be aware that @b PostgreSQL @b defers @b notifications @b occurring * @b inside @b transactions. (This was done for excellent reasons; just think * about what happens if the transaction where you happen to handle an incoming * notification is later rolled back for other reasons). So if you're keeping a * transaction open, don't expect any of your receivers on the same connection * to be notified. * * (For very similar reasons, outgoing notifications are also not sent until the * transaction that sends them commits.) * * Multiple receivers on the same connection may listen on a notification of the * same name. An incoming notification is processed by invoking all receivers * (zero or more) of the same name. */ class PQXX_LIBEXPORT PQXX_NOVTABLE notification_receiver : public PGSTD::binary_function { public: /// Register the receiver with a connection. /** * @param c Connnection to operate on. * @param channel Name of the notification to listen for. */ notification_receiver(connection_base &c, const PGSTD::string &channel); virtual ~notification_receiver(); /// The channel that this receiver listens on. const PGSTD::string &channel() const { return m_channel; } /// Overridable: action to invoke when notification arrives. /** * @param payload On PostgreSQL 9.0 or later, an optional string that may have * been passed to the NOTIFY command. * @param backend_pid Process ID of the database backend process that served * our connection when the notification arrived. The actual process ID behind * the connection may have changed by the time this method is called. */ virtual void operator()(const PGSTD::string &payload, int backend_pid) =0; protected: connection_base &conn() const throw () { return m_conn; } private: // Not allowed. notification_receiver(const notification_receiver &); // Not allowed. notification_receiver &operator=(const notification_receiver &); connection_base &m_conn; PGSTD::string m_channel; }; } #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/notify-listen000066400000000000000000000013001224474465600213040ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notify-listen * * DESCRIPTION * Obsolete pqxx::notify_listener functor interface. * Predecessor to notification_receiver. Deprecated. Do not use. * * Copyright (c) 2007-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/notify-listen.hxx" libpqxx-4.0.1+dfsg/include/pqxx/notify-listen.hxx000066400000000000000000000040451224474465600221230ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notify-listen.hxx * * DESCRIPTION * Definition of the obsolete pqxx::notify_listener functor interface. * Predecessor to notification_receiver. Deprecated. Do not use. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/notify-listen instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_NOTIFY_LISTEN #define PQXX_H_NOTIFY_LISTEN #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/notification" namespace pqxx { class connection_base; class notify_listener; namespace internal { /// Internal helper class to support old-style, payloadless notifications. class notify_listener_forwarder: public notification_receiver { public: notify_listener_forwarder( connection_base &c, const PGSTD::string &channel_name, notify_listener *wrappee) : notification_receiver(c, channel_name), m_wrappee(wrappee) {} virtual void operator()(const PGSTD::string &, int backend_pid); private: notify_listener *m_wrappee; }; } /// Obsolete notification receiver. /** @deprecated Use notification_receiver instead. */ class PQXX_LIBEXPORT PQXX_NOVTABLE notify_listener : public PGSTD::unary_function { public: notify_listener(connection_base &c, const PGSTD::string &n); virtual ~notify_listener() throw (); const PGSTD::string &name() const { return m_forwarder.channel(); } virtual void operator()(int be_pid) =0; protected: connection_base &Conn() const throw () { return conn(); } connection_base &conn() const throw () { return m_conn; } private: connection_base &m_conn; internal::notify_listener_forwarder m_forwarder; }; } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/performance.hxx000066400000000000000000000026011224474465600216140ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/performance.hxx * * DESCRIPTION * performance features documentation * Documentation only: libpqxx performance features. * DO NOT INCLUDE THIS FILE; it's here only to provide documentation. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ /** * @defgroup performance Performance features * * If your program's database interaction is not as efficient as it needs to be, * the first place to look is usually the SQL you're executing. But libpqxx * has a few specialized features to help you squeeze a bit more performance out * of how you issue commands and retrieve data: * \li pqxx::pipeline lets you send queries to the database in batch, and * continue other processing while they are executing. * \li @ref prepared. These can be executed many times without the server * parsing and planning them each and every time. They also save you having * to escape string parameters. * * As always of course, don't risk the quality of your code for optimizations * that you don't need! */ libpqxx-4.0.1+dfsg/include/pqxx/pipeline000066400000000000000000000011751224474465600203170ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/pipeline * * DESCRIPTION * pqxx::pipeline class. * Throughput-optimized query manager * * Copyright (c) 2003-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/pipeline.hxx" libpqxx-4.0.1+dfsg/include/pqxx/pipeline.hxx000066400000000000000000000170311224474465600211230ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/pipeline.hxx * * DESCRIPTION * definition of the pqxx::pipeline class. * Throughput-optimized query manager * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/pipeline instead. * * Copyright (c) 2003-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_PIPELINE #define PQXX_H_PIPELINE #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #ifdef PQXX_HAVE_LIMITS #include #endif #include #include #include "pqxx/transaction_base" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { /// Processes several queries in FIFO manner, optimized for high throughput /** Use a pipeline if you want to execute queries without always sitting still * while they execute. Result retrieval is decoupled from execution request; * queries "go in at the front" and results "come out the back." Actually * results may be retrieved in any order, if you want. * * Feel free to pump as many queries into the pipeline as possible, even if they * were generated after looking at a result from the same pipeline. To get the * best possible throughput, try to make insertion of queries run as far ahead * of results retrieval as possible; issue each query as early as possible and * retrieve their results as late as possible, so the pipeline has as many * ongoing queries as possible at any given time. In other words, keep it busy! * * One warning: if any of the queries you insert leads to a syntactic error, the * error may be returned as if it were generated by an older query. Future * versions may try to work around this if working in a nontransaction. */ class PQXX_LIBEXPORT pipeline : public internal::transactionfocus { public: typedef long query_id; explicit pipeline(transaction_base &, const PGSTD::string &Name=PGSTD::string()); //[t69] ~pipeline() throw (); /// Add query to the pipeline. /** Queries are accumulated in the pipeline and sent to the backend in a * concatenated format, separated by semicolons. The queries you insert must * not use this construct themselves, or the pipeline will get hopelessly * confused! * @return Identifier for this query, unique only within this pipeline */ query_id insert(const PGSTD::string &); //[t69] /// Wait for all ongoing or pending operations to complete. /** Detaches from the transaction when done. */ void complete(); //[t71] /// Forget all ongoing or pending operations and retrieved results /** Queries already sent to the backend may still be completed, depending * on implementation and timing. * * Any error state (unless caused by an internal error) will also be cleared. * This is mostly useful in a nontransaction, since a backend transaction is * aborted automatically when an error occurs. * * Detaches from the transaction when done. */ void flush(); //[t70] /// Cancel ongoing query, if any. /** May cancel any or all of the queries that have been inserted at this point * whose results have not yet been retrieved. If the pipeline lives in a * backend transaction, that transaction may be left in a nonfunctional state * in which it can only be aborted. * * Therefore, either use this function in a nontransaction, or abort the * transaction after calling it. */ void cancel(); /// Is result for given query available? bool is_finished(query_id) const; //[t71] /// Retrieve result for given query /** If the query failed for whatever reason, this will throw an exception. * The function will block if the query has not finished yet. * @warning If results are retrieved out-of-order, i.e. in a different order * than the one in which their queries were inserted, errors may "propagate" * to subsequent queries. */ result retrieve(query_id qid) //[t71] { return retrieve(m_queries.find(qid)).second; } /// Retrieve oldest unretrieved result (possibly wait for one) /** @return The query's identifier and its result set */ PGSTD::pair retrieve(); //[t69] bool empty() const throw () { return m_queries.empty(); } //[t69] /// Set maximum number of queries to retain before issuing them to the backend /** The pipeline will perform better if multiple queries are issued at once, * but retaining queries until the results are needed (as opposed to issuing * them to the backend immediately) may negate any performance benefits the * pipeline can offer. * * Recommended practice is to set this value no higher than the number of * queries you intend to insert at a time. * @param retain_max A nonnegative "retention capacity;" passing zero will * cause queries to be issued immediately * @return Old retention capacity */ int retain(int retain_max=2); //[t70] /// Resume retained query emission (harmless when not needed) void resume(); //[t70] private: class PQXX_PRIVATE Query { public: explicit Query(const PGSTD::string &q) : m_query(q), m_res() {} const result &get_result() const throw () { return m_res; } void set_result(const result &r) throw () { m_res = r; } const PGSTD::string &get_query() const throw () { return m_query; } private: PGSTD::string m_query; result m_res; }; typedef PGSTD::map QueryMap; struct getquery:PGSTD::unary_function { getquery(){} // Silences bogus warning in some gcc versions PGSTD::string operator()(QueryMap::const_iterator i) const { return i->second.get_query(); } }; void attach(); void detach(); /// Upper bound to query id's static query_id qid_limit() throw () { #if defined(PQXX_HAVE_LIMITS) return PGSTD::numeric_limits::max(); #else return LONG_MAX; #endif } /// Create new query_id query_id PQXX_PRIVATE generate_id(); bool have_pending() const throw () { return m_issuedrange.second != m_issuedrange.first; } void PQXX_PRIVATE issue(); /// The given query failed; never issue anything beyond that void set_error_at(query_id qid) throw () { if (qid < m_error) m_error = qid; } void PQXX_PRIVATE PQXX_NORETURN internal_error(const PGSTD::string &err) throw (PGSTD::logic_error); bool PQXX_PRIVATE obtain_result(bool expect_none=false); void PQXX_PRIVATE obtain_dummy(); void PQXX_PRIVATE get_further_available_results(); void PQXX_PRIVATE check_end_results(); /// Receive any results that happen to be available; it's not urgent void PQXX_PRIVATE receive_if_available(); /// Receive results, up to stop if possible void PQXX_PRIVATE receive(pipeline::QueryMap::const_iterator stop); PGSTD::pair retrieve(pipeline::QueryMap::iterator); QueryMap m_queries; PGSTD::pair m_issuedrange; int m_retain; int m_num_waiting; query_id m_q_id; /// Is there a "dummy query" pending? bool m_dummy_pending; /// Point at which an error occurred; no results beyond it will be available query_id m_error; /// Not allowed pipeline(const pipeline &); /// Not allowed pipeline &operator=(const pipeline &); }; } // namespace #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/pqxx000066400000000000000000000021631224474465600175100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/pqxx * * DESCRIPTION * Convenience header: include all libpqxx definitions * * Copyright (c) 2003-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/binarystring" #include "pqxx/connection" #include "pqxx/cursor" #include "pqxx/errorhandler" #include "pqxx/except" #include "pqxx/field" #include "pqxx/largeobject" #include "pqxx/nontransaction" #include "pqxx/notification" #include "pqxx/notify-listen" #include "pqxx/pipeline" #include "pqxx/prepared_statement" #include "pqxx/result" #include "pqxx/robusttransaction" #include "pqxx/subtransaction" #include "pqxx/strconv" #include "pqxx/tablereader" #include "pqxx/tablewriter" #include "pqxx/transaction" #include "pqxx/transactor" #include "pqxx/tuple" #include "pqxx/util" #include "pqxx/version" libpqxx-4.0.1+dfsg/include/pqxx/prepared_statement000066400000000000000000000013301224474465600223710ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/connection_base * * DESCRIPTION * Helper classes for defining and executing prepared statements * See the connection_base hierarchy for more about prepared statements * * Copyright (c) 2006-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/prepared_statement.hxx" libpqxx-4.0.1+dfsg/include/pqxx/prepared_statement.hxx000066400000000000000000000210101224474465600231740ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/prepared_statement.hxx * * DESCRIPTION * Helper classes for defining and executing prepared statements * See the connection_base hierarchy for more about prepared statements * * Copyright (c) 2006-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_PREPARED_STATEMENT #define PQXX_H_PREPARED_STATEMENT #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/internal/statement_parameters.hxx" namespace pqxx { class binarystring; class connection_base; class transaction_base; class result; /// Dedicated namespace for helper types related to prepared statements namespace prepare { /** \defgroup prepared Prepared statements * * Prepared statements are SQL queries that you define once and then invoke * as many times as you like, typically with varying parameters. It's basically * a function that you can define ad hoc. * * If you have an SQL statement that you're going to execute many times in * quick succession, it may be more efficient to prepare it once and reuse it. * This saves the database backend the effort of parsing complex SQL and * figuring out an efficient execution plan. Another nice side effect is that * you don't need to worry about escaping parameters. * * You create a prepared statement by preparing it on the connection, passing an * identifier and its SQL text. The identifier is the name by which the * prepared statement will be known; it should consist of letters, digits, and * underscores only and start with a letter. The name is case-sensitive. * * @code * void prepare_my_statement(pqxx::connection_base &c) * { * c.prepare("my_statement", "SELECT * FROM Employee WHERE name = 'Xavier'"); * } * @endcode * * Once you've done this, you'll be able to call @c my_statement from any * transaction you execute on the same connection. You start an invocation by * looking up your statement using a member function called @c "prepared". (The * definition used a different member function, called @c "prepare" ). * * @code * pqxx::result execute_my_statement(pqxx::transaction_base &t) * { * return t.prepared("my_statement").exec(); * } * @endcode * * Did I mention that prepared statements can have parameters? The query text * can contain $@c 1, @c $2 etc. as placeholders for parameter values that you * will provide when you invoke the prepared satement. * * @code * void prepare_find(pqxx::connection_base &c) * { * // Prepare a statement called "find" that looks for employees with a given * // name (parameter 1) whose salary exceeds a given number (parameter 2). * c.prepare( * "find", * "SELECT * FROM Employee WHERE name = $1 AND salary > $2"); * } * @endcode * * How do you pass those parameters? C++ has no good way to let you pass an * unlimited, variable number of arguments to a function call, and the compiler * does not know how many you are going to pass. There's a trick for that: you * can treat the value you get back from @c prepared as a function, which you * call to pass a parameter. What you get back from that call is the same * again, so you can call it again to pass another parameter and so on. * * Once you've passed all parameters in this way, you invoke the statement with * the parameters by calling @c exec on the invocation. * * This example looks up the prepared statement "find," passes @c name and * @c min_salary as parameters, and invokes the statement with those values: * * @code * pqxx::result execute_find( * pqxx::transaction_base &t, std::string name, int min_salary) * { * return t.prepared("find")(name)(min_salary).exec(); * } * @endcode * * @warning There are cases where prepared statements are actually slower than * plain SQL. Sometimes the backend can produce a better execution plan when it * knows the parameter values. For example, say you've got a web application * and you're querying for users with status "inactive" who have email addresses * in a given domain name X. If X is a very popular provider, the best way to * plan the query may be to list the inactive users first and then filter for * the email addresses you're looking for. But in other cases, it may be much * faster to find matching email addresses first and then see which of their * owners are "inactive." A prepared statement must be planned to fit either * case, but a direct query can be optimized based on table statistics, partial * indexes, etc. */ /// Helper class for passing parameters to, and executing, prepared statements class PQXX_LIBEXPORT invocation : internal::statement_parameters { public: invocation(transaction_base &, const PGSTD::string &statement); /// Execute! result exec() const; /// Has a statement of this name been defined? bool exists() const; /// Pass null parameter. invocation &operator()() { add_param(); return *this; } /// Pass parameter value. /** * @param v parameter value; will be represented as a string internally. */ template invocation &operator()(const T &v) { add_param(v, true); return *this; } /// Pass binary parameter value for a BYTEA field. /** * @param v binary string; will be passed on directly in binary form. */ invocation &operator()(const binarystring &v) { add_binary_param(v, true); return *this; } /// Pass parameter value. /** * @param v parameter value (will be represented as a string internally). * @param nonnull replaces value with null if set to false. */ template invocation &operator()(const T &v, bool nonnull) { add_param(v, nonnull); return *this; } /// Pass binary parameter value for a BYTEA field. /** * @param v binary string; will be passed on directly in binary form. * @param nonnull determines whether to pass a real value, or NULL. */ invocation &operator()(const binarystring &v, bool nonnull) { add_binary_param(v, nonnull); return *this; } /// Pass C-style parameter string, or null if pointer is null. /** * This version is for passing C-style strings; it's a template, so any * pointer type that @c to_string accepts will do. * * @warning Be very careful with the special constant @c NULL! Since @c NULL * in C++ is an @c int, not a pointer, a value of @c NULL would cause the * wrong version of this template to be invoked. To all intents and purposes * it would look like you were trying to pass a regular zero as an integer * value, instead of a null string. This is not a problem with pointer * variables that may happen to be @c NULL, since in that case the value's * type is not subject to any confusion. So if you know at compile time that * you want to pass a null value, use the zero-argument version of this * operator; if you don't want to do that, at least add a second argument of * @c false to make clear that you want a null, not a zero. * * @param v parameter value (will be represented as a C++ string internally) * @param nonnull replaces value with null if set to @c false */ template invocation &operator()(T *v, bool nonnull=true) { add_param(v, nonnull); return *this; } /// Pass C-style string parameter, or null if pointer is null. /** This duplicates the pointer-to-template-argument-type version of the * operator, but helps compilers with less advanced template implementations * disambiguate calls where C-style strings are passed. */ invocation &operator()(const char *v, bool nonnull=true) { add_param(v, nonnull); return *this; } private: /// Not allowed invocation &operator=(const invocation &); transaction_base &m_home; const PGSTD::string m_statement; PGSTD::vector m_values; PGSTD::vector m_nonnull; invocation &setparam(const PGSTD::string &, bool nonnull); }; namespace internal { /// Internal representation of a prepared statement definition struct PQXX_LIBEXPORT prepared_def { /// Text of prepared query PGSTD::string definition; /// Has this prepared statement been prepared in the current session? bool registered; prepared_def(); explicit prepared_def(const PGSTD::string &); }; } // namespace pqxx::prepare::internal } // namespace pqxx::prepare } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/result000066400000000000000000000012571224474465600200310ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/result * * DESCRIPTION * pqxx::result class and support classes. * pqxx::result represents the set of result tuples from a database query * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/result.hxx" libpqxx-4.0.1+dfsg/include/pqxx/result.hxx000066400000000000000000000406021224474465600206340ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/result.hxx * * DESCRIPTION * definitions for the pqxx::result class and support classes. * pqxx::result represents the set of result tuples from a database query * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/result instead. * * Copyright (c) 2001-2012, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_RESULT #define PQXX_H_RESULT #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #ifdef PQXX_HAVE_IOS #include #endif #include #include "pqxx/internal/result_data.hxx" #include "pqxx/except" #include "pqxx/field" #include "pqxx/tuple" #include "pqxx/util" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ // TODO: Support SQL arrays namespace pqxx { namespace internal { namespace gate { class result_connection; class result_creation; class result_sql_cursor; } // namespace internal::gate } // namespace internal class const_result_iterator; class const_reverse_result_iterator; /// Result set containing data returned by a query or command. /** This behaves as a container (as defined by the C++ standard library) and * provides random access const iterators to iterate over its tuples. A tuple * can also be accessed by indexing a result R by the tuple's zero-based * number: * * @code * for (result::size_type i=0; i < R.size(); ++i) Process(R[i]); * @endcode * * Result sets in libpqxx are lightweight, reference-counted wrapper objects * (following the Proxy design pattern) that are small and cheap to copy. Think * of a result object as a "smart pointer" to an underlying result set. * * @warning The result set that a result object points to is not thread-safe. * If you copy a result object, it still refers to the same underlying result * set. So never copy, destroy, query, or otherwise access a result while * another thread may be copying, destroying, querying, or otherwise accessing * the same result set--even if it is doing so through a different result * object! */ class PQXX_LIBEXPORT result : private internal::PQAlloc< const internal::result_data, internal::freemem_result_data> { typedef internal::PQAlloc< const internal::result_data, internal::freemem_result_data> super; public: typedef unsigned long size_type; typedef signed long difference_type; typedef pqxx::tuple reference; typedef const_result_iterator const_iterator; typedef const_iterator pointer; typedef const_iterator iterator; typedef const_reverse_result_iterator const_reverse_iterator; typedef const_reverse_iterator reverse_iterator; /// For backward compatibility only. @deprecated Use @c pqxx::tuple instead. typedef pqxx::tuple tuple; /// For backward compatibility only. @deprecated Use @c pqxx::field instead. typedef pqxx::field field; result() throw () : super(), m_data(0) {} //[t3] result(const result &rhs) throw () : //[t1] super(rhs), m_data(rhs.m_data) {} result &operator=(const result &rhs) throw () //[t10] { super::operator=(rhs); m_data=rhs.m_data; return *this; } /** * @name Comparisons */ //@{ bool operator==(const result &) const throw (); //[t70] bool operator!=(const result &rhs) const throw () //[t70] { return !operator==(rhs); } //@} const_reverse_iterator rbegin() const; //[t75] const_reverse_iterator rend() const; //[t75] const_iterator begin() const throw (); //[t1] inline const_iterator end() const throw (); //[t1] reference front() const throw () { return tuple(this,0); } //[t74] reference back() const throw () {return tuple(this,size()-1);} //[t75] size_type PQXX_PURE size() const throw (); //[t2] bool PQXX_PURE empty() const throw (); //[t11] size_type capacity() const throw () { return size(); } //[t20] void swap(result &) throw (); //[t77] const tuple operator[](size_type i) const throw () //[t2] { return tuple(this, i); } const tuple at(size_type) const throw (range_error); //[t10] void clear() throw () { super::reset(); m_data = 0; } //[t20] /** * @name Column information */ //@{ /// Number of columns in result tuple::size_type PQXX_PURE columns() const throw (); //[t11] /// Number of given column (throws exception if it doesn't exist) tuple::size_type column_number(const char ColName[]) const; //[t11] /// Number of given column (throws exception if it doesn't exist) tuple::size_type column_number(const PGSTD::string &Name) const //[t11] {return column_number(Name.c_str());} /// Name of column with this number (throws exception if it doesn't exist) const char *column_name(tuple::size_type Number) const; //[t11] /// Type of given column oid column_type(tuple::size_type ColNum) const; //[t7] /// Type of given column oid column_type(int ColNum) const //[t7] { return column_type(tuple::size_type(ColNum)); } /// Type of given column oid column_type(const PGSTD::string &ColName) const //[t7] { return column_type(column_number(ColName)); } /// Type of given column oid column_type(const char ColName[]) const //[t7] { return column_type(column_number(ColName)); } /// What table did this column come from? oid column_table(tuple::size_type ColNum) const; //[t2] /// What table did this column come from? oid column_table(int ColNum) const //[t2] { return column_table(tuple::size_type(ColNum)); } /// What table did this column come from? oid column_table(const PGSTD::string &ColName) const //[t2] { return column_table(column_number(ColName)); } /// What column in its table did this column come from? tuple::size_type table_column(tuple::size_type ColNum) const; //[t93] /// What column in its table did this column come from? tuple::size_type table_column(int ColNum) const //[t93] { return table_column(tuple::size_type(ColNum)); } /// What column in its table did this column come from? tuple::size_type table_column(const PGSTD::string &ColName) const //[t93] { return table_column(column_number(ColName)); } //@} /// Query that produced this result, if available (empty string otherwise) const PGSTD::string & PQXX_PURE query() const throw (); //[t70] /// If command was @c INSERT of 1 row, return oid of inserted row /** @return Identifier of inserted row if exactly one row was inserted, or * oid_none otherwise. */ oid PQXX_PURE inserted_oid() const; //[t13] /// If command was @c INSERT, @c UPDATE, or @c DELETE: number of affected rows /** @return Number of affected rows if last command was @c INSERT, @c UPDATE, * or @c DELETE; zero for all other commands. */ size_type PQXX_PURE affected_rows() const; //[t7] private: friend class pqxx::field; const char * PQXX_PURE GetValue(size_type Row, tuple::size_type Col) const; bool PQXX_PURE GetIsNull(size_type Row, tuple::size_type Col) const; field::size_type PQXX_PURE GetLength( size_type, tuple::size_type) const throw (); friend class pqxx::internal::gate::result_creation; result(internal::pq::PGresult *rhs, int protocol, const PGSTD::string &Query, int encoding_code); void PQXX_PRIVATE CheckStatus() const; friend class pqxx::internal::gate::result_connection; bool operator!() const throw () { return !m_data; } operator bool() const throw () { return m_data != 0; } void PQXX_PRIVATE PQXX_NORETURN ThrowSQLError( const PGSTD::string &Err, const PGSTD::string &Query) const; int PQXX_PRIVATE PQXX_PURE errorposition() const throw (); PGSTD::string PQXX_PRIVATE StatusError() const; friend class pqxx::internal::gate::result_sql_cursor; const char * PQXX_PURE CmdStatus() const throw (); /// Shortcut: pointer to result data pqxx::internal::pq::PGresult *m_data; static const PGSTD::string PQXX_PRIVATE s_empty_string; }; /// Iterator for rows (tuples) in a result. Use as result::const_iterator. /** A result, once obtained, cannot be modified. Therefore there is no * plain iterator type for result. However its const_iterator type can be * used to inspect its tuples without changing them. */ class PQXX_LIBEXPORT const_result_iterator : public PGSTD::iterator< PGSTD::random_access_iterator_tag, const tuple, result::difference_type, const_result_iterator, tuple>, public tuple { public: typedef const tuple *pointer; typedef tuple reference; typedef result::size_type size_type; typedef result::difference_type difference_type; const_result_iterator() throw () : tuple(0,0) {} const_result_iterator(const tuple &t) throw () : tuple(t) {} /** * @name Dereferencing operators */ //@{ /** The iterator "points to" its own tuple, which is also itself. This * allows a result to be addressed as a two-dimensional container without * going through the intermediate step of dereferencing the iterator. I * hope this works out to be similar to C pointer/array semantics in useful * cases. * * IIRC Alex Stepanov, the inventor of the STL, once remarked that having * this as standard behaviour for pointers would be useful in some * algorithms. So even if this makes me look foolish, I would seem to be in * distinguished company. */ pointer operator->() const { return this; } //[t12] reference operator*() const { return tuple(*this); } //[t12] //@} /** * @name Manipulations */ //@{ const_result_iterator operator++(int); //[t12] const_result_iterator &operator++() { ++m_Index; return *this; } //[t1] const_result_iterator operator--(int); //[t12] const_result_iterator &operator--() { --m_Index; return *this; } //[t12] const_result_iterator &operator+=(difference_type i) //[t12] { m_Index = size_type(difference_type(m_Index) + i); return *this; } const_result_iterator &operator-=(difference_type i) //[t12] { m_Index = size_type(difference_type (m_Index) - i); return *this; } //@} /** * @name Comparisons */ //@{ bool operator==(const const_result_iterator &i) const //[t12] {return m_Index==i.m_Index;} bool operator!=(const const_result_iterator &i) const //[t12] {return m_Index!=i.m_Index;} bool operator<(const const_result_iterator &i) const //[t12] {return m_Index(const const_result_iterator &i) const //[t12] {return m_Index>i.m_Index;} bool operator>=(const const_result_iterator &i) const //[t12] {return m_Index>=i.m_Index;} //@} /** * @name Arithmetic operators */ //@{ inline const_result_iterator operator+(difference_type) const; //[t12] friend const_result_iterator operator+( //[t12] difference_type, const_result_iterator); inline const_result_iterator operator-(difference_type) const; //[t12] inline difference_type operator-(const_result_iterator) const; //[t12] //@} private: friend class pqxx::result; const_result_iterator(const pqxx::result *r, result::size_type i) throw () : tuple(r, i) {} }; /// Reverse iterator for result. Use as result::const_reverse_iterator. class PQXX_LIBEXPORT const_reverse_result_iterator : private const_result_iterator { public: typedef const_result_iterator super; typedef const_result_iterator iterator_type; using iterator_type::iterator_category; using iterator_type::difference_type; using iterator_type::pointer; #ifndef _MSC_VER using iterator_type::value_type; using iterator_type::reference; #else // Workaround for Visual C++.NET 2003, which has access problems typedef const tuple &reference; typedef tuple value_type; #endif const_reverse_result_iterator( //[t75] const const_reverse_result_iterator &rhs) : const_result_iterator(rhs) {} explicit const_reverse_result_iterator( //[t75] const const_result_iterator &rhs) : const_result_iterator(rhs) { super::operator--(); } const_result_iterator PQXX_PURE base() const throw (); //[t75] /** * @name Dereferencing operators */ //@{ using const_result_iterator::operator->; //[t75] using const_result_iterator::operator*; //[t75] //@} /** * @name Manipulations */ //@{ const_reverse_result_iterator &operator=( //[t75] const const_reverse_result_iterator &r) { iterator_type::operator=(r); return *this; } const_reverse_result_iterator operator++() //[t75] { iterator_type::operator--(); return *this; } const_reverse_result_iterator operator++(int); //[t75] const_reverse_result_iterator &operator--() //[t75] { iterator_type::operator++(); return *this; } const_reverse_result_iterator operator--(int); //[t75] const_reverse_result_iterator &operator+=(difference_type i) //[t75] { iterator_type::operator-=(i); return *this; } const_reverse_result_iterator &operator-=(difference_type i) //[t75] { iterator_type::operator+=(i); return *this; } //@} /** * @name Arithmetic operators */ //@{ const_reverse_result_iterator operator+(difference_type i) const //[t75] { return const_reverse_result_iterator(base() - i); } const_reverse_result_iterator operator-(difference_type i) //[t75] { return const_reverse_result_iterator(base() + i); } difference_type operator-( //[t75] const const_reverse_result_iterator &rhs) const { return rhs.const_result_iterator::operator-(*this); } //@} /** * @name Comparisons */ //@{ bool operator==( //[t75] const const_reverse_result_iterator &rhs) const throw () { return iterator_type::operator==(rhs); } bool operator!=( //[t75] const const_reverse_result_iterator &rhs) const throw () { return !operator==(rhs); } bool operator<(const const_reverse_result_iterator &rhs) const //[t75] { return iterator_type::operator>(rhs); } bool operator<=(const const_reverse_result_iterator &rhs) const //[t75] { return iterator_type::operator>=(rhs); } bool operator>(const const_reverse_result_iterator &rhs) const //[t75] { return iterator_type::operator<(rhs); } bool operator>=(const const_reverse_result_iterator &rhs) const //[t75] { return iterator_type::operator<=(rhs); } //@} }; /// Write a result field to any type of stream /** This can be convenient when writing a field to an output stream. More * importantly, it lets you write a field to e.g. a @c stringstream which you * can then use to read, format and convert the field in ways that to() does not * support. * * Example: parse a field into a variable of the nonstandard * "long long" type. * * @code * extern result R; * long long L; * stringstream S; * * // Write field's string into S * S << R[0][0]; * * // Parse contents of S into L * S >> L; * @endcode */ template inline PGSTD::basic_ostream &operator<<( PGSTD::basic_ostream &S, const pqxx::field &F) //[t46] { S.write(F.c_str(), PGSTD::streamsize(F.size())); return S; } /// Convert a field's string contents to another type template inline void from_string(const field &F, T &Obj) //[t46] { from_string(F.c_str(), Obj, F.size()); } /// Convert a field to a string template<> inline PGSTD::string to_string(const field &Obj) //[t74] { return PGSTD::string(Obj.c_str(), Obj.size()); } inline const_result_iterator const_result_iterator::operator+(result::difference_type o) const { return const_result_iterator( m_Home, size_type(result::difference_type(m_Index) + o)); } inline const_result_iterator operator+(result::difference_type o, const_result_iterator i) { return i + o; } inline const_result_iterator const_result_iterator::operator-(result::difference_type o) const { return const_result_iterator( m_Home, result::size_type(result::difference_type(m_Index) - o)); } inline result::difference_type const_result_iterator::operator-(const_result_iterator i) const { return result::difference_type(num() - i.num()); } inline const_result_iterator result::end() const throw () { return const_result_iterator(this, size()); } inline const_reverse_result_iterator operator+(result::difference_type n, const const_reverse_result_iterator &i) { return const_reverse_result_iterator(i.base() - n); } } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/robusttransaction000066400000000000000000000012651224474465600222760ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/robusttransaction * * DESCRIPTION * pqxx::robusttransaction class. * pqxx::robusttransaction is a slower but safer transaction class * * Copyright (c) 2002-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/robusttransaction.hxx" libpqxx-4.0.1+dfsg/include/pqxx/robusttransaction.hxx000066400000000000000000000156361224474465600231130ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/robusttransaction.hxx * * DESCRIPTION * definition of the pqxx::robusttransaction class. * pqxx::robusttransaction is a slower but safer transaction class * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/robusttransaction instead. * * Copyright (c) 2002-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_ROBUSTTRANSACTION #define PQXX_H_ROBUSTTRANSACTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/dbtransaction" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { /** * @addtogroup transaction Transaction classes * * @{ */ class PQXX_LIBEXPORT PQXX_NOVTABLE basic_robusttransaction : public dbtransaction { public: /// Isolation level is read_committed by default typedef isolation_traits isolation_tag; virtual ~basic_robusttransaction() =0; //[t16] protected: basic_robusttransaction( connection_base &C, const PGSTD::string &IsolationLevel, const PGSTD::string &table_name=PGSTD::string()); //[t16] private: typedef unsigned long IDType; IDType m_record_id; PGSTD::string m_xid; PGSTD::string m_LogTable; PGSTD::string m_sequence; int m_backendpid; virtual void do_begin(); //[t18] virtual void do_commit(); //[t16] virtual void do_abort(); //[t18] void PQXX_PRIVATE CreateLogTable(); void PQXX_PRIVATE CreateTransactionRecord(); PGSTD::string PQXX_PRIVATE sql_delete() const; void PQXX_PRIVATE DeleteTransactionRecord() throw (); bool PQXX_PRIVATE CheckTransactionRecord(); }; /// Slightly slower, better-fortified version of transaction /** robusttransaction is similar to transaction, but spends more effort (and * performance!) to deal with the hopefully rare case that the connection to * the backend is lost just as the current transaction is being committed. In * this case, there is no way to determine whether the backend managed to * commit the transaction before noticing the loss of connection. * * In such cases, this class tries to reconnect to the database and figure out * what happened. It will need to store and manage some information (pretty * much a user-level transaction log) in the back-end for each and every * transaction just on the off chance that this problem might occur. * This service level was made optional since you may not want to pay this * overhead where it is not necessary. Certainly the use of this class makes * no sense for local connections, or for transactions that read the database * but never modify it, or for noncritical database manipulations. * * Besides being slower, it's theoretically possible that robusttransaction * actually fails more instead of less often than a normal transaction. This is * due to the added work and complexity. What robusttransaction tries to * achieve is to be more deterministic, not more successful per se. * * When a user first uses a robusttransaction in a database, the class will * attempt to create a log table there to keep vital transaction-related state * information in. This table, located in that same database, will be called * pqxxlog_*user*, where *user* is the PostgreSQL username for that user. If * the log table can not be created, the transaction fails immediately. * * If the user does not have permission to create the log table, the database * administrator may create one for him beforehand, and give ownership (or at * least full insert/update rights) to the user. The table must contain two * non-unique fields (which will never be null): "name" (of text type, * @c varchar(256) by default) and "date" (of @c timestamp type). Older * versions of robusttransaction also added a unique "id" field; this field is * now obsolete and the log table's implicit oids are used instead. The log * tables' names may be made configurable in a future version of libpqxx. * * The transaction log table contains records describing unfinished * transactions, i.e. ones that have been started but not, as far as the client * knows, committed or aborted. This can mean any of the following: * *
    *
  1. The transaction is in progress. Since backend transactions can't run * for extended periods of time, this can only be the case if the log record's * timestamp (compared to the server's clock) is not very old, provided of * course that the server's system clock hasn't just made a radical jump. *
  2. The client's connection to the server was lost, just when the client was * committing the transaction, and the client so far has not been able to * re-establish the connection to verify whether the transaction was actually * completed or rolled back by the server. This is a serious (and luckily a * rare) condition and requires manual inspection of the database to determine * what happened. The robusttransaction will emit clear and specific warnings * to this effect, and will identify the log record describing the transaction * in question. *
  3. The transaction was completed (either by commit or by rollback), but the * client's connection was durably lost just as it tried to clean up the log * record. Again, robusttransaction will emit a clear and specific warning to * tell you about this and request that the record be deleted as soon as * possible. *
  4. The client has gone offline at any time while in one of the preceding * states. This also requires manual intervention, but the client obviously is * not able to issue a warning. *
* * It is safe to drop a log table when it is not in use (ie., it is empty or all * records in it represent states 2-4 above). Each robusttransaction will * attempt to recreate the table at its next time of use. */ template class robusttransaction : public basic_robusttransaction { public: typedef isolation_traits isolation_tag; /// Constructor /** Creates robusttransaction of given name * @param C Connection that this robusttransaction should live inside. * @param Name optional human-readable name for this transaction */ explicit robusttransaction(connection_base &C, const PGSTD::string &Name=PGSTD::string()) : namedclass(fullname("robusttransaction",isolation_tag::name()), Name), basic_robusttransaction(C, isolation_tag::name()) { Begin(); } virtual ~robusttransaction() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(conn()); #endif End(); } }; /** * @} */ } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/strconv000066400000000000000000000011421224474465600202020ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/strconv * * DESCRIPTION * String conversion definitions for libpqxx * * Copyright (c) 2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/strconv.hxx" libpqxx-4.0.1+dfsg/include/pqxx/strconv.hxx000066400000000000000000000215141224474465600210150ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/stringconv.hxx * * DESCRIPTION * String conversion definitions for libpqxx * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stringconv instead. * * Copyright (c) 2008-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_STRINGCONV #define PQXX_H_STRINGCONV #include "pqxx/compiler-public.hxx" #include #include namespace pqxx { /** * @defgroup stringconversion String conversion * * For purposes of communication with the server, values need to be converted * from and to a human-readable string format that (unlike the various functions * and templates in the C and C++ standard libraries) is not sensitive to locale * settings and internationalization. This section contains functionality that * is used extensively by libpqxx itself, but is also available for use by other * programs. */ //@{ /// Traits class for use in string conversions /** Specialize this template for a type that you wish to add to_string and * from_string support for. */ template struct string_traits {}; namespace internal { /// Throw exception for attempt to convert null to given type. void PQXX_LIBEXPORT PQXX_NORETURN throw_null_conversion( const PGSTD::string &type); } // namespace pqxx::internal #define PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(T) \ template<> struct PQXX_LIBEXPORT string_traits \ { \ typedef T subject_type; \ static const char *name() { return #T; } \ static bool has_null() { return false; } \ static bool is_null(T) { return false; } \ static T null() \ { internal::throw_null_conversion(name()); return subject_type(); } \ static void from_string(const char Str[], T &Obj); \ static PGSTD::string to_string(T Obj); \ }; PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(bool) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(short) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned short) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(int) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned int) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned long) #ifdef PQXX_HAVE_LONG_LONG PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long long) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned long long) #endif PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(float) PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(double) #ifdef PQXX_HAVE_LONG_DOUBLE PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long double) #endif #undef PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION /// String traits for C-style string ("pointer to const char") template<> struct PQXX_LIBEXPORT string_traits { static const char *name() { return "const char *"; } static bool has_null() { return true; } static bool is_null(const char *t) { return !t; } static const char *null() { return NULL; } static void from_string(const char Str[], const char *&Obj) { Obj = Str; } static PGSTD::string to_string(const char *Obj) { return Obj; } }; /// String traits for non-const C-style string ("pointer to char") template<> struct PQXX_LIBEXPORT string_traits { static const char *name() { return "char *"; } static bool has_null() { return true; } static bool is_null(const char *t) { return !t; } static const char *null() { return NULL; } // Don't allow this conversion since it breaks const-safety. // static void from_string(const char Str[], char *&Obj); static PGSTD::string to_string(char *Obj) { return Obj; } }; /// String traits for C-style string constant ("array of char") template struct PQXX_LIBEXPORT string_traits { static const char *name() { return "char[]"; } static bool has_null() { return true; } static bool is_null(const char t[]) { return !t; } static const char *null() { return NULL; } static PGSTD::string to_string(const char Obj[]) { return Obj; } }; /// String traits for "array of const char." /** Visual Studio 2010 isn't happy without this redundant specialization. * Other compilers shouldn't need it. */ template struct PQXX_LIBEXPORT string_traits { static const char *name() { return "char[]"; } static bool has_null() { return true; } static bool is_null(const char t[]) { return !t; } static const char *null() { return NULL; } static PGSTD::string to_string(const char Obj[]) { return Obj; } }; template<> struct PQXX_LIBEXPORT string_traits { static const char *name() { return "string"; } static bool has_null() { return false; } static bool is_null(const PGSTD::string &) { return false; } static PGSTD::string null() { internal::throw_null_conversion(name()); return PGSTD::string(); } static void from_string(const char Str[], PGSTD::string &Obj) { Obj=Str; } static PGSTD::string to_string(const PGSTD::string &Obj) { return Obj; } }; template<> struct PQXX_LIBEXPORT string_traits { static const char *name() { return "const string"; } static bool has_null() { return false; } static bool is_null(const PGSTD::string &) { return false; } static const PGSTD::string null() { internal::throw_null_conversion(name()); return PGSTD::string(); } static const PGSTD::string to_string(const PGSTD::string &Obj) { return Obj; } }; template<> struct PQXX_LIBEXPORT string_traits { static const char *name() { return "stringstream"; } static bool has_null() { return false; } static bool is_null(const PGSTD::stringstream &) { return false; } static PGSTD::stringstream null() { internal::throw_null_conversion(name()); // No, dear compiler, we don't need a return here. throw 0; } static void from_string(const char Str[], PGSTD::stringstream &Obj) { Obj.clear(); Obj << Str; } static PGSTD::string to_string(const PGSTD::stringstream &Obj) { return Obj.str(); } }; // TODO: Implement date conversions /// Attempt to convert postgres-generated string to given built-in type /** If the form of the value found in the string does not match the expected * type, e.g. if a decimal point is found when converting to an integer type, * the conversion fails. Overflows (e.g. converting "9999999999" to a 16-bit * C++ type) are also treated as errors. If in some cases this behaviour should * be inappropriate, convert to something bigger such as @c long @c int first * and then truncate the resulting value. * * Only the simplest possible conversions are supported. No fancy features * such as hexadecimal or octal, spurious signs, or exponent notation will work. * No whitespace is stripped away. Only the kinds of strings that come out of * PostgreSQL and out of to_string() can be converted. */ template inline void from_string(const char Str[], T &Obj) { if (!Str) throw PGSTD::runtime_error("Attempt to read NULL string"); string_traits::from_string(Str, Obj); } /// Conversion with known string length (for strings that may contain nuls) /** This is only used for strings, where embedded nul bytes should not determine * the end of the string. * * For all other types, this just uses the regular, nul-terminated version of * from_string(). */ template inline void from_string(const char Str[], T &Obj, size_t) { return from_string(Str, Obj); } template<> inline void from_string(const char Str[], PGSTD::string &Obj, size_t len) //[t0] { if (!Str) throw PGSTD::runtime_error("Attempt to read NULL string"); Obj.assign(Str, len); } template inline void from_string(const PGSTD::string &Str, T &Obj) //[t45] { from_string(Str.c_str(), Obj); } template inline void from_string(const PGSTD::stringstream &Str, T &Obj) //[t0] { from_string(Str.str(), Obj); } template<> inline void from_string(const PGSTD::string &Str, PGSTD::string &Obj) //[t46] { Obj = Str; } namespace internal { /// Compute numeric value of given textual digit (assuming that it is a digit) inline int digit_to_number(char c) throw () { return c-'0'; } inline char number_to_digit(int i) throw () { return static_cast(i+'0'); } } // namespace pqxx::internal /// Convert built-in type to a readable string that PostgreSQL will understand /** No special formatting is done, and any locale settings are ignored. The * resulting string will be human-readable and in a format suitable for use in * SQL queries. */ template inline PGSTD::string to_string(const T &Obj) { return string_traits::to_string(Obj); } //@} } // namespace pqxx #endif libpqxx-4.0.1+dfsg/include/pqxx/subtransaction000066400000000000000000000012701224474465600215450ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/subtransaction * * DESCRIPTION * pqxx::subtransaction class. * pqxx::subtransaction is a nested transaction, i.e. one inside a transaction * * Copyright (c) 2005-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/subtransaction.hxx" libpqxx-4.0.1+dfsg/include/pqxx/subtransaction.hxx000066400000000000000000000065161224474465600223630ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/subtransaction.hxx * * DESCRIPTION * definition of the pqxx::subtransaction class. * pqxx::subtransaction is a nested transaction, i.e. one within a transaction * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead. * * Copyright (c) 2005-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_SUBTRANSACTION #define PQXX_H_SUBTRANSACTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/dbtransaction" /* Methods tested in eg. self-test program test1 are marked with "//[t1]" */ namespace pqxx { /** * @addtogroup transaction Transaction classes */ /// "Transaction" nested within another transaction /** A subtransaction can be executed inside a backend transaction, or inside * another subtransaction. This can be useful when, for example, statements in * a transaction may harmlessly fail and you don't want them to abort the entire * transaction. Here's an example of how a temporary table may be dropped * before re-creating it, without failing if the table did not exist: * * @code * void do_job(connection_base &C) * { * const string temptable = "fleetingtable"; * * // Since we're dealing with a temporary table here, disallow automatic * // recovery of the connection in case it breaks. * C.inhibit_reactivation(true); * * work W(C, "do_job"); * do_firstpart(W); * * // Attempt to delete our temporary table if it already existed * try * { * subtransaction S(W, "droptemp"); * S.exec("DROP TABLE " + temptable); * S.commit(); * } * catch (const undefined_table &) * { * // Table did not exist. Which is what we were hoping to achieve anyway. * // Carry on without regrets. * } * * // S may have gone into a failed state and been destroyed, but the * // upper-level transaction W is still fine. We can continue to use it. * W.exec("CREATE TEMP TABLE " + temptable + "(bar integer, splat varchar)"); * * do_lastpart(W); * } * @endcode * * (This is just an example. If you really wanted to do drop a table without an * error if it doesn't exist, you'd use DROP TABLE IF EXISTS.) * * There are no isolation levels inside a transaction. They are not needed * because all actions within the same backend transaction are always performed * sequentially anyway. */ class PQXX_LIBEXPORT subtransaction : public internal::transactionfocus, public dbtransaction { public: /// Nest a subtransaction nested in another transaction. explicit subtransaction( //[t88] dbtransaction &T, const PGSTD::string &Name=PGSTD::string()); /// Nest a subtransaction in another subtransaction. explicit subtransaction( subtransaction &T, const PGSTD::string &Name=PGSTD::string()); private: virtual void do_begin(); //[t88] virtual void do_commit(); //[t88] virtual void do_abort(); //[t88] void check_backendsupport() const; dbtransaction &m_parent; }; } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/tablereader000066400000000000000000000012511224474465600207570ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablereader * * DESCRIPTION * pqxx::tablereader class. * pqxx::tablereader enables optimized batch reads from a database table * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/tablereader.hxx" libpqxx-4.0.1+dfsg/include/pqxx/tablereader.hxx000066400000000000000000000063651224474465600216000ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablereader.hxx * * DESCRIPTION * definition of the pqxx::tablereader class. * pqxx::tablereader enables optimized batch reads from a database table * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablereader instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TABLEREADER #define PQXX_H_TABLEREADER #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/result" #include "pqxx/tablestream" namespace pqxx { /// @deprecated Efficiently pull data directly out of a table. /** @warning This class does not work reliably with multibyte encodings. Using * it with some multi-byte encodings may pose a security risk. */ class PQXX_LIBEXPORT tablereader : public tablestream { public: tablereader(transaction_base &, const PGSTD::string &Name, const PGSTD::string &Null=PGSTD::string()); template tablereader(transaction_base &, const PGSTD::string &Name, ITER begincolumns, ITER endcolumns); template tablereader(transaction_base &, const PGSTD::string &Name, ITER begincolumns, ITER endcolumns, const PGSTD::string &Null); ~tablereader() throw (); template tablereader &operator>>(TUPLE &); operator bool() const throw () { return !m_Done; } bool operator!() const throw () { return m_Done; } bool get_raw_line(PGSTD::string &Line); template void tokenize(PGSTD::string, TUPLE &) const; virtual void complete(); private: void setup(transaction_base &T, const PGSTD::string &RName, const PGSTD::string &Columns=PGSTD::string()); void PQXX_PRIVATE reader_close(); PGSTD::string extract_field(const PGSTD::string &, PGSTD::string::size_type &) const; bool m_Done; }; template inline tablereader::tablereader(transaction_base &T, const PGSTD::string &Name, ITER begincolumns, ITER endcolumns) : namedclass(Name, "tablereader"), tablestream(T, PGSTD::string()), m_Done(true) { setup(T, Name, columnlist(begincolumns, endcolumns)); } template inline tablereader::tablereader(transaction_base &T, const PGSTD::string &Name, ITER begincolumns, ITER endcolumns, const PGSTD::string &Null) : namedclass(Name, "tablereader"), tablestream(T, Null), m_Done(true) { setup(T, Name, columnlist(begincolumns, endcolumns)); } template inline void tablereader::tokenize(PGSTD::string Line, TUPLE &T) const { PGSTD::back_insert_iterator ins = PGSTD::back_inserter(T); PGSTD::string::size_type here=0; while (here < Line.size()) *ins++ = extract_field(Line, here); } template inline tablereader &pqxx::tablereader::operator>>(TUPLE &T) { PGSTD::string Line; if (get_raw_line(Line)) tokenize(Line, T); return *this; } } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/tablestream000066400000000000000000000012511224474465600210100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablestream * * DESCRIPTION * pqxx::tablestream class. * pqxx::tablestream provides optimized batch access to a database table * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/tablestream.hxx" libpqxx-4.0.1+dfsg/include/pqxx/tablestream.hxx000066400000000000000000000034361224474465600216250ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablestream.hxx * * DESCRIPTION * definition of the pqxx::tablestream class. * pqxx::tablestream provides optimized batch access to a database table * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TABLESTREAM #define PQXX_H_TABLESTREAM #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/transaction_base" namespace pqxx { class transaction_base; /// @deprecated Base class for obsolete tablereader/tablewriter classes. class PQXX_LIBEXPORT PQXX_NOVTABLE tablestream : public internal::transactionfocus { public: explicit tablestream(transaction_base &Trans, const PGSTD::string &Null=PGSTD::string()); virtual ~tablestream() throw () =0; virtual void complete() =0; protected: const PGSTD::string &NullStr() const { return m_Null; } bool is_finished() const throw () { return m_Finished; } void base_close(); template static PGSTD::string columnlist(ITER colbegin, ITER colend); private: PGSTD::string m_Null; bool m_Finished; tablestream(); tablestream(const tablestream &); tablestream &operator=(const tablestream &); }; template inline PGSTD::string tablestream::columnlist(ITER colbegin, ITER colend) { return separated_list(",", colbegin, colend); } } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/tablewriter000066400000000000000000000012511224474465600210310ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablewriter * * DESCRIPTION * pqxx::tablewriter class. * pqxx::tablewriter enables optimized batch updates to a database table * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/tablewriter.hxx" libpqxx-4.0.1+dfsg/include/pqxx/tablewriter.hxx000066400000000000000000000124061224474465600216430ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tablewriter.hxx * * DESCRIPTION * definition of the pqxx::tablewriter class. * pqxx::tablewriter enables optimized batch updates to a database table * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablewriter.hxx instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TABLEWRITER #define PQXX_H_TABLEWRITER #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/tablestream" namespace pqxx { class tablereader; /// @deprecated Efficiently write data directly to a database table. /** @warning This class does not work reliably with multibyte encodings. Using * it with some multi-byte encodings may pose a security risk. */ class PQXX_LIBEXPORT tablewriter : public tablestream { public: typedef unsigned size_type; tablewriter(transaction_base &, const PGSTD::string &WName, const PGSTD::string &Null=PGSTD::string()); template tablewriter(transaction_base &, const PGSTD::string &WName, ITER begincolumns, ITER endcolumns); template tablewriter(transaction_base &T, const PGSTD::string &WName, ITER begincolumns, ITER endcolumns, const PGSTD::string &Null); ~tablewriter() throw (); template void insert(IT Begin, IT End); template void insert(const TUPLE &); template void push_back(IT Begin, IT End); template void push_back(const TUPLE &); void reserve(size_type) {} template tablewriter &operator<<(const TUPLE &); tablewriter &operator<<(tablereader &); template PGSTD::string generate(IT Begin, IT End) const; template PGSTD::string generate(const TUPLE &) const; virtual void complete(); void write_raw_line(const PGSTD::string &); private: void setup(transaction_base &, const PGSTD::string &WName, const PGSTD::string &Columns = PGSTD::string()); void PQXX_PRIVATE writer_close(); }; } // namespace pqxx namespace PGSTD { template<> class back_insert_iterator : public iterator { public: explicit back_insert_iterator(pqxx::tablewriter &W) throw () : m_Writer(&W) {} back_insert_iterator & operator=(const back_insert_iterator &rhs) throw () { m_Writer = rhs.m_Writer; return *this; } template back_insert_iterator &operator=(const TUPLE &T) { m_Writer->insert(T); return *this; } back_insert_iterator &operator++() { return *this; } back_insert_iterator &operator++(int) { return *this; } back_insert_iterator &operator*() { return *this; } private: pqxx::tablewriter *m_Writer; }; } // namespace PGSTD namespace pqxx { template inline tablewriter::tablewriter(transaction_base &T, const PGSTD::string &WName, ITER begincolumns, ITER endcolumns) : namedclass("tablewriter", WName), tablestream(T, PGSTD::string()) { setup(T, WName, columnlist(begincolumns, endcolumns)); } template inline tablewriter::tablewriter(transaction_base &T, const PGSTD::string &WName, ITER begincolumns, ITER endcolumns, const PGSTD::string &Null) : namedclass("tablewriter", WName), tablestream(T, Null) { setup(T, WName, columnlist(begincolumns, endcolumns)); } namespace internal { PGSTD::string PQXX_LIBEXPORT Escape( const PGSTD::string &s, const PGSTD::string &null); inline PGSTD::string EscapeAny( const PGSTD::string &s, const PGSTD::string &null) { return Escape(s, null); } inline PGSTD::string EscapeAny( const char s[], const PGSTD::string &null) { return s ? Escape(PGSTD::string(s), null) : "\\N"; } template inline PGSTD::string EscapeAny( const T &t, const PGSTD::string &null) { return Escape(to_string(t), null); } template class Escaper { const PGSTD::string &m_null; public: explicit Escaper(const PGSTD::string &null) : m_null(null) {} PGSTD::string operator()(IT i) const { return EscapeAny(*i, m_null); } }; } template inline PGSTD::string tablewriter::generate(IT Begin, IT End) const { return separated_list("\t", Begin, End, internal::Escaper(NullStr())); } template inline PGSTD::string tablewriter::generate(const TUPLE &T) const { return generate(T.begin(), T.end()); } template inline void tablewriter::insert(IT Begin, IT End) { write_raw_line(generate(Begin, End)); } template inline void tablewriter::insert(const TUPLE &T) { insert(T.begin(), T.end()); } template inline void tablewriter::push_back(IT Begin, IT End) { insert(Begin, End); } template inline void tablewriter::push_back(const TUPLE &T) { insert(T.begin(), T.end()); } template inline tablewriter &tablewriter::operator<<(const TUPLE &T) { insert(T); return *this; } } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/transaction000066400000000000000000000012401224474465600210300ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transaction * * DESCRIPTION * pqxx::transaction class. * pqxx::transaction represents a standard database transaction * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/transaction.hxx" libpqxx-4.0.1+dfsg/include/pqxx/transaction.hxx000066400000000000000000000065571224474465600216560ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transaction.hxx * * DESCRIPTION * definition of the pqxx::transaction class. * pqxx::transaction represents a standard database transaction * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TRANSACTION #define PQXX_H_TRANSACTION #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/dbtransaction" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif /* Methods tested in eg. self-test program test1 are marked with "//[t1]" */ namespace pqxx { /** * @addtogroup transaction Transaction classes */ //@{ class PQXX_LIBEXPORT basic_transaction : public dbtransaction { protected: basic_transaction( //[t1] connection_base &C, const PGSTD::string &IsolationLevel, readwrite_policy); private: virtual void do_commit(); //[t1] }; /// Standard back-end transaction, templatized on isolation level /** This is the type you'll normally want to use to represent a transaction on * the database. * * While you may choose to create your own transaction object to interface to * the database backend, it is recommended that you wrap your transaction code * into a transactor code instead and let the transaction be created for you. * @see pqxx/transactor.hxx * * If you should find that using a transactor makes your code less portable or * too complex, go ahead, create your own transaction anyway. * * Usage example: double all wages * * @code * extern connection C; * work T(C); * try * { * T.exec("UPDATE employees SET wage=wage*2"); * T.commit(); // NOTE: do this inside try block * } * catch (const exception &e) * { * cerr << e.what() << endl; * T.abort(); // Usually not needed; same happens when T's life ends. * } * @endcode */ template< isolation_level ISOLATIONLEVEL=read_committed, readwrite_policy READWRITE=read_write> class transaction : public basic_transaction { public: typedef isolation_traits isolation_tag; /// Create a transaction /** * @param C Connection for this transaction to operate on * @param TName Optional name for transaction; must begin with a letter and * may contain letters and digits only */ explicit transaction(connection_base &C, const PGSTD::string &TName): //[t1] namedclass(fullname("transaction", isolation_tag::name()), TName), basic_transaction(C, isolation_tag::name(), READWRITE) { Begin(); } explicit transaction(connection_base &C) : //[t1] namedclass(fullname("transaction", isolation_tag::name())), basic_transaction(C, isolation_tag::name(), READWRITE) { Begin(); } virtual ~transaction() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(conn()); #endif End(); } }; /// Bog-standard, default transaction type typedef transaction<> work; /// Read-only transaction typedef transaction read_transaction; //@} } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/transaction_base000066400000000000000000000013461224474465600220310ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transaction_base * * DESCRIPTION * base for the transaction classes. * pqxx::transaction_base defines the interface for any abstract class that * represents a database transaction * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/transaction_base.hxx" libpqxx-4.0.1+dfsg/include/pqxx/transaction_base.hxx000066400000000000000000000412371224474465600226420ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transaction_base.hxx * * DESCRIPTION * common code and definitions for the transaction classes. * pqxx::transaction_base defines the interface for any abstract class that * represents a database transaction * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction_base instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TRANSACTION_BASE #define PQXX_H_TRANSACTION_BASE #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" /* End-user programs need not include this file, unless they define their own * transaction classes. This is not something the typical program should want * to do. * * However, reading this file is worthwhile because it defines the public * interface for the available transaction classes such as transaction and * nontransaction. */ #include "pqxx/connection_base" #include "pqxx/isolation" #include "pqxx/result" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { class connection_base; class transaction_base; namespace internal { class sql_cursor; class PQXX_LIBEXPORT transactionfocus : public virtual namedclass { public: explicit transactionfocus(transaction_base &t) : namedclass("transactionfocus"), m_Trans(t), m_registered(false) { } protected: void register_me(); void unregister_me() throw (); void reg_pending_error(const PGSTD::string &) throw (); bool registered() const throw () { return m_registered; } transaction_base &m_Trans; private: bool m_registered; /// Not allowed transactionfocus(); /// Not allowed transactionfocus(const transactionfocus &); /// Not allowed transactionfocus &operator=(const transactionfocus &); }; class PQXX_LIBEXPORT parameterized_invocation : statement_parameters { public: parameterized_invocation(connection_base &, const PGSTD::string &query); parameterized_invocation &operator()() { add_param(); return *this; } parameterized_invocation &operator()(const binarystring &v) { add_binary_param(v, true); return *this; } template parameterized_invocation &operator()(const T &v) { add_param(v, true); return *this; } parameterized_invocation &operator()(const binarystring &v, bool nonnull) { add_binary_param(v, nonnull); return *this; } template parameterized_invocation &operator()(const T &v, bool nonnull) { add_param(v, nonnull); return *this; } result exec(); private: /// Not allowed parameterized_invocation &operator=(const parameterized_invocation &); connection_base &m_home; const PGSTD::string m_query; }; } // namespace internal namespace internal { namespace gate { class transaction_subtransaction; class transaction_tablereader; class transaction_tablewriter; class transaction_transactionfocus; } // namespace internal::gate } // namespace internal /// Interface definition (and common code) for "transaction" classes. /** * @addtogroup transaction Transaction classes * All database access must be channeled through one of these classes for * safety, although not all implementations of this interface need to provide * full transactional integrity. * * Several implementations of this interface are shipped with libpqxx, including * the plain transaction class, the entirely unprotected nontransaction, and the * more cautions robusttransaction. */ class PQXX_LIBEXPORT PQXX_NOVTABLE transaction_base : public virtual internal::namedclass { public: /// If nothing else is known, our isolation level is at least read_committed typedef isolation_traits isolation_tag; virtual ~transaction_base() =0; //[t1] /// Commit the transaction /** Unless this function is called explicitly, the transaction will not be * committed (actually the nontransaction implementation breaks this rule, * hence the name). * * Once this function returns, the whole transaction will typically be * irrevocably completed in the database. There is also, however, a minute * risk that the connection to the database may be lost at just the wrong * moment. In that case, libpqxx may be unable to determine whether the * transaction was completed or aborted and an in_doubt_error will be thrown * to make this fact known to the caller. The robusttransaction * implementation takes some special precautions to reduce this risk. */ void commit(); //[t1] /// Abort the transaction /** No special effort is required to call this function; it will be called * implicitly when the transaction is destructed. */ void abort(); //[t10] /** * @addtogroup escaping String escaping */ //@{ /// Escape string for use as SQL string literal in this transaction PGSTD::string esc(const char str[]) const { return conn().esc(str); } /// Escape string for use as SQL string literal in this transaction PGSTD::string esc(const char str[], size_t maxlen) const { return conn().esc(str, maxlen); } /// Escape string for use as SQL string literal in this transaction PGSTD::string esc(const PGSTD::string &str) const { return conn().esc(str); } /// Escape binary data for use as SQL string literal in this transaction /** Raw, binary data is treated differently from regular strings. Binary * strings are never interpreted as text, so they may safely include byte * values or byte sequences that don't happen to represent valid characters in * the character encoding being used. * * The binary string does not stop at the first zero byte, as is the case with * textual strings. Instead, they may contain zero bytes anywhere. If it * happens to contain bytes that look like quote characters, or other things * that can disrupt their use in SQL queries, they will be replaced with * special escape sequences. */ PGSTD::string esc_raw(const unsigned char str[], size_t len) const //[t62] { return conn().esc_raw(str, len); } /// Escape binary data for use as SQL string literal in this transaction PGSTD::string esc_raw(const PGSTD::string &) const; //[t62] /// Represent object as SQL string, including quoting & escaping. /** Nulls are recognized and represented as SQL nulls. */ template PGSTD::string quote(const T &t) const { return conn().quote(t); } /// Binary-escape and quote a binarystring for use as an SQL constant. PGSTD::string quote_raw(const unsigned char str[], size_t len) const { return conn().quote_raw(str, len); } PGSTD::string quote_raw(const PGSTD::string &str) const; /// Escape an SQL identifier for use in a query. PGSTD::string quote_name(const PGSTD::string &identifier) const { return conn().quote_name(identifier); } //@} /// Execute query /** Perform a query in this transaction. * * This is one of the most important functions in libpqxx. * * Most libpqxx exceptions can be thrown from here, including sql_error, * broken_connection, and many sql_error subtypes such as * feature_not_supported or insufficient_privilege. But any exception thrown * by the C++ standard library may also occur here. All exceptions will be * derived from std::exception, however, and all libpqxx-specific exception * types are derived from pqxx::pqxx_exception. * * @param Query Query or command to execute * @param Desc Optional identifier for query, to help pinpoint SQL errors * @return A result set describing the query's or command's result */ result exec(const PGSTD::string &Query, const PGSTD::string &Desc=PGSTD::string()); //[t1] result exec(const PGSTD::stringstream &Query, const PGSTD::string &Desc=PGSTD::string()) { return exec(Query.str(), Desc); } /// Parameterize a statement. /* Use this to build up a parameterized statement invocation, then invoke it * using @c exec() * * Example: @c trans.parameterized("SELECT $1 + 1")(1).exec(); */ internal::parameterized_invocation parameterized(const PGSTD::string &query); /** * @name Prepared statements */ //@{ /// Execute prepared statement. /** Prepared statements are defined using the connection classes' prepare() * function, and continue to live on in the ongoing session regardless of * the context they were defined in (unless explicitly dropped using the * connection's unprepare() function). Their execution however, like other * forms of query execution, requires a transaction object. * * Just like param_declaration is a helper class that lets you tag parameter * declarations onto the statement declaration, the invocation class returned * here lets you tag parameter values onto the call: * * @code * result run_mystatement(transaction_base &T) * { * return T.prepared("mystatement")("param1")(2)()(4).exec(); * } * @endcode * * Here, parameter 1 (written as "$1" in the statement's body) is a * string that receives the value "param1"; the second parameter is an integer * with the value 2; the third receives a null, making its type irrelevant; * and number 4 again is an integer. The ultimate invocation of exec() is * essential; if you forget this, nothing happens. * * To see whether any prepared statement has been defined under a given name, * use: * * @code * T.prepared("mystatement").exists() * @endcode * * @warning Do not try to execute a prepared statement manually through direct * SQL statements. This is likely not to work, and even if it does, is likely * to be slower than using the proper libpqxx functions. Also, libpqxx knows * how to emulate prepared statements if some part of the infrastructure does * not support them. * * @warning Actual definition of the prepared statement on the backend may be * deferred until its first use, which means that any errors in the prepared * statement may not show up until it is executed--and perhaps abort the * ongoing transaction in the process. * * If you leave out the statement name, the call refers to the nameless * statement instead. */ prepare::invocation prepared(const PGSTD::string &statement=PGSTD::string()); //@} /** * @name Error/warning output */ //@{ /// Have connection process warning message void process_notice(const char Msg[]) const //[t14] { m_Conn.process_notice(Msg); } /// Have connection process warning message void process_notice(const PGSTD::string &Msg) const //[t14] { m_Conn.process_notice(Msg); } //@} /// Connection this transaction is running in connection_base &conn() const { return m_Conn; } //[t4] /// Set session variable in this connection /** The new value is typically forgotten if the transaction aborts. * Known exceptions to this rule are nontransaction, and PostgreSQL versions * prior to 7.3. In the case of nontransaction, the set value will be kept * regardless; but in that case, if the connection ever needs to be recovered, * the set value will not be restored. * @param Var The variable to set * @param Val The new value to store in the variable */ void set_variable(const PGSTD::string &Var, const PGSTD::string &Val);//[t61] /// Get currently applicable value of variable /** First consults an internal cache of variables that have been set (whether * in the ongoing transaction or in the connection) using the set_variable * functions. If it is not found there, the database is queried. * * @warning Do not mix the set_variable with raw "SET" queries, and do not * try to set or get variables while a pipeline or table stream is active. * * @warning This function used to be declared as @c const but isn't anymore. */ PGSTD::string get_variable(const PGSTD::string &); //[t61] protected: /// Create a transaction (to be called by implementation classes only) /** The optional name, if nonempty, must begin with a letter and may contain * letters and digits only. * * @param c The connection that this transaction is to act on. * @param direct Running directly in connection context (i.e. not nested)? */ explicit transaction_base(connection_base &c, bool direct=true); /// Begin transaction (to be called by implementing class) /** Will typically be called from implementing class' constructor. */ void Begin(); /// End transaction. To be called by implementing class' destructor void End() throw (); /// To be implemented by derived implementation class: start transaction virtual void do_begin() =0; /// To be implemented by derived implementation class: perform query virtual result do_exec(const char Query[]) =0; /// To be implemented by derived implementation class: commit transaction virtual void do_commit() =0; /// To be implemented by derived implementation class: abort transaction virtual void do_abort() =0; // For use by implementing class: /// Execute query on connection directly /** * @param C Query or command to execute * @param Retries Number of times to retry the query if it fails. Be * extremely careful with this option; if you retry in the middle of a * transaction, you may be setting up a new connection transparently and * executing the latter part of the transaction without a backend transaction * being active (and with the former part aborted). */ result DirectExec(const char C[], int Retries=0); /// Forget about any reactivation-blocking resources we tried to allocate void reactivation_avoidance_clear() throw () {m_reactivation_avoidance.clear();} protected: /// Resources allocated in this transaction that make reactivation impossible /** This number may be negative! */ internal::reactivation_avoidance_counter m_reactivation_avoidance; private: /* A transaction goes through the following stages in its lifecycle: *
    *
  • nascent: the transaction hasn't actually begun yet. If our connection * fails at this stage, it may recover and the transaction can attempt to * establish itself again. *
  • active: the transaction has begun. Since no commit command has been * issued, abortion is implicit if the connection fails now. *
  • aborted: an abort has been issued; the transaction is terminated and * its changes to the database rolled back. It will accept no further * commands. *
  • committed: the transaction has completed successfully, meaning that a * commit has been issued. No further commands are accepted. *
  • in_doubt: the connection was lost at the exact wrong time, and there * is no way of telling whether the transaction was committed or aborted. *
* * Checking and maintaining state machine logic is the responsibility of the * base class (ie., this one). */ enum Status { st_nascent, st_active, st_aborted, st_committed, st_in_doubt }; /// Make sure transaction is opened on backend, if appropriate void PQXX_PRIVATE activate(); void PQXX_PRIVATE CheckPendingError(); template bool parm_is_null(T *p) const throw () { return !p; } template bool parm_is_null(T) const throw () { return false; } friend class pqxx::internal::gate::transaction_transactionfocus; void PQXX_PRIVATE RegisterFocus(internal::transactionfocus *); void PQXX_PRIVATE UnregisterFocus(internal::transactionfocus *) throw (); void PQXX_PRIVATE RegisterPendingError(const PGSTD::string &) throw (); friend class pqxx::internal::gate::transaction_tablereader; void PQXX_PRIVATE BeginCopyRead(const PGSTD::string &, const PGSTD::string &); bool ReadCopyLine(PGSTD::string &); friend class pqxx::internal::gate::transaction_tablewriter; void PQXX_PRIVATE BeginCopyWrite( const PGSTD::string &Table, const PGSTD::string &Columns); void WriteCopyLine(const PGSTD::string &); void EndCopyWrite(); friend class pqxx::internal::gate::transaction_subtransaction; connection_base &m_Conn; internal::unique m_Focus; Status m_Status; bool m_Registered; PGSTD::map m_Vars; PGSTD::string m_PendingError; /// Not allowed transaction_base(); /// Not allowed transaction_base(const transaction_base &); /// Not allowed transaction_base &operator=(const transaction_base &); }; } // namespace pqxx #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/transactor000066400000000000000000000012441224474465600206670ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transactor * * DESCRIPTION * pqxx::transactor class. * pqxx::transactor is a framework-style wrapper for safe transactions * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/transactor.hxx" libpqxx-4.0.1+dfsg/include/pqxx/transactor.hxx000066400000000000000000000152441224474465600215020ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/transactor.hxx * * DESCRIPTION * definition of the pqxx::transactor class. * pqxx::transactor is a framework-style wrapper for safe transactions * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transactor instead. * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TRANSACTOR #define PQXX_H_TRANSACTOR #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/connection_base" #include "pqxx/transaction" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { /// Wrapper for transactions that automatically restarts them on failure /** * @addtogroup transactor Transactor framework * * Some transactions may be replayed if their connection fails, until they do * succeed. These can be encapsulated in a transactor-derived classes. The * transactor framework will take care of setting up a backend transaction * context for the operation, and of aborting and retrying if its connection * goes bad. * * The transactor framework also makes it easier for you to do this safely, * avoiding typical pitfalls and encouraging programmers to separate their * transaction definitions (essentially, business rules implementations) from * their higher-level code (application using those business rules). The * former go into the transactor-based class. * * Pass an object of your transactor-based class to connection_base::perform() * to execute the transaction code embedded in it (see the definitions in * pqxx/connection_base.hxx). * * connection_base::perform() is actually a template, specializing itself to any * transactor type you pass to it. This means you will have to pass it a * reference of your object's ultimate static type; runtime polymorphism is * not allowed. Hence the absence of virtual methods in transactor. The * exact methods to be called at runtime *must* be resolved at compile time. * * Your transactor-derived class must define a copy constructor. This will be * used to create a "clean" copy of your transactor for every attempt that * perform() makes to run it. */ template > class transactor : public PGSTD::unary_function { public: explicit transactor(const PGSTD::string &TName="transactor") : //[t4] m_Name(TName) { } /// Overridable transaction definition; insert your database code here /** The operation will be retried if the connection to the backend is lost or * the operation fails, but not if the connection is broken in such a way as * to leave the library in doubt as to whether the operation succeeded. In * that case, an in_doubt_error will be thrown. * * Recommended practice is to allow this operator to modify only the * transactor itself, and the dedicated transaction object it is passed as an * argument. This is what makes side effects, retrying etc. controllable in * the transactor framework. * @param T Dedicated transaction context created to perform this operation. */ void operator()(TRANSACTION &T); //[t4] // Overridable member functions, called by connection_base::perform() if an // attempt to run transaction fails/succeeds, respectively, or if the // connection is lost at just the wrong moment, goes into an indeterminate // state. Use these to patch up runtime state to match events, if needed, or // to report failure conditions. /// Optional overridable function to be called if transaction is aborted /** This need not imply complete failure; the transactor will automatically * retry the operation a number of times before giving up. on_abort() will be * called for each of the failed attempts. * * One parameter is passed in by the framework: an error string describing why * the transaction failed. This will also be logged to the connection's * notice processor. */ void on_abort(const char[]) throw () {} //[t13] /// Optional overridable function to be called after successful commit /** If your on_commit() throws an exception, the actual back-end transaction * will remain committed, so any changes in the database remain regardless of * how this function terminates. */ void on_commit() {} //[t7] /// Overridable function to be called when "in doubt" about outcome /** This may happen if the connection to the backend is lost while attempting * to commit. In that case, the backend may have committed the transaction * but is unable to confirm this to the frontend; or the transaction may have * failed, causing it to be rolled back, but again without acknowledgement to * the client program. The best way to deal with this situation is typically * to wave red flags in the user's face and ask him to investigate. * * The robusttransaction class is intended to reduce the chances of this * error occurring, at a certain cost in performance. * @see robusttransaction */ void on_doubt() throw () {} //[t13] // TODO: Rename Name()--is there a compatible way? /// The transactor's name. PGSTD::string Name() const { return m_Name; } //[t13] private: PGSTD::string m_Name; }; } template inline void pqxx::connection_base::perform(const TRANSACTOR &T, int Attempts) { if (Attempts <= 0) return; bool Done = false; // Make attempts to perform T // TODO: Differentiate between db-related exceptions and other exceptions? do { --Attempts; // Work on a copy of T2 so we can restore the starting situation if need be TRANSACTOR T2(T); try { typename TRANSACTOR::argument_type X(*this, T2.Name()); T2(X); X.commit(); Done = true; } catch (const in_doubt_error &) { // Not sure whether transaction went through or not. The last thing in // the world that we should do now is retry. T2.on_doubt(); throw; } catch (const PGSTD::exception &e) { // Could be any kind of error. T2.on_abort(e.what()); if (Attempts <= 0) throw; continue; } catch (...) { // Don't try to forge ahead if we don't even know what happened T2.on_abort("Unknown exception"); throw; } T2.on_commit(); } while (!Done); } #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/trigger000066400000000000000000000012761224474465600201570ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/trigger * * DESCRIPTION * Obsolete header from libpqxx 1.x/2.x. Include notify-listen instead. * pqxx::trigger was replaced with pqxx::notify_listener * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/trigger.hxx" libpqxx-4.0.1+dfsg/include/pqxx/trigger.hxx000066400000000000000000000014721224474465600207630ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/trigger.hxx * * DESCRIPTION * definition of the pqxx::trigger functor interface. * OBSOLETE. Include pqxx/notify-listen instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TRIGGER #define PQXX_H_TRIGGER #include "pqxx/notify-listen" namespace pqxx { /** * @deprecated The trigger class from libpqxx 1.x/2.x has been * replaced with notification_receiver. */ typedef notify_listener trigger; } #endif libpqxx-4.0.1+dfsg/include/pqxx/tuple000066400000000000000000000011641224474465600176410ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/tuple * * DESCRIPTION * pqxx::tuple class. * pqxx::tuple refers to a row in a result. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/tuple.hxx" libpqxx-4.0.1+dfsg/include/pqxx/tuple.hxx000066400000000000000000000317411224474465600204530ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/result.hxx * * DESCRIPTION * definitions for the pqxx::result class and support classes. * pqxx::result represents the set of result tuples from a database query * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tuple instead. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_TUPLE #define PQXX_H_TUPLE #include "pqxx/compiler-public.hxx" #include "pqxx/compiler-internal-pre.hxx" #include "pqxx/except" #include "pqxx/field" /* Methods tested in eg. self-test program test001 are marked with "//[t1]" */ namespace pqxx { class const_tuple_iterator; class const_reverse_tuple_iterator; class result; class range_error; /// Reference to one row in a result. /** A tuple represents one row (also called a tuple) in a query result set. * It also acts as a container mapping column numbers or names to field * values (see below): * * @code * cout << tuple["date"].c_str() << ": " << tuple["name"].c_str() << endl; * @endcode * * The tuple itself acts like a (non-modifyable) container, complete with its * own const_iterator and const_reverse_iterator. */ class PQXX_LIBEXPORT tuple { public: typedef tuple_size_type size_type; typedef tuple_difference_type difference_type; typedef const_tuple_iterator const_iterator; typedef const_iterator iterator; typedef field reference; typedef const_tuple_iterator pointer; typedef const_reverse_tuple_iterator const_reverse_iterator; typedef const_reverse_iterator reverse_iterator; /// @deprecated Do not use this constructor. It will become private. tuple(const result *r, size_t i) throw (); ~tuple() throw () {} // Yes Scott Meyers, you're absolutely right[1] /** * @name Comparison */ //@{ bool PQXX_PURE operator==(const tuple &) const throw (); //[t75] bool operator!=(const tuple &rhs) const throw () //[t75] { return !operator==(rhs); } //@} const_iterator begin() const throw (); //[t82] const_iterator end() const throw (); //[t82] /** * @name Field access */ //@{ reference front() const throw (); //[t74] reference back() const throw (); //[t75] const_reverse_tuple_iterator rbegin() const; //[t82] const_reverse_tuple_iterator rend() const; //[t82] reference operator[](size_type) const throw (); //[t11] reference operator[](int) const throw (); //[t2] reference operator[](const char[]) const; //[t11] reference operator[](const PGSTD::string &) const; //[t11] reference at(size_type) const throw (pqxx::range_error); //[t11] reference at(int) const throw (pqxx::range_error); //[t11] reference at(const char[]) const; //[t11] reference at(const PGSTD::string &) const; //[t11] //@} size_type size() const throw () //[t11] { return m_End-m_Begin; } void swap(tuple &) throw (); //[t11] size_t rownumber() const throw () { return m_Index; } //[t11] /** * @name Column information */ //@{ /// Number of given column (throws exception if it doesn't exist) size_type column_number(const PGSTD::string &ColName) const //[t30] { return column_number(ColName.c_str()); } /// Number of given column (throws exception if it doesn't exist) size_type column_number(const char[]) const; //[t30] /// Type of given column oid column_type(size_type) const; //[t7] /// Type of given column oid column_type(int ColNum) const //[t7] { return column_type(size_type(ColNum)); } /// Type of given column oid column_type(const PGSTD::string &ColName) const //[t7] { return column_type(column_number(ColName)); } /// Type of given column oid column_type(const char ColName[]) const //[t7] { return column_type(column_number(ColName)); } /// What table did this column come from? oid column_table(size_type ColNum) const; //[t2] /// What table did this column come from? oid column_table(int ColNum) const //[t2] { return column_table(size_type(ColNum)); } /// What table did this column come from? oid column_table(const PGSTD::string &ColName) const //[t2] { return column_table(column_number(ColName)); } /// What column number in its table did this result column come from? /** A meaningful answer can be given only if the column in question comes * directly from a column in a table. If the column is computed in any * other way, a logic_error will be thrown. * * @param ColNum a zero-based column number in this result set * @return a zero-based column number in originating table * * Requires libpq from PostgreSQL 7.4 or better, as well as a server version * of at least 7.4. */ size_type table_column(size_type) const; //[t93] /// What column number in its table did this result column come from? size_type table_column(int ColNum) const //[t93] { return table_column(size_type(ColNum)); } /// What column number in its table did this result column come from? size_type table_column(const PGSTD::string &ColName) const //[t93] { return table_column(column_number(ColName)); } //@} size_t num() const { return rownumber(); } //[t1] /** Produce a slice of this tuple, containing the given range of columns. * * The slice runs from the range's starting column to the range's end * column, exclusive. It looks just like a normal result tuple, except * slices can be empty. * * @warning Slicing is a relatively new feature, and not all software may be * prepared to deal with empty slices. If there is any chance that your * program might be creating empty slices and passing them to code that may * not be designed with the possibility of empty tuples in mind, be sure to * test for that case. */ tuple slice(size_type Begin, size_type End) const; // Is this an empty slice? bool PQXX_PURE empty() const throw (); protected: friend class field; const result *m_Home; size_t m_Index; size_type m_Begin; size_type m_End; private: // Not allowed: tuple(); }; /// Iterator for fields in a tuple. Use as tuple::const_iterator. class PQXX_LIBEXPORT const_tuple_iterator : public PGSTD::iterator, public field { typedef PGSTD::iterator it; public: using it::pointer; typedef tuple::size_type size_type; typedef tuple::difference_type difference_type; typedef field reference; const_tuple_iterator(const tuple &T, tuple::size_type C) throw () : //[t82] field(T, C) {} const_tuple_iterator(const field &F) throw () : field(F) {} //[t82] /** * @name Dereferencing operators */ //@{ pointer operator->() const { return this; } //[t82] reference operator*() const { return field(*this); } //[t82] //@} /** * @name Manipulations */ //@{ const_tuple_iterator operator++(int); //[t82] const_tuple_iterator &operator++() { ++m_col; return *this; } //[t82] const_tuple_iterator operator--(int); //[t82] const_tuple_iterator &operator--() { --m_col; return *this; } //[t82] const_tuple_iterator &operator+=(difference_type i) //[t82] { m_col = size_type(difference_type(m_col) + i); return *this; } const_tuple_iterator &operator-=(difference_type i) //[t82] { m_col = size_type(difference_type(m_col) - i); return *this; } //@} /** * @name Comparisons */ //@{ bool operator==(const const_tuple_iterator &i) const //[t82] {return col()==i.col();} bool operator!=(const const_tuple_iterator &i) const //[t82] {return col()!=i.col();} bool operator<(const const_tuple_iterator &i) const //[t82] {return col()(const const_tuple_iterator &i) const //[t82] {return col()>i.col();} bool operator>=(const const_tuple_iterator &i) const //[t82] {return col()>=i.col();} //@} /** * @name Arithmetic operators */ //@{ inline const_tuple_iterator operator+(difference_type) const; //[t82] friend const_tuple_iterator operator+( //[t82] difference_type, const_tuple_iterator); inline const_tuple_iterator operator-(difference_type) const; //[t82] inline difference_type operator-(const_tuple_iterator) const; //[t82] //@} }; /// Reverse iterator for a tuple. Use as tuple::const_reverse_iterator. class PQXX_LIBEXPORT const_reverse_tuple_iterator : private const_tuple_iterator { public: typedef const_tuple_iterator super; typedef const_tuple_iterator iterator_type; using iterator_type::iterator_category; using iterator_type::difference_type; using iterator_type::pointer; #ifndef _MSC_VER using iterator_type::value_type; using iterator_type::reference; #else // Workaround for Visual C++.NET 2003, which has access problems typedef field value_type; typedef const field &reference; #endif const_reverse_tuple_iterator(const const_reverse_tuple_iterator &r) : //[t82] const_tuple_iterator(r) {} explicit const_reverse_tuple_iterator(const super &rhs) throw() : //[t82] const_tuple_iterator(rhs) { super::operator--(); } iterator_type PQXX_PURE base() const throw (); //[t82] /** * @name Dereferencing operators */ //@{ using iterator_type::operator->; //[t82] using iterator_type::operator*; //[t82] //@} /** * @name Manipulations */ //@{ const_reverse_tuple_iterator & operator=(const const_reverse_tuple_iterator &r) //[t82] { iterator_type::operator=(r); return *this; } const_reverse_tuple_iterator operator++() //[t82] { iterator_type::operator--(); return *this; } const_reverse_tuple_iterator operator++(int); //[t82] const_reverse_tuple_iterator &operator--() //[t82] { iterator_type::operator++(); return *this; } const_reverse_tuple_iterator operator--(int); //[t82] const_reverse_tuple_iterator &operator+=(difference_type i) //[t82] { iterator_type::operator-=(i); return *this; } const_reverse_tuple_iterator &operator-=(difference_type i) //[t82] { iterator_type::operator+=(i); return *this; } //@} /** * @name Arithmetic operators */ //@{ const_reverse_tuple_iterator operator+(difference_type i) const //[t82] { return const_reverse_tuple_iterator(base()-i); } const_reverse_tuple_iterator operator-(difference_type i) //[t82] { return const_reverse_tuple_iterator(base()+i); } difference_type operator-(const const_reverse_tuple_iterator &rhs) const //[t82] { return rhs.const_tuple_iterator::operator-(*this); } //@} /** * @name Comparisons */ //@{ bool operator==(const const_reverse_tuple_iterator &rhs) const throw () //[t82] { return iterator_type::operator==(rhs); } bool operator!=(const const_reverse_tuple_iterator &rhs) const throw () //[t82] { return !operator==(rhs); } bool operator<(const const_reverse_tuple_iterator &rhs) const //[t82] { return iterator_type::operator>(rhs); } bool operator<=(const const_reverse_tuple_iterator &rhs) const //[t82] { return iterator_type::operator>=(rhs); } bool operator>(const const_reverse_tuple_iterator &rhs) const //[t82] { return iterator_type::operator<(rhs); } bool operator>=(const const_reverse_tuple_iterator &rhs) const //[t82] { return iterator_type::operator<=(rhs); } //@} }; inline const_tuple_iterator const_tuple_iterator::operator+(difference_type o) const { return const_tuple_iterator( tuple(home(), idx()), size_type(difference_type(col()) + o)); } inline const_tuple_iterator operator+(const_tuple_iterator::difference_type o, const_tuple_iterator i) { return i + o; } inline const_tuple_iterator const_tuple_iterator::operator-(difference_type o) const { return const_tuple_iterator( tuple(home(), idx()), size_type(difference_type(col()) - o)); } inline const_tuple_iterator::difference_type const_tuple_iterator::operator-(const_tuple_iterator i) const { return difference_type(num() - i.num()); } } // namespace pqxx /* [1] Scott Meyers, in one of his essential books, "Effective C++" and "More Effective C++", points out that it is good style to have any class containing a member of pointer type define a destructor--just to show that it knows what it is doing with the pointer. This helps prevent nasty memory leak / double deletion bugs typically resulting from programmers' omission to deal with such issues in their destructors. The @c -Weffc++ option in gcc generates warnings for noncompliance with Scott's style guidelines, and hence necessitates the definition of this destructor, trivial as it may be. */ #include "pqxx/compiler-internal-post.hxx" #endif libpqxx-4.0.1+dfsg/include/pqxx/util000066400000000000000000000011371224474465600174650ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/util * * DESCRIPTION * Various utility definitions for libpqxx * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/util.hxx" libpqxx-4.0.1+dfsg/include/pqxx/util.hxx000066400000000000000000000574451224474465600203100ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/util.hxx * * DESCRIPTION * Various utility definitions for libpqxx * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/util instead. * * Copyright (c) 2001-2012, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_UTIL #define PQXX_H_UTIL #include "pqxx/compiler-public.hxx" #include #include #include #include #include #include #ifdef PQXX_TR1_HEADERS #include #else #include #endif #include "pqxx/strconv" /** @mainpage * @author Jeroen T. Vermeulen * * Welcome to libpqxx, the C++ API to the PostgreSQL database management system. * * Compiling this package requires PostgreSQL to be installed--including the C * headers for client development. The library builds on top of PostgreSQL's * standard C API, libpq. The libpq headers are not needed to compile client * programs, however. * * For a quick introduction to installing and using libpqxx, see the README * file; a more extensive tutorial is available in doc/html/Tutorial/index.html. * * The latest information, as well as updates, a mailing list, and a bug * reporting system can be found at http://pqxx.org/ * * Some links that should help you find your bearings: * \li \ref gettingstarted * \li \ref threading * \li \ref connection * \li \ref transaction * \li \ref performance * * @see http://pqxx.org/ */ /** @page gettingstarted Getting started * The most basic three types in libpqxx are the connection (which inherits its * API from pqxx::connection_base and its setup behaviour from * pqxx::connectionpolicy), the transaction (derived from * pqxx::transaction_base), and the result (pqxx::result). * * They fit together as follows: * \li You connect to the database by creating a * connection object (see \ref connection). The connection type you'll usually * want is pqxx::connection. * \li You create a transaction object (see \ref transaction) operating on that * connection. You'll usually want the pqxx::work variety. If you don't want * transactional behaviour, use pqxx::nontransaction. Once you're done you call * the transaction's @c commit function to make its work final. If you don't * call this, the work will be rolled back when the transaction object is * destroyed. * \li Until then, use the transaction's @c exec function to execute queries, * which you pass in as simple strings. * \li The function returns a pqxx::result object, which acts as a standard * container of rows. Each row in itself acts as a container of fields. You * can use array indexing and/or iterators to access either. * \li The field's data is stored as a text string. You can read it as such * using its @c c_str() function, or convert it to other types using its @c as() * and @c to() member functions. These are templated on the destination type: * @c myfield.as(); or @c myfield.to(myint); * \li After you've closed the transaction, the connection is free to run a next * transaction. * * Here's a very basic example. It connects to the default database (you'll * need to have one set up), queries it for a very simple result, converts it to * an @c int, and prints it out. It also contains some basic error handling. * * @code * #include * #include * * int main() * { * try * { * pqxx::connection c; * pqxx::work w(c); * pqxx::result r = w.exec("SELECT 1"); * w.commit(); * * std::cout << r[0][0].as() << std::endl; * } * catch (const std::exception &e) * { * std::cerr << e.what() << std::endl; * return 1; * } * } * @endcode * * This prints the number 1. Notice that you can keep the result object * around after the transaction (or even the connection) has been closed. * * Here's a slightly more complicated example. It takes an argument from the * command line and retrieves a string with that value. The interesting part is * that it uses the escaping-and-quoting function @c quote() to embed this * string value in SQL safely. It also reads the result field's value as a * plain C-style string using its @c c_str() function. * * @code * #include * #include * * int main(int argc, char *argv[]) * { * if (!argv[1]) * { * std::cerr << "Give me a string!" << std::endl; * return 1; * } * try * { * pqxx::connection c; * pqxx::work w(c); * pqxx::result r = w.exec("SELECT " + w.quote(argv[1])); * w.commit(); * * std::cout << r[0][0].c_str() << std::endl; * } * catch (const std::exception &e) * { * std::cerr << e.what() << std::endl; * return 1; * } * } * @endcode * * You can find more about converting field values to native types, or * converting values to strings for use with libpqxx, under * \ref stringconversion. More about getting to the tuples and fields of a * result is under \ref accessingresults. * * If you want to handle exceptions thrown by libpqxx in more detail, for * example to print the SQL contents of a query that failed, see \ref exception. */ /** @page accessingresults Accessing results and result rows * * Let's say you have a result object. For example, your program may have done: * * @code * pqxx::result r = w.exec("SELECT * FROM mytable"); * @endcode * * Now how do you access the data inside @c r? * * The simplest way is array indexing. A result acts as an array of tuples, * and a tuple acts as an array of fields. * * @code * const int num_rows = r.size(); * for (int rownum=0; rownum < num_rows; ++rownum) * { * const pqxx::tuple row = r[rownum]; * const int num_cols = row.size(); * for (int colnum=0; colnum < num_cols; ++colnum) * { * const pqxx::field field = row[colnum]; * std::cout << field.c_str() << '\t'; * } * * std::cout << std::endl; * } * @endcode * * But results and rows also define @c const_iterator types: * * @code * for (pqxx::result::const_iterator row = r.begin(); * row != r.end(); * ++row) * { * for (pqxx::result::tuple::const_iterator field = row->begin(); * field != row->end(); * ++field) * std::cout << field->c_str() << '\t'; * * std::cout << std::endl; * } * @endcode * * They also have @c const_reverse_iterator types, which iterate backwards from * @c rbegin() to @c rend() exclusive. * * All these iterator types provide one extra bit of convenience that you won't * normally find in C++ iterators: referential transparency. You don't need to * dereference them to get to the row or field they refer to. That is, instead * of @c row->end() you can also choose to say @c row.end(). Similarly, you * may prefer @c field.c_str() over @c field->c_str(). * * This becomes really helpful with the array-indexing operator. With regular * C++ iterators you would need ugly expressions like @c (*row)[0] or * @c row->operator[](0). With the iterator types defined by the result and * tuple classes you can simply say @c row[0]. */ /** @page threading Thread safety * * This library does not contain any locking code to protect objects against * simultaneous modification in multi-threaded programs. There are many * different threading interfaces and libpqxx does not dictate your choice. * * Therefore it is up to you, the user of the library, to ensure that your * threaded client programs perform no conflicting operations concurrently. * * The library does try to avoid non-obvious unsafe operations and so does the * underlying libpq. Here's what you should do to keep your threaded libpqxx * application safe: * * \li Treat a connection, together with any and all objects related to it, as a * "world" of its own. You should generally make sure that the same "world" is * never accessed concurrently by multiple threads. There are a few cases where * you don't need to be this careful, however; see below. * * \li Result sets (pqxx::result) and binary data (pqxx::binarystring) * are special. Copying these objects is very cheap, and you can give the copy * to another thread. Just make sure that no other thread accesses the same * copy when it's being assigned to, swapped, cleared, or destroyed. * * @warning Prior to libpqxx 3.1, or in C++ environments without the standard * @c "shared_ptr" smart pointer type, copying, assigning, or destroying a * pqxx::result or pqxx::binarystring could also affect any other other object * of the same type referring to the same underlying data. * * Use @c pqxx::describe_thread_safety to find out at runtime what level of * thread safety is implemented in your build and version of libpqxx. It * returns a pqxx::thread_safety_model describing what you can and cannot rely * on. A command-line utility @c tools/pqxxthreadsafety prints out the same * information. */ /// The home of all libpqxx classes, functions, templates, etc. namespace pqxx {} /// Alias for the standard namespace "std" /** This alias is used throughout libpqxx to accomodate the use of other * standard library implementations than the one native to the compiler. These * alternative implementations may live in separate namespaces to avoid * confusion. */ namespace PGSTD {} #include namespace pqxx { /// Descriptor of library's thread-safety model. /** This describes what the library knows about various risks to thread-safety. */ struct PQXX_LIBEXPORT thread_safety_model { /// Does standard C library have a thread-safe alternative to @c strerror? /** If not, its @c strerror implementation may still be thread-safe. Check * your compiler's manual. * * Without @c strerror_r (@c strerror_s in Visual C++) or a thread-safe @c * strerror, the library can't safely obtain descriptions of certain run-time * errors. In that case, your application must serialize all use of libpqxx. */ bool have_safe_strerror; /// Is the underlying libpq build thread-safe? /** A @c "false" here may mean one of two things: either the libpq build is * not thread-safe, or it is a thread-safe build of an older version that did * not offer thread-safety information. * * In that case, the best fix is to rebuild libpqxx against (a thread-safe * build of) a newer libpq version. */ bool safe_libpq; /// Is canceling queries thread-safe? /** If not, avoid use of the pqxx::pipeline class in threaded programs. Or * better, rebuild libpqxx against a newer libpq version. */ bool safe_query_cancel; /// Are copies of pqxx::result and pqxx::binarystring objects thread-safe? /** If @c true, it's safe to copy an object of either of these types (copying * these is done very efficiently, so don't worry about data size) and hand * the copy off to another thread. The other thread may access the copy * freely without any concurrency concerns. */ bool safe_result_copy; /// Is Kerberos thread-safe? /** @warning Is currently always @c false. * * If your application uses Kerberos, all accesses to libpqxx or Kerberos must * be serialized. Confine their use to a single thread, or protect it with a * global lock. */ bool safe_kerberos; /// A human-readable description of any thread-safety issues. PGSTD::string description; }; /// Describe thread safety available in this build. thread_safety_model PQXX_LIBEXPORT describe_thread_safety() throw (); /// The "null" oid const oid oid_none = 0; /// Container of items with easy contents initialization and string rendering /** Designed as a wrapper around an arbitrary container type, this class lets * you easily create a container object and provide its contents in the same * line. Regular addition methods such as push_back() will also still work, but * you can now write things like * @code * items numbers; numbers(1)(2)(3)(4); * @endcode * * Up to five elements may be specified directly as constructor arguments, e.g. * @code * items numbers(1,2,3,4); * @endcode * * One thing that cannot be done with this simple class is create const objects * with nontrivial contents. This is because the function invocation operator * (which is being used to add items) modifies the container rather than * creating a new one. This was done to keep performance within reasonable * bounds. * * @warning This class may see substantial change in its interface before it * stabilizes. Do not count on it remaining the way it is. */ template > class items : public CONT { public: /// Create empty items list items() : CONT() {} //[t0] /// Create items list with one element explicit items(const T &t) : CONT() { this->push_back(t); } //[t0] items(const T &t1, const T &t2) : CONT() //[t0] { this->push_back(t1); this->push_back(t2); } items(const T &t1, const T &t2, const T &t3) : CONT() //[t0] { this->push_back(t1); this->push_back(t2); this->push_back(t3); } items(const T &t1, const T &t2, const T &t3, const T &t4) : CONT() //[t0] { this->push_back(t1); this->push_back(t2); this->push_back(t3); this->push_back(t4); } items(const T&t1,const T&t2,const T&t3,const T&t4,const T&t5):CONT() //[t0] { this->push_back(t1); this->push_back(t2); this->push_back(t3); this->push_back(t4); this->push_back(t5); } /// Copy container items(const CONT &c) : CONT(c) {} //[t0] /// Add element to items list items &operator()(const T &t) //[t0] { this->push_back(t); return *this; } }; namespace internal { // TODO: Does standard library provide a ready-made version of this? /// Functor: dereference iterator template struct dereference { typename ITER::value_type operator()(ITER i) const { return *i; } }; template struct deref_ptr { T operator()(T *i) const {return *i;} }; } // namespace internal /// Access iterators using ACCESS functor, returning separator-separated list /** * @param sep separator string (to be placed between items) * @param begin beginning of items sequence * @param end end of items sequence * @param access functor defining how to dereference sequence elements */ template inline PGSTD::string separated_list(const PGSTD::string &sep, //[t0] ITER begin, ITER end, ACCESS access) { PGSTD::string result; if (begin != end) { result = to_string(access(begin)); for (++begin; begin != end; ++begin) { result += sep; result += to_string(access(begin)); } } return result; } /** * @defgroup utility Utility functions */ //@{ /// Render sequence as a string, using given separator between items template inline PGSTD::string separated_list(const PGSTD::string &sep, ITER begin, ITER end) //[t0] { return separated_list(sep,begin,end,internal::dereference()); } /// Render array as a string, using given separator between items template inline PGSTD::string separated_list(const PGSTD::string &sep, OBJ *begin, OBJ *end) //[t0] { return separated_list(sep,begin,end,internal::deref_ptr()); } /// Render items in a container as a string, using given separator template inline PGSTD::string separated_list(const PGSTD::string &sep, const CONTAINER &c) //[t10] { return separated_list(sep, c.begin(), c.end()); } //@} /// Private namespace for libpqxx's internal use; do not access /** This namespace hides definitions internal to libpqxx. These are not * supposed to be used by client programs, and they may change at any time * without notice. * * Conversely, if you find something in this namespace tremendously useful, by * all means do lodge a request for its publication. * * @warning Here be dragons! */ namespace internal { typedef unsigned long result_size_type; typedef long result_difference_type; } // namespace internal namespace internal { void PQXX_LIBEXPORT freepqmem(const void *) throw (); template inline void freepqmem_templated(P *p) throw () { freepqmem(p); } void PQXX_LIBEXPORT freemallocmem(const void *) throw (); template inline void freemallocmem_templated(P *p) throw () { freemallocmem(p); } #ifdef PQXX_HAVE_SHARED_PTR /// Reference-counted smart pointer to libpq-allocated object template > class PQAlloc { public: typedef T content_type; PQAlloc() throw () : m_ptr() {} PQAlloc(const PQAlloc &rhs) throw () : m_ptr(rhs.m_ptr) {} explicit PQAlloc(T *t) : m_ptr(t, DELETER) {} T *get() const throw () { return m_ptr.get(); } PQAlloc &operator=(const PQAlloc &rhs) throw () { m_ptr = rhs.m_ptr; return *this; } T *operator->() const throw () { return m_ptr.get(); } T &operator*() const throw () { return *m_ptr; } void reset() throw () { m_ptr.reset(); } void swap(PQAlloc &other) throw () { m_ptr.swap(other.m_ptr); } private: PQXXTR1::shared_ptr m_ptr; }; #else // !PQXX_HAVE_SHARED_PTR /// Helper class used in reference counting (doubly-linked circular list) /// Reference-counted smart-pointer for libpq-allocated resources. class PQXX_LIBEXPORT refcount { refcount *volatile m_l, *volatile m_r; public: refcount(); ~refcount(); /// Create additional reference based on existing refcount object void makeref(refcount &) throw (); /// Drop this reference; return whether we were the last reference bool loseref() throw (); private: /// Not allowed refcount(const refcount &); /// Not allowed refcount &operator=(const refcount &); }; /// Reference-counted smart pointer to libpq-allocated object /** Keep track of a libpq-allocated object, and free it once all references to * it have died. * * The memory is freed with @c PQfreemem() by default. This matters on Windows, * where apparently under some circumstances, memory allocated by a DLL must be * freed by the same DLL. * * @warning Copying, swapping, and destroying PQAlloc objects that refer to the * same underlying libpq-allocated block is not thread-safe. If you * wish to pass reference-counted objects around between threads, make sure that * each of these operations is protected against concurrency with similar * operations on the same object--or other copies of the same object. */ template > class PQAlloc { T *m_Obj; mutable refcount m_rc; public: typedef T content_type; PQAlloc() throw () : m_Obj(0), m_rc() {} PQAlloc(const PQAlloc &rhs) throw () : m_Obj(0), m_rc() { makeref(rhs); } ~PQAlloc() throw () { loseref(); } PQAlloc &operator=(const PQAlloc &rhs) throw () {redoref(rhs); return *this;} /// Assume ownership of a pointer /** @warning Don't to this more than once for a given object! */ explicit PQAlloc(T *obj) throw () : m_Obj(obj), m_rc() {} void swap(PQAlloc &rhs) throw () { PQAlloc tmp(*this); *this = rhs; rhs = tmp; } //PQAlloc &operator=(T *obj) throw () { redoref(obj); return *this; } /// Is this pointer non-null? operator bool() const throw () { return m_Obj != 0; } /// Is this pointer null? bool operator!() const throw () { return !m_Obj; } /// Dereference pointer /** Throws a logic_error if the pointer is null. */ T *operator->() const throw (PGSTD::logic_error) { if (!m_Obj) throw PGSTD::logic_error("Null pointer dereferenced"); return m_Obj; } /// Dereference pointer /** Throws a logic_error if the pointer is null. */ T &operator*() const throw (PGSTD::logic_error) { return *operator->(); } /// Obtain underlying pointer /** Ownership of the pointer's memory remains with the PQAlloc object */ T *get() const throw () { return m_Obj; } void reset() throw () { loseref(); } private: void makeref(T *p) throw () { m_Obj = p; } void makeref(const PQAlloc &rhs) throw () { m_Obj = rhs.m_Obj; m_rc.makeref(rhs.m_rc); } /// Free and reset current pointer (if any) void loseref() throw () { if (m_rc.loseref() && m_Obj) DELETER(m_Obj); m_Obj = 0; } void redoref(const PQAlloc &rhs) throw () { if (rhs.m_Obj != m_Obj) { loseref(); makeref(rhs); } } void redoref(T *obj) throw () { if (obj != m_Obj) { loseref(); makeref(obj); } } }; #endif // PQXX_HAVE_SHARED_PTR template class scoped_array { T *m_ptr; public: typedef size_t size_type; typedef long difference_type; scoped_array() : m_ptr(0) {} explicit scoped_array(size_type n) : m_ptr(new T[n]) {} explicit scoped_array(T *t) : m_ptr(t) {} ~scoped_array() { delete [] m_ptr; } T *get() const throw () { return m_ptr; } T &operator*() const throw () { return *m_ptr; } template T &operator[](INDEX i) const throw () { return m_ptr[i]; } scoped_array &operator=(T *t) throw () { if (t != m_ptr) { delete [] m_ptr; m_ptr = t; } return *this; } private: /// Not allowed scoped_array(const scoped_array &); scoped_array &operator=(const scoped_array &); }; class PQXX_LIBEXPORT namedclass { public: namedclass(const PGSTD::string &Classname, const PGSTD::string &Name="") : m_Classname(Classname), m_Name(Name) { } const PGSTD::string &name() const throw () { return m_Name; } //[t1] const PGSTD::string &classname() const throw () {return m_Classname;} //[t73] PGSTD::string description() const; private: PGSTD::string m_Classname, m_Name; }; void CheckUniqueRegistration(const namedclass *New, const namedclass *Old); void CheckUniqueUnregistration(const namedclass *New, const namedclass *Old); /// Ensure proper opening/closing of GUEST objects related to a "host" object /** Only a single GUEST may exist for a single host at any given time. GUEST * must be derived from namedclass. */ template class unique { public: unique() : m_Guest(0) {} GUEST *get() const throw () { return m_Guest; } void Register(GUEST *G) { CheckUniqueRegistration(G, m_Guest); m_Guest = G; } void Unregister(GUEST *G) { CheckUniqueUnregistration(G, m_Guest); m_Guest = 0; } private: GUEST *m_Guest; /// Not allowed unique(const unique &); /// Not allowed unique &operator=(const unique &); }; /// Sleep for the given number of seconds /** May return early, e.g. when interrupted by a signal. Completes instantly if * a zero or negative sleep time is requested. */ void PQXX_LIBEXPORT sleep_seconds(int); /// Work around problem with library export directives and pointers typedef const char *cstring; /// Human-readable description for error code, possibly using given buffer /** Wrapper for @c strerror() or thread-safe variant, as available. The * default code copies the string to the provided buffer, but this may not * always be necessary. The result is guaranteed to remain usable for as long * as the given buffer does. * @param err system error code as copied from errno * @param buf caller-provided buffer for message to be stored in, if needed * @param len usable size (in bytes) of provided buffer * @return human-readable error string, which may or may not reside in buf */ cstring PQXX_LIBEXPORT strerror_wrapper(int err, char buf[], PGSTD::size_t len) throw (); /// Commonly used SQL commands extern const char sql_begin_work[], sql_commit_work[], sql_rollback_work[]; /// Wrapper for std::distance; not all platforms have std::distance(). template inline PGSTD::ptrdiff_t distance(T first, T last) { #ifdef PQXX_HAVE_DISTANCE return PGSTD::distance(first, last); #else // Naive implementation. All we really need for now. PGSTD::ptrdiff_t d; for (d=0; first != last; ++d) ++first; return d; #endif } } // namespace internal } // namespace pqxx #endif libpqxx-4.0.1+dfsg/include/pqxx/version000066400000000000000000000011241224474465600201710ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/version * * DESCRIPTION * libpqxx version description. * * Copyright (c) 2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/version.hxx" libpqxx-4.0.1+dfsg/include/pqxx/version.hxx000066400000000000000000000015501224474465600210020ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/version.hxx * * DESCRIPTION * libpqxx version description. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/version instead. * * Copyright (c) 2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_VERSION /// Full libpqxx version string. #define PQXX_VERSION "4.0.1" /// Major version number for this libpqxx release. #define PQXX_VERSION_MAJOR 4 /// Minor version number for this libpqxx release. #define PQXX_VERSION_MINOR 0 /// Library ABI version. #define PQXX_ABI "4.0" #endif libpqxx-4.0.1+dfsg/include/pqxx/version.hxx.template000066400000000000000000000016151224474465600226160ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/version.hxx * * DESCRIPTION * libpqxx version description. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/version instead. * * Copyright (c) 2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #ifndef PQXX_H_VERSION /// Full libpqxx version string. #define PQXX_VERSION "@PQXXVERSION@" /// Major version number for this libpqxx release. #define PQXX_VERSION_MAJOR @PQXX_MAJOR@ /// Minor version number for this libpqxx release. #define PQXX_VERSION_MINOR @PQXX_MINOR@ /// Library ABI version. #define PQXX_ABI "@PQXX_ABI@" #endif libpqxx-4.0.1+dfsg/libpqxx.pc.in000066400000000000000000000004321224474465600165570ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libpqxx Description: a C++ API to the PostgreSQL database management system. Version: @VERSION@ Libs: -L${libdir} -L@with_postgres_lib@ -lpqxx Cflags: -I${includedir} -I@with_postgres_include@ libpqxx-4.0.1+dfsg/libpqxx.spec000066400000000000000000000034621224474465600165100ustar00rootroot00000000000000Summary: C++ API to the PostgreSQL database management system. Name: libpqxx Version: 4.0.1 Release: 1 License: BSD Group: Development/Libraries Source: ftp://pqxx.org/software/libpqxx/libpqxx-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://pqxx.org/ Vendor: Andromeda Technology & Automation Packager: Arjen Baart Requires: postgresql-libs BuildRequires: postgresql-devel Prefix: %{_prefix} Docdir: %{_docdir} %description This is the official C++ client API for postgres. What libpqxx brings you is effective use of templates to reduce the inconvenience of dealing with type conversions; of standard C++ strings to keep you from having to worry about buffer allocation and overflow attacks; of exceptions to take the tedious and error-prone plumbing around error handling out of your hands; of constructors and destructors to bring resource management under control; and even basic object-orientation to give you some extra reliability features that would be hard to get with most other database interfaces. %package devel Summary: Libraries, includes, etc. to develop PostgreSQL applications in C++. Group: Development/Libraries Requires: libpqxx = %{version} %description devel Libraries, include files, etc you can use to develop PostgreSQL applications in C++. %prep %setup -q %build %configure --enable-shared make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README COPYING %{_libdir}/lib*.so %files devel %defattr(-, root, root) %{_libdir}/*a %{_libdir}/pkgconfig/libpqxx.pc %{_includedir}/* %{_bindir}/pqxx-config %changelog * Thu Jan 29 2004 Arjen Baart - Built release 2.1.3 libpqxx-4.0.1+dfsg/libpqxx.spec.in000066400000000000000000000034661224474465600171210ustar00rootroot00000000000000Summary: C++ API to the PostgreSQL database management system. Name: libpqxx Version: @VERSION@ Release: 1 License: BSD Group: Development/Libraries Source: ftp://pqxx.org/software/libpqxx/libpqxx-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-root URL: http://pqxx.org/ Vendor: Andromeda Technology & Automation Packager: Arjen Baart Requires: postgresql-libs BuildRequires: postgresql-devel Prefix: %{_prefix} Docdir: %{_docdir} %description This is the official C++ client API for postgres. What libpqxx brings you is effective use of templates to reduce the inconvenience of dealing with type conversions; of standard C++ strings to keep you from having to worry about buffer allocation and overflow attacks; of exceptions to take the tedious and error-prone plumbing around error handling out of your hands; of constructors and destructors to bring resource management under control; and even basic object-orientation to give you some extra reliability features that would be hard to get with most other database interfaces. %package devel Summary: Libraries, includes, etc. to develop PostgreSQL applications in C++. Group: Development/Libraries Requires: libpqxx = %{version} %description devel Libraries, include files, etc you can use to develop PostgreSQL applications in C++. %prep %setup -q %build %configure --enable-shared make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install %clean rm -rf $RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-, root, root) %doc AUTHORS ChangeLog NEWS README COPYING %{_libdir}/lib*.so %files devel %defattr(-, root, root) %{_libdir}/*a %{_libdir}/pkgconfig/libpqxx.pc %{_includedir}/* %{_bindir}/pqxx-config %changelog * Thu Jan 29 2004 Arjen Baart - Built release 2.1.3 libpqxx-4.0.1+dfsg/pqxx-config.in000066400000000000000000000023211224474465600167310ustar00rootroot00000000000000#! /bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ pkgconfig=@PKG_CONFIG@ deprecated() { cat 1>&2 </dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libpqxx_la_LIBADD = am_libpqxx_la_OBJECTS = binarystring.lo connection_base.lo \ connection.lo cursor.lo dbtransaction.lo errorhandler.lo \ except.lo field.lo largeobject.lo nontransaction.lo \ notification.lo notify-listen.lo pipeline.lo \ prepared_statement.lo result.lo robusttransaction.lo \ statement_parameters.lo strconv.lo subtransaction.lo \ tablereader.lo tablestream.lo tablewriter.lo transaction.lo \ transaction_base.lo tuple.lo util.lo libpqxx_la_OBJECTS = $(am_libpqxx_la_OBJECTS) libpqxx_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libpqxx_la_LDFLAGS) $(LDFLAGS) -o $@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpqxx_la_SOURCES) DIST_SOURCES = $(libpqxx_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ lib_LTLIBRARIES = libpqxx.la libpqxx_la_SOURCES = binarystring.cxx \ connection_base.cxx \ connection.cxx \ cursor.cxx \ dbtransaction.cxx \ errorhandler.cxx \ except.cxx \ field.cxx \ largeobject.cxx \ nontransaction.cxx \ notification.cxx \ notify-listen.cxx \ pipeline.cxx \ prepared_statement.cxx \ result.cxx \ robusttransaction.cxx \ statement_parameters.cxx \ strconv.cxx \ subtransaction.cxx \ tablereader.cxx \ tablestream.cxx \ tablewriter.cxx \ transaction.cxx \ transaction_base.cxx \ tuple.cxx \ util.cxx libpqxx_version = -release $(PQXX_ABI) libpqxx_la_LDFLAGS = $(libpqxx_version) \ -rpath $(libdir) \ ${POSTGRES_LIB} INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include ${POSTGRES_INCLUDE} # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES = MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpqxx.la: $(libpqxx_la_OBJECTS) $(libpqxx_la_DEPENDENCIES) $(EXTRA_libpqxx_la_DEPENDENCIES) $(libpqxx_la_LINK) -rpath $(libdir) $(libpqxx_la_OBJECTS) $(libpqxx_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binarystring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbtransaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errorhandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/except.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/field.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/largeobject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nontransaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notification.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify-listen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipeline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prepared_statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/result.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/robusttransaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/statement_parameters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subtransaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tablereader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tablestream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tablewriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transaction.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transaction_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tuple.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/src/binarystring.cxx000066400000000000000000000133731224474465600201750ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * binarystring.cxx * * DESCRIPTION * implementation of bytea (binary string) conversions * * Copyright (c) 2003-2013, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include #include #include #include "libpq-fe.h" #include "pqxx/binarystring" using namespace PGSTD; using namespace pqxx::internal; namespace { typedef unsigned char unsigned_char; #ifndef PQXX_HAVE_PQUNESCAPEBYTEA_9 // Convert textual digit to value inline unsigned char DV(unsigned char d) { return unsigned_char(digit_to_number(char(d))); } #endif typedef pair buffer; buffer to_buffer(const void *data, size_t len) { void *const output(malloc(len + 1)); if (!output) throw bad_alloc(); static_cast(output)[len] = '\0'; memcpy(static_cast(output), data, len); return buffer(static_cast(output), len); } buffer to_buffer(const string &source) { return to_buffer(source.c_str(), source.size()); } buffer builtin_unescape(const unsigned char escaped[], size_t) { #ifdef _WIN32 /* On Windows only, the return value from PQunescapeBytea() must be freed * using PQfreemem. Copy to a buffer allocated by libpqxx, so that the * binarystring's buffer can be freed uniformly, */ size_t unescaped_len = 0; PQAlloc A( PQunescapeBytea(const_cast(escaped), &unescaped_len)); void *data = A.get(); if (!data) throw bad_alloc(); return to_buffer(data, unescaped_len); #else /* On non-Windows platforms, it's okay to free libpq-allocated memory using * free(). No extra copy needed. */ buffer unescaped; unescaped.first = PQunescapeBytea( const_cast(escaped), &unescaped.second); if (!unescaped.first) throw bad_alloc(); return unescaped; #endif } #ifndef PQXX_HAVE_PQUNESCAPEBYTEA_9 /// Is this in PostgreSQL 9.0 hex-escaped binary format? bool is_hex(const unsigned char buf[], size_t len) { return len >= 2 && buf[0] == '\\' && buf[1] == 'x'; } #endif #ifndef PQXX_HAVE_PQUNESCAPEBYTEA_9 /// Unescape PostgreSQL 9.0 hex-escaped binary format: "\x3a20" string unescape_hex(const unsigned char buf[], size_t len) { string bin; bin.reserve((len-2)/2); bool in_pair = false; int last_nibble = 0; for (size_t i=2; i(F.c_str()), F.size())); super::operator=(super(unescaped.first)); m_size = unescaped.second; } pqxx::binarystring::binarystring(const string &s) : super(), m_size(s.size()) { super::operator=(super(to_buffer(s).first)); } pqxx::binarystring::binarystring(const void *binary_data, size_t len) : super(), m_size(len) { super::operator=(super(to_buffer(binary_data, len).first)); } bool pqxx::binarystring::operator==(const binarystring &rhs) const throw () { if (rhs.size() != size()) return false; for (size_type i=0; i= m_size) { if (!m_size) throw out_of_range("Accessing empty binarystring"); throw out_of_range("binarystring index out of range: " + to_string(n) + " (should be below " + to_string(m_size) + ")"); } return data()[n]; } void pqxx::binarystring::swap(binarystring &rhs) { // PQAlloc<>::swap() is nothrow super::swap(rhs); // This part very obviously can't go wrong, so do it last const size_type s(m_size); m_size = rhs.m_size; rhs.m_size = s; } string pqxx::binarystring::str() const { return string(get(), m_size); } string pqxx::escape_binary(const unsigned char bin[], size_t len) { size_t escapedlen = 0; unsigned char *p = const_cast(bin); PQAlloc A(PQescapeBytea(p, len, &escapedlen)); const char *cstr = reinterpret_cast(A.get()); if (!cstr) throw bad_alloc(); return string(cstr, escapedlen-1); } string pqxx::escape_binary(const unsigned char bin[]) { return escape_binary(bin, strlen(reinterpret_cast(bin))); } string pqxx::escape_binary(const char bin[], size_t len) { return escape_binary(reinterpret_cast(bin), len); } string pqxx::escape_binary(const char bin[]) { return escape_binary(bin, strlen(bin)); } string pqxx::escape_binary(const string &bin) { return escape_binary(bin.c_str(), bin.size()); } libpqxx-4.0.1+dfsg/src/connection.cxx000066400000000000000000000076111224474465600176170ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * connection.cxx * * DESCRIPTION * implementation of the pqxx::connection and sibling classes. * Different ways of setting up a backend connection. * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include "libpq-fe.h" #include "pqxx/connection" using namespace PGSTD; pqxx::connectionpolicy::connectionpolicy(const PGSTD::string &opts) : m_options(opts) { } pqxx::connectionpolicy::~connectionpolicy() throw () { } pqxx::connectionpolicy::handle pqxx::connectionpolicy::normalconnect(handle orig) { if (orig) return orig; orig = PQconnectdb(options().c_str()); if (!orig) throw bad_alloc(); if (PQstatus(orig) != CONNECTION_OK) { const string msg(PQerrorMessage(orig)); PQfinish(orig); throw broken_connection(msg); } return orig; } pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_startconnect(handle orig) { return orig; } pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_completeconnect(handle orig) { return orig; } pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_dropconnect(handle orig) throw () { return orig; } pqxx::connectionpolicy::handle pqxx::connectionpolicy::do_disconnect(handle orig) throw () { orig = do_dropconnect(orig); if (orig) PQfinish(orig); return 0; } bool pqxx::connectionpolicy::is_ready(handle h) const throw () { return h != 0; } pqxx::connectionpolicy::handle pqxx::connect_direct::do_startconnect(handle orig) { if (orig) return orig; orig = normalconnect(orig); if (PQstatus(orig) != CONNECTION_OK) { const string msg(PQerrorMessage(orig)); do_disconnect(orig); throw broken_connection(msg); } return orig; } pqxx::connectionpolicy::handle pqxx::connect_lazy::do_completeconnect(handle orig) { return normalconnect(orig); } pqxx::connect_async::connect_async(const PGSTD::string &opts) : connectionpolicy(opts), m_connecting(false) { } pqxx::connectionpolicy::handle pqxx::connect_async::do_startconnect(handle orig) { if (orig) return orig; // Already connecting or connected m_connecting = false; orig = PQconnectStart(options().c_str()); if (!orig) throw bad_alloc(); if (PQstatus(orig) == CONNECTION_BAD) { do_dropconnect(orig); throw broken_connection(string(PQerrorMessage(orig))); } m_connecting = true; return orig; } pqxx::connectionpolicy::handle pqxx::connect_async::do_completeconnect(handle orig) { const bool makenew = !orig; if (makenew) orig = do_startconnect(orig); if (!m_connecting) return orig; // Our "attempt to connect" state ends here, for better or for worse m_connecting = false; PostgresPollingStatusType pollstatus = PGRES_POLLING_WRITING; do { switch (pollstatus) { case PGRES_POLLING_FAILED: if (makenew) do_disconnect(orig); throw broken_connection(string(PQerrorMessage(orig))); case PGRES_POLLING_READING: internal::wait_read(orig); break; case PGRES_POLLING_WRITING: internal::wait_write(orig); break; case PGRES_POLLING_OK: break; default: // Meaningless, really, but deals with the obsolete PGRES_POLLING_ACTIVE // without requiring it to be defined. break; } pollstatus = PQconnectPoll(orig); } while (pollstatus != PGRES_POLLING_OK); return orig; } pqxx::connectionpolicy::handle pqxx::connect_async::do_dropconnect(handle orig) throw () { m_connecting = false; return orig; } bool pqxx::connect_async::is_ready(handle h) const throw () { return h && !m_connecting; } libpqxx-4.0.1+dfsg/src/connection_base.cxx000066400000000000000000001013771224474465600206150ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * connection_base.cxx * * DESCRIPTION * implementation of the pqxx::connection_base abstract base class. * pqxx::connection_base encapsulates a frontend to backend connection * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include #include #include #include #include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #if defined(_WIN32) #include #endif #if defined(HAVE_UNISTD_H) #include #endif #endif // PQXX_HAVE_SYS_SELECT_H #ifdef PQXX_HAVE_POLL #include #endif #include "libpq-fe.h" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif #include "pqxx/binarystring" #include "pqxx/connection" #include "pqxx/connection_base" #include "pqxx/nontransaction" #include "pqxx/pipeline" #include "pqxx/result" #include "pqxx/strconv" #include "pqxx/transaction" #include "pqxx/notification" #include "pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx" #include "pqxx/internal/gates/errorhandler-connection.hxx" #include "pqxx/internal/gates/result-creation.hxx" #include "pqxx/internal/gates/result-connection.hxx" using namespace PGSTD; using namespace pqxx; using namespace pqxx::internal; using namespace pqxx::prepare; #ifdef PQXX_SELECT_ACCEPTS_NULL // The always-empty fd_set static fd_set *const fdset_none = 0; #else // PQXX_SELECT_ACCEPTS_NULL static fd_set emptyfd; // Relies on zero-initialization static fd_set *const fdset_none = &emptyfd; #endif // PQXX_SELECT_ACCEPTS_NULL #ifndef PQXX_HAVE_POLL // Concentrate stupid "old-style cast" warnings for GNU libc in one place, and // by using "C" linkage, perhaps silence them altogether. static void set_fdbit(int f, fd_set *s) { #ifdef _MSC_VER #pragma warning ( push ) #pragma warning ( disable: 4389 ) // signed/unsigned mismatch #pragma warning ( disable: 4127 ) // conditional expression is constant #endif FD_SET(f, s); #ifdef _MSC_VER #pragma warning ( pop ) #endif } static void clear_fdmask(fd_set *mask) { FD_ZERO(mask); } #endif extern "C" { // The PQnoticeProcessor that receives an error or warning from libpq and sends // it to the appropriate connection for processing. static void pqxx_notice_processor(void *conn, const char *msg) { reinterpret_cast(conn)->process_notice(msg); } } #ifdef PQXX_HAVE_PQENCRYPTPASSWORD string pqxx::encrypt_password(const string &user, const string &password) { PQAlloc p(PQencryptPassword(password.c_str(), user.c_str())); return string(p.get()); } #endif pqxx::connection_base::connection_base(connectionpolicy &pol) : m_Conn(0), m_policy(pol), m_Trans(), m_errorhandlers(), m_Trace(0), m_serverversion(0), m_reactivation_avoidance(), m_unique_id(0), m_Completed(false), m_inhibit_reactivation(false), m_caps(), m_verbosity(normal) { clearcaps(); } void pqxx::connection_base::init() { m_Conn = m_policy.do_startconnect(m_Conn); if (m_policy.is_ready(m_Conn)) activate(); } pqxx::result pqxx::connection_base::make_result( internal::pq::PGresult *rhs, const PGSTD::string &query) { return gate::result_creation::create( rhs, protocol_version(), query, encoding_code()); } int pqxx::connection_base::backendpid() const throw () { return m_Conn ? PQbackendPID(m_Conn) : 0; } namespace { int PQXX_PURE socket_of(const ::pqxx::internal::pq::PGconn *c) throw () { return c ? PQsocket(c) : -1; } } int pqxx::connection_base::sock() const throw () { return socket_of(m_Conn); } void pqxx::connection_base::activate() { if (!is_open()) { if (m_inhibit_reactivation) throw broken_connection("Could not reactivate connection; " "reactivation is inhibited"); // If any objects were open that didn't survive the closing of our // connection, don't try to reactivate if (m_reactivation_avoidance.get()) return; try { m_Conn = m_policy.do_startconnect(m_Conn); m_Conn = m_policy.do_completeconnect(m_Conn); m_Completed = true; // (But retracted if error is thrown below) if (!is_open()) throw broken_connection(); SetupState(); } catch (const broken_connection &e) { disconnect(); m_Completed = false; throw broken_connection(e.what()); } catch (const exception &) { m_Completed = false; throw; } } } void pqxx::connection_base::deactivate() { if (!m_Conn) return; if (m_Trans.get()) throw usage_error("Attempt to deactivate connection while " + m_Trans.get()->description() + " still open"); if (m_reactivation_avoidance.get()) { process_notice("Attempt to deactivate connection while it is in a state " "that cannot be fully recovered later (ignoring)"); return; } m_Completed = false; m_Conn = m_policy.do_disconnect(m_Conn); } void pqxx::connection_base::simulate_failure() { if (m_Conn) { m_Conn = m_policy.do_disconnect(m_Conn); inhibit_reactivation(true); } } int pqxx::connection_base::protocol_version() const throw () { return m_Conn ? PQprotocolVersion(m_Conn) : 0; } int pqxx::connection_base::server_version() const throw () { return m_serverversion; } void pqxx::connection_base::set_variable(const PGSTD::string &Var, const PGSTD::string &Value) { if (m_Trans.get()) { // We're in a transaction. The variable should go in there. m_Trans.get()->set_variable(Var, Value); } else { // We're not in a transaction. Set a session variable. if (is_open()) RawSetVar(Var, Value); m_Vars[Var] = Value; } } string pqxx::connection_base::get_variable(const PGSTD::string &Var) { return m_Trans.get() ? m_Trans.get()->get_variable(Var) : RawGetVar(Var); } string pqxx::connection_base::RawGetVar(const PGSTD::string &Var) { // Is this variable in our local map of set variables? // TODO: Could we safely read-allocate variables into m_Vars? map::const_iterator i = m_Vars.find(Var); if (i != m_Vars.end()) return i->second; return Exec(("SHOW " + Var).c_str(), 0).at(0).at(0).as(string()); } void pqxx::connection_base::clearcaps() throw () { m_caps.reset(); } /** Set up various parts of logical connection state that may need to be * recovered because the physical connection to the database was lost and is * being reset, or that may not have been initialized yet. */ void pqxx::connection_base::SetupState() { if (!m_Conn) throw internal_error("SetupState() on no connection"); if (Status() != CONNECTION_OK) { const string Msg( ErrMsg() ); m_Conn = m_policy.do_disconnect(m_Conn); throw failure(Msg); } read_capabilities(); PSMap::iterator prepared_end(m_prepared.end()); for (PSMap::iterator p = m_prepared.begin(); p != prepared_end; ++p) p->second.registered = false; PQsetNoticeProcessor(m_Conn, pqxx_notice_processor, this); InternalSetTrace(); if (!m_receivers.empty() || !m_Vars.empty()) { stringstream restore_query; // Pipeline all queries needed to restore receivers and variables, so we can // send them over in one go. // Reinstate all active receivers if (!m_receivers.empty()) { const receiver_list::const_iterator End = m_receivers.end(); string Last; for (receiver_list::const_iterator i = m_receivers.begin(); i != End; ++i) { // m_receivers can handle multiple receivers waiting on the same event; // issue just one LISTEN for each event. if (i->first != Last) { restore_query << "LISTEN \"" << i->first << "\"; "; Last = i->first; } } } const map::const_iterator var_end(m_Vars.end()); for (map::const_iterator i=m_Vars.begin(); i!=var_end; ++i) restore_query << "SET " << i->first << "=" << i->second << "; "; // Now do the whole batch at once PQsendQuery(m_Conn, restore_query.str().c_str()); result r; do r = make_result(PQgetResult(m_Conn), "[RECONNECT]"); while (gate::result_connection(r)); } m_Completed = true; if (!is_open()) throw broken_connection(); } void pqxx::connection_base::check_result(const result &R) { if (!is_open()) throw broken_connection(); // A shame we can't quite detect out-of-memory to turn this into a bad_alloc! if (!gate::result_connection(R)) throw failure(ErrMsg()); try { gate::result_creation(R).CheckStatus(); } catch (const exception &e) { /* If the connection is broken, we'd expect is_open() to return false, since * PQstatus() is supposed to return CONNECTION_BAD. * * It turns out that, at least for the libpq in PostgreSQL 8.0 and the 8.1 * prerelease I'm looking at now (we're writing July 2005), libpq will only * abandon CONNECTION_OK if the errno code for the broken connection is * exactly EPIPE or ECONNRESET. This is usually fine for local connections, * but ignores the wide range of fatal errors that can occur on TCP/IP * sockets, such as extreme out-of-memory conditions, hardware failures, * severed network connections, and serious software errors. In these cases * libpq will return an error result that is (as far as I can make out) * indistinguishable from a server-side error, but will retain its state * indication of CONNECTION_OK--thus inviting the possibly false impression * that the query failed to execute (in reality it may have executed * successfully) and the definitely false impression that the connection is * still in a workable state. * * A particular worry is connection timeout. One user observed a 15-minute * period of inactivity when he pulled out a network cable, after which * libpq finally returned a result object containing an error (the error * message for connection failure is subject to translation, by the way, and * is also subject to a bug where random data may currently be embedded in * it in place of the system's explanation of the error, so even attempting * to recognize the string is not a reliable workaround) but said the * connection was still operational. * * This bug seems to have been fixed in the libpq that shipped with * PostgreSQL 8.1. */ // TODO: Only do this extra check when using buggy libpq! if (!consume_input()) throw broken_connection(e.what()); const int fd = sock(); if (fd < 0) throw broken_connection(e.what()); #ifdef PQXX_HAVE_POLL pollfd pfd = { fd, POLLERR|POLLHUP|POLLNVAL, 0 }; #else fd_set errs; clear_fdmask(&errs); #endif int sel; do { #ifdef PQXX_HAVE_POLL sel = poll(&pfd, 1, 0); #else timeval nowait = { 0, 0 }; set_fdbit(fd, &errs); sel = select(fd+1, 0, 0, &errs, &nowait); #endif } while (sel == -1 && errno == EINTR); switch (sel) { case -1: switch (errno) { case EBADF: case EINVAL: throw broken_connection(e.what()); case ENOMEM: throw bad_alloc(); } break; case 0: break; case 1: throw broken_connection(e.what()); } throw; } } void pqxx::connection_base::disconnect() throw () { // When we activate again, the server may be different! clearcaps(); m_Conn = m_policy.do_disconnect(m_Conn); } bool pqxx::connection_base::is_open() const throw () { return m_Conn && m_Completed && (Status() == CONNECTION_OK); } void pqxx::connection_base::process_notice_raw(const char msg[]) throw () { if (!msg || !*msg) return; const list::const_reverse_iterator rbegin = m_errorhandlers.rbegin(), rend = m_errorhandlers.rend(); for ( list::const_reverse_iterator i = rbegin; i != rend && (**i)(msg); ++i) ; } void pqxx::connection_base::process_notice(const char msg[]) throw () { if (!msg) return; const size_t len = strlen(msg); if (len == 0) return; if (msg[len-1] == '\n') { process_notice_raw(msg); } else try { // Newline is missing. Try the C++ string version of this function. process_notice(string(msg)); } catch (const exception &) { // If we can't even do that, use plain old buffer copying instead // (unavoidably, this will break up overly long messages!) const char separator[] = "[...]\n"; char buf[1007]; size_t bytes = sizeof(buf)-sizeof(separator)-1; size_t written; strcpy(&buf[bytes], separator); // Write all chunks but last. Each will fill the buffer exactly. for (written = 0; (written+bytes) < len; written += bytes) { memcpy(buf, &msg[written], bytes); process_notice_raw(buf); } // Write any remaining bytes (which won't fill an entire buffer) bytes = len-written; memcpy(buf, &msg[written], bytes); // Add trailing nul byte, plus newline unless there already is one strcpy(&buf[bytes], &"\n"[buf[bytes-1]=='\n']); process_notice_raw(buf); } } void pqxx::connection_base::process_notice(const PGSTD::string &msg) throw () { // Ensure that message passed to errorhandler ends in newline if (msg[msg.size()-1] == '\n') { process_notice_raw(msg.c_str()); } else try { const string nl = msg + "\n"; process_notice_raw(nl.c_str()); } catch (const exception &) { // If nothing else works, try writing the message without the newline process_notice_raw(msg.c_str()); // This is ugly. process_notice_raw("\n"); } } void pqxx::connection_base::trace(FILE *Out) throw () { m_Trace = Out; if (m_Conn) InternalSetTrace(); } void pqxx::connection_base::add_receiver(pqxx::notification_receiver *T) { if (!T) throw argument_error("Null receiver registered"); // Add to receiver list and attempt to start listening. const receiver_list::iterator p = m_receivers.find(T->channel()); const receiver_list::value_type NewVal(T->channel(), T); if (p == m_receivers.end()) { // Not listening on this event yet, start doing so. const string LQ("LISTEN \"" + T->channel() + "\""); if (is_open()) try { check_result(make_result(PQexec(m_Conn, LQ.c_str()), LQ)); } catch (const broken_connection &) { } m_receivers.insert(NewVal); } else { m_receivers.insert(p, NewVal); } } void pqxx::connection_base::remove_receiver(pqxx::notification_receiver *T) throw () { if (!T) return; try { // Keep Sun compiler happy... Hope it doesn't annoy other compilers pair tmp_pair(T->channel(), T); receiver_list::value_type E = tmp_pair; typedef pair Range; Range R = m_receivers.equal_range(E.first); const receiver_list::iterator i = find(R.first, R.second, E); if (i == R.second) { process_notice("Attempt to remove unknown receiver '" + E.first + "'"); } else { // Erase first; otherwise a notification for the same receiver may yet // come in and wreak havoc. Thanks Dragan Milenkovic. const bool gone = (m_Conn && (R.second == ++R.first)); m_receivers.erase(i); if (gone) Exec(("UNLISTEN \"" + T->channel() + "\"").c_str(), 0); } } catch (const exception &e) { process_notice(e.what()); } } bool pqxx::connection_base::consume_input() throw () { return PQconsumeInput(m_Conn) != 0; } bool pqxx::connection_base::is_busy() const throw () { return PQisBusy(m_Conn) != 0; } namespace { class cancel_wrapper { #ifdef PQXX_HAVE_PQCANCEL PGcancel *m_cancel; char m_errbuf[500]; #else PGconn *m_conn; #endif public: cancel_wrapper(PGconn *conn) : #ifdef PQXX_HAVE_PQCANCEL m_cancel(NULL), m_errbuf() #else m_conn(conn) #endif { if (conn) { #ifdef PQXX_HAVE_PQCANCEL m_cancel = PQgetCancel(conn); if (!m_cancel) throw bad_alloc(); #endif } } #ifdef PQXX_HAVE_PQCANCEL ~cancel_wrapper() { if (m_cancel) PQfreeCancel(m_cancel); } #endif void operator()() { #ifdef PQXX_HAVE_PQCANCEL if (m_cancel && !PQcancel(m_cancel, m_errbuf, int(sizeof(m_errbuf)))) throw sql_error(string(m_errbuf)); #else if (m_conn && !PQrequestCancel(m_conn)) throw sql_error(PQerrorMessage(m_conn)); #endif } }; } void pqxx::connection_base::cancel_query() { cancel_wrapper cancel(m_Conn); cancel(); } void pqxx::connection_base::set_verbosity(error_verbosity verbosity) throw () { PQsetErrorVerbosity(m_Conn, static_cast(verbosity)); m_verbosity = verbosity; } int pqxx::connection_base::get_notifs() { if (!is_open()) return 0; if (!consume_input()) throw broken_connection(); // Even if somehow we receive notifications during our transaction, don't // deliver them. if (m_Trans.get()) return 0; int notifs = 0; typedef PQAlloc notifptr; for (notifptr N( PQnotifies(m_Conn) ); N.get(); N = notifptr(PQnotifies(m_Conn))) { typedef receiver_list::iterator TI; notifs++; pair Hit = m_receivers.equal_range(string(N->relname)); for (TI i = Hit.first; i != Hit.second; ++i) try { (*i->second)(N->extra, N->be_pid); } catch (const exception &e) { try { process_notice("Exception in notification receiver '" + i->first + "': " + e.what() + "\n"); } catch (const bad_alloc &) { // Out of memory. Try to get the message out in a more robust way. process_notice("Exception in notification receiver, " "and also ran out of memory\n"); } catch (const exception &) { process_notice("Exception in notification receiver " "(compounded by other error)\n"); } } N.reset(); } return notifs; } const char *pqxx::connection_base::dbname() { if (!m_Conn) activate(); return PQdb(m_Conn); } const char *pqxx::connection_base::username() { if (!m_Conn) activate(); return PQuser(m_Conn); } const char *pqxx::connection_base::hostname() { if (!m_Conn) activate(); return PQhost(m_Conn); } const char *pqxx::connection_base::port() { if (!m_Conn) activate(); return PQport(m_Conn); } const char *pqxx::connection_base::ErrMsg() const throw () { return m_Conn ? PQerrorMessage(m_Conn) : "No connection to database"; } void pqxx::connection_base::register_errorhandler(errorhandler *handler) { m_errorhandlers.push_back(handler); } void pqxx::connection_base::unregister_errorhandler(errorhandler *handler) throw () { // The errorhandler itself will take care of nulling its pointer to this // connection. m_errorhandlers.remove(handler); } vector pqxx::connection_base::get_errorhandlers() const { vector handlers; handlers.reserve(m_errorhandlers.size()); for ( list::const_iterator i = m_errorhandlers.begin(); i != m_errorhandlers.end(); ++i) handlers.push_back(*i); return handlers; } pqxx::result pqxx::connection_base::Exec(const char Query[], int Retries) { activate(); result R = make_result(PQexec(m_Conn, Query), Query); while ((Retries > 0) && !gate::result_connection(R) && !is_open()) { Retries--; Reset(); if (is_open()) R = make_result(PQexec(m_Conn, Query), Query); } check_result(R); get_notifs(); return R; } void pqxx::connection_base::prepare( const PGSTD::string &name, const PGSTD::string &definition) { PSMap::iterator i = m_prepared.find(name); if (i != m_prepared.end()) { if (definition != i->second.definition) { if (!name.empty()) throw argument_error( "Inconsistent redefinition of prepared statement " + name); if (!supports(cap_prepare_unnamed_statement)) throw feature_not_supported( "Defining unnamed prepared statements requires a newer " "libpq version."); i->second.registered = false; i->second.definition = definition; } } else { m_prepared.insert(make_pair( name, prepare::internal::prepared_def(definition))); } } void pqxx::connection_base::prepare(const PGSTD::string &definition) { this->prepare(string(), definition); } void pqxx::connection_base::unprepare(const PGSTD::string &name) { PSMap::iterator i = m_prepared.find(name); // Quietly ignore duplicated or spurious unprepare()s if (i == m_prepared.end()) return; if (i->second.registered) Exec(("DEALLOCATE \"" + name + "\"").c_str(), 0); m_prepared.erase(i); } pqxx::prepare::internal::prepared_def & pqxx::connection_base::find_prepared(const PGSTD::string &statement) { PSMap::iterator s = m_prepared.find(statement); if (s == m_prepared.end()) throw argument_error("Unknown prepared statement '" + statement + "'"); return s->second; } pqxx::prepare::internal::prepared_def & pqxx::connection_base::register_prepared(const PGSTD::string &name) { activate(); if (!supports(cap_prepared_statements) || protocol_version() < 3) throw feature_not_supported( "Prepared statements in libpqxx require a newer server version."); prepare::internal::prepared_def &s = find_prepared(name); // "Register" (i.e., define) prepared statement with backend on demand if (!s.registered) { result r = make_result( PQprepare(m_Conn, name.c_str(), s.definition.c_str(), 0, 0), "[PREPARE " + name + "]"); check_result(r); s.registered = !name.empty(); return s; } return s; } void pqxx::connection_base::prepare_now(const PGSTD::string &name) { register_prepared(name); } // TODO: Can we make this work with std::string instead of C-style? pqxx::result pqxx::connection_base::prepared_exec( const PGSTD::string &statement, const char *const params[], const int paramlengths[], const int binary[], int nparams) { register_prepared(statement); activate(); result r = make_result( PQexecPrepared( m_Conn, statement.c_str(), nparams, params, paramlengths, binary, 0), statement); check_result(r); get_notifs(); return r; } bool pqxx::connection_base::prepared_exists(const string &statement) const { PSMap::const_iterator s = m_prepared.find(statement); return s != PSMap::const_iterator(m_prepared.end()); } void pqxx::connection_base::Reset() { if (m_inhibit_reactivation) throw broken_connection("Could not reset connection: " "reactivation is inhibited"); if (m_reactivation_avoidance.get()) return; // TODO: Probably need to go through a full disconnect/reconnect! // Forget about any previously ongoing connection attempts m_Conn = m_policy.do_dropconnect(m_Conn); m_Completed = false; if (m_Conn) { // Reset existing connection PQreset(m_Conn); SetupState(); } else { // No existing connection--start a new one activate(); } } void pqxx::connection_base::close() throw () { m_Completed = false; #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(*this); #endif inhibit_reactivation(false); m_reactivation_avoidance.clear(); try { if (m_Trans.get()) process_notice("Closing connection while " + m_Trans.get()->description() + " still open"); if (!m_receivers.empty()) { process_notice("Closing connection with outstanding receivers."); m_receivers.clear(); } PQsetNoticeProcessor(m_Conn, NULL, NULL); list old_handlers; m_errorhandlers.swap(old_handlers); const list::const_reverse_iterator rbegin = old_handlers.rbegin(), rend = old_handlers.rend(); for (list::const_reverse_iterator i = rbegin; i!=rend; ++i) gate::errorhandler_connection_base(**i).unregister(); m_Conn = m_policy.do_disconnect(m_Conn); } catch (...) { } } void pqxx::connection_base::RawSetVar(const PGSTD::string &Var, const PGSTD::string &Value) { Exec(("SET " + Var + "=" + Value).c_str(), 0); } void pqxx::connection_base::AddVariables( const PGSTD::map &Vars) { for (map::const_iterator i=Vars.begin(); i!=Vars.end(); ++i) m_Vars[i->first] = i->second; } void pqxx::connection_base::InternalSetTrace() throw () { if (m_Conn) { if (m_Trace) PQtrace(m_Conn, m_Trace); else PQuntrace(m_Conn); } } int pqxx::connection_base::Status() const throw () { return PQstatus(m_Conn); } void pqxx::connection_base::RegisterTransaction(transaction_base *T) { m_Trans.Register(T); } void pqxx::connection_base::UnregisterTransaction(transaction_base *T) throw () { try { m_Trans.Unregister(T); } catch (const exception &e) { process_notice(e.what()); } } bool pqxx::connection_base::ReadCopyLine(PGSTD::string &Line) { if (!is_open()) throw internal_error("ReadCopyLine() without connection"); Line.erase(); bool Result; char *Buf = 0; const string query = "[END COPY]"; switch (PQgetCopyData(m_Conn, &Buf, false)) { case -2: throw failure("Reading of table data failed: " + string(ErrMsg())); case -1: for (result R(make_result(PQgetResult(m_Conn), query)); gate::result_connection(R); R=make_result(PQgetResult(m_Conn), query)) check_result(R); Result = false; break; case 0: throw internal_error("table read inexplicably went asynchronous"); default: if (Buf) { PQAlloc PQA(Buf); Line = Buf; } Result = true; } return Result; } void pqxx::connection_base::WriteCopyLine(const PGSTD::string &Line) { if (!is_open()) throw internal_error("WriteCopyLine() without connection"); const string L = Line + '\n'; const char *const LC = L.c_str(); const string::size_type Len = L.size(); if (PQputCopyData(m_Conn, LC, int(Len)) <= 0) { const string Msg = string("Error writing to table: ") + ErrMsg(); PQendcopy(m_Conn); throw failure(Msg); } } void pqxx::connection_base::EndCopyWrite() { int Res = PQputCopyEnd(m_Conn, NULL); switch (Res) { case -1: throw failure("Write to table failed: " + string(ErrMsg())); case 0: throw internal_error("table write is inexplicably asynchronous"); case 1: // Normal termination. Retrieve result object. break; default: throw internal_error("unexpected result " + to_string(Res) + " " "from PQputCopyEnd()"); } check_result(make_result(PQgetResult(m_Conn), "[END COPY]")); } void pqxx::connection_base::start_exec(const PGSTD::string &Q) { activate(); if (!PQsendQuery(m_Conn, Q.c_str())) throw failure(ErrMsg()); } pqxx::internal::pq::PGresult *pqxx::connection_base::get_result() { if (!m_Conn) throw broken_connection(); return PQgetResult(m_Conn); } void pqxx::connection_base::add_reactivation_avoidance_count(int n) { m_reactivation_avoidance.add(n); } string pqxx::connection_base::esc(const char str[], size_t maxlen) { string escaped; // We need a connection object... This is the one reason why this function is // not const! if (!m_Conn) activate(); char *const buf = new char[2*maxlen+1]; try { int err = 0; PQescapeStringConn(m_Conn, buf, str, maxlen, &err); if (err) throw argument_error(ErrMsg()); escaped = string(buf); } catch (const exception &) { delete [] buf; throw; } delete [] buf; return escaped; } string pqxx::connection_base::esc(const char str[]) { return this->esc(str, strlen(str)); } string pqxx::connection_base::esc(const PGSTD::string &str) { return this->esc(str.c_str(), str.size()); } string pqxx::connection_base::esc_raw(const unsigned char str[], size_t len) { size_t bytes = 0; // We need a connection object... This is the one reason why this function is // not const! activate(); PQAlloc buf( PQescapeByteaConn(m_Conn, str, len, &bytes) ); if (!buf.get()) throw bad_alloc(); return string(reinterpret_cast(buf.get())); } string pqxx::connection_base::quote_raw(const unsigned char str[], size_t len) { return "'" + esc_raw(str, len) + "'::bytea"; } string pqxx::connection_base::quote(const binarystring &b) { return quote_raw(b.data(), b.size()); } string pqxx::connection_base::quote_name(const string &identifier) { #ifdef PQXX_HAVE_PQESCAPEIDENTIFIER // We need a connection object... This is the one reason why this function is // not const! activate(); PQAlloc buf( PQescapeIdentifier(m_Conn, identifier.c_str(), identifier.size())); if (!buf.get()) throw failure(ErrMsg()); return string(buf.get()); #else for (string::const_iterator i = identifier.begin(); i!=identifier.end(); ++i) if (*i == '\\' || *i == '\'' || *i == '"' || *i == '\0') throw feature_not_supported( "Identifier contains characters that are difficult to escape; " "this requires a newer libpq version."); return "\"" + identifier + "\""; #endif } pqxx::internal::reactivation_avoidance_exemption:: reactivation_avoidance_exemption( connection_base &C) : m_home(C), m_count(gate::connection_reactivation_avoidance_exemption(C).get_counter()), m_open(C.is_open()) { gate::connection_reactivation_avoidance_exemption gate(C); gate.clear_counter(); } pqxx::internal::reactivation_avoidance_exemption:: ~reactivation_avoidance_exemption() { // Don't leave the connection open if reactivation avoidance is in effect and // the connection needed to be reactivated temporarily. if (m_count && !m_open) m_home.deactivate(); gate::connection_reactivation_avoidance_exemption gate(m_home); gate.add_counter(m_count); } namespace { void wait_fd(int fd, bool forwrite=false, timeval *tv=0) { if (fd < 0) throw pqxx::broken_connection(); #ifdef PQXX_HAVE_POLL pollfd pfd = { fd, short(POLLERR|POLLHUP|POLLNVAL | (forwrite?POLLOUT:POLLIN)) , 0 }; poll(&pfd, 1, (tv ? int(tv->tv_sec*1000 + tv->tv_usec/1000) : -1)); #else fd_set s; clear_fdmask(&s); set_fdbit(fd, &s); select(fd+1, (forwrite?fdset_none:&s), (forwrite?&s:fdset_none), &s, tv); #endif } } // namespace void pqxx::internal::wait_read(const pq::PGconn *c) { wait_fd(socket_of(c)); } void pqxx::internal::wait_read(const pq::PGconn *c, long seconds, long microseconds) { // These are really supposed to be time_t and suseconds_t. But not all // platforms have that type; some use "long" instead, and some 64-bit // systems use 32-bit integers here. So "int" seems to be the only really // safe type to use. timeval tv = { time_t(seconds), int(microseconds) }; wait_fd(socket_of(c), false, &tv); } void pqxx::internal::wait_write(const pq::PGconn *c) { wait_fd(socket_of(c), true); } void pqxx::connection_base::wait_read() const { internal::wait_read(m_Conn); } void pqxx::connection_base::wait_read(long seconds, long microseconds) const { internal::wait_read(m_Conn, seconds, microseconds); } void pqxx::connection_base::wait_write() const { internal::wait_write(m_Conn); } int pqxx::connection_base::await_notification() { activate(); int notifs = get_notifs(); if (!notifs) { wait_read(); notifs = get_notifs(); } return notifs; } int pqxx::connection_base::await_notification(long seconds, long microseconds) { activate(); int notifs = get_notifs(); if (!notifs) { wait_read(seconds, microseconds); notifs = get_notifs(); } return notifs; } void pqxx::connection_base::read_capabilities() throw () { m_serverversion = PQserverVersion(m_Conn); const int v = m_serverversion; const int p = protocol_version(); m_caps[cap_prepared_statements] = (v >= 70300); m_caps[cap_statement_varargs] = (v >= 70300 && (p >= 3)); m_caps[cap_prepare_unnamed_statement] = (p >= 3); m_caps[cap_cursor_scroll] = (v >= 70400); m_caps[cap_cursor_with_hold] = (v >= 70400); m_caps[cap_cursor_fetch_0] = (v >= 70400); m_caps[cap_nested_transactions] = (v >= 80000); m_caps[cap_create_table_with_oids] = (v >= 80000); m_caps[cap_read_only_transactions] = (v >= 80000); m_caps[cap_notify_payload] = (v >= 90000); m_caps[cap_table_column] = (p >= 3); m_caps[cap_parameterized_statements] = (p >= 3); } string pqxx::connection_base::adorn_name(const PGSTD::string &n) { const string id = to_string(++m_unique_id); return n.empty() ? ("x"+id) : (n+"_"+id); } int pqxx::connection_base::encoding_code() { #ifdef PQXX_HAVE_PQCLIENTENCODING activate(); return PQclientEncoding(m_Conn); #else return 0; #endif } pqxx::result pqxx::connection_base::parameterized_exec( const PGSTD::string &query, const char *const params[], const int paramlengths[], const int binaries[], int nparams) { if (!supports(cap_parameterized_statements)) throw feature_not_supported( "Database backend version does not support parameterized statements."); result r = make_result( PQexecParams( m_Conn, query.c_str(), nparams, NULL, params, paramlengths, binaries, 0), query); check_result(r); get_notifs(); return r; } libpqxx-4.0.1+dfsg/src/cursor.cxx000066400000000000000000000374051224474465600170010ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * cursor.cxx * * DESCRIPTION * implementation of libpqxx STL-style cursor classes. * These classes wrap SQL cursors in STL-like interfaces * * Copyright (c) 2004-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include "pqxx/cursor" #include "pqxx/result" #include "pqxx/strconv" #include "pqxx/transaction" #include "pqxx/internal/gates/connection-sql_cursor.hxx" #include "pqxx/internal/gates/icursor_iterator-icursorstream.hxx" #include "pqxx/internal/gates/icursorstream-icursor_iterator.hxx" #include "pqxx/internal/gates/result-sql_cursor.hxx" using namespace PGSTD; using namespace pqxx; using namespace pqxx::internal; namespace { /// Is this character a "useless trailing character" in a query? /** A character is "useless" at the end of a query if it is either whitespace or * a semicolon. */ inline bool useless_trail(char c) { return isspace(c) || c==';'; } } pqxx::internal::sql_cursor::sql_cursor(transaction_base &t, const string &query, const string &cname, cursor_base::accesspolicy ap, cursor_base::updatepolicy up, cursor_base::ownershippolicy op, bool hold) : cursor_base(t.conn(), cname), m_home(t.conn()), m_empty_result(), m_adopted(false), m_at_end(-1), m_pos(0), m_endpos(-1) { if (&t.conn() != &m_home) throw internal_error("Cursor in wrong connection"); stringstream cq, qn; /* Strip trailing semicolons (and whitespace, as side effect) off query. The * whitespace is stripped because it might otherwise mask a semicolon. After * this, the remaining useful query will be the sequence defined by * query.begin() and last, i.e. last may be equal to query.end() or point to * the first useless trailing character. */ string::const_iterator last = query.end(); // TODO: May break on multibyte encodings! for (--last; last!=query.begin() && useless_trail(*last); --last) ; if (last==query.begin() && useless_trail(*last)) throw argument_error("Cursor created on empty query"); ++last; cq << "DECLARE \"" << name() << "\" "; m_home.activate(); if (m_home.supports(connection_base::cap_cursor_scroll)) { if (ap == cursor_base::forward_only) cq << "NO "; cq << "SCROLL "; } cq << "CURSOR "; if (hold) { if (!m_home.supports(connection_base::cap_cursor_with_hold)) throw failure("Cursor " + name() + " " "created for use outside of its originating transaction, " "but this backend version does not support that."); cq << "WITH HOLD "; } cq << "FOR " << string(query.begin(),last) << ' '; if (up != cursor_base::update) cq << "FOR READ ONLY "; else if (!m_home.supports(connection_base::cap_cursor_update)) throw failure("Cursor " + name() + " " "created as updatable, " "but this backend version does not support that."); else cq << "FOR UPDATE "; qn << "[DECLARE " << name() << ']'; t.exec(cq, qn.str()); // Now that we're here in the starting position, keep a copy of an empty // result. That may come in handy later, because we may not be able to // construct an empty result with all the right metadata due to the weird // meaning of "FETCH 0." init_empty_result(t); // If we're creating a WITH HOLD cursor, noone is going to destroy it until // after this transaction. That means the connection cannot be deactivated // without losing the cursor. if (hold) gate::connection_sql_cursor(t.conn()).add_reactivation_avoidance_count(1); m_ownership = op; } pqxx::internal::sql_cursor::sql_cursor(transaction_base &t, const string &cname, cursor_base::ownershippolicy op) : cursor_base(t.conn(), cname, false), m_home(t.conn()), m_empty_result(), m_adopted(true), m_at_end(0), m_pos(-1), m_endpos(-1) { // If we take responsibility for destroying the cursor, that's one less reason // not to allow the connection to be deactivated and reactivated. // TODO: Go over lifetime/reactivation rules again to be sure they work if (op==cursor_base::owned) gate::connection_sql_cursor(t.conn()).add_reactivation_avoidance_count(-1); m_adopted = true; m_ownership = op; } void pqxx::internal::sql_cursor::close() throw () { if (m_ownership==cursor_base::owned) { try { gate::connection_sql_cursor(m_home).Exec( ("CLOSE \"" + name() + "\"").c_str(), 0); } catch (const exception &) { } if (m_adopted) gate::connection_sql_cursor(m_home).add_reactivation_avoidance_count(-1); m_ownership = cursor_base::loose; } } void pqxx::internal::sql_cursor::init_empty_result(transaction_base &t) { if (pos() != 0) throw internal_error("init_empty_result() from bad pos()"); // This doesn't work with older backends, where "FETCH 0" meant "FETCH ALL." if (m_home.supports(connection_base::cap_cursor_fetch_0)) m_empty_result = t.exec("FETCH 0 IN \"" + name() + '"'); } /// Compute actual displacement based on requested and reported displacements internal::sql_cursor::difference_type pqxx::internal::sql_cursor::adjust(difference_type hoped, difference_type actual) { if (actual < 0) throw internal_error("Negative rows in cursor movement"); if (hoped == 0) return 0; const int direction = ((hoped < 0) ? -1 : 1); bool hit_end = false; if (actual != labs(hoped)) { if (actual > labs(hoped)) throw internal_error("Cursor displacement larger than requested"); // If we see fewer rows than requested, then we've hit an end (on either // side) of the result set. Wether we make an extra step to a one-past-end // position or whether we're already there depends on where we were // previously: if our last move was in the same direction and also fell // short, we're already at a one-past-end row. if (m_at_end != direction) ++actual; // If we hit the beginning, make sure our position calculation ends up // at zero (even if we didn't previously know where we were!), and if we // hit the other end, register the fact that we now know where the end // of the result set is. if (direction > 0) hit_end = true; else if (m_pos == -1) m_pos = actual; else if (m_pos != actual) throw internal_error("Moved back to beginning, but wrong position: " "hoped=" + to_string(hoped) + ", " "actual=" + to_string(actual) + ", " "m_pos=" + to_string(m_pos) + ", " "direction=" + to_string(direction)); m_at_end = direction; } else { m_at_end = 0; } if (m_pos >= 0) m_pos += direction*actual; if (hit_end) { if (m_endpos >= 0 && m_pos != m_endpos) throw internal_error("Inconsistent cursor end positions"); m_endpos = m_pos; } return direction*actual; } result pqxx::internal::sql_cursor::fetch(difference_type rows, difference_type &displacement) { if (!rows) { displacement = 0; return m_empty_result; } const string query = "FETCH " + stridestring(rows) + " IN \"" + name() + "\""; const result r(gate::connection_sql_cursor(m_home).Exec(query.c_str(), 0)); displacement = adjust(rows, difference_type(r.size())); return r; } cursor_base::difference_type pqxx::internal::sql_cursor::move( difference_type rows, difference_type &displacement) { if (!rows) { displacement = 0; return 0; } const string query = "MOVE " + stridestring(rows) + " IN \"" + name() + "\""; const result r(gate::connection_sql_cursor(m_home).Exec(query.c_str(), 0)); // Starting with the libpq in PostgreSQL 7.4, PQcmdTuples() (which we call // indirectly here) also returns the number of rows skipped by a MOVE difference_type d = difference_type(r.affected_rows()); // We may not have PQcmdTuples(), or this may be a libpq version that doesn't // implement it for MOVE yet. We'll also get zero if we decide to use a // prepared statement for the MOVE. if (!d) { static const string StdResponse("MOVE "); const char *const status = gate::result_sql_cursor(r).CmdStatus(); if (strncmp(status, StdResponse.c_str(), StdResponse.size()) != 0) throw internal_error("cursor MOVE returned " "'" + string(status) + "' " "(expected '" + StdResponse + "')"); from_string(status + StdResponse.size(), d); } displacement = adjust(rows, d); return d; } string pqxx::internal::sql_cursor::stridestring(difference_type n) { /* Some special-casing for ALL and BACKWARD ALL here. We used to use numeric * "infinities" for difference_type for this (the highest and lowest possible * values for "long"), but for PostgreSQL 8.0 at least, the backend appears to * expect a 32-bit number and fails to parse large 64-bit numbers. * We could change the typedef to match this behaviour, but that would break * if/when Postgres is changed to accept 64-bit displacements. */ static const string All("ALL"), BackAll("BACKWARD ALL"); if (n >= cursor_base::all()) return All; else if (n <= cursor_base::backward_all()) return BackAll; return to_string(n); } pqxx::cursor_base::cursor_base(connection_base &context, const PGSTD::string &Name, bool embellish_name) : m_name(embellish_name ? context.adorn_name(Name) : Name) { } result::size_type pqxx::internal::obtain_stateless_cursor_size(sql_cursor &cur) { if (cur.endpos() == -1) cur.move(cursor_base::all()); return result::size_type(cur.endpos() - 1); } result pqxx::internal::stateless_cursor_retrieve( sql_cursor &cur, result::difference_type size, result::difference_type begin_pos, result::difference_type end_pos) { if (begin_pos < 0 || begin_pos > size) throw range_error("Starting position out of range"); if (end_pos < -1) end_pos = -1; else if (end_pos > size) end_pos = size; if (begin_pos == end_pos) return cur.empty_result(); const int direction = ((begin_pos < end_pos) ? 1 : -1); cur.move((begin_pos-direction) - (cur.pos()-1)); return cur.fetch(end_pos - begin_pos); } pqxx::icursorstream::icursorstream( transaction_base &context, const PGSTD::string &query, const PGSTD::string &basename, difference_type sstride) : m_cur(context, query, basename, cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false), m_stride(sstride), m_realpos(0), m_reqpos(0), m_iterators(0), m_done(false) { set_stride(sstride); } pqxx::icursorstream::icursorstream( transaction_base &context, const field &cname, difference_type sstride, cursor_base::ownershippolicy op) : m_cur(context, cname.c_str(), op), m_stride(sstride), m_realpos(0), m_reqpos(0), m_iterators(0), m_done(false) { set_stride(sstride); } void pqxx::icursorstream::set_stride(difference_type n) { if (n < 1) throw argument_error("Attempt to set cursor stride to " + to_string(n)); m_stride = n; } result pqxx::icursorstream::fetchblock() { const result r(m_cur.fetch(m_stride)); m_realpos += r.size(); if (r.empty()) m_done = true; return r; } icursorstream &pqxx::icursorstream::ignore(PGSTD::streamsize n) { difference_type offset = m_cur.move(difference_type(n)); m_realpos += offset; if (offset < n) m_done = true; return *this; } icursorstream::size_type pqxx::icursorstream::forward(size_type n) { m_reqpos += difference_type(n) * m_stride; return icursorstream::size_type(m_reqpos); } void pqxx::icursorstream::insert_iterator(icursor_iterator *i) throw () { gate::icursor_iterator_icursorstream(*i).set_next(m_iterators); if (m_iterators) gate::icursor_iterator_icursorstream(*m_iterators).set_prev(i); m_iterators = i; } void pqxx::icursorstream::remove_iterator(icursor_iterator *i) const throw () { gate::icursor_iterator_icursorstream igate(*i); if (i == m_iterators) { m_iterators = igate.get_next(); if (m_iterators) gate::icursor_iterator_icursorstream(*m_iterators).set_prev(0); } else { icursor_iterator *prev = igate.get_prev(), *next = igate.get_next(); gate::icursor_iterator_icursorstream(*prev).set_next(next); if (next) gate::icursor_iterator_icursorstream(*next).set_prev(prev); } igate.set_prev(0); igate.set_next(0); } void pqxx::icursorstream::service_iterators(difference_type topos) { if (topos < m_realpos) return; typedef multimap todolist; todolist todo; for (icursor_iterator *i = m_iterators, *next; i; i = next) { gate::icursor_iterator_icursorstream gate(*i); const icursor_iterator::difference_type ipos = gate.pos(); if (ipos >= m_realpos && ipos <= topos) todo.insert(todolist::value_type(ipos, i)); next = gate.get_next(); } const todolist::const_iterator todo_end(todo.end()); for (todolist::const_iterator i = todo.begin(); i != todo_end; ) { const difference_type readpos = i->first; if (readpos > m_realpos) ignore(readpos - m_realpos); const result r = fetchblock(); for ( ; i != todo_end && i->first == readpos; ++i) gate::icursor_iterator_icursorstream(*i->second).fill(r); } } pqxx::icursor_iterator::icursor_iterator() throw () : m_stream(0), m_here(), m_pos(0), m_prev(0), m_next(0) { } pqxx::icursor_iterator::icursor_iterator(istream_type &s) throw () : m_stream(&s), m_here(), m_pos(difference_type(gate::icursorstream_icursor_iterator(s).forward(0))), m_prev(0), m_next(0) { gate::icursorstream_icursor_iterator(*m_stream).insert_iterator(this); } pqxx::icursor_iterator::icursor_iterator(const icursor_iterator &rhs) throw () : m_stream(rhs.m_stream), m_here(rhs.m_here), m_pos(rhs.m_pos), m_prev(0), m_next(0) { if (m_stream) gate::icursorstream_icursor_iterator(*m_stream).insert_iterator(this); } pqxx::icursor_iterator::~icursor_iterator() throw () { if (m_stream) gate::icursorstream_icursor_iterator(*m_stream).remove_iterator(this); } icursor_iterator pqxx::icursor_iterator::operator++(int) { icursor_iterator old(*this); m_pos = difference_type( gate::icursorstream_icursor_iterator(*m_stream).forward()); m_here.clear(); return old; } icursor_iterator &pqxx::icursor_iterator::operator++() { m_pos = difference_type( gate::icursorstream_icursor_iterator(*m_stream).forward()); m_here.clear(); return *this; } icursor_iterator &pqxx::icursor_iterator::operator+=(difference_type n) { if (n <= 0) { if (!n) return *this; throw argument_error("Advancing icursor_iterator by negative offset"); } m_pos = difference_type( gate::icursorstream_icursor_iterator(*m_stream).forward( icursorstream::size_type(n))); m_here.clear(); return *this; } icursor_iterator & pqxx::icursor_iterator::operator=(const icursor_iterator &rhs) throw () { if (rhs.m_stream == m_stream) { m_here = rhs.m_here; m_pos = rhs.m_pos; } else { if (m_stream) gate::icursorstream_icursor_iterator(*m_stream).remove_iterator(this); m_here = rhs.m_here; m_pos = rhs.m_pos; m_stream = rhs.m_stream; if (m_stream) gate::icursorstream_icursor_iterator(*m_stream).insert_iterator(this); } return *this; } bool pqxx::icursor_iterator::operator==(const icursor_iterator &rhs) const { if (m_stream == rhs.m_stream) return pos() == rhs.pos(); if (m_stream && rhs.m_stream) return false; refresh(); rhs.refresh(); return m_here.empty() && rhs.m_here.empty(); } bool pqxx::icursor_iterator::operator<(const icursor_iterator &rhs) const { if (m_stream == rhs.m_stream) return pos() < rhs.pos(); refresh(); rhs.refresh(); return !m_here.empty(); } void pqxx::icursor_iterator::refresh() const { if (m_stream) gate::icursorstream_icursor_iterator(*m_stream).service_iterators(pos()); } void pqxx::icursor_iterator::fill(const result &r) { m_here = r; } libpqxx-4.0.1+dfsg/src/dbtransaction.cxx000066400000000000000000000050171224474465600203110ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * dbtransaction.cxx * * DESCRIPTION * implementation of the pqxx::dbtransaction class. * pqxx::dbtransaction represents a real backend transaction * * Copyright (c) 2004-2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/dbtransaction" #include "pqxx/internal/gates/connection-dbtransaction.hxx" using namespace PGSTD; using namespace pqxx::internal; namespace { string generate_set_transaction( pqxx::connection_base &C, pqxx::readwrite_policy rw, const string &IsolationString=string()) { string args; if (!IsolationString.empty()) if (IsolationString != pqxx::isolation_traits::name()) args += " ISOLATION LEVEL " + IsolationString; if (rw != pqxx::read_write && C.supports(pqxx::connection_base::cap_read_only_transactions)) args += " READ ONLY"; return args.empty() ? pqxx::internal::sql_begin_work : (string(pqxx::internal::sql_begin_work) + "; SET TRANSACTION" + args); } } // namespace pqxx::dbtransaction::dbtransaction( connection_base &C, const PGSTD::string &IsolationString, readwrite_policy rw) : namedclass("dbtransaction"), transaction_base(C), m_StartCmd(generate_set_transaction(C, rw, IsolationString)) { } pqxx::dbtransaction::dbtransaction( connection_base &C, bool direct, readwrite_policy rw) : namedclass("dbtransaction"), transaction_base(C, direct), m_StartCmd(generate_set_transaction(C, rw)) { } pqxx::dbtransaction::~dbtransaction() { } void pqxx::dbtransaction::do_begin() { const gate::connection_dbtransaction gate(conn()); const int avoidance_counter = gate.get_reactivation_avoidance_count(); DirectExec(m_StartCmd.c_str(), avoidance_counter ? 0 : 2); } pqxx::result pqxx::dbtransaction::do_exec(const char Query[]) { try { return DirectExec(Query); } catch (const exception &) { try { abort(); } catch (const exception &) {} throw; } } void pqxx::dbtransaction::do_abort() { reactivation_avoidance_clear(); DirectExec(internal::sql_rollback_work); } string pqxx::dbtransaction::fullname(const PGSTD::string &ttype, const PGSTD::string &isolation) { return ttype + "<" + isolation + ">"; } libpqxx-4.0.1+dfsg/src/errorhandler.cxx000066400000000000000000000023031224474465600201400ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * errorhandler.cxx * * DESCRIPTION * implementation of pqxx::errorhandler and helpers. * pqxx::errorhandler allows programs to receive errors and warnings. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/connection_base" #include "pqxx/errorhandler" #include "pqxx/internal/gates/connection-errorhandler.hxx" using namespace pqxx; using namespace pqxx::internal; pqxx::errorhandler::errorhandler(connection_base &conn) : m_home(&conn) { gate::connection_errorhandler(*m_home).register_errorhandler(this); } pqxx::errorhandler::~errorhandler() { unregister(); } void pqxx::errorhandler::unregister() throw () { if (m_home) { gate::connection_errorhandler connection_gate(*m_home); m_home = NULL; connection_gate.unregister_errorhandler(this); } } libpqxx-4.0.1+dfsg/src/except.cxx000066400000000000000000000036671224474465600167570ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * except.cxx * * DESCRIPTION * implementation of libpqxx exception classes * * Copyright (c) 2005-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/except" using namespace PGSTD; pqxx::pqxx_exception::~pqxx_exception() throw () { } pqxx::failure::failure(const PGSTD::string &whatarg) : pqxx_exception(), runtime_error(whatarg) { } pqxx::broken_connection::broken_connection() : failure("Connection to database failed") { } pqxx::broken_connection::broken_connection(const PGSTD::string &whatarg) : failure(whatarg) { } pqxx::sql_error::sql_error() : failure("Failed query"), m_Q() { } pqxx::sql_error::sql_error(const PGSTD::string &whatarg) : failure(whatarg), m_Q() { } pqxx::sql_error::sql_error(const PGSTD::string &whatarg, const PGSTD::string &Q) : failure(whatarg), m_Q(Q) { } pqxx::sql_error::~sql_error() throw () { } const string & PQXX_CONST pqxx::sql_error::query() const throw () { return m_Q; } pqxx::in_doubt_error::in_doubt_error(const PGSTD::string &whatarg) : failure(whatarg) { } pqxx::internal_error::internal_error(const PGSTD::string &whatarg) : logic_error("libpqxx internal error: " + whatarg) { } pqxx::usage_error::usage_error(const PGSTD::string &whatarg) : logic_error(whatarg) { } pqxx::argument_error::argument_error(const PGSTD::string &whatarg) : invalid_argument(whatarg) { } pqxx::conversion_error::conversion_error(const PGSTD::string &whatarg) : domain_error(whatarg) { } pqxx::range_error::range_error(const PGSTD::string &whatarg) : out_of_range(whatarg) { } libpqxx-4.0.1+dfsg/src/field.cxx000066400000000000000000000034711224474465600165430ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * field.cxx * * DESCRIPTION * implementation of the pqxx::field class. * pqxx::field refers to a field in a query result. * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/internal/libpq-forward.hxx" #include "pqxx/field" #include "pqxx/result" #include "pqxx/tuple" using namespace PGSTD; pqxx::field::field(const pqxx::tuple &T, pqxx::tuple::size_type C) throw () : m_col(C), m_home(T.m_Home), m_row(T.m_Index) { } bool pqxx::field::operator==(const field &rhs) const { if (is_null() != rhs.is_null()) return false; // TODO: Verify null handling decision const size_type s = size(); if (s != rhs.size()) return false; const char *const l(c_str()), *const r(rhs.c_str()); for (size_type i = 0; i < s; ++i) if (l[i] != r[i]) return false; return true; } const char *pqxx::field::name() const { return home()->column_name(col()); } pqxx::oid pqxx::field::type() const { return home()->column_type(col()); } pqxx::oid pqxx::field::table() const { return home()->column_table(col()); } pqxx::tuple::size_type pqxx::field::table_column() const { return home()->table_column(col()); } const char *pqxx::field::c_str() const { return home()->GetValue(idx(), col()); } bool pqxx::field::is_null() const throw () { return home()->GetIsNull(idx(), col()); } pqxx::field::size_type pqxx::field::size() const throw () { return home()->GetLength(idx(), col()); } libpqxx-4.0.1+dfsg/src/largeobject.cxx000066400000000000000000000162471224474465600177460ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * largeobject.cxx * * DESCRIPTION * Implementation of the Large Objects interface * Allows access to large objects directly, or though I/O streams * * Copyright (c) 2003-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include "libpq-fe.h" //#include "libpq/libpq-fs.h" /// Copied from libpq/libpq-fs.h so we don't need that header anymore #define INV_WRITE 0x00020000 /// Copied from libpq/libpq-fs.h so we don't need that header anymore #define INV_READ 0x00040000 #include "pqxx/largeobject" #include "pqxx/internal/gates/connection-largeobject.hxx" using namespace PGSTD; using namespace pqxx::internal; namespace { inline int StdModeToPQMode(ios::openmode mode) { return ((mode & ios::in) ? INV_READ : 0) | ((mode & ios::out) ? INV_WRITE : 0); } inline int StdDirToPQDir(ios::seekdir dir) throw () { // TODO: Figure out whether seekdir values match C counterparts! #ifdef PQXX_SEEKDIRS_MATCH_C return dir; #else int pqdir; switch (dir) { case ios::beg: pqdir=SEEK_SET; break; case ios::cur: pqdir=SEEK_CUR; break; case ios::end: pqdir=SEEK_END; break; /* Added mostly to silence compiler warning, but also to help compiler detect * cases where this function can be optimized away completely. This latter * reason should go away as soon as PQXX_SEEKDIRS_MATCH_C works. */ default: pqdir = dir; break; } return pqdir; #endif } } // namespace pqxx::largeobject::largeobject() throw () : m_ID(oid_none) { } pqxx::largeobject::largeobject(dbtransaction &T) : m_ID() { m_ID = lo_creat(RawConnection(T), INV_READ|INV_WRITE); if (m_ID == oid_none) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Could not create large object: " + Reason(err)); } } pqxx::largeobject::largeobject(dbtransaction &T, const PGSTD::string &File) : m_ID() { m_ID = lo_import(RawConnection(T), File.c_str()); if (m_ID == oid_none) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Could not import file '" + File + "' to large object: " + Reason(err)); } } pqxx::largeobject::largeobject(const largeobjectaccess &O) throw () : m_ID(O.id()) { } void pqxx::largeobject::to_file(dbtransaction &T, const PGSTD::string &File) const { if (lo_export(RawConnection(T), id(), File.c_str()) == -1) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Could not export large object " + to_string(m_ID) + " " "to file '" + File + "': " + Reason(err)); } } void pqxx::largeobject::remove(dbtransaction &T) const { if (lo_unlink(RawConnection(T), id()) == -1) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Could not delete large object " + to_string(m_ID) + ": " + Reason(err)); } } pqxx::internal::pq::PGconn *pqxx::largeobject::RawConnection( const dbtransaction &T) { return gate::connection_largeobject(T.conn()).RawConnection(); } string pqxx::largeobject::Reason(int err) const { if (err == ENOMEM) return "Out of memory"; if (id() == oid_none) return "No object selected"; char buf[500]; return string(strerror_wrapper(err, buf, sizeof(buf))); } pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, openmode mode) : largeobject(T), m_Trans(T), m_fd(-1) { open(mode); } pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, oid O, openmode mode) : largeobject(O), m_Trans(T), m_fd(-1) { open(mode); } pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, largeobject O, openmode mode) : largeobject(O), m_Trans(T), m_fd(-1) { open(mode); } pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, const PGSTD::string &File, openmode mode) : largeobject(T, File), m_Trans(T), m_fd(-1) { open(mode); } pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::seek(size_type dest, seekdir dir) { const size_type Result = cseek(dest, dir); if (Result == -1) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Error seeking in large object: " + Reason(err)); } return Result; } pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cseek(off_type dest, seekdir dir) throw () { return lo_lseek(RawConnection(), m_fd, int(dest), StdDirToPQDir(dir)); } pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cwrite(const char Buf[], size_type Len) throw () { return PGSTD::max( lo_write(RawConnection(), m_fd,const_cast(Buf), size_t(Len)), -1); } pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::cread(char Buf[], size_type Bytes) throw () { return PGSTD::max(lo_read(RawConnection(), m_fd, Buf, size_t(Bytes)), -1); } pqxx::largeobjectaccess::pos_type pqxx::largeobjectaccess::ctell() const throw () { return #if defined(PQXX_HAVE_LO_TELL) lo_tell(RawConnection(), m_fd); #else lo_lseek(RawConnection(), m_fd, 0, SEEK_CUR); #endif } void pqxx::largeobjectaccess::write(const char Buf[], size_type Len) { const long Bytes = cwrite(Buf, Len); if (Bytes < Len) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); if (Bytes < 0) throw failure("Error writing to large object #" + to_string(id()) + ": " + Reason(err)); if (Bytes == 0) throw failure("Could not write to large object #" + to_string(id()) + ": " + Reason(err)); throw failure("Wanted to write " + to_string(Len) + " bytes " "to large object #" + to_string(id()) + "; " "could only write " + to_string(Bytes)); } } pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::read(char Buf[], size_type Len) { const long Bytes = cread(Buf, Len); if (Bytes < 0) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Error reading from large object #" + to_string(id()) + ": " + Reason(err)); } return Bytes; } void pqxx::largeobjectaccess::open(openmode mode) { m_fd = lo_open(RawConnection(), id(), StdModeToPQMode(mode)); if (m_fd < 0) { const int err = errno; if (err == ENOMEM) throw bad_alloc(); throw failure("Could not open large object " + to_string(id()) + ": " + Reason(err)); } } void pqxx::largeobjectaccess::close() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(m_Trans.conn()); #endif if (m_fd >= 0) lo_close(RawConnection(), m_fd); } pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::tell() const { const size_type res = ctell(); if (res == -1) throw failure(Reason(errno)); return res; } string pqxx::largeobjectaccess::Reason(int err) const { return (m_fd == -1) ? "No object opened" : largeobject::Reason(err); } void pqxx::largeobjectaccess::process_notice(const PGSTD::string &s) throw () { m_Trans.process_notice(s); } libpqxx-4.0.1+dfsg/src/nontransaction.cxx000066400000000000000000000015131224474465600205130ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * nontransaction.cxx * * DESCRIPTION * implementation of the pqxx::nontransaction class. * pqxx::nontransaction provides nontransactional database access * * Copyright (c) 2002-2005, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/nontransaction" using namespace PGSTD; pqxx::nontransaction::~nontransaction() { End(); } pqxx::result pqxx::nontransaction::do_exec(const char Query[]) { return DirectExec(Query, 0); } libpqxx-4.0.1+dfsg/src/notification.cxx000066400000000000000000000024031224474465600201400ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notification.cxx * * DESCRIPTION * implementation of the pqxx::notification_receiever class. * pqxx::notification_receiver processes notifications. * * Copyright (c) 2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include "pqxx/internal/gates/connection-notification_receiver.hxx" #include "pqxx/notification" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif using namespace pqxx::internal; pqxx::notification_receiver::notification_receiver( connection_base &c, const PGSTD::string &channel_name) : m_conn(c), m_channel(channel_name) { gate::connection_notification_receiver(c).add_receiver(this); } pqxx::notification_receiver::~notification_receiver() { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(this->conn()); #endif gate::connection_notification_receiver(this->conn()).remove_receiver(this); } libpqxx-4.0.1+dfsg/src/notify-listen.cxx000066400000000000000000000020141224474465600202540ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pqxx/notify-listen.cxx * * DESCRIPTION * implementation of the pqxx::notify_listener class. * Predecessor to notification_receiver. Deprecated. Do not use. * * Copyright (c) 2009-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include "pqxx/notify-listen" void pqxx::internal::notify_listener_forwarder::operator()( const PGSTD::string &, int backend_pid) { (*m_wrappee)(backend_pid); } pqxx::notify_listener::notify_listener( connection_base &c, const PGSTD::string &n) : m_conn(c), m_forwarder(c, n, this) { } pqxx::notify_listener::~notify_listener() throw () { } libpqxx-4.0.1+dfsg/src/pipeline.cxx000066400000000000000000000275731224474465600172760ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * pipeline.cxx * * DESCRIPTION * implementation of the pqxx::pipeline class * Throughput-optimized query manager * * Copyright (c) 2003-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif #include "pqxx/dbtransaction" #include "pqxx/pipeline" #include "pqxx/internal/gates/connection-pipeline.hxx" #include "pqxx/internal/gates/result-creation.hxx" using namespace PGSTD; using namespace pqxx; using namespace pqxx::internal; #define pqxxassert(ARG) /* ignore */ namespace { const string theSeparator("; "); const string theDummyValue("1"); const string theDummyQuery("SELECT " + theDummyValue + theSeparator); } pqxx::pipeline::pipeline(transaction_base &t, const PGSTD::string &Name) : namedclass("pipeline", Name), transactionfocus(t), m_queries(), m_issuedrange(), m_retain(0), m_num_waiting(0), m_q_id(0), m_dummy_pending(false), m_error(qid_limit()) { m_issuedrange = make_pair(m_queries.end(), m_queries.end()); attach(); } pqxx::pipeline::~pipeline() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(m_Trans.conn()); #endif try { cancel(); } catch (const exception &) {} detach(); } void pqxx::pipeline::attach() { if (!registered()) register_me(); } void pqxx::pipeline::detach() { if (registered()) unregister_me(); } pipeline::query_id pqxx::pipeline::insert(const PGSTD::string &q) { attach(); const query_id qid = generate_id(); pqxxassert(qid > 0); pqxxassert(m_queries.lower_bound(qid)==m_queries.end()); const QueryMap::iterator i = m_queries.insert(make_pair(qid,Query(q))).first; if (m_issuedrange.second == m_queries.end()) { m_issuedrange.second = i; if (m_issuedrange.first == m_queries.end()) m_issuedrange.first = i; } m_num_waiting++; pqxxassert(m_issuedrange.first != m_queries.end()); pqxxassert(m_issuedrange.second != m_queries.end()); if (m_num_waiting > m_retain) { if (have_pending()) receive_if_available(); if (!have_pending()) issue(); } return qid; } void pqxx::pipeline::complete() { if (have_pending()) receive(m_issuedrange.second); if (m_num_waiting && (m_error == qid_limit())) { pqxxassert(!have_pending()); issue(); pqxxassert(!m_num_waiting); pqxxassert(have_pending()); pqxxassert(m_issuedrange.second == m_queries.end()); receive(m_queries.end()); pqxxassert((m_error!=qid_limit()) || !have_pending()); } detach(); pqxxassert((m_num_waiting == 0) || (m_error != qid_limit())); pqxxassert(!m_dummy_pending); } void pqxx::pipeline::flush() { if (!m_queries.empty()) { if (have_pending()) receive(m_issuedrange.second); m_issuedrange.first = m_issuedrange.second = m_queries.end(); m_num_waiting = 0; m_dummy_pending = false; m_queries.clear(); } detach(); } void pqxx::pipeline::cancel() { while (have_pending()) { gate::connection_pipeline(m_Trans.conn()).cancel_query(); QueryMap::iterator canceled_query = m_issuedrange.first; ++m_issuedrange.first; m_queries.erase(canceled_query); } } bool pqxx::pipeline::is_finished(pipeline::query_id q) const { if (m_queries.find(q) == m_queries.end()) throw logic_error("Requested status for unknown query " + to_string(q)); return (QueryMap::const_iterator(m_issuedrange.first)==m_queries.end()) || (q < m_issuedrange.first->first && q < m_error); } pair pqxx::pipeline::retrieve() { if (m_queries.empty()) throw logic_error("Attempt to retrieve result from empty pipeline"); return retrieve(m_queries.begin()); } int pqxx::pipeline::retain(int retain_max) { if (retain_max < 0) throw range_error("Attempt to make pipeline retain " + to_string(retain_max) + " queries"); const int oldvalue = m_retain; m_retain = retain_max; if (m_num_waiting >= m_retain) resume(); return oldvalue; } void pqxx::pipeline::resume() { if (have_pending()) receive_if_available(); if (!have_pending() && m_num_waiting) { issue(); receive_if_available(); } } pipeline::query_id pqxx::pipeline::generate_id() { if (m_q_id == qid_limit()) throw overflow_error("Too many queries went through pipeline"); ++m_q_id; return m_q_id; } void pqxx::pipeline::issue() { pqxxassert(m_num_waiting); pqxxassert(!have_pending()); pqxxassert(!m_dummy_pending); pqxxassert(m_num_waiting); // TODO: Wrap in nested transaction if available, for extra "replayability" // Retrieve that NULL result for the last query, if needed obtain_result(); // Don't issue anything if we've encountered an error if (m_error < qid_limit()) return; // Start with oldest query (lowest id) not in previous issue range QueryMap::iterator oldest = m_issuedrange.second; pqxxassert(oldest != m_queries.end()); // Construct cumulative query string for entire batch string cum = separated_list(theSeparator,oldest,m_queries.end(),getquery()); const QueryMap::size_type num_issued = QueryMap::size_type(internal::distance(oldest, m_queries.end())); const bool prepend_dummy = (num_issued > 1); if (prepend_dummy) cum = theDummyQuery + cum; gate::connection_pipeline(m_Trans.conn()).start_exec(cum); // Since we managed to send out these queries, update state to reflect this m_dummy_pending = prepend_dummy; m_issuedrange.first = oldest; m_issuedrange.second = m_queries.end(); m_num_waiting -= int(num_issued); } void pqxx::pipeline::internal_error(const PGSTD::string &err) throw (PGSTD::logic_error) { set_error_at(0); throw pqxx::internal_error(err); } bool pqxx::pipeline::obtain_result(bool expect_none) { pqxxassert(!m_dummy_pending); pqxxassert(!m_queries.empty()); gate::connection_pipeline gate(m_Trans.conn()); internal::pq::PGresult *r = gate.get_result(); if (!r) { if (have_pending() && !expect_none) { set_error_at(m_issuedrange.first->first); m_issuedrange.second = m_issuedrange.first; } return false; } pqxxassert(r); const result res = gate::result_creation::create( r, 0, m_queries.begin()->second.get_query(), gate::connection_pipeline(m_Trans.conn()).encoding_code()); if (!have_pending()) { set_error_at(m_queries.begin()->first); throw logic_error("Got more results from pipeline than there were queries"); } // Must be the result for the oldest pending query if (!m_issuedrange.first->second.get_result().empty()) internal_error("multiple results for one query"); m_issuedrange.first->second.set_result(res); ++m_issuedrange.first; return true; } void pqxx::pipeline::obtain_dummy() { pqxxassert(m_dummy_pending); gate::connection_pipeline gate(m_Trans.conn()); internal::pq::PGresult *const r = gate.get_result(); m_dummy_pending = false; if (!r) internal_error("pipeline got no result from backend when it expected one"); result R = gate::result_creation::create( r, 0, "[DUMMY PIPELINE QUERY]", gate::connection_pipeline(m_Trans.conn()).encoding_code()); bool OK = false; try { gate::result_creation(R).CheckStatus(); OK = true; } catch (const sql_error &) { } if (OK) { if (R.size() > 1) internal_error("unexpected result for dummy query in pipeline"); if (string(R.at(0).at(0).c_str()) != theDummyValue) internal_error("dummy query in pipeline returned unexpected value"); return; } /* Since none of the queries in the batch were actually executed, we can * afford to replay them one by one until we find the exact query that * caused the error. This gives us not only a more specific error message * to report, but also tells us which query to report it for. */ // First, give the whole batch the same syntax error message, in case all else // is going to fail. for (QueryMap::iterator i = m_issuedrange.first; i != m_issuedrange.second; ++i) i->second.set_result(R); // Remember where the end of this batch was const QueryMap::iterator stop = m_issuedrange.second; // Retrieve that NULL result for the last query, if needed obtain_result(true); // Reset internal state to forget botched batch attempt m_num_waiting += int(internal::distance(m_issuedrange.first, stop)); m_issuedrange.second = m_issuedrange.first; pqxxassert(!m_dummy_pending); pqxxassert(!have_pending()); pqxxassert(m_num_waiting > 0); // Issue queries in failed batch one at a time. unregister_me(); try { do { m_num_waiting--; const string &query = m_issuedrange.first->second.get_query(); const result res(m_Trans.exec(query)); m_issuedrange.first->second.set_result(res); gate::result_creation(res).CheckStatus(); ++m_issuedrange.first; } while (m_issuedrange.first != stop); } catch (const exception &) { pqxxassert(m_issuedrange.first != m_queries.end()); const query_id thud = m_issuedrange.first->first; ++m_issuedrange.first; m_issuedrange.second = m_issuedrange.first; QueryMap::const_iterator q = m_issuedrange.first; set_error_at( (q == m_queries.end()) ? thud + 1 : q->first); pqxxassert(m_num_waiting == internal::distance(m_issuedrange.second, m_queries.end())); } pqxxassert(m_issuedrange.first != m_queries.end()); pqxxassert(m_error <= m_q_id); } PGSTD::pair pqxx::pipeline::retrieve(pipeline::QueryMap::iterator q) { if (q == m_queries.end()) throw logic_error("Attempt to retrieve result for unknown query"); if (q->first >= m_error) throw runtime_error("Could not complete query in pipeline " "due to error in earlier query"); // If query hasn't issued yet, do it now if (m_issuedrange.second != m_queries.end() && (q->first >= m_issuedrange.second->first)) { pqxxassert(internal::distance(m_issuedrange.second, q) >= 0); if (have_pending()) receive(m_issuedrange.second); if (m_error == qid_limit()) issue(); } // If result not in yet, get it; else get at least whatever's convenient if (have_pending()) { if (q->first >= m_issuedrange.first->first) { QueryMap::const_iterator suc = q; ++suc; receive(suc); } else { receive_if_available(); } } pqxxassert((m_error <= q->first) || (q != m_issuedrange.first)); if (q->first >= m_error) throw runtime_error("Could not complete query in pipeline " "due to error in earlier query"); // Don't leave the backend idle if there are queries waiting to be issued if (m_num_waiting && !have_pending() && (m_error==qid_limit())) issue(); const result R = q->second.get_result(); pair P(make_pair(q->first, R)); m_queries.erase(q); gate::result_creation(R).CheckStatus(); return P; } void pqxx::pipeline::get_further_available_results() { pqxxassert(!m_dummy_pending); gate::connection_pipeline gate(m_Trans.conn()); while (!gate.is_busy() && obtain_result()) if (!gate.consume_input()) throw broken_connection(); } void pqxx::pipeline::receive_if_available() { gate::connection_pipeline gate(m_Trans.conn()); if (!gate.consume_input()) throw broken_connection(); if (gate.is_busy()) return; if (m_dummy_pending) obtain_dummy(); if (have_pending()) get_further_available_results(); } void pqxx::pipeline::receive(pipeline::QueryMap::const_iterator stop) { pqxxassert(have_pending()); if (m_dummy_pending) obtain_dummy(); while (obtain_result() && QueryMap::const_iterator(m_issuedrange.first) != stop) ; // Also haul in any remaining "targets of opportunity" if (QueryMap::const_iterator(m_issuedrange.first) == stop) get_further_available_results(); } libpqxx-4.0.1+dfsg/src/prepared_statement.cxx000066400000000000000000000034141224474465600213430ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * prepared_statement.cxx * * DESCRIPTION * Helper classes for defining and executing prepared statements * See the connection_base hierarchy for more about prepared statements * * Copyright (c) 2006-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/connection_base" #include "pqxx/prepared_statement" #include "pqxx/result" #include "pqxx/transaction_base" #include "pqxx/internal/gates/connection-prepare-invocation.hxx" using namespace PGSTD; using namespace pqxx; using namespace pqxx::internal; pqxx::prepare::invocation::invocation( transaction_base &home, const PGSTD::string &statement) : statement_parameters(), m_home(home), m_statement(statement) { } pqxx::result pqxx::prepare::invocation::exec() const { scoped_array ptrs; scoped_array lens; scoped_array binaries; const int elts = marshall(ptrs, lens, binaries); return gate::connection_prepare_invocation(m_home.conn()).prepared_exec( m_statement, ptrs.get(), lens.get(), binaries.get(), elts); } bool pqxx::prepare::invocation::exists() const { return gate::connection_prepare_invocation(m_home.conn()).prepared_exists( m_statement); } pqxx::prepare::internal::prepared_def::prepared_def() : definition(), registered(false) { } pqxx::prepare::internal::prepared_def::prepared_def(const PGSTD::string &def) : definition(def), registered(false) { } libpqxx-4.0.1+dfsg/src/result.cxx000066400000000000000000000233151224474465600167750ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * result.cxx * * DESCRIPTION * implementation of the pqxx::result class and support classes. * pqxx::result represents the set of result tuples from a database query * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include #include "libpq-fe.h" #include "pqxx/except" #include "pqxx/field" #include "pqxx/result" #include "pqxx/tuple" using namespace PGSTD; const string pqxx::result::s_empty_string; pqxx::internal::result_data::result_data() : data(0), protocol(0), query(), encoding_code(0) {} pqxx::internal::result_data::result_data(pqxx::internal::pq::PGresult *d, int p, const PGSTD::string &q, int e) : data(d), protocol(p), query(q), encoding_code(e) {} pqxx::internal::result_data::~result_data() { PQclear(data); } void pqxx::internal::freemem_result_data(const result_data *d) throw () { delete d; } pqxx::result::result(pqxx::internal::pq::PGresult *rhs, int protocol, const PGSTD::string &Query, int encoding_code) : super(new internal::result_data(rhs, protocol, Query, encoding_code)), m_data(rhs) {} bool pqxx::result::operator==(const result &rhs) const throw () { if (&rhs == this) return true; const size_type s(size()); if (rhs.size() != s) return false; for (size_type i=0; idata : 0); rhs.m_data = (rhs.get() ? rhs.get()->data : 0); } const pqxx::tuple pqxx::result::at(pqxx::result::size_type i) const throw (range_error) { if (i >= size()) throw range_error("Tuple number out of range"); return operator[](i); } void pqxx::result::ThrowSQLError( const PGSTD::string &Err, const PGSTD::string &Query) const { // Try to establish more precise error type, and throw corresponding exception const char *const code = PQresultErrorField(m_data, PG_DIAG_SQLSTATE); if (code) switch (code[0]) { case '0': switch (code[1]) { case '8': throw broken_connection(Err); case 'A': throw feature_not_supported(Err, Query); } break; case '2': switch (code[1]) { case '2': throw data_exception(Err, Query); case '3': if (strcmp(code,"23001")==0) throw restrict_violation(Err, Query); if (strcmp(code,"23502")==0) throw not_null_violation(Err, Query); if (strcmp(code,"23503")==0) throw foreign_key_violation(Err, Query); if (strcmp(code,"23505")==0) throw unique_violation(Err, Query); if (strcmp(code,"23514")==0) throw check_violation(Err, Query); throw integrity_constraint_violation(Err, Query); case '4': throw invalid_cursor_state(Err, Query); case '6': throw invalid_sql_statement_name(Err, Query); } break; case '3': switch (code[1]) { case '4': throw invalid_cursor_name(Err, Query); } break; case '4': switch (code[1]) { case '2': if (strcmp(code,"42501")==0) throw insufficient_privilege(Err, Query); if (strcmp(code,"42601")==0) throw syntax_error(Err, Query, errorposition()); if (strcmp(code,"42703")==0) throw undefined_column(Err, Query); if (strcmp(code,"42883")==0) throw undefined_function(Err, Query); if (strcmp(code,"42P01")==0) throw undefined_table(Err, Query); } break; case '5': switch (code[1]) { case '3': if (strcmp(code,"53100")==0) throw disk_full(Err, Query); if (strcmp(code,"53200")==0) throw out_of_memory(Err, Query); if (strcmp(code,"53300")==0) throw too_many_connections(Err); throw insufficient_resources(Err, Query); } break; case 'P': if (strcmp(code, "P0001")==0) throw plpgsql_raise(Err, Query); if (strcmp(code, "P0002")==0) throw plpgsql_no_data_found(Err, Query); if (strcmp(code, "P0003")==0) throw plpgsql_too_many_rows(Err, Query); throw plpgsql_error(Err, Query); } throw sql_error(Err, Query); } void pqxx::result::CheckStatus() const { const string Err = StatusError(); if (!Err.empty()) ThrowSQLError(Err, query()); } string pqxx::result::StatusError() const { if (!m_data) throw failure("No result set given"); string Err; switch (PQresultStatus(m_data)) { case PGRES_EMPTY_QUERY: // The string sent to the backend was empty. case PGRES_COMMAND_OK: // Successful completion of a command returning no data case PGRES_TUPLES_OK: // The query successfully executed break; case PGRES_COPY_OUT: // Copy Out (from server) data transfer started case PGRES_COPY_IN: // Copy In (to server) data transfer started break; case PGRES_BAD_RESPONSE: // The server's response was not understood case PGRES_NONFATAL_ERROR: case PGRES_FATAL_ERROR: Err = PQresultErrorMessage(m_data); break; default: throw internal_error("pqxx::result: Unrecognized response code " + to_string(int(PQresultStatus(m_data)))); } return Err; } const char *pqxx::result::CmdStatus() const throw () { return PQcmdStatus(m_data); } const string &pqxx::result::query() const throw () { return get() ? get()->query : s_empty_string; } pqxx::oid pqxx::result::inserted_oid() const { if (!m_data) throw usage_error("Attempt to read oid of inserted row without an INSERT " "result"); return PQoidValue(m_data); } pqxx::result::size_type pqxx::result::affected_rows() const { const char *const RowsStr = PQcmdTuples(m_data); return RowsStr[0] ? size_type(atoi(RowsStr)) : 0; } const char *pqxx::result::GetValue( pqxx::result::size_type Row, pqxx::tuple::size_type Col) const { return PQgetvalue(m_data, int(Row), int(Col)); } bool pqxx::result::GetIsNull( pqxx::result::size_type Row, pqxx::tuple::size_type Col) const { return PQgetisnull(m_data, int(Row), int(Col)) != 0; } pqxx::field::size_type pqxx::result::GetLength( pqxx::result::size_type Row, pqxx::tuple::size_type Col) const throw () { return field::size_type(PQgetlength(m_data, int(Row), int(Col))); } pqxx::oid pqxx::result::column_type(tuple::size_type ColNum) const { const oid T = PQftype(m_data, int(ColNum)); if (T == oid_none) throw argument_error( "Attempt to retrieve type of nonexistant column " + to_string(ColNum) + " of query result"); return T; } pqxx::oid pqxx::result::column_table(tuple::size_type ColNum) const { const oid T = PQftable(m_data, int(ColNum)); /* If we get oid_none, it may be because the column is computed, or because we * got an invalid row number. */ if (T == oid_none && ColNum >= columns()) throw argument_error("Attempt to retrieve table ID for column " + to_string(ColNum) + " out of " + to_string(columns())); return T; } pqxx::tuple::size_type pqxx::result::table_column(tuple::size_type ColNum) const { const tuple::size_type n = tuple::size_type(PQftablecol(m_data, int(ColNum))); if (n) return n-1; // Failed. Now find out why, so we can throw a sensible exception. // Possible reasons: // 1. Column out of range // 2. Not using protocol 3.0 or better // 3. Column not taken directly from a table if (ColNum > columns()) throw range_error("Invalid column index in table_column(): " + to_string(ColNum)); if (!get() || get()->protocol < 3) throw feature_not_supported("Backend version does not support querying of " "column's original number", "[TABLE_COLUMN]"); throw usage_error("Can't query origin of column " + to_string(ColNum) + ": " "not derived from table column"); } int pqxx::result::errorposition() const throw () { int pos = -1; if (m_data) { const char *p = PQresultErrorField(m_data, PG_DIAG_STATEMENT_POSITION); if (p) from_string(p, pos); } return pos; } const char *pqxx::result::column_name(pqxx::tuple::size_type Number) const { const char *const N = PQfname(m_data, int(Number)); if (!N) throw range_error("Invalid column number: " + to_string(Number)); return N; } pqxx::tuple::size_type pqxx::result::columns() const throw () { return m_data ? tuple::size_type(PQnfields(m_data)) : 0; } // const_result_iterator pqxx::const_result_iterator pqxx::const_result_iterator::operator++(int) { const_result_iterator old(*this); m_Index++; return old; } pqxx::const_result_iterator pqxx::const_result_iterator::operator--(int) { const_result_iterator old(*this); m_Index--; return old; } pqxx::result::const_iterator pqxx::result::const_reverse_iterator::base() const throw () { iterator_type tmp(*this); return ++tmp; } pqxx::const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator++(int) { const_reverse_result_iterator tmp(*this); iterator_type::operator--(); return tmp; } pqxx::const_reverse_result_iterator pqxx::const_reverse_result_iterator::operator--(int) { const_reverse_result_iterator tmp(*this); iterator_type::operator++(); return tmp; } libpqxx-4.0.1+dfsg/src/robusttransaction.cxx000066400000000000000000000210771224474465600212460ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * robusttransaction.cxx * * DESCRIPTION * implementation of the pqxx::robusttransaction class. * pqxx::robusttransaction is a slower but safer transaction class * * Copyright (c) 2002-2009, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include "pqxx/connection_base" #include "pqxx/result" #include "pqxx/robusttransaction" using namespace PGSTD; using namespace pqxx::internal; // TODO: Log username in more places. pqxx::basic_robusttransaction::basic_robusttransaction( connection_base &C, const PGSTD::string &IsolationLevel, const PGSTD::string &table_name) : namedclass("robusttransaction"), dbtransaction(C, IsolationLevel), m_record_id(0), m_xid(), m_LogTable(table_name), m_sequence(), m_backendpid(-1) { if (table_name.empty()) m_LogTable = "pqxx_robusttransaction_log"; m_sequence = m_LogTable + "_seq"; } pqxx::basic_robusttransaction::~basic_robusttransaction() { } void pqxx::basic_robusttransaction::do_begin() { try { CreateTransactionRecord(); } catch (const exception &) { // The problem here *may* be that the log table doesn't exist yet. Create // one, start a new transaction, and try again. try { dbtransaction::do_abort(); } catch (const exception &) {} CreateLogTable(); dbtransaction::do_begin(); m_backendpid = conn().backendpid(); CreateTransactionRecord(); } dbtransaction::do_begin(); // If this transaction commits, the transaction record should also be gone. DirectExec(sql_delete().c_str()); if (conn().server_version() >= 80300) DirectExec("SELECT txid_current()")[0][0].to(m_xid); } void pqxx::basic_robusttransaction::do_commit() { if (!m_record_id) throw internal_error("transaction '" + name() + "' has no ID"); // Check constraints before sending the COMMIT to the database to reduce the // work being done inside our in-doubt window. try { DirectExec("SET CONSTRAINTS ALL IMMEDIATE"); } catch (...) { do_abort(); throw; } // Here comes the critical part. If we lose our connection here, we'll be // left clueless as to whether the backend got the message and is trying to // commit the transaction (let alone whether it will succeed if so). That // case requires some special handling that makes robusttransaction what it // is. try { DirectExec(sql_commit_work); // If we make it here, great. Normal, successful commit. m_record_id = 0; return; } catch (const broken_connection &) { // Oops, lost connection at the crucial moment. Fall through to in-doubt // handling below. } catch (...) { if (conn().is_open()) { // Commit failed--probably due to a constraint violation or something // similar. But we're still connected, so no worries from a consistency // point of view. do_abort(); throw; } // Otherwise, fall through to in-doubt handling. } // If we get here, we're in doubt. Talk to the backend, figure out what // happened. If the transaction record still exists, the transaction failed. // If not, it succeeded. bool exists; try { exists = CheckTransactionRecord(); } catch (const exception &f) { // Couldn't check for transaction record. We're still in doubt as to // whether the transaction was performed. const string Msg = "WARNING: " "Connection lost while committing transaction " "'" + name() + "' (id " + to_string(m_record_id) + ", " "transaction_id " + m_xid + "). " "Please check for this record in the " "'" + m_LogTable + "' table. " "If the record exists, the transaction was executed. " "If not, then it wasn't.\n"; process_notice(Msg); process_notice("Could not verify existence of transaction record " "because of the following error:\n"); process_notice(string(f.what()) + "\n"); throw in_doubt_error(Msg); } // Transaction record is still there, so the transaction failed and all we // have is a "normal" transaction failure. if (exists) { do_abort(); throw broken_connection("Connection lost while committing."); } // Otherwise, the transaction succeeded. Forget there was ever an error. } void pqxx::basic_robusttransaction::do_abort() { dbtransaction::do_abort(); DeleteTransactionRecord(); } // Create transaction log table if it didn't already exist void pqxx::basic_robusttransaction::CreateLogTable() { // Create log table in case it doesn't already exist. This code must only be // executed before the backend transaction has properly started. string CrTab = "CREATE TABLE \"" + m_LogTable + "\" (" "id INTEGER NOT NULL, " "username VARCHAR(256), " "transaction_id xid, " "name VARCHAR(256), " "date TIMESTAMP NOT NULL" ")"; try { DirectExec(CrTab.c_str(), 1); } catch (const exception &e) { conn().process_notice( "Could not create transaction log table: " + string(e.what())); } try { DirectExec(("CREATE SEQUENCE " + m_sequence).c_str()); } catch (const exception &e) { conn().process_notice( "Could not create transaction log sequence: " + string(e.what())); } } void pqxx::basic_robusttransaction::CreateTransactionRecord() { static const string Fail = "Could not create transaction log record: "; // Clean up old transaction records. DirectExec(( "DELETE FROM " + m_LogTable + " " "WHERE date < CURRENT_TIMESTAMP - '30 days'::interval").c_str()); // Allocate id. const string sql_get_id("SELECT nextval(" + quote(m_sequence) + ")"); DirectExec(sql_get_id.c_str())[0][0].to(m_record_id); DirectExec(( "INSERT INTO \"" + m_LogTable + "\" " "(id, username, name, date) " "VALUES " "(" + to_string(m_record_id) + ", " + quote(conn().username()) + ", " + (name().empty() ? "NULL" : quote(name())) + ", " "CURRENT_TIMESTAMP" ")").c_str()); } string pqxx::basic_robusttransaction::sql_delete() const { return "DELETE FROM \"" + m_LogTable + "\" " "WHERE id = " + to_string(m_record_id); } void pqxx::basic_robusttransaction::DeleteTransactionRecord() throw () { if (!m_record_id) return; try { const string Del = sql_delete(); reactivation_avoidance_exemption E(conn()); DirectExec(Del.c_str(), 20); // Now that we've arrived here, we're about as sure as we can be that that // record is quite dead. m_record_id = 0; } catch (const exception &) { } if (m_record_id != 0) try { process_notice("WARNING: " "Failed to delete obsolete transaction record with id " + to_string(m_record_id) + " ('" + name() + "'). " "Please delete it manually. Thank you.\n"); } catch (const exception &) { } } // Attempt to establish whether transaction record with given ID still exists bool pqxx::basic_robusttransaction::CheckTransactionRecord() { bool hold = true; for (int c=20; hold && c; internal::sleep_seconds(5), --c) { if (conn().server_version() > 80300) { const string query( "SELECT " + m_xid + " >= txid_snapshot_xmin(txid_current_snapshot())"); DirectExec(query.c_str())[0][0].to(hold); } else { /* Wait for the old backend (with the lost connection) to die. * * Actually this is only possible if stats_command_string (or maybe * stats_start_collector?) has been set in postgresql.conf and we're * running as the postgres superuser. * * Starting with 7.4, we could also use pg_locks. The entry for a zombied * transaction will have a "relation" field of null, a "transaction" field * with the transaction ID, and "pid" set to our backend pid. If the * relation exists but no such record is found, then the transaction is no * longer running. */ const result R(DirectExec(( "SELECT current_query " "FROM pq_stat_activity " "WHERE procpid = " + to_string(m_backendpid)).c_str())); hold = !R.empty(); } } if (hold) throw in_doubt_error( "Old backend process stays alive too long to wait for."); // Now look for our transaction record const string Find = "SELECT id FROM \"" + m_LogTable + "\" " "WHERE " "id = " + to_string(m_record_id) + " AND " "user = " + conn().username(); return !DirectExec(Find.c_str(), 20).empty(); } libpqxx-4.0.1+dfsg/src/statement_parameters.cxx000066400000000000000000000033531224474465600217060ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * statement_parameters.cxx * * DESCRIPTION * Common implementation for statement parameter lists. * See the connection_base hierarchy for more about prepared statements * * Copyright (c) 2006-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/util" #include "pqxx/internal/statement_parameters.hxx" using namespace PGSTD; pqxx::internal::statement_parameters::statement_parameters() : m_values(), m_nonnull() { } void pqxx::internal::statement_parameters::add_checked_param( const PGSTD::string &v, bool nonnull, bool binary) { m_nonnull.push_back(nonnull); if (nonnull) m_values.push_back(v); m_binary.push_back(binary); } int pqxx::internal::statement_parameters::marshall( scoped_array &values, scoped_array &lengths, scoped_array &binaries) const { const size_t elements = m_nonnull.size(); values = new const char *[elements+1]; lengths = new int[2*(elements+1)]; binaries = new int[elements+1]; size_t v = 0; for (size_t i = 0; i < elements; ++i) { if (m_nonnull[i]) { values[i] = m_values[v].c_str(); lengths[i] = int(m_values[v].size()); ++v; } else { values[i] = 0; lengths[i] = 0; } binaries[i] = int(m_binary[i]); } values[elements] = 0; lengths[elements] = 0; binaries[elements] = 0; return int(elements); } libpqxx-4.0.1+dfsg/src/strconv.cxx000066400000000000000000000273371224474465600171650ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * strconv.cxx * * DESCRIPTION * implementation of string conversions * * Copyright (c) 2008-2012, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #ifdef PQXX_HAVE_LIMITS #include #endif #ifdef PQXX_HAVE_LOCALE #include #endif #include "pqxx/except" #include "pqxx/strconv" using namespace PGSTD; using namespace pqxx::internal; namespace { // It turns out that NaNs are pretty hard to do portably. If the appropriate // C++ traits functions are not available, C99 defines a NAN macro (also widely // supported in other dialects, I believe) and some functions that can do the // same work. But if none of those are available, we need to resort to // compile-time "0/0" expressions. Most compilers won't crash while compiling // those anymore, but there may be unneeded warnings--which are almost as bad. template void set_to_NaN(T &); #if defined(PQXX_HAVE_QUIET_NAN) template inline void set_to_NaN(T &t) { t = numeric_limits::quiet_NaN(); } #elif defined(PQXX_HAVE_C_NAN) template inline void set_to_NaN(T &t) { t = NAN; } #elif defined(PQXX_HAVE_NAN) template<> inline void set_to_NaN(float &t) { t = fnan(""); } template<> inline void set_to_NaN(double &t) { t = nan(""); } #ifdef PQXX_HAVE_LONG_DOUBLE template<> inline void set_to_NaN(long double &t) { t = lnan(""); } #endif #else const float nan_f(0.0/0.0); template<> inline void set_to_NaN(float &t) { t = nan_f; } const double nan_d(0.0/0.0); template<> inline void set_to_NaN(double &t) { t = nan_d; } #ifdef PQXX_HAVE_LONG_DOUBLE const long double nan_ld(0.0/0.0); template<> inline void set_to_NaN(long double &t) { t = nan_ld; } #endif #endif // TODO: This may need tweaking for various compilers. template inline void set_to_Inf(T &t, int sign=1) { #ifdef PQXX_HAVE_LIMITS T value = numeric_limits::infinity(); #else T value = INFINITY; #endif if (sign < 0) value = -value; t = value; } void report_overflow() { throw pqxx::failure( "Could not convert string to integer: value out of range."); } /** Helper to check for underflow before multiplying a number by 10. * * Needed just so the compiler doesn't get to complain about an "if (n < 0)" * clause that's pointless for unsigned numbers. */ template struct underflow_check; /* Specialization for signed types: check. */ template struct underflow_check { static void check_before_adding_digit(T n) { const T ten(10); if (n < 0 && (numeric_limits::min() / ten) > n) report_overflow(); } }; /* Specialization for unsigned types: no check needed becaue negative * numbers don't exist. */ template struct underflow_check { static void check_before_adding_digit(T) {} }; /// Return 10*n, or throw exception if it overflows. template T safe_multiply_by_ten(T n) { const T ten(10); if (n > 0 && (numeric_limits::max() / n) < ten) report_overflow(); underflow_check::is_signed>::check_before_adding_digit( n); return T(n * ten); } /// Add a digit d to n, or throw exception if it overflows. template T safe_add_digit(T n, T d) { assert((n >= 0 && d >= 0) || (n <=0 && d <= 0)); if ((n > 0) && (n > (numeric_limits::max() - d))) report_overflow(); if ((n < 0) && (n < (numeric_limits::min() - d))) report_overflow(); return n + d; } /// For use in string parsing: add new numeric digit to intermediate value template inline L absorb_digit(L value, R digit) { return L(safe_multiply_by_ten(value) + L(digit)); } template void from_string_signed(const char Str[], T &Obj) { int i = 0; T result = 0; if (!isdigit(Str[i])) { if (Str[i] != '-') throw pqxx::failure("Could not convert string to integer: '" + string(Str) + "'"); for (++i; isdigit(Str[i]); ++i) result = absorb_digit(result, -digit_to_number(Str[i])); } else for (; isdigit(Str[i]); ++i) result = absorb_digit(result, digit_to_number(Str[i])); if (Str[i]) throw pqxx::failure("Unexpected text after integer: '" + string(Str) + "'"); Obj = result; } template void from_string_unsigned(const char Str[], T &Obj) { int i = 0; T result = 0; if (!isdigit(Str[i])) throw pqxx::failure("Could not convert string to unsigned integer: '" + string(Str) + "'"); for (; isdigit(Str[i]); ++i) result = absorb_digit(result, digit_to_number(Str[i])); if (Str[i]) throw pqxx::failure("Unexpected text after integer: '" + string(Str) + "'"); Obj = result; } bool valid_infinity_string(const char str[]) { // TODO: Also accept less sensible case variations. return strcmp("infinity", str) == 0 || strcmp("Infinity", str) == 0 || strcmp("INFINITY", str) == 0 || strcmp("inf", str) == 0; } /* These are hard. Sacrifice performance of specialized, nonflexible, * non-localized code and lean on standard library. Some special-case code * handles NaNs. */ template inline void from_string_float(const char Str[], T &Obj) { bool ok = false; T result; switch (Str[0]) { case 'N': case 'n': // Accept "NaN," "nan," etc. ok = ((Str[1]=='A'||Str[1]=='a') && (Str[2]=='N'||Str[2]=='n') && !Str[3]); set_to_NaN(result); break; case 'I': case 'i': ok = valid_infinity_string(Str); set_to_Inf(result); break; default: if (Str[0] == '-' && valid_infinity_string(&Str[1])) { ok = true; set_to_Inf(result, -1); } else { stringstream S(Str); #if defined(PQXX_HAVE_IMBUE) S.imbue(locale("C")); #endif ok = static_cast(S >> result); } break; } if (!ok) throw pqxx::failure("Could not convert string to numeric value: '" + string(Str) + "'"); Obj = result; } template inline string to_string_unsigned(T Obj) { if (!Obj) return "0"; // Every byte of width on T adds somewhere between 3 and 4 digits to the // maximum length of our decimal string. char buf[4*sizeof(T)+1]; char *p = &buf[sizeof(buf)]; *--p = '\0'; while (Obj > 0) { *--p = number_to_digit(int(Obj%10)); Obj /= 10; } return p; } template inline string to_string_fallback(T Obj) { stringstream S; #ifdef PQXX_HAVE_IMBUE S.imbue(locale("C")); #endif // Provide enough precision. #ifdef PQXX_HAVE_LIMITS // Kirit reports getting two more digits of precision than // numeric_limits::digits10 would give him, so we try not to make him lose // those last few bits. S.precision(numeric_limits::digits10 + 2); #else // Guess: enough for an IEEE 754 double-precision value. S.precision(16); #endif S << Obj; return S.str(); } template inline bool is_NaN(T Obj) { return #if defined(PQXX_HAVE_C_ISNAN) isnan(Obj); #elif defined(PQXX_HAVE_LIMITS) !(Obj <= Obj+numeric_limits::max()); #else !(Obj <= Obj + 1000); #endif } template inline bool is_Inf(T Obj) { return #if defined(PQXX_HAVE_C_ISINF) isinf(Obj); #else Obj >= Obj+1 && Obj <= 2*Obj && Obj >= 2*Obj; #endif } template inline string to_string_float(T Obj) { // TODO: Omit this special case if NaN is output as "nan"/"NAN"/"NaN" #ifndef PQXX_HAVE_NAN_OUTPUT if (is_NaN(Obj)) return "nan"; #endif // TODO: Omit this special case if infinity is output as "infinity" #ifndef PQXX_HAVE_INF_OUTPUT if (is_Inf(Obj)) return Obj > 0 ? "infinity" : "-infinity"; #endif return to_string_fallback(Obj); } template inline string to_string_signed(T Obj) { if (Obj < 0) { // Remember--the smallest negative number for a given two's-complement type // cannot be negated. #if PQXX_HAVE_LIMITS const bool negatable = (Obj != numeric_limits::min()); #else T Neg(-Obj); const bool negatable = Neg > 0; #endif if (negatable) return '-' + to_string_unsigned(-Obj); else return to_string_fallback(Obj); } return to_string_unsigned(Obj); } } // namespace namespace pqxx { namespace internal { void throw_null_conversion(const PGSTD::string &type) { throw conversion_error("Attempt to convert null to " + type); } } // namespace pqxx::internal void string_traits::from_string(const char Str[], bool &Obj) { bool OK, result=false; switch (Str[0]) { case 0: result = false; OK = true; break; case 'f': case 'F': result = false; OK = !(Str[1] && (strcmp(Str+1, "alse") != 0) && (strcmp(Str+1, "ALSE") != 0)); break; case '0': { int I; string_traits::from_string(Str, I); result = (I != 0); OK = ((I == 0) || (I == 1)); } break; case '1': result = true; OK = !Str[1]; break; case 't': case 'T': result = true; OK = !(Str[1] && (strcmp(Str+1, "rue") != 0) && (strcmp(Str+1, "RUE") != 0)); break; default: OK = false; } if (!OK) throw argument_error("Failed conversion to bool: '" + string(Str) + "'"); Obj = result; } string string_traits::to_string(bool Obj) { return Obj ? "true" : "false"; } void string_traits::from_string(const char Str[], short &Obj) { from_string_signed(Str, Obj); } string string_traits::to_string(short Obj) { return to_string_signed(Obj); } void string_traits::from_string( const char Str[], unsigned short &Obj) { from_string_unsigned(Str, Obj); } string string_traits::to_string(unsigned short Obj) { return to_string_unsigned(Obj); } void string_traits::from_string(const char Str[], int &Obj) { from_string_signed(Str, Obj); } string string_traits::to_string(int Obj) { return to_string_signed(Obj); } void string_traits::from_string( const char Str[], unsigned int &Obj) { from_string_unsigned(Str, Obj); } string string_traits::to_string(unsigned int Obj) { return to_string_unsigned(Obj); } void string_traits::from_string(const char Str[], long &Obj) { from_string_signed(Str, Obj); } string string_traits::to_string(long Obj) { return to_string_signed(Obj); } void string_traits::from_string( const char Str[], unsigned long &Obj) { from_string_unsigned(Str, Obj); } string string_traits::to_string(unsigned long Obj) { return to_string_unsigned(Obj); } #ifdef PQXX_HAVE_LONG_LONG void string_traits::from_string(const char Str[], long long &Obj) { from_string_signed(Str, Obj); } string string_traits::to_string(long long Obj) { return to_string_signed(Obj); } void string_traits::from_string( const char Str[], unsigned long long &Obj) { from_string_unsigned(Str, Obj); } string string_traits::to_string(unsigned long long Obj) { return to_string_unsigned(Obj); } #endif void string_traits::from_string(const char Str[], float &Obj) { from_string_float(Str, Obj); } string string_traits::to_string(float Obj) { return to_string_float(Obj); } void string_traits::from_string(const char Str[], double &Obj) { from_string_float(Str, Obj); } string string_traits::to_string(double Obj) { return to_string_float(Obj); } #ifdef PQXX_HAVE_LONG_DOUBLE void string_traits::from_string(const char Str[], long double &Obj) { from_string_float(Str, Obj); } string string_traits::to_string(long double Obj) { return to_string_float(Obj); } #endif } // namespace pqxx libpqxx-4.0.1+dfsg/src/subtransaction.cxx000066400000000000000000000042431224474465600205150ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * subtransaction.cxx * * DESCRIPTION * implementation of the pqxx::subtransaction class. * pqxx::transaction is a nested transaction, i.e. one within a transaction * * Copyright (c) 2005-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include "pqxx/connection_base" #include "pqxx/subtransaction" #include "pqxx/internal/gates/transaction-subtransaction.hxx" using namespace PGSTD; using namespace pqxx::internal; pqxx::subtransaction::subtransaction( dbtransaction &T, const PGSTD::string &Name) : namedclass("subtransaction", T.conn().adorn_name(Name)), transactionfocus(T), dbtransaction(T.conn(), false), m_parent(T) { check_backendsupport(); } namespace { typedef pqxx::dbtransaction &dbtransaction_ref; } pqxx::subtransaction::subtransaction( subtransaction &T, const PGSTD::string &Name) : namedclass("subtransaction", T.conn().adorn_name(Name)), transactionfocus(dbtransaction_ref(T)), dbtransaction(T.conn(), false), m_parent(T) { check_backendsupport(); } void pqxx::subtransaction::do_begin() { try { DirectExec(("SAVEPOINT \"" + name() + "\"").c_str()); } catch (const sql_error &) { throw; } } void pqxx::subtransaction::do_commit() { const int ra = m_reactivation_avoidance.get(); m_reactivation_avoidance.clear(); DirectExec(("RELEASE SAVEPOINT \"" + name() + "\"").c_str()); gate::transaction_subtransaction(m_parent).add_reactivation_avoidance_count( ra); } void pqxx::subtransaction::do_abort() { DirectExec(("ROLLBACK TO SAVEPOINT \"" + name() + "\"").c_str()); } void pqxx::subtransaction::check_backendsupport() const { if (!m_parent.conn().supports(connection_base::cap_nested_transactions)) throw feature_not_supported( "Backend version does not support nested transactions"); } libpqxx-4.0.1+dfsg/src/tablereader.cxx000066400000000000000000000115501224474465600177270ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * tablereader.cxx * * DESCRIPTION * implementation of the pqxx::tablereader class. * pqxx::tablereader enables optimized batch reads from a database table * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif #include "pqxx/tablereader" #include "pqxx/transaction" #include "pqxx/internal/gates/transaction-tablereader.hxx" using namespace PGSTD; using namespace pqxx::internal; pqxx::tablereader::tablereader(transaction_base &T, const PGSTD::string &Name, const PGSTD::string &Null) : namedclass("tablereader", Name), tablestream(T, Null), m_Done(true) { setup(T, Name); } void pqxx::tablereader::setup(transaction_base &T, const PGSTD::string &Name, const PGSTD::string &Columns) { gate::transaction_tablereader(T).BeginCopyRead(Name, Columns); register_me(); m_Done = false; } pqxx::tablereader::~tablereader() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(m_Trans.conn()); #endif try { reader_close(); } catch (const exception &e) { reg_pending_error(e.what()); } } bool pqxx::tablereader::get_raw_line(PGSTD::string &Line) { if (!m_Done) try { m_Done = !gate::transaction_tablereader(m_Trans).ReadCopyLine(Line); } catch (const exception &) { m_Done = true; throw; } return !m_Done; } void pqxx::tablereader::complete() { reader_close(); } void pqxx::tablereader::reader_close() { if (!is_finished()) { base_close(); // If any lines remain to be read, consume them to not confuse PQendcopy() if (!m_Done) { try { string Dummy; while (get_raw_line(Dummy)) ; } catch (const broken_connection &) { try { base_close(); } catch (const exception &) {} throw; } catch (const exception &e) { reg_pending_error(e.what()); } } } } namespace { inline bool is_octalchar(char o) throw () { return (o>='0') && (o<='7'); } /// Find first tab character at or after start position in string /** If not found, returns Line.size() rather than string::npos. */ string::size_type findtab(const PGSTD::string &Line, PGSTD::string::size_type start) { // TODO: Fix for multibyte encodings? const string::size_type here = Line.find('\t', start); return (here == string::npos) ? Line.size() : here; } } // namespace string pqxx::tablereader::extract_field(const PGSTD::string &Line, PGSTD::string::size_type &i) const { // TODO: Pick better exception types string R; bool isnull=false; string::size_type stop = findtab(Line, i); for (; i < stop; ++i) { const char c = Line[i]; switch (c) { case '\n': // End of row // Shouldn't happen, but we may get old-style, newline-terminated lines i = stop; break; case '\\': // Escape sequence { const char n = Line[++i]; if (i >= Line.size()) throw failure("Row ends in backslash"); switch (n) { case 'N': // Null value if (!R.empty()) throw failure("Null sequence found in nonempty field"); R = NullStr(); isnull = true; break; case '0': // Octal sequence (3 digits) case '1': case '2': case '3': case '4': case '5': case '6': case '7': { if ((i+2) >= Line.size()) throw failure("Row ends in middle of octal value"); const char n1 = Line[++i]; const char n2 = Line[++i]; if (!is_octalchar(n1) || !is_octalchar(n2)) throw failure("Invalid octal in encoded table stream"); R += char((digit_to_number(n)<<6) | (digit_to_number(n1)<<3) | digit_to_number(n2)); } break; case 'b': // TODO: Escape code? R += char(8); break; // Backspace case 'v': // TODO: Escape code? R += char(11); break; // Vertical tab case 'f': // TODO: Escape code? R += char(12); break; // Form feed case 'n': R += '\n'; break; // Newline case 't': R += '\t'; break; // Tab case 'r': R += '\r'; break; // Carriage return; default: // Self-escaped character R += n; // This may be a self-escaped tab that we thought was a terminator... if (i == stop) { if ((i+1) >= Line.size()) throw internal_error("COPY line ends in backslash"); stop = findtab(Line, i+1); } break; } } break; default: R += c; break; } } ++i; if (isnull && (R.size() != NullStr().size())) throw failure("Field contains data behind null sequence"); return R; } libpqxx-4.0.1+dfsg/src/tablestream.cxx000066400000000000000000000021001224474465600177470ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * tablestream.cxx * * DESCRIPTION * implementation of the pqxx::tablestream class. * pqxx::tablestream provides optimized batch access to a database table * * Copyright (c) 2001-2006, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include "pqxx/tablestream" #include "pqxx/transaction" using namespace PGSTD; pqxx::tablestream::tablestream(transaction_base &STrans, const PGSTD::string &Null) : internal::namedclass("tablestream"), internal::transactionfocus(STrans), m_Null(Null), m_Finished(false) { } pqxx::tablestream::~tablestream() throw () { } void pqxx::tablestream::base_close() { if (!is_finished()) { m_Finished = true; unregister_me(); } } libpqxx-4.0.1+dfsg/src/tablewriter.cxx000066400000000000000000000067531224474465600200120ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * tablewriter.cxx * * DESCRIPTION * implementation of the pqxx::tablewriter class. * pqxx::tablewriter enables optimized batch updates to a database table * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif #include "pqxx/tablereader" #include "pqxx/tablewriter" #include "pqxx/transaction" #include "pqxx/internal/gates/transaction-tablewriter.hxx" using namespace PGSTD; using namespace pqxx::internal; pqxx::tablewriter::tablewriter(transaction_base &T, const PGSTD::string &WName, const PGSTD::string &Null) : namedclass("tablewriter", WName), tablestream(T, Null) { setup(T, WName); } pqxx::tablewriter::~tablewriter() throw () { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(m_Trans.conn()); #endif try { writer_close(); } catch (const exception &e) { reg_pending_error(e.what()); } } void pqxx::tablewriter::setup(transaction_base &T, const PGSTD::string &WName, const PGSTD::string &Columns) { gate::transaction_tablewriter(T).BeginCopyWrite(WName, Columns); register_me(); } pqxx::tablewriter &pqxx::tablewriter::operator<<(pqxx::tablereader &R) { string Line; // TODO: Can we do this in binary mode? (Might require protocol version check) while (R.get_raw_line(Line)) write_raw_line(Line); return *this; } void pqxx::tablewriter::write_raw_line(const PGSTD::string &Line) { const string::size_type len = Line.size(); gate::transaction_tablewriter(m_Trans).WriteCopyLine( (!len || Line[len-1] != '\n') ? Line : string(Line, 0, len-1)); } void pqxx::tablewriter::complete() { writer_close(); } void pqxx::tablewriter::writer_close() { if (!is_finished()) { base_close(); try { gate::transaction_tablewriter(m_Trans).EndCopyWrite(); } catch (const exception &) { try { base_close(); } catch (const exception &) {} throw; } } } namespace { inline char escapechar(char i) { char r = '\0'; switch (i) { case 8: r='b'; break; // backspace case 11: r='v'; break; // vertical tab case 12: r='f'; break; // form feed case '\n': r='n'; break; // newline case '\t': r='t'; break; // tab case '\r': r='r'; break; // carriage return case '\\': r='\\'; break; // backslash } return r; } inline bool unprintable(char i) { return i < ' ' || i > '~'; } inline char tooctdigit(char c, int n) { typedef unsigned char unsigned_char; unsigned int i = unsigned_char(c); return number_to_digit((i>>(3*n)) & 0x07); } } // namespace string pqxx::internal::Escape(const string &s, const string &null) { if (s == null) return "\\N"; if (s.empty()) return s; string R; R.reserve(s.size()+1); const string::const_iterator s_end(s.end()); for (string::const_iterator j = s.begin(); j != s_end; ++j) { const char c = *j; const char e = escapechar(c); if (e) { R += '\\'; R += e; } else if (unprintable(c)) { R += "\\\\"; for (int n=2; n>=0; --n) R += tooctdigit(c, n); } else { R += c; } } return R; } libpqxx-4.0.1+dfsg/src/transaction.cxx000066400000000000000000000033141224474465600200010ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * transaction.cxx * * DESCRIPTION * implementation of the pqxx::transaction class. * pqxx::transaction represents a regular database transaction * * Copyright (c) 2001-2008, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include "pqxx/connection_base" #include "pqxx/result" #include "pqxx/transaction" using namespace PGSTD; pqxx::basic_transaction::basic_transaction( connection_base &C, const PGSTD::string &IsolationLevel, readwrite_policy rw) : namedclass("transaction"), dbtransaction(C, IsolationLevel, rw) { } void pqxx::basic_transaction::do_commit() { try { DirectExec(internal::sql_commit_work); } catch (const exception &e) { if (!conn().is_open()) { // We've lost the connection while committing. There is just no way of // telling what happened on the other end. >8-O process_notice(e.what() + string("\n")); const string Msg = "WARNING: " "Connection lost while committing transaction " "'" + name() + "'. " "There is no way to tell whether the transaction succeeded " "or was aborted except to check manually."; process_notice(Msg + "\n"); throw in_doubt_error(Msg); } else { // Commit failed--probably due to a constraint violation or something // similar. throw; } } } libpqxx-4.0.1+dfsg/src/transaction_base.cxx000066400000000000000000000302561224474465600210000ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * transaction_base.cxx * * DESCRIPTION * common code and definitions for the transaction classes * pqxx::transaction_base defines the interface for any abstract class that * represents a database transaction * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #ifdef PQXX_QUIET_DESTRUCTORS #include "pqxx/errorhandler" #endif #include "pqxx/connection_base" #include "pqxx/result" #include "pqxx/transaction_base" #include "pqxx/internal/gates/connection-transaction.hxx" #include "pqxx/internal/gates/connection-parameterized_invocation.hxx" #include "pqxx/internal/gates/transaction-transactionfocus.hxx" using namespace PGSTD; using namespace pqxx::internal; pqxx::internal::parameterized_invocation::parameterized_invocation( connection_base &c, const PGSTD::string &query) : m_home(c), m_query(query) { } pqxx::result pqxx::internal::parameterized_invocation::exec() { scoped_array values; scoped_array lengths; scoped_array binaries; const int elements = marshall(values, lengths, binaries); return gate::connection_parameterized_invocation(m_home).parameterized_exec( m_query, values.get(), lengths.get(), binaries.get(), elements); } pqxx::transaction_base::transaction_base(connection_base &C, bool direct) : namedclass("transaction_base"), m_reactivation_avoidance(), m_Conn(C), m_Focus(), m_Status(st_nascent), m_Registered(false), m_PendingError() { if (direct) { gate::connection_transaction gate(conn()); gate.RegisterTransaction(this); m_Registered = true; } } pqxx::transaction_base::~transaction_base() { #ifdef PQXX_QUIET_DESTRUCTORS quiet_errorhandler quiet(m_Conn); #endif try { reactivation_avoidance_clear(); if (!m_PendingError.empty()) process_notice("UNPROCESSED ERROR: " + m_PendingError + "\n"); if (m_Registered) { m_Conn.process_notice(description() + " was never closed properly!\n"); gate::connection_transaction gate(conn()); gate.UnregisterTransaction(this); } } catch (const exception &e) { try { process_notice(string(e.what()) + "\n"); } catch (const exception &) { process_notice(e.what()); } } } void pqxx::transaction_base::commit() { CheckPendingError(); // Check previous status code. Caller should only call this function if // we're in "implicit" state, but multiple commits are silently accepted. switch (m_Status) { case st_nascent: // Empty transaction. No skin off our nose. return; case st_active: // Just fine. This is what we expect. break; case st_aborted: throw usage_error("Attempt to commit previously aborted " + description()); case st_committed: // Transaction has been committed already. This is not exactly proper // behaviour, but throwing an exception here would only give the impression // that an abort is needed--which would only confuse things further at this // stage. // Therefore, multiple commits are accepted, though under protest. m_Conn.process_notice(description() + " committed more than once\n"); return; case st_in_doubt: // Transaction may or may not have been committed. The only thing we can // really do is keep telling the caller that the transaction is in doubt. throw in_doubt_error(description() + " committed again while in an indeterminate state"); default: throw internal_error("pqxx::transaction: invalid status code"); } // Tricky one. If stream is nested in transaction but inside the same scope, // the commit() will come before the stream is closed. Which means the // commit is premature. Punish this swiftly and without fail to discourage // the habit from forming. if (m_Focus.get()) throw failure("Attempt to commit " + description() + " " "with " + m_Focus.get()->description() + " " "still open"); // Check that we're still connected (as far as we know--this is not an // absolute thing!) before trying to commit. If the connection was broken // already, the commit would fail anyway but this way at least we don't remain // in-doubt as to whether the backend got the commit order at all. if (!m_Conn.is_open()) throw broken_connection("Broken connection to backend; " "cannot complete transaction"); try { do_commit(); m_Status = st_committed; } catch (const in_doubt_error &) { m_Status = st_in_doubt; throw; } catch (const exception &) { m_Status = st_aborted; throw; } gate::connection_transaction gate(conn()); gate.AddVariables(m_Vars); End(); } void pqxx::transaction_base::abort() { // Check previous status code. Quietly accept multiple aborts to // simplify emergency bailout code. switch (m_Status) { case st_nascent: // Never began transaction. No need to issue rollback. break; case st_active: try { do_abort(); } catch (const exception &) { } break; case st_aborted: return; case st_committed: throw usage_error("Attempt to abort previously committed " + description()); case st_in_doubt: // Aborting an in-doubt transaction is probably a reasonably sane response // to an insane situation. Log it, but do not complain. m_Conn.process_notice("Warning: " + description() + " " "aborted after going into indeterminate state; " "it may have been executed anyway.\n"); return; default: throw internal_error("invalid transaction status"); } m_Status = st_aborted; End(); } string pqxx::transaction_base::esc_raw(const PGSTD::string &str) const { const unsigned char *p = reinterpret_cast(str.c_str()); return conn().esc_raw(p, str.size()); } string pqxx::transaction_base::quote_raw(const PGSTD::string &str) const { const unsigned char *p = reinterpret_cast(str.c_str()); return conn().quote_raw(p, str.size()); } void pqxx::transaction_base::activate() { switch (m_Status) { case st_nascent: // Make sure transaction has begun before executing anything Begin(); break; case st_active: break; case st_committed: case st_aborted: case st_in_doubt: throw usage_error( "Attempt to activate " + description() + " " "which is already closed"); default: throw internal_error("pqxx::transaction: invalid status code"); } } pqxx::result pqxx::transaction_base::exec(const PGSTD::string &Query, const PGSTD::string &Desc) { CheckPendingError(); const string N = (Desc.empty() ? "" : "'" + Desc + "' "); if (m_Focus.get()) throw usage_error("Attempt to execute query " + N + "on " + description() + " " "with " + m_Focus.get()->description() + " " "still open"); try { activate(); } catch (const usage_error &e) { throw usage_error("Error executing query " + N + ". " + e.what()); } // TODO: Pass Desc to do_exec(), and from there on down return do_exec(Query.c_str()); } pqxx::internal::parameterized_invocation pqxx::transaction_base::parameterized(const PGSTD::string &query) { return internal::parameterized_invocation(conn(), query); } pqxx::prepare::invocation pqxx::transaction_base::prepared(const PGSTD::string &statement) { try { activate(); } catch (const usage_error &e) { throw usage_error( "Error executing prepared statement " + statement + ". " + e.what()); } return prepare::invocation(*this, statement); } void pqxx::transaction_base::set_variable(const PGSTD::string &Var, const PGSTD::string &Value) { // Before committing to this new value, see what the backend thinks about it gate::connection_transaction gate(conn()); gate.RawSetVar(Var, Value); m_Vars[Var] = Value; } string pqxx::transaction_base::get_variable(const PGSTD::string &Var) { const map::const_iterator i = m_Vars.find(Var); if (i != m_Vars.end()) return i->second; return gate::connection_transaction(conn()).RawGetVar(Var); } void pqxx::transaction_base::Begin() { if (m_Status != st_nascent) throw internal_error("pqxx::transaction: " "Begin() called while not in nascent state"); try { // Better handle any pending notifications before we begin m_Conn.get_notifs(); do_begin(); m_Status = st_active; } catch (const exception &) { End(); throw; } } void pqxx::transaction_base::End() throw () { try { try { CheckPendingError(); } catch (const exception &e) { m_Conn.process_notice(e.what()); } if (m_Registered) { m_Registered = false; gate::connection_transaction gate(conn()); gate.UnregisterTransaction(this); } if (m_Status != st_active) return; if (m_Focus.get()) m_Conn.process_notice("Closing " + description() + " " " with " + m_Focus.get()->description() + " " "still open\n"); try { abort(); } catch (const exception &e) { m_Conn.process_notice(e.what()); } gate::connection_transaction gate(conn()); gate.take_reactivation_avoidance(m_reactivation_avoidance.get()); m_reactivation_avoidance.clear(); } catch (const exception &e) { try { m_Conn.process_notice(e.what()); } catch (const exception &) {} } } void pqxx::transaction_base::RegisterFocus(internal::transactionfocus *S) { m_Focus.Register(S); } void pqxx::transaction_base::UnregisterFocus(internal::transactionfocus *S) throw () { try { m_Focus.Unregister(S); } catch (const exception &e) { m_Conn.process_notice(string(e.what()) + "\n"); } } pqxx::result pqxx::transaction_base::DirectExec(const char C[], int Retries) { CheckPendingError(); return gate::connection_transaction(conn()).Exec(C, Retries); } void pqxx::transaction_base::RegisterPendingError(const PGSTD::string &Err) throw () { if (m_PendingError.empty() && !Err.empty()) { try { m_PendingError = Err; } catch (const exception &e) { try { process_notice("UNABLE TO PROCESS ERROR\n"); process_notice(e.what()); process_notice("ERROR WAS:"); process_notice(Err); } catch (...) { } } } } void pqxx::transaction_base::CheckPendingError() { if (!m_PendingError.empty()) { const string Err(m_PendingError); #ifdef PQXX_HAVE_STRING_CLEAR m_PendingError.clear(); #else m_PendingError.resize(0); #endif throw failure(m_PendingError); } } namespace { string MakeCopyString(const string &Table, const string &Columns) { string Q = "COPY " + Table + " "; if (!Columns.empty()) Q += "(" + Columns + ") "; return Q; } } // namespace void pqxx::transaction_base::BeginCopyRead(const PGSTD::string &Table, const PGSTD::string &Columns) { exec(MakeCopyString(Table, Columns) + "TO STDOUT"); } void pqxx::transaction_base::BeginCopyWrite(const PGSTD::string &Table, const PGSTD::string &Columns) { exec(MakeCopyString(Table, Columns) + "FROM STDIN"); } bool pqxx::transaction_base::ReadCopyLine(PGSTD::string &line) { return gate::connection_transaction(conn()).ReadCopyLine(line); } void pqxx::transaction_base::WriteCopyLine(const PGSTD::string &line) { gate::connection_transaction gate(conn()); gate.WriteCopyLine(line); } void pqxx::transaction_base::EndCopyWrite() { gate::connection_transaction gate(conn()); gate.EndCopyWrite(); } void pqxx::internal::transactionfocus::register_me() { gate::transaction_transactionfocus gate(m_Trans); gate.RegisterFocus(this); m_registered = true; } void pqxx::internal::transactionfocus::unregister_me() throw () { gate::transaction_transactionfocus gate(m_Trans); gate.UnregisterFocus(this); m_registered = false; } void pqxx::internal::transactionfocus::reg_pending_error(const PGSTD::string &err) throw () { gate::transaction_transactionfocus gate(m_Trans); gate.RegisterPendingError(err); } libpqxx-4.0.1+dfsg/src/tuple.cxx000066400000000000000000000123071224474465600166070ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * tuple.cxx * * DESCRIPTION * implementation of the pqxx::result class and support classes. * pqxx::result represents the set of result tuples from a database query * * Copyright (c) 2001-2011, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include "libpq-fe.h" #include "pqxx/except" #include "pqxx/result" using namespace PGSTD; pqxx::tuple::tuple(const result *r, size_t i) throw () : m_Home(r), m_Index(i), m_Begin(0), m_End(r ? r->columns() : 0) { } pqxx::tuple::const_iterator pqxx::tuple::begin() const throw () { return const_iterator(*this, m_Begin); } pqxx::tuple::const_iterator pqxx::tuple::end() const throw () { return const_iterator(*this, m_End); } pqxx::tuple::reference pqxx::tuple::front() const throw () { return field(*this, m_Begin); } pqxx::tuple::reference pqxx::tuple::back() const throw () { return field(*this, m_End - 1); } pqxx::tuple::const_reverse_iterator pqxx::tuple::rbegin() const { return const_reverse_tuple_iterator(end()); } pqxx::tuple::const_reverse_iterator pqxx::tuple::rend() const { return const_reverse_tuple_iterator(begin()); } bool pqxx::tuple::operator==(const tuple &rhs) const throw () { if (&rhs == this) return true; const size_type s(size()); if (rhs.size() != s) return false; // TODO: Depends on how null is handled! for (size_type i=0; i= size()) throw range_error("Invalid field number"); return operator[](i); } pqxx::oid pqxx::tuple::column_type(size_type ColNum) const { return m_Home->column_type(m_Begin + ColNum); } pqxx::oid pqxx::tuple::column_table(size_type ColNum) const { return m_Home->column_table(m_Begin + ColNum); } pqxx::tuple::size_type pqxx::tuple::table_column(size_type ColNum) const { return m_Home->table_column(m_Begin + ColNum); } pqxx::tuple::size_type pqxx::tuple::column_number(const char ColName[]) const { const size_type n = m_Home->column_number(ColName); if (n >= m_End) return result().column_number(ColName); if (n >= m_Begin) return n - m_Begin; const char *const AdaptedColName = m_Home->column_name(n); for (size_type i = m_Begin; i < m_End; ++i) if (strcmp(AdaptedColName, m_Home->column_name(i)) == 0) return i - m_Begin; return result().column_number(ColName); } pqxx::tuple::size_type pqxx::result::column_number(const char ColName[]) const { const int N = PQfnumber(m_data, ColName); // TODO: Should this be an out_of_range? if (N == -1) throw argument_error("Unknown column name: '" + string(ColName) + "'"); return tuple::size_type(N); } pqxx::tuple pqxx::tuple::slice(size_type Begin, size_type End) const { if (Begin > End || End > size()) throw range_error("Invalid field range"); tuple result(*this); result.m_Begin = m_Begin + Begin; result.m_End = m_Begin + End; return result; } bool pqxx::tuple::empty() const throw () { return m_Begin == m_End; } pqxx::const_tuple_iterator pqxx::const_tuple_iterator::operator++(int) { const_tuple_iterator old(*this); m_col++; return old; } pqxx::const_tuple_iterator pqxx::const_tuple_iterator::operator--(int) { const_tuple_iterator old(*this); m_col--; return old; } pqxx::const_tuple_iterator pqxx::const_reverse_tuple_iterator::base() const throw () { iterator_type tmp(*this); return ++tmp; } pqxx::const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator++(int) { const_reverse_tuple_iterator tmp(*this); operator++(); return tmp; } pqxx::const_reverse_tuple_iterator pqxx::const_reverse_tuple_iterator::operator--(int) { const_reverse_tuple_iterator tmp(*this); operator--(); return tmp; } libpqxx-4.0.1+dfsg/src/util.cxx000066400000000000000000000145721224474465600164410ustar00rootroot00000000000000/*------------------------------------------------------------------------- * * FILE * util.cxx * * DESCRIPTION * Various utility functions for libpqxx * * Copyright (c) 2003-2013, Jeroen T. Vermeulen * * See COPYING for copyright license. If you did not receive a file called * COPYING with this source code, please notify the distributor of this mistake, * or contact the author. * *------------------------------------------------------------------------- */ #include "pqxx/compiler-internal.hxx" #include #include #include #include #include #ifdef PQXX_HAVE_SYS_SELECT_H #include #else #include #if defined(_WIN32) #include #endif #endif // PQXX_HAVE_SYS_SELECT_H #ifdef HAVE_UNISTD_H #include #endif #ifdef _WIN32 #include #endif #include "libpq-fe.h" #include "pqxx/except" #include "pqxx/util" using namespace PGSTD; using namespace pqxx::internal; const char pqxx::internal::sql_begin_work[] = "BEGIN", pqxx::internal::sql_commit_work[] = "COMMIT", pqxx::internal::sql_rollback_work[] = "ROLLBACK"; pqxx::thread_safety_model pqxx::describe_thread_safety() throw () { thread_safety_model model; #if defined(PQXX_HAVE_STRERROR_R) || defined(PQXX_HAVE_STRERROR_S) model.have_safe_strerror = true; #else model.have_safe_strerror = false; model.description += "The available strerror() may not be thread-safe.\n"; #endif #ifdef PQXX_HAVE_PQISTHREADSAFE if (PQisthreadsafe()) { model.safe_libpq = true; } else { model.safe_libpq = false; model.description += "Using a libpq build that is not thread-safe.\n"; } #else model.safe_libpq = false; model.description += "Built with old libpq version; can't tell whether it is thread-safe.\n"; #endif #ifdef PQXX_HAVE_PQCANCEL model.safe_query_cancel = true; #else model.safe_query_cancel = false; model.description += "Built with old libpq version; canceling queries is unsafe..\n"; #endif #ifdef PQXX_HAVE_SHARED_PTR model.safe_result_copy = true; #else model.safe_result_copy = false; model.description += "Built without shared_ptr. Copying & destroying results is unsafe.\n"; #endif // Sadly I'm not aware of any way to avoid this just yet. model.safe_kerberos = false; model.description += "Kerberos is not thread-safe. If your application uses Kerberos, " "protect all calls to Kerberos or libpqxx using a global lock.\n"; return model; } #ifndef PQXX_HAVE_SHARED_PTR pqxx::internal::refcount::refcount() : m_l(this), m_r(this) { } pqxx::internal::refcount::~refcount() { loseref(); } void pqxx::internal::refcount::makeref(refcount &rhs) throw () { // TODO: Make threadsafe m_l = &rhs; m_r = rhs.m_r; m_l->m_r = m_r->m_l = this; } bool pqxx::internal::refcount::loseref() throw () { // TODO: Make threadsafe const bool result = (m_l == this); m_r->m_l = m_l; m_l->m_r = m_r; m_l = m_r = this; return result; } #endif // PQXX_HAVE_SHARED_PTR string pqxx::internal::namedclass::description() const { try { string desc = classname(); if (!name().empty()) desc += " '" + name() + "'"; return desc; } catch (const exception &) { // Oops, string composition failed! Probably out of memory. // Let's try something easier. } return name().empty() ? classname() : name(); } void pqxx::internal::CheckUniqueRegistration(const namedclass *New, const namedclass *Old) { if (!New) throw internal_error("NULL pointer registered"); if (Old) { if (Old == New) throw usage_error("Started twice: " + New->description()); throw usage_error("Started " + New->description() + " " "while " + Old->description() + " still active"); } } void pqxx::internal::CheckUniqueUnregistration(const namedclass *New, const namedclass *Old) { if (New != Old) { if (!New) throw usage_error("Expected to close " + Old->description() + ", " "but got NULL pointer instead"); if (!Old) throw usage_error("Closed while not open: " + New->description()); throw usage_error("Closed " + New->description() + "; " "expected to close " + Old->description()); } } void pqxx::internal::freepqmem(const void *p) throw () { PQfreemem(const_cast(p)); } void pqxx::internal::freemallocmem(const void *p) throw () { free(const_cast(p)); } void pqxx::internal::sleep_seconds(int s) { if (s <= 0) return; #if defined(PQXX_HAVE_SLEEP) // Use POSIX.1 sleep() if available sleep(unsigned(s)); #elif defined(_WIN32) // Windows has its own Sleep(), which speaks milliseconds Sleep(s*1000); #else // If all else fails, use select() on nothing and specify a timeout fd_set F; FD_ZERO(&F); struct timeval timeout; timeout.tv_sec = s; timeout.tv_usec = 0; if (select(0, &F, &F, &F, &timeout) == -1) switch (errno) { case EINVAL: // Invalid timeout throw range_error("Invalid timeout value: " + to_string(s)); case EINTR: // Interrupted by signal break; case ENOMEM: // Out of memory throw bad_alloc(); default: throw internal_error("select() failed for unknown reason"); } #endif } #if !defined(PQXX_HAVE_STRERROR_R) || !defined(PQXX_HAVE_STRERROR_R_GNU) namespace { void cpymsg(char buf[], const char input[], size_t buflen) throw () { #if defined(PQXX_HAVE_STRLCPY) strlcpy(buf, input, buflen); #else strncpy(buf, input, buflen); if (buflen) buf[buflen-1] = '\0'; #endif } } #endif cstring pqxx::internal::strerror_wrapper(int err, char buf[], PGSTD::size_t len) throw () { if (!buf || len <= 0) return "No buffer provided for error message!"; const char *res = buf; #if !defined(PQXX_HAVE_STRERROR_R) && !defined(PQXX_HAVE_STRERROR_S) cpymsg(buf, strerror(err), len); #elif defined(PQXX_HAVE_STRERROR_R_GNU) // GNU strerror_r returns error string (which may be anywhere). return strerror_r(err, buf, len); #elif defined(PQXX_HAVE_STRERROR_S) // Windows equivalent of strerror_r returns result code. if (strerror_s(buf, len, err) == 0) res = buf; else cpymsg(buf, "Unknown error", len); #else // Single Unix Specification version of strerror_r returns result code. switch (strerror_r(err, buf, len)) { case 0: res = buf; break; case -1: cpymsg(buf, "Unknown error", len); break; default: cpymsg( buf, "Unexpected result from strerror_r()! Is it really SUS-compliant?", len); break; } #endif return res; } libpqxx-4.0.1+dfsg/test/000077500000000000000000000000001224474465600151175ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/test/Makefile.am000066400000000000000000000050561224474465600171610ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/test/Makefile.am.template'. ################################################################################ # Makefile.am is generated automatically for automake whenever test programs are # added to libpqxx. SUBDIRS = unit EXTRA_DIST = Makefile.am.template INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES= noinst_HEADERS = test_helpers.hxx test_main.hxx CLEANFILES=pqxxlo.txt MAINTAINERCLEANFILES=Makefile.in #TESTS_ENVIRONMENT=PGDATABASE=libpqxx # PGDATABASE, PGHOST, PGPORT, PGUSER runner_SOURCES = \ test000.cxx \ test001.cxx \ test002.cxx \ test004.cxx \ test007.cxx \ test010.cxx \ test011.cxx \ test012.cxx \ test013.cxx \ test014.cxx \ test015.cxx \ test016.cxx \ test017.cxx \ test018.cxx \ test020.cxx \ test021.cxx \ test023.cxx \ test026.cxx \ test029.cxx \ test030.cxx \ test031.cxx \ test032.cxx \ test033.cxx \ test034.cxx \ test035.cxx \ test036.cxx \ test037.cxx \ test039.cxx \ test046.cxx \ test048.cxx \ test049.cxx \ test050.cxx \ test051.cxx \ test052.cxx \ test053.cxx \ test054.cxx \ test055.cxx \ test056.cxx \ test057.cxx \ test058.cxx \ test059.cxx \ test060.cxx \ test061.cxx \ test062.cxx \ test063.cxx \ test064.cxx \ test065.cxx \ test066.cxx \ test067.cxx \ test069.cxx \ test070.cxx \ test071.cxx \ test072.cxx \ test073.cxx \ test074.cxx \ test075.cxx \ test076.cxx \ test077.cxx \ test078.cxx \ test079.cxx \ test082.cxx \ test083.cxx \ test084.cxx \ test086.cxx \ test087.cxx \ test088.cxx \ test089.cxx \ test090.cxx \ test092.cxx \ test093.cxx \ test094.cxx \ runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} TESTS = runner check_PROGRAMS = ${TESTS} # ###MAKTEMPLATE:FOREACH test/test*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} libpqxx-4.0.1+dfsg/test/Makefile.am.template000066400000000000000000000016611224474465600207710ustar00rootroot00000000000000# Makefile.am is generated automatically for automake whenever test programs are # added to libpqxx. SUBDIRS = unit EXTRA_DIST = Makefile.am.template INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES= noinst_HEADERS = test_helpers.hxx test_main.hxx CLEANFILES=pqxxlo.txt MAINTAINERCLEANFILES=Makefile.in #TESTS_ENVIRONMENT=PGDATABASE=libpqxx # PGDATABASE, PGHOST, PGPORT, PGUSER runner_SOURCES = \ ###MAKTEMPLATE:FOREACH test/test*.cxx ###BASENAME###.cxx \ ###MAKTEMPLATE:ENDFOREACH runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} TESTS = runner check_PROGRAMS = ${TESTS} # ###MAKTEMPLATE:FOREACH test/test*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} libpqxx-4.0.1+dfsg/test/Makefile.in000066400000000000000000001004031224474465600171620ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ TESTS = runner$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) subdir = test DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = runner$(EXEEXT) am_runner_OBJECTS = test000.$(OBJEXT) test001.$(OBJEXT) \ test002.$(OBJEXT) test004.$(OBJEXT) test007.$(OBJEXT) \ test010.$(OBJEXT) test011.$(OBJEXT) test012.$(OBJEXT) \ test013.$(OBJEXT) test014.$(OBJEXT) test015.$(OBJEXT) \ test016.$(OBJEXT) test017.$(OBJEXT) test018.$(OBJEXT) \ test020.$(OBJEXT) test021.$(OBJEXT) test023.$(OBJEXT) \ test026.$(OBJEXT) test029.$(OBJEXT) test030.$(OBJEXT) \ test031.$(OBJEXT) test032.$(OBJEXT) test033.$(OBJEXT) \ test034.$(OBJEXT) test035.$(OBJEXT) test036.$(OBJEXT) \ test037.$(OBJEXT) test039.$(OBJEXT) test046.$(OBJEXT) \ test048.$(OBJEXT) test049.$(OBJEXT) test050.$(OBJEXT) \ test051.$(OBJEXT) test052.$(OBJEXT) test053.$(OBJEXT) \ test054.$(OBJEXT) test055.$(OBJEXT) test056.$(OBJEXT) \ test057.$(OBJEXT) test058.$(OBJEXT) test059.$(OBJEXT) \ test060.$(OBJEXT) test061.$(OBJEXT) test062.$(OBJEXT) \ test063.$(OBJEXT) test064.$(OBJEXT) test065.$(OBJEXT) \ test066.$(OBJEXT) test067.$(OBJEXT) test069.$(OBJEXT) \ test070.$(OBJEXT) test071.$(OBJEXT) test072.$(OBJEXT) \ test073.$(OBJEXT) test074.$(OBJEXT) test075.$(OBJEXT) \ test076.$(OBJEXT) test077.$(OBJEXT) test078.$(OBJEXT) \ test079.$(OBJEXT) test082.$(OBJEXT) test083.$(OBJEXT) \ test084.$(OBJEXT) test086.$(OBJEXT) test087.$(OBJEXT) \ test088.$(OBJEXT) test089.$(OBJEXT) test090.$(OBJEXT) \ test092.$(OBJEXT) test093.$(OBJEXT) test094.$(OBJEXT) \ runner.$(OBJEXT) runner_OBJECTS = $(am_runner_OBJECTS) am__DEPENDENCIES_1 = runner_DEPENDENCIES = $(top_builddir)/src/libpqxx.la \ $(am__DEPENDENCIES_1) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(runner_SOURCES) DIST_SOURCES = $(runner_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ ################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/test/Makefile.am.template'. ################################################################################ # Makefile.am is generated automatically for automake whenever test programs are # added to libpqxx. SUBDIRS = unit EXTRA_DIST = Makefile.am.template INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES = noinst_HEADERS = test_helpers.hxx test_main.hxx CLEANFILES = pqxxlo.txt MAINTAINERCLEANFILES = Makefile.in #TESTS_ENVIRONMENT=PGDATABASE=libpqxx # PGDATABASE, PGHOST, PGPORT, PGUSER runner_SOURCES = \ test000.cxx \ test001.cxx \ test002.cxx \ test004.cxx \ test007.cxx \ test010.cxx \ test011.cxx \ test012.cxx \ test013.cxx \ test014.cxx \ test015.cxx \ test016.cxx \ test017.cxx \ test018.cxx \ test020.cxx \ test021.cxx \ test023.cxx \ test026.cxx \ test029.cxx \ test030.cxx \ test031.cxx \ test032.cxx \ test033.cxx \ test034.cxx \ test035.cxx \ test036.cxx \ test037.cxx \ test039.cxx \ test046.cxx \ test048.cxx \ test049.cxx \ test050.cxx \ test051.cxx \ test052.cxx \ test053.cxx \ test054.cxx \ test055.cxx \ test056.cxx \ test057.cxx \ test058.cxx \ test059.cxx \ test060.cxx \ test061.cxx \ test062.cxx \ test063.cxx \ test064.cxx \ test065.cxx \ test066.cxx \ test067.cxx \ test069.cxx \ test070.cxx \ test071.cxx \ test072.cxx \ test073.cxx \ test074.cxx \ test075.cxx \ test076.cxx \ test077.cxx \ test078.cxx \ test079.cxx \ test082.cxx \ test083.cxx \ test084.cxx \ test086.cxx \ test087.cxx \ test088.cxx \ test089.cxx \ test090.cxx \ test092.cxx \ test093.cxx \ test094.cxx \ runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} all: all-recursive .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list runner$(EXEEXT): $(runner_OBJECTS) $(runner_DEPENDENCIES) $(EXTRA_runner_DEPENDENCIES) @rm -f runner$(EXEEXT) $(CXXLINK) $(runner_OBJECTS) $(runner_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test001.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test002.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test004.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test007.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test010.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test011.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test012.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test013.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test014.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test015.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test016.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test017.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test018.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test020.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test021.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test023.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test026.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test029.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test030.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test031.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test032.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test033.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test034.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test035.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test036.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test037.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test039.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test046.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test048.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test049.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test050.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test051.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test052.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test053.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test054.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test055.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test056.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test057.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test058.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test059.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test060.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test061.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test062.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test063.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test064.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test065.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test066.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test067.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test069.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test070.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test071.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test072.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test073.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test074.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test075.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test076.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test077.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test078.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test079.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test082.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test083.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test084.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test086.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test087.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test088.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test089.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test090.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test092.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test093.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test094.Po@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile $(HEADERS) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am # ###MAKTEMPLATE:FOREACH test/test*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/test/runner.cxx000066400000000000000000000000311224474465600171460ustar00rootroot00000000000000#include "test_main.hxx" libpqxx-4.0.1+dfsg/test/test000.cxx000066400000000000000000000144141224474465600170460ustar00rootroot00000000000000// Test "long long" support, if available #define PQXX_ALLOW_LONG_LONG // We need some libpqxx-internal configuration items. DON'T INCLUDE THIS HEADER // IN NORMAL CLIENT PROGRAMS! #include "pqxx/config-internal-compiler.h" #ifdef PQXX_HAVE_LOCALE #include #endif #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Initial test program for libpqxx. Test functionality that doesn't require a // running database. namespace { template void testitems(const T &I, typename T::size_type s) { PQXX_CHECK_EQUAL(I.size(), s, "Wrong size in items class."); for ( ; s; --s) { const typename T::size_type value = typename T::size_type((I[s-1])); PQXX_CHECK_EQUAL(value, s, "Wrong value in items object."); } } void check(string ref, string val, string vdesc) { PQXX_CHECK_EQUAL(val, ref, "String mismatch for " + vdesc); } template inline void strconv(string type, const T &Obj, string expected) { const string Objstr(to_string(Obj)); check(expected, Objstr, type); T NewObj; from_string(Objstr, NewObj); check(expected, to_string(NewObj), "recycled " + type); } // There's no from_string()... inline void strconv(string type, const char Obj[], string expected) { const string Objstr(to_string(Obj)); check(expected, Objstr, type); } const double not_a_number = #if defined(PQXX_HAVE_QUIET_NAN) numeric_limits::quiet_NaN(); #elif defined(PQXX_HAVE_C_NAN) NAN; #elif defined(PQXX_HAVE_NAN) nan(""); #else 0.0/0.0; #endif struct intderef { intderef(){} // Silences bogus warning in some gcc versions template int operator()(ITER i) const throw () { return int(*i); } }; void test_000(transaction_base &) { PQXX_CHECK_EQUAL(oid_none, 0u, "InvalidIod is not zero as it used to be. This may conceivably " "cause problems in libpqxx."); PQXX_CHECK( cursor_base::prior() < 0 && cursor_base::backward_all() < 0, "cursor_base::difference_type appears to be unsigned."); // Test items template items I0; testitems(I0, 0); items I1(1); testitems(I1, 1); items I2(1,2); testitems(I2,2); items I3(1,2,3); testitems(I3,3); items I4(1,2,3,4); testitems(I4,4); items I5(1,2,3,4,5); testitems(I5,5); items Ivar; Ivar(1); testitems(Ivar,1); const string l = separated_list(",",I5.begin(),I5.end(),intderef()); PQXX_CHECK_EQUAL(l, "1,2,3,4,5", "separated_list is broken."); vector V2(I2); testitems(items(V2),2); const char weird[] = "foo\t\n\0bar"; const string weirdstr(weird, sizeof(weird)-1); // Test string conversions strconv("const char[]", "", ""); strconv("const char[]", "foo", "foo"); strconv("int", 0, "0"); strconv("int", 100, "100"); strconv("int", -1, "-1"); #if defined(PQXX_HAVE_LIMITS) && !defined(_MSC_VER) const long long_min = PGSTD::numeric_limits::min(), long_max = PGSTD::numeric_limits::max(); #else const long long_min = LONG_MIN, long_max = LONG_MAX; #endif stringstream lminstr, lmaxstr, llminstr, llmaxstr, ullmaxstr; #if defined(PQXX_HAVE_IMBUE) lminstr.imbue(locale("C")); lmaxstr.imbue(locale("C")); llminstr.imbue(locale("C")); llmaxstr.imbue(locale("C")); ullmaxstr.imbue(locale("C")); #endif lminstr << long_min; lmaxstr << long_max; #if defined(PQXX_HAVE_LONG_LONG) typedef long long longlong; typedef unsigned long long ulonglong; const unsigned long long ullong_max = ~ulonglong(0); const long long llong_max = longlong(ullong_max >> 2), llong_min = -1 - llong_max; llminstr << llong_min; llmaxstr << llong_max; ullmaxstr << ullong_max; #endif strconv("long", 0, "0"); strconv("long", long_min, lminstr.str()); strconv("long", long_max, lmaxstr.str()); strconv("double", not_a_number, "nan"); strconv("string", string(), ""); strconv("string", weirdstr, weirdstr); #if defined(PQXX_HAVE_LONG_LONG) strconv("long long", 0LL, "0"); strconv("long long", llong_min, llminstr.str()); strconv("long long", llong_max, llmaxstr.str()); strconv("unsigned long long", 0ULL, "0"); strconv("unsigned long long", ullong_max, ullmaxstr.str()); #endif const char zerobuf[] = "0"; string zero; from_string(zerobuf, zero, sizeof(zerobuf)-1); PQXX_CHECK_EQUAL( zero, zerobuf, "Converting \"0\" with explicit length failed."); const char nulbuf[] = "\0string\0with\0nuls\0"; const string nully(nulbuf, sizeof(nulbuf)-1); string nully_parsed; from_string(nulbuf, nully_parsed, sizeof(nulbuf)-1); PQXX_CHECK_EQUAL(nully_parsed.size(), nully.size(), "Nul truncates string."); PQXX_CHECK_EQUAL(nully_parsed, nully, "String conversion breaks on nuls."); from_string(nully.c_str(), nully_parsed, nully.size()); PQXX_CHECK_EQUAL(nully_parsed, nully, "Nul conversion breaks on strings."); stringstream ss; strconv("empty stringstream", ss, ""); ss << -3.1415; strconv("stringstream", ss, ss.str()); // TODO: Test binarystring reversibility #ifdef PQXX_HAVE_PQENCRYPTPASSWORD const string pw = encrypt_password("foo", "bar"); PQXX_CHECK(!pw.empty(), "Encrypting a password returned no data."); PQXX_CHECK_NOT_EQUAL( pw, encrypt_password("splat", "blub"), "Password encryption is broken."); PQXX_CHECK( pw.find("bar") == string::npos, "Encrypted password contains original."); #endif // Test error handling for failed connections { nullconnection nc; PQXX_CHECK_THROWS( work w(nc), broken_connection, "nullconnection fails to fail."); } { nullconnection nc(""); PQXX_CHECK_THROWS( work w(nc), broken_connection, "nullconnection(const char[]) is broken."); } { string n; nullconnection nc(n); PQXX_CHECK_THROWS( work w(nc), broken_connection, "nullconnection(const string &) is broken."); } // Now that we know nullconnections throw errors as expected, test // pqxx_exception. try { nullconnection nc; work w(nc); } catch (const pqxx_exception &e) { PQXX_CHECK( dynamic_cast(&e.base()), "Downcast pqxx_exception is not a broken_connection"); pqxx::test::expected_exception(e.base().what()); PQXX_CHECK_EQUAL( dynamic_cast(e.base()).what(), e.base().what(), "Inconsistent what() message in exception."); } } } // namespace PQXX_REGISTER_TEST_NODB(test_000) libpqxx-4.0.1+dfsg/test/test001.cxx000066400000000000000000000025511224474465600170460ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; namespace { // Simple test program for libpqxx. Open connection to database, start // a transaction, and perform a query inside it. void test_001(transaction_base &trans) { cout << "Connected to database." << endl << "Backend version: " << trans.conn().server_version() << endl << "Protocol version: " << trans.conn().protocol_version() << endl; // Close old transaction. trans.abort(); // Begin a transaction acting on our current connection. Give it a human- // readable name so the library can include it in error messages. work T(trans.conn(), "test1"); // Perform a query on the database, storing result tuples in R. result R( T.exec("SELECT * FROM pg_tables") ); // We're expecting to find some tables... PQXX_CHECK(!R.empty(), "No tables found. Cannot test."); // Process each successive result tuple for (result::const_iterator c = R.begin(); c != R.end(); ++c) { // Dump tuple number and column 0 value to cout. Read the value using // as(), which converts the field to the same type as the default value // you give it (or returns the default value if the field is null). cout << '\t' << to_string(c.num()) << '\t' << c[0].as(string()) << endl; } T.commit(); } } // namespace PQXX_REGISTER_TEST(test_001) libpqxx-4.0.1+dfsg/test/test002.cxx000066400000000000000000000046261224474465600170540ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example/test program for libpqxx. Perform a query and enumerate its output // using array indexing. namespace { void bad_connect() { connection C("totally#invalid@connect$string!?"); } void test_002(transaction_base &) { // Before we really connect, test the expected behaviour of the default // connection type, where a failure to connect results in an immediate // exception rather than a silent retry. PQXX_CHECK_THROWS( bad_connect(), exception, "Invalid connection string did not cause exception."); // Set up connection to database string ConnectString = ""; connection C(ConnectString); // Start transaction within context of connection work T(C, "test2"); // Perform query within transaction result R( T.exec("SELECT * FROM pg_tables") ); // Let's keep the database waiting as briefly as possible: commit now, // before we start processing results. We could do this later, or since // we're not making any changes in the database that need to be committed, // we could in this case even omit it altogether. T.commit(); // Since we don't need the database anymore, we can be even more // considerate and close the connection now. This is optional. C.disconnect(); // Ah, this version of postgres will tell you which table a column in a // result came from. Let's just test that functionality... const oid rtable = R.column_table(0); PQXX_CHECK_EQUAL( rtable, R.column_table(pqxx::tuple::size_type(0)), "Inconsistent answers from column_table()"); const string rcol = R.column_name(0); const oid crtable = R.column_table(rcol); PQXX_CHECK_EQUAL( crtable, rtable, "Field looked up by name gives different origin."); // Now we've got all that settled, let's process our results. for (result::size_type i = 0; i < R.size(); ++i) { const oid ftable = R[i][0].table(); PQXX_CHECK_EQUAL(ftable, rtable, "field::table() is broken."); const oid ttable = R[i].column_table(0); PQXX_CHECK_EQUAL( ttable, R[i].column_table(pqxx::tuple::size_type(0)), "Inconsistent pqxx::tuple::column_table()."); PQXX_CHECK_EQUAL(ttable, rtable, "Inconsistent result::column_table()."); const oid cttable = R[i].column_table(rcol); PQXX_CHECK_EQUAL( cttable, rtable, "pqxx::tuple::column_table() is broken."); } } } // namespace PQXX_REGISTER_TEST_NODB(test_002) libpqxx-4.0.1+dfsg/test/test004.cxx000066400000000000000000000033301224474465600170450ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Send notification to self. namespace { int Backend_PID = 0; // Sample implementation of notification receiver. class TestListener : public notification_receiver { bool m_done; public: explicit TestListener(connection_base &C) : notification_receiver(C, "listen"), m_done(false) {} virtual void operator()(const string &, int be_pid) { m_done = true; PQXX_CHECK_EQUAL( be_pid, Backend_PID, "Notification came from wrong backend process."); } bool done() const { return m_done; } }; // A transactor to trigger our notification receiver. class Notify : public transactor<> { string m_channel; public: explicit Notify(string channel) : transactor<>("Notifier"), m_channel(channel) { } void operator()(argument_type &T) { T.exec("NOTIFY \"" + m_channel + "\""); Backend_PID = T.conn().backendpid(); } }; void test_004(transaction_base &T) { T.abort(); TestListener L(T.conn()); T.conn().perform(Notify(L.channel())); int notifs = 0; for (int i=0; (i < 20) && !L.done(); ++i) { PQXX_CHECK_EQUAL(notifs, 0, "Got unexpected notifications."); // Sleep one second using a libpqxx-internal function. Kids, don't try // this at home! The pqxx::internal namespace is not for third-party use // and may change radically at any time. pqxx::internal::sleep_seconds(1); notifs = T.conn().get_notifs(); } PQXX_CHECK_NOT_EQUAL(L.done(), false, "No notification received."); PQXX_CHECK_EQUAL(notifs, 1, "Got too many notifications."); } } // namespace PQXX_REGISTER_TEST_T(test_004, nontransaction) libpqxx-4.0.1+dfsg/test/test007.cxx000066400000000000000000000125531224474465600170570ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Modify the database, retaining transactional // integrity using the transactor framework. // // This assumes the existence of a database table "pqxxevents" containing a // 2-digit "year" field, which is extended to a 4-digit format by assuming all // year numbers of 70 or higher are in the 20th century, and all others in the // 21st, and that no years before 1970 are possible. namespace { // Global list of converted year numbers and what they've been converted to map theConversions; // Convert year to 4-digit format. int To4Digits(int Y) { int Result = Y; PQXX_CHECK(Y >= 0, "Negative year: " + to_string(Y)); if (Y < 70) Result += 2000; else if (Y < 100) Result += 1900; else if (Y < 1970) PQXX_CHECK_NOTREACHED("Unexpected year: " + to_string(Y)); return Result; } // Transaction definition for year-field update class UpdateYears : public transactor<> { public: UpdateYears() : transactor<>("YearUpdate") {} // Transaction definition void operator()(argument_type &T) { // First select all different years occurring in the table. result R( T.exec("SELECT year FROM pqxxevents") ); // See if we get reasonable type identifier for this column const oid rctype = R.column_type(0); PQXX_CHECK_EQUAL( R.column_type(pqxx::tuple::size_type(0)), rctype, "Inconsistent result::column_type()."); const string rct = to_string(rctype); PQXX_CHECK(rctype > 0, "Got strange type ID for column: " + rct); const string rcol = R.column_name(0); PQXX_CHECK( !rcol.empty(), "Didn't get a name for column."); const oid rcctype = R.column_type(rcol); PQXX_CHECK_EQUAL(rcctype, rctype, "Column type is not what it is by name."); const oid rawrcctype = R.column_type(rcol.c_str()); PQXX_CHECK_EQUAL( rawrcctype, rctype, "Column type by C-style name is different."); // Note all different years currently occurring in the table, writing them // and their correct mappings to m_Conversions for (result::const_iterator r = R.begin(); r != R.end(); ++r) { int Y; // Read year, and if it is non-null, note its converted value if (r[0] >> Y) m_Conversions[Y] = To4Digits(Y); // See if type identifiers are consistent const oid tctype = r->column_type(0); PQXX_CHECK_EQUAL( tctype, r->column_type(pqxx::tuple::size_type(0)), "Inconsistent pqxx::tuple::column_type()"); PQXX_CHECK_EQUAL( tctype, rctype, "tuple::column_type() is inconsistent with result::column_type()."); const oid ctctype = r->column_type(rcol); PQXX_CHECK_EQUAL( ctctype, rctype, "Column type lookup by column name is broken."); const oid rawctctype = r->column_type(rcol.c_str()); PQXX_CHECK_EQUAL( rawctctype, rctype, "Column type lookup by C-style name is broken."); const oid fctype = r[0].type(); PQXX_CHECK_EQUAL( fctype, rctype, "Field type lookup is broken."); } result::size_type AffectedRows = 0; // For each occurring year, write converted date back to whereever it may // occur in the table. Since we're in a transaction, any changes made by // others at the same time will not affect us. for (map::const_iterator c = m_Conversions.begin(); c != m_Conversions.end(); ++c) { R = T.exec(("UPDATE pqxxevents " "SET year=" + to_string(c->second) + " " "WHERE year=" + to_string(c->first)).c_str()); AffectedRows += R.affected_rows(); } cout << AffectedRows << " rows updated." << endl; } // Postprocessing code for successful execution void on_commit() { // Report the conversions performed once the transaction has completed // successfully. Do not report conversions occurring in unsuccessful // attempts, as some of those may have been removed from the table by // somebody else between our attempts. // Even if this fails (eg. because we run out of memory), the actual // database transaction will still have been performed. theConversions = m_Conversions; } // Postprocessing code for aborted execution attempt void on_abort(const char Reason[]) throw () { try { // Notify user that the transaction attempt went wrong; we may retry. cerr << "Transaction interrupted: " << Reason << endl; } catch (const exception &) { // Ignore any exceptions on cerr. } } private: // Local store of date conversions to be performed map m_Conversions; }; void test_007(transaction_base &T) { connection_base &C(T.conn()); T.abort(); C.set_client_encoding("SQL_ASCII"); { work T2(C); test::create_pqxxevents(T2); T2.commit(); } // Perform (an instantiation of) the UpdateYears transactor we've defined // in the code above. This is where the work gets done. C.perform(UpdateYears()); // Just for fun, report the exact conversions performed. Note that this // list will be accurate even if other people were modifying the database // at the same time; this property was established through use of the // transactor framework. for (map::const_iterator i = theConversions.begin(); i != theConversions.end(); ++i) cout << '\t' << i->first << "\t-> " << i->second << endl; } } // namespace PQXX_REGISTER_TEST(test_007) libpqxx-4.0.1+dfsg/test/test010.cxx000066400000000000000000000063241224474465600170500ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Open connection to database, start a transaction, // abort it, and verify that it "never happened." namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const int BoringYear = 1977; const string Table("pqxxevents"); // Count events, and boring events, in table pair CountEvents(transaction_base &T) { const string EventsQuery = "SELECT count(*) FROM " + Table; const string BoringQuery = EventsQuery + " WHERE year=" + to_string(BoringYear); int EventsCount = 0, BoringCount = 0; result R( T.exec(EventsQuery) ); R.at(0).at(0).to(EventsCount); R = T.exec(BoringQuery); R.at(0).at(0).to(BoringCount); return make_pair(EventsCount, BoringCount); } // Try adding a record, then aborting it, and check whether the abort was // performed correctly. void Test(connection_base &C, bool ExplicitAbort) { items<> BoringTuple(to_string(BoringYear), "yawn"); pair EventCounts; // First run our doomed transaction. This will refuse to run if an event // exists for our Boring Year. { // Begin a transaction acting on our current connection; we'll abort it // later though. work Doomed(C, "Doomed"); // Verify that our Boring Year was not yet in the events table EventCounts = CountEvents(Doomed); PQXX_CHECK_EQUAL( EventCounts.second, 0, "Can't run, boring year is already in table."); // Now let's try to introduce a tuple for our Boring Year { tablewriter W(Doomed, Table); PQXX_CHECK_EQUAL(W.name(), Table, "tablewriter's name changed."); PQXX_CHECK_EQUAL( W.generate(BoringTuple), separated_list("\t", BoringTuple), "tablewriter writes new tuple incorrectly."); W.push_back(BoringTuple); } const pair Recount = CountEvents(Doomed); PQXX_CHECK_EQUAL( Recount.second, 1, "Wrong # events for " + to_string(BoringYear)); PQXX_CHECK_EQUAL( Recount.first, EventCounts.first + 1, "Number of events changed."); // Okay, we've added an entry but we don't really want to. Abort it // explicitly if requested, or simply let the Transaction object "expire." if (ExplicitAbort) Doomed.abort(); // If now explicit abort requested, Doomed Transaction still ends here } // Now check that we're back in the original state. Note that this may go // wrong if somebody managed to change the table between our two // transactions. work Checkup(C, "Checkup"); const pair NewEvents = CountEvents(Checkup); PQXX_CHECK_EQUAL( NewEvents.first, EventCounts.first, "Number of events changed. This may be due to a bug in libpqxx, " "or the test table was modified by some other process."); PQXX_CHECK_EQUAL( NewEvents.second, 0, "Found unexpected events. This may be due to a bug in libpqxx, " "or the test table was modified by some other process."); } void test_abort(transaction_base &t) { test::create_pqxxevents(t); connection_base &c(t.conn()); t.commit(); Test(c, true); Test(c, false); } } // namespace PQXX_REGISTER_TEST_T(test_abort, nontransaction) libpqxx-4.0.1+dfsg/test/test011.cxx000066400000000000000000000041331224474465600170450ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Query a table and report its metadata. namespace { void test_011(transaction_base &T) { const string Table = "pg_tables"; result R( T.exec("SELECT * FROM " + Table) ); // Print column names for (pqxx::tuple::size_type c = 0; c < R.columns(); ++c) { string N = R.column_name(c); cout << c << ":\t" << N << endl; PQXX_CHECK_EQUAL(R.column_number(N), c, "Inconsistent column numbers."); } // If there are rows in R, compare their metadata to R's. if (!R.empty()) { PQXX_CHECK_EQUAL(R[0].rownumber(), 0u, "Row 0 has wrong number."); if (R.size() < 2) cout << "(Only one row in table.)" << endl; else PQXX_CHECK_EQUAL(R[1].rownumber(), 1u, "Row 1 has wrong number."); // Test tuple::swap() const pqxx::tuple T1(R[0]), T2(R[1]); PQXX_CHECK_NOT_EQUAL(T1, T2, "Values are identical--can't test swap()."); pqxx::tuple T1s(T1), T2s(T2); PQXX_CHECK_EQUAL(T1s, T1, "Tuple copy-construction incorrect."); PQXX_CHECK_EQUAL(T2s, T2, "Tuple copy-construction inconsistently wrong."); T1s.swap(T2s); PQXX_CHECK_NOT_EQUAL(T1s, T1, "Tuple swap doesn't work."); PQXX_CHECK_NOT_EQUAL(T2s, T2, "Tuple swap inconsistently wrong."); PQXX_CHECK_EQUAL(T2s, T1, "Tuple swap is asymmetric."); PQXX_CHECK_EQUAL(T1s, T2, "Tuple swap is inconsistently asymmetric."); for (pqxx::tuple::size_type c = 0; c < R[0].size(); ++c) { string N = R.column_name(c); PQXX_CHECK_EQUAL( string(R[0].at(c).c_str()), R[0].at(N).c_str(), "Field by name != field by number."); PQXX_CHECK_EQUAL( string(R[0][c].c_str()), R[0][N].c_str(), "at() is inconsistent with operator[]."); PQXX_CHECK_EQUAL(R[0][c].name(), N, "Field names are inconsistent."); PQXX_CHECK_EQUAL( size_t(R[0][c].size()), strlen(R[0][c].c_str()), "Field size is not what we expected."); } } else { cout << "(Table is empty.)" << endl; } } } // namespace PQXX_REGISTER_TEST(test_011) libpqxx-4.0.1+dfsg/test/test012.cxx000066400000000000000000000101021224474465600170370ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. See which fields in a query are null, and figure // out whether any fields are lexicographically sorted. namespace { template void InitVector(VEC &V, typename VEC::size_type s, VAL val) { V.resize(s); for (typename VEC::iterator i = V.begin(); i != V.end(); ++i) *i = val; } void test_012(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string Table = "pg_tables"; // Tell C we won't be needing it for a while (not true, but let's pretend) C.deactivate(); // Now set up some data structures vector NullFields; // Maps column to no. of null fields vector SortedUp, SortedDown; // Does column appear to be sorted? // ...And reactivate C (not really needed, but it sounds more polite) C.activate(); work T(C, "test12"); result R( T.exec("SELECT * FROM " + Table) ); InitVector(NullFields, R.columns(), 0); InitVector(SortedUp, R.columns(), true); InitVector(SortedDown, R.columns(), true); for (result::const_iterator i = R.begin(); i != R.end(); i++) { PQXX_CHECK_EQUAL( (*i).rownumber(), i->rownumber(), "Inconsistent row numbers for operator*() and operator->()."); PQXX_CHECK_EQUAL(i->size(), R.columns(), "Inconsistent row size."); // Look for null fields for (pqxx::tuple::size_type f=0; fsize(); ++f) { NullFields[f] += i.at(f).is_null(); string A, B; PQXX_CHECK_EQUAL( i[f].to(A), i[f].to(B, string("")), "Variants of to() disagree on nullness."); PQXX_CHECK_EQUAL(A, B, "Inconsistent field contents."); } // Compare fields to those of preceding row if (i != R.begin()) { const result::const_iterator j = i - 1; // First perform some sanity checks on j vs. i and how libpqxx handles // their interrelationship... PQXX_CHECK_EQUAL(i - j, 1, "Iterator is wrong distance from successor."); PQXX_CHECK(!(j == i), "Iterator equals its successor."); PQXX_CHECK(j != i, "Iterator inequality is inconsistent."); PQXX_CHECK(!(j >= i), "Iterator doesn't come before its successor."); PQXX_CHECK(!(j > i), "Iterator is preceded by its successor."); PQXX_CHECK(!(i <= j), "Iterator doesn't come after its predecessor."); PQXX_CHECK(!(i < j), "Iterator is succeded by its predecessor."); PQXX_CHECK(j <= i, "operator<=() doesn't mirror operator>=()."); PQXX_CHECK(j < i, "operator<() doesn't mirror operator>()."); PQXX_CHECK_EQUAL(1 + j, i, "Adding 1 doesn't reach successor."); result::const_iterator k(i); PQXX_CHECK_EQUAL(k--, i, "Post-increment returns wrong iterator."); PQXX_CHECK_EQUAL(k, j, "Bad iterator position after post-increment."); result::const_iterator l(i); PQXX_CHECK_EQUAL(--l, j, "Pre-increment returns wrong iterator."); PQXX_CHECK_EQUAL(l, j, "Pre-increment sets wrong iterator position."); PQXX_CHECK_EQUAL(k += 1, i, "Wrong return value from +=."); PQXX_CHECK_EQUAL(k, i, "Bad iterator position after +=."); PQXX_CHECK_EQUAL(k -= 1, j, "Wrong return value from -=."); PQXX_CHECK_EQUAL(k, j, "Bad iterator position after -=."); // ...Now let's do meaningful stuff with j, such as finding out which // fields may be sorted. Don't do anything fancy like trying to // detect numbers and comparing them as such, just compare them as // simple strings. for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) { if (!j[f].is_null()) { const bool U = SortedUp[f], D = SortedDown[f]; SortedUp[f] = U & (string(j[f].c_str()) <= string(i[f].c_str())); SortedDown[f] = D & (string(j[f].c_str()) >= string(i[f].c_str())); } } } } for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) PQXX_CHECK( NullFields[f] <= int(R.size()), "Found more nulls than there were rows."); } } // namespace PQXX_REGISTER_TEST_T(test_012, nontransaction) libpqxx-4.0.1+dfsg/test/test013.cxx000066400000000000000000000052401224474465600170470ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Verify abort behaviour of transactor. // // The program will attempt to add an entry to a table called "pqxxevents", // with a key column called "year"--and then abort the change. // // Note for the superstitious: the numbering for this test program is pure // coincidence. namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const unsigned int BoringYear = 1977; // Count events and specifically events occurring in Boring Year, leaving the // former count in the result pair's first member, and the latter in second. class CountEvents : public transactor<> { string m_Table; pair &m_Results; public: CountEvents(string Table, pair &Results) : transactor<>("CountEvents"), m_Table(Table), m_Results(Results) {} void operator()(argument_type &T) { const string CountQuery = "SELECT count(*) FROM " + m_Table; result R; R = T.exec(CountQuery); R.at(0).at(0).to(m_Results.first); R = T.exec(CountQuery + " WHERE year=" + to_string(BoringYear)); R.at(0).at(0).to(m_Results.second); } }; struct deliberate_error : exception { }; class FailedInsert : public transactor<> { string m_Table; public: FailedInsert(string Table) : transactor<>("FailedInsert"), m_Table(Table) { } void operator()(argument_type &T) { result R( T.exec("INSERT INTO " + m_Table + " VALUES (" + to_string(BoringYear) + ", " "'yawn')") ); PQXX_CHECK_EQUAL(R.affected_rows(), 1u, "Bad affected_rows()."); throw deliberate_error(); } void on_abort(const char Reason[]) throw () { pqxx::test::expected_exception(Name() + " failed: " + Reason); } }; void test_013(transaction_base &T) { connection_base &C(T.conn()); T.abort(); { work T2(C); test::create_pqxxevents(T2); T2.commit(); } const string Table = "pqxxevents"; pair Before; C.perform(CountEvents(Table, Before)); PQXX_CHECK_EQUAL( Before.second, 0, "Already have event for " + to_string(BoringYear) + "--can't test."); const FailedInsert DoomedTransaction(Table); quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.perform(DoomedTransaction), deliberate_error, "Failing transactor failed to throw correct exception."); pair After; C.perform(CountEvents(Table, After)); PQXX_CHECK_EQUAL( After.first, Before.first, "abort() didn't reset event count."); PQXX_CHECK_EQUAL( After.second, Before.second, "abort() didn't reset event count for " + to_string(BoringYear)); } } // namespace PQXX_REGISTER_TEST_T(test_013, nontransaction) libpqxx-4.0.1+dfsg/test/test014.cxx000066400000000000000000000027511224474465600170540ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { void test_014(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); // Begin a "non-transaction" acting on our current connection. This is // really all the transactional integrity we need since we're only // performing one query which does not modify the database. nontransaction T(C, "test14"); // The Transaction family of classes also has ProcessNotice() functions. // These simply pass the notice through to their connection, but this may // be more convenient in some cases. All ProcessNotice() functions accept // C++ strings as well as C strings. T.process_notice(string("Started nontransaction\n")); result R( T.exec("SELECT * FROM pg_tables") ); // Give some feedback to the test program's user prior to the real work T.process_notice(to_string(R.size()) + " " "result tuples in transaction " + T.name() + "\n"); for (result::const_iterator c = R.begin(); c != R.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } // "Commit" the non-transaction. This doesn't really do anything since // NonTransaction doesn't start a backend transaction. T.commit(); } } // namespace PQXX_REGISTER_TEST_T(test_014, nontransaction) libpqxx-4.0.1+dfsg/test/test015.cxx000066400000000000000000000017001224474465600170460ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { class ReadTables : public transactor { result m_Result; public: ReadTables() : transactor("ReadTables") {} void operator()(argument_type &T) { m_Result = T.exec("SELECT * FROM pg_tables"); } void on_commit() { for (result::const_iterator c = m_Result.begin(); c != m_Result.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } } }; void test_015(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); // See if deactivate() behaves... C.deactivate(); C.perform(ReadTables()); } } // namespace PQXX_REGISTER_TEST_T(test_015, nontransaction) libpqxx-4.0.1+dfsg/test/test016.cxx000066400000000000000000000024061224474465600170530ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { void test_016(transaction_base &T) { result R( T.exec("SELECT * FROM pg_tables") ); result::const_iterator c; for (c = R.begin(); c != R.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } // See if back() and tuple comparison work properly PQXX_CHECK(R.size() >= 2, "Not enough rows in pg_tables to test, sorry!"); --c; PQXX_CHECK_EQUAL( c->size(), R.back().size(), "Size mismatch between pqxx::tuple iterator and back()."); const string nullstr; for (pqxx::tuple::size_type i = 0; i < c->size(); ++i) PQXX_CHECK_EQUAL( c[i].as(nullstr), R.back()[i].as(nullstr), "Value mismatch in back()."); PQXX_CHECK(c == R.back(), "Tuple equality is broken."); PQXX_CHECK(!(c != R.back()), "Tuple inequality is broken."); // "Commit" the non-transaction. This doesn't really do anything since // NonTransaction doesn't start a backend transaction. T.commit(); } } // namespace PQXX_REGISTER_TEST_T(test_016, robusttransaction<>) libpqxx-4.0.1+dfsg/test/test017.cxx000066400000000000000000000015751224474465600170620ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { class ReadTables : public transactor { result m_Result; public: ReadTables() : transactor("ReadTables") {} void operator()(argument_type &T) { m_Result = T.exec("SELECT * FROM pg_tables"); } void on_commit() { for (result::const_iterator c = m_Result.begin(); c != m_Result.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } } }; void test_017(transaction_base &T) { connection_base &C(T.conn()); T.abort(); C.perform(ReadTables()); } } // namespace PQXX_REGISTER_TEST_T(test_017, nontransaction) libpqxx-4.0.1+dfsg/test/test018.cxx000066400000000000000000000053131224474465600170550ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Verify abort behaviour of RobustTransaction. // // The program will attempt to add an entry to a table called "pqxxevents", // with a key column called "year"--and then abort the change. namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const long BoringYear = 1977; // Count events and specifically events occurring in Boring Year, leaving the // former count in the result pair's first member, and the latter in second. class CountEvents : public transactor { string m_Table; pair &m_Results; public: CountEvents(string Table, pair &Results) : transactor("CountEvents"), m_Table(Table), m_Results(Results) { } void operator()(argument_type &T) { const string CountQuery = "SELECT count(*) FROM " + m_Table; result R; R = T.exec(CountQuery); R.at(0).at(0).to(m_Results.first); R = T.exec(CountQuery + " WHERE year=" + to_string(BoringYear)); R.at(0).at(0).to(m_Results.second); } }; struct deliberate_error : exception { }; class FailedInsert : public transactor > { string m_Table; static string LastReason; public: FailedInsert(string Table) : transactor("FailedInsert018"), m_Table(Table) { } void operator()(argument_type &T) { T.exec("INSERT INTO " + m_Table + " VALUES (" + to_string(BoringYear) + ", '" + T.esc("yawn") + "')"); throw deliberate_error(); } void on_abort(const char Reason[]) throw () { if (Reason != LastReason) { pqxx::test::expected_exception( "Transactor " + Name() + " failed: " + Reason); LastReason = Reason; } } }; string FailedInsert::LastReason; void test_018(transaction_base &T) { connection_base &C(T.conn()); T.abort(); { work T2(C); test::create_pqxxevents(T2); T2.commit(); } const string Table = "pqxxevents"; pair Before; C.perform(CountEvents(Table, Before)); PQXX_CHECK_EQUAL( Before.second, 0, "Already have event for " + to_string(BoringYear) + ", cannot run."); const FailedInsert DoomedTransaction(Table); { quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.perform(DoomedTransaction), deliberate_error, "Not getting expected exception from failing transactor."); } pair After; C.perform(CountEvents(Table, After)); PQXX_CHECK_EQUAL(After.first, Before.first, "Event count changed."); PQXX_CHECK_EQUAL( After.second, Before.second, "Event count for " + to_string(BoringYear) + " changed."); } } // namespace PQXX_REGISTER_TEST_T(test_018, nontransaction) libpqxx-4.0.1+dfsg/test/test020.cxx000066400000000000000000000042761224474465600170550ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Modify the database inside a NonTransaction, and // verify that the change gets made regardless of whether the NonTransaction is // eventually committed or aborted. namespace { const unsigned long BoringYear = 1977; void test_020(transaction_base &T1) { test::create_pqxxevents(T1); connection_base &C(T1.conn()); const string Table = "pqxxevents"; // Verify our start condition before beginning: there must not be a 1977 // record already. result R( T1.exec(("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)).c_str()) ); PQXX_CHECK_EQUAL( R.size(), 0u, "Already have a row for " + to_string(BoringYear) + ", cannot test."); // (Not needed, but verify that clear() works on empty containers) R.clear(); PQXX_CHECK(R.empty(), "result::clear() is broken."); // OK. Having laid that worry to rest, add a record for 1977. T1.exec(("INSERT INTO " + Table + " VALUES" "(" + to_string(BoringYear) + "," "'Yawn'" ")").c_str()); // Abort T1. Since T1 is a nontransaction, which provides only the // transaction class interface without providing any form of transactional // integrity, this is not going to undo our work. T1.abort(); // Verify that our record was added, despite the Abort() nontransaction T2(C, "T2"); R = T2.exec(("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)).c_str()); PQXX_CHECK_EQUAL( R.size(), 1u, "Found wrong number of rows for " + to_string(BoringYear) + "."); PQXX_CHECK(R.capacity() >= R.size(), "Result's capacity is too small."); R.clear(); PQXX_CHECK(R.empty(), "result::clear() doesn't work."); // Now remove our record again T2.exec(("DELETE FROM " + Table + " " "WHERE year=" + to_string(BoringYear)).c_str()); T2.commit(); // And again, verify results nontransaction T3(C, "T3"); R = T3.exec(("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)).c_str()); PQXX_CHECK_EQUAL(R.size(), 0u, "Record still found after removal."); } } // namespace PQXX_REGISTER_TEST_T(test_020, nontransaction) libpqxx-4.0.1+dfsg/test/test021.cxx000066400000000000000000000033451224474465600170520ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open a lazy connection to database, start // a transaction, and perform a query inside it. namespace { void test_021(transaction_base &) { lazyconnection C; C.process_notice("Printing details on deferred connection\n"); const string HostName = (C.hostname() ? C.hostname() : ""); C.process_notice(string() + "database=" + C.dbname() + ", " "username=" + C.username() + ", " "hostname=" + HostName + ", " "port=" + to_string(C.port()) + ", " "options='" + C.options() + "', " "backendpid=" + to_string(C.backendpid()) + "\n"); work T(C, "test_021"); // By now our connection should really have been created C.process_notice("Printing details on actual connection\n"); C.process_notice(string() + "database=" + C.dbname() + ", " "username=" + C.username() + ", " "hostname=" + HostName + ", " "port=" + to_string(C.port()) + ", " "options='" + C.options() + "', " "backendpid=" + to_string(C.backendpid()) + "\n"); string P; from_string(C.port(), P); PQXX_CHECK_EQUAL(P, to_string(C.port()), "Port string conversion is broken."); PQXX_CHECK_EQUAL(to_string(P), P, "Port string conversion is broken."); result R( T.exec("SELECT * FROM pg_tables") ); T.process_notice(to_string(R.size()) + " " "result tuples in transaction " + T.name() + "\n"); // Process each successive result tuple for (result::const_iterator c = R.begin(); c != R.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } T.commit(); } } // namespace PQXX_REGISTER_TEST_NODB(test_021) libpqxx-4.0.1+dfsg/test/test023.cxx000066400000000000000000000035521224474465600170540ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Send notification to self, using deferred // connection. namespace { // Sample implementation of notification receiver. class TestListener : public notification_receiver { bool m_done; public: explicit TestListener(connection_base &C) : notification_receiver(C, "listen"), m_done(false) {} virtual void operator()(const string &, int be_pid) { m_done = true; PQXX_CHECK_EQUAL( be_pid, conn().backendpid(), "Notification came from wrong backend process."); cout << "Received notification: " << channel() << " pid=" << be_pid << endl; } bool done() const { return m_done; } }; // A transactor to trigger our notification listener class Notify : public transactor<> { string m_channel; public: explicit Notify(string NotifName) : transactor<>("Notifier"), m_channel(NotifName) { } void operator()(argument_type &T) { T.exec("NOTIFY " + m_channel); } void on_abort(const char Reason[]) throw () { try { cerr << "Notify failed!" << endl; if (Reason) cerr << "Reason: " << Reason << endl; } catch (const exception &) { } } }; void test_023(transaction_base &) { lazyconnection C; cout << "Adding listener..." << endl; TestListener L(C); cout << "Sending notification..." << endl; C.perform(Notify(L.channel())); int notifs = 0; for (int i=0; (i < 20) && !L.done(); ++i) { PQXX_CHECK_EQUAL(notifs, 0, "Got unexpected notifications."); pqxx::internal::sleep_seconds(1); notifs = C.get_notifs(); cout << "."; } cout << endl; PQXX_CHECK(L.done(), "No notification received."); PQXX_CHECK_EQUAL(notifs, 1, "Unexpected number of notifications."); } } // namespace PQXX_REGISTER_TEST_NODB(test_023) libpqxx-4.0.1+dfsg/test/test026.cxx000066400000000000000000000067111224474465600170570ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Modify the database, retaining transactional // integrity using the transactor framework, and using lazy connections. namespace { // Global list of converted year numbers and what they've been converted to map theConversions; // Convert year to 4-digit format. int To4Digits(int Y) { int Result = Y; PQXX_CHECK(Y >= 0, "Negative year: " + to_string(Y)); if (Y < 70) Result += 2000; else if (Y < 100) Result += 1900; else PQXX_CHECK(Y >= 1970, "Unexpected year: " + to_string(Y)); return Result; } // Transaction definition for year-field update class UpdateYears : public transactor<> { public: UpdateYears() : transactor<>("YearUpdate") {} // Transaction definition void operator()(argument_type &T) { // First select all different years occurring in the table. result R( T.exec("SELECT year FROM pqxxevents") ); // Note all different years currently occurring in the table, writing them // and their correct mappings to m_Conversions for (result::const_iterator r = R.begin(); r != R.end(); ++r) { int Y; // Read year, and if it is non-null, note its converted value if (r[0].to(Y)) m_Conversions[Y] = To4Digits(Y); } // For each occurring year, write converted date back to whereever it may // occur in the table. Since we're in a transaction, any changes made by // others at the same time will not affect us. for (map::const_iterator c = m_Conversions.begin(); c != m_Conversions.end(); ++c) T.exec("UPDATE pqxxevents " "SET year=" + to_string(c->second) + " " "WHERE year=" + to_string(c->first)); } // Postprocessing code for successful execution void on_commit() { // Report the conversions performed once the transaction has completed // successfully. Do not report conversions occurring in unsuccessful // attempts, as some of those may have been removed from the table by // somebody else between our attempts. // Even if this fails (eg. because we run out of memory), the actual // database transaction will still have been performed. theConversions = m_Conversions; } // Postprocessing code for aborted execution attempt void on_abort(const char Reason[]) throw () { try { // Notify user that the transaction attempt went wrong; we may retry. cerr << "Transaction interrupted: " << Reason << endl; } catch (const exception &) { // Ignore any exceptions on cerr. } } private: // Local store of date conversions to be performed map m_Conversions; }; void test_026(transaction_base &) { lazyconnection C; { nontransaction T(C); test::create_pqxxevents(T); T.commit(); } // Perform (an instantiation of) the UpdateYears transactor we've defined // in the code above. This is where the work gets done. C.perform(UpdateYears()); // Just for fun, report the exact conversions performed. Note that this // list will be accurate even if other people were modifying the database // at the same time; this property was established through use of the // transactor framework. for (map::const_iterator i = theConversions.begin(); i != theConversions.end(); ++i) cout << '\t' << i->first << "\t-> " << i->second << endl; } } // namespace PQXX_REGISTER_TEST_NODB(test_026) libpqxx-4.0.1+dfsg/test/test029.cxx000066400000000000000000000065631224474465600170670ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Open connection to database, start a transaction, // abort it, and verify that it "never happened." Use lazy connection. // // The program will attempt to add an entry to a table called "pqxxevents", // with a key column called "year"--and then abort the change. namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const int BoringYear = 1977; const string Table = "pqxxevents"; // Count events, and boring events, in table pair CountEvents(transaction_base &T) { const string EventsQuery = "SELECT count(*) FROM " + Table; const string BoringQuery = EventsQuery + " WHERE year=" + to_string(BoringYear); int EventsCount = 0, BoringCount = 0; result R( T.exec(EventsQuery) ); R.at(0).at(0).to(EventsCount); R = T.exec(BoringQuery); R.at(0).at(0).to(BoringCount); return make_pair(EventsCount, BoringCount); } // Try adding a record, then aborting it, and check whether the abort was // performed correctly. void Test(connection_base &C, bool ExplicitAbort) { vector BoringTuple; BoringTuple.push_back(to_string(BoringYear)); BoringTuple.push_back("yawn"); pair EventCounts; // First run our doomed transaction. This will refuse to run if an event // exists for our Boring Year. { // Begin a transaction acting on our current connection; we'll abort it // later though. work Doomed(C, "Doomed"); // Verify that our Boring Year was not yet in the events table EventCounts = CountEvents(Doomed); PQXX_CHECK_EQUAL( EventCounts.second, 0, "Can't run; " + to_string(BoringYear) + " is already in the table."); // Now let's try to introduce a tuple for our Boring Year { tablewriter W(Doomed, Table); PQXX_CHECK_EQUAL(W.name(), Table, "tablewriter name is not what I set."); const string Literal = W.generate(BoringTuple); const string Expected = to_string(BoringYear) + "\t" + BoringTuple[1]; PQXX_CHECK_EQUAL(Literal, Expected, "tablewriter mangles new tuple."); W.push_back(BoringTuple); } const pair Recount = CountEvents(Doomed); PQXX_CHECK_EQUAL(Recount.second, 1, "Unexpected number of events."); PQXX_CHECK_EQUAL( Recount.first, EventCounts.first+1, "Number of events changed."); // Okay, we've added an entry but we don't really want to. Abort it // explicitly if requested, or simply let the Transaction object "expire." if (ExplicitAbort) Doomed.abort(); // If now explicit abort requested, Doomed Transaction still ends here } // Now check that we're back in the original state. Note that this may go // wrong if somebody managed to change the table between our two // transactions. work Checkup(C, "Checkup"); const pair NewEvents = CountEvents(Checkup); PQXX_CHECK_EQUAL( NewEvents.first, EventCounts.first, "Wrong number of events."); PQXX_CHECK_EQUAL(NewEvents.second, 0, "Found unexpected events."); } void test_029(transaction_base &) { lazyconnection C; { nontransaction T(C); test::create_pqxxevents(T); } // Test abort semantics, both with explicit and implicit abort Test(C, true); Test(C, false); } } // namespace PQXX_REGISTER_TEST_NODB(test_029) libpqxx-4.0.1+dfsg/test/test030.cxx000066400000000000000000000034301224474465600170450ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Query a table and report its metadata. Use lazy // connection. namespace { void test_030(transaction_base &) { const string Table = "pg_tables"; lazyconnection C; work T(C, "test30"); result R( T.exec(("SELECT * FROM " + Table).c_str()) ); PQXX_CHECK(!R.empty(), "Table " + Table + " is empty, cannot test."); // Print column names for (pqxx::tuple::size_type c = 0; c < R.columns(); ++c) { string N= R.column_name(c); cout << c << ":\t" << N << endl; PQXX_CHECK_EQUAL( R[0].column_number(N), R.column_number(N), "tuple::column_number() is inconsistent with result::column_number()."); PQXX_CHECK_EQUAL( R[0].column_number(N.c_str()), c, "Inconsistent column numbers."); } // If there are rows in R, compare their metadata to R's. if (R.empty()) { cout << "(Table is empty.)" << endl; return; } PQXX_CHECK_EQUAL(R[0].rownumber(), 0u, "Row 0 reports wrong number."); if (R.size() < 2) cout << "(Only one row in table.)" << endl; else PQXX_CHECK_EQUAL(R[1].rownumber(), 1u, "Row 1 reports wrong number."); for (pqxx::tuple::size_type c = 0; c < R[0].size(); ++c) { string N = R.column_name(c); PQXX_CHECK_EQUAL( string(R[0].at(c).c_str()), R[0].at(N).c_str(), "Different field values by name and by number."); PQXX_CHECK_EQUAL( string(R[0][c].c_str()), R[0][N].c_str(), "at() is inconsistent with operator[]."); PQXX_CHECK_EQUAL( R[0][c].name(), N, "Inconsistent field names."); PQXX_CHECK_EQUAL( size_t(R[0][c].size()), strlen(R[0][c].c_str()), "Inconsistent field lengths."); } } } // namespace PQXX_REGISTER_TEST_NODB(test_030) libpqxx-4.0.1+dfsg/test/test031.cxx000066400000000000000000000107211224474465600170470ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. See which fields in a query are null, and figure // out whether any fields are lexicographically sorted. Use lazy connection. namespace { template void InitVector(VEC &V, typename VEC::size_type s, VAL val) { V.resize(s); for (typename VEC::iterator i = V.begin(); i != V.end(); ++i) *i = val; } void test_031(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string Table = "pg_tables"; // Tell C we won't be needing it for a while (not true, but let's pretend) C.deactivate(); vector NullFields; // Maps column to no. of null fields vector SortedUp, SortedDown; // Does column appear to be sorted? // Reactivate C (not really needed, but it sounds more polite) C.activate(); work T(C, "test31"); result R( T.exec("SELECT * FROM " + Table) ); InitVector(NullFields, R.columns(), 0); InitVector(SortedUp, R.columns(), true); InitVector(SortedDown, R.columns(), true); for (result::const_iterator i = R.begin(); i != R.end(); i++) { PQXX_CHECK_EQUAL( (*i).rownumber(), i->rownumber(), "operator*() is inconsistent with operator->()."); PQXX_CHECK_EQUAL( i->size(), R.columns(), "Row size is inconsistent with result::columns()."); // Look for null fields for (pqxx::tuple::size_type f=0; fsize(); ++f) { NullFields[f] += i.at(f).is_null(); string A, B; PQXX_CHECK_EQUAL( i[f].to(A), i[f].to(B, string("")), "Variants of to() disagree on nullness."); PQXX_CHECK_EQUAL(A, B, "Variants of to() produce different values."); } // Compare fields to those of preceding row if (i != R.begin()) { const result::const_iterator j = i - 1; // First perform some sanity checks on j vs. i and how libpqxx handles // their interrelationship... PQXX_CHECK_EQUAL(i - j, 1, "Iterator successor is at wrong distance."); PQXX_CHECK_NOT_EQUAL(j, i, "Iterator equals successor."); PQXX_CHECK(j != i, "Iterator is not different from successor."); PQXX_CHECK(!(j >= i), "Iterator does not precede successor."); PQXX_CHECK(!(j > i), "Iterator follows successor."); PQXX_CHECK(!(i <= j), "operator<=() is asymmetric."); PQXX_CHECK(!(i < j), "operator<() is asymmetric."); PQXX_CHECK(j <= i, "operator<=() is inconsistent."); PQXX_CHECK(j < i, "operator<() is inconsistent."); PQXX_CHECK_EQUAL( 1 + j, i, "Predecessor+1 brings us to wrong place."); result::const_iterator k(i); PQXX_CHECK_EQUAL(k--, i, "Post-decrement returns wrong value."); PQXX_CHECK_EQUAL(k, j, "Post-decrement goes to wrong position."); result::const_iterator l(i); PQXX_CHECK_EQUAL(--l, j, "Pre-decrement returns wrong value."); PQXX_CHECK_EQUAL(l, j, "Pre-decrement goes to wrong position."); PQXX_CHECK_EQUAL(k += 1, i, "operator+=() returns wrong value."); PQXX_CHECK_EQUAL(k, i, "operator+=() goes to wrong position."); PQXX_CHECK_EQUAL(k -= 1, j, "operator-=() returns wrong value."); PQXX_CHECK_EQUAL(k, j, "operator-=() goes to wrong position."); // ...Now let's do meaningful stuff with j, such as finding out which // fields may be sorted. Don't do anything fancy like trying to // detect numbers and comparing them as such, just compare them as // simple strings. for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) { if (!j[f].is_null()) { const bool U = SortedUp[f], D = SortedDown[f]; SortedUp[f] = U & (string(j[f].c_str()) <= string(i[f].c_str())); SortedDown[f] = D & (string(j[f].c_str()) >= string(i[f].c_str())); } } } } // Now report on what we've found cout << "Read " << to_string(R.size()) << " rows." << endl; cout << "Field \t Field Name\t Nulls\t Sorted" << endl; for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) { cout << to_string(f) << ":\t" << R.column_name(f) << '\t' << NullFields[f] << '\t' << (SortedUp[f] ? (SortedDown[f] ? "equal" : "up" ) : (SortedDown[f] ? "down" : "no" ) ) << endl; PQXX_CHECK_BOUNDS( NullFields[f], 0, int(R.size()) + 1, "Found more nulls than there were rows."); } } } // namespace PQXX_REGISTER_TEST_CT(test_031, lazyconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test032.cxx000066400000000000000000000052231224474465600170510ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Verify abort behaviour of transactor. // // The program will attempt to add an entry to a table called "pqxxevents", // with a key column called "year"--and then abort the change. // // Note for the superstitious: the numbering for this test program is pure // coincidence. namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const int BoringYear = 1977; // Count events and specifically events occurring in Boring Year, leaving the // former count in the result pair's first member, and the latter in second. class CountEvents : public transactor<> { string m_Table; pair &m_Results; public: CountEvents(string Table, pair &Results) : transactor<>("CountEvents"), m_Table(Table), m_Results(Results) {} void operator()(argument_type &T) { const string CountQuery = "SELECT count(*) FROM " + m_Table; result R; R = T.exec(CountQuery); R.at(0).at(0).to(m_Results.first); R = T.exec(CountQuery + " WHERE year=" + to_string(BoringYear)); R.at(0).at(0).to(m_Results.second); } }; struct deliberate_error : exception { }; class FailedInsert : public transactor<> { string m_Table; static string LastReason; public: FailedInsert(string Table) : transactor<>("FailedInsert"), m_Table(Table) { } void operator()(argument_type &T) { T.exec("INSERT INTO " + m_Table + " VALUES (" + to_string(BoringYear) + ", " "'yawn')"); throw deliberate_error(); } void on_abort(const char Reason[]) throw () { if (Reason != LastReason) { pqxx::test::expected_exception( "Transactor " + Name() + " failed: " + Reason); LastReason = Reason; } } }; string FailedInsert::LastReason; void test_032(transaction_base &) { lazyconnection C; { nontransaction W(C); test::create_pqxxevents(W); } const string Table = "pqxxevents"; pair Before; C.perform(CountEvents(Table, Before)); PQXX_CHECK_EQUAL( Before.second, 0, "Already have event for " + to_string(BoringYear) + ", cannot test."); const FailedInsert DoomedTransaction(Table); { quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.perform(DoomedTransaction), deliberate_error, "Did not get expected exception from failing transactor."); } pair After; C.perform(CountEvents(Table, After)); PQXX_CHECK_EQUAL(After.first, Before.first, "Event count changed."); PQXX_CHECK_EQUAL( After.second, Before.second, "Event count for " + to_string(BoringYear) + " changed."); } } // namespace PQXX_REGISTER_TEST_NODB(test_032) libpqxx-4.0.1+dfsg/test/test033.cxx000066400000000000000000000013411224474465600170470ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { void test_033(transaction_base &T) { result R( T.exec("SELECT * FROM pg_tables") ); for (result::const_iterator c = R.begin(); c != R.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } // "Commit" the non-transaction. This doesn't really do anything since // nontransaction doesn't start a backend transaction. T.commit(); } } // namespace PQXX_REGISTER_TEST_CT(test_033, lazyconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test034.cxx000066400000000000000000000017531224474465600170570ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. // This test uses a lazy connection. namespace { class ReadTables : public transactor { result m_Result; public: ReadTables() : transactor("ReadTables") {} void operator()(argument_type &T) { m_Result = T.exec("SELECT * FROM pg_tables"); } void on_commit() { for (result::const_iterator c = m_Result.begin(); c != m_Result.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } } }; void test_034(transaction_base &T) { connection_base &C(T.conn()); T.abort(); // See if deactivate() behaves... C.deactivate(); C.perform(ReadTables()); } } // namespace PQXX_REGISTER_TEST_CT(test_034, lazyconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test035.cxx000066400000000000000000000014511224474465600170530ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. // This test combines a lazy connection with a robust transaction. namespace { void test_035(transaction_base &T) { result R( T.exec("SELECT * FROM pg_tables") ); for (result::const_iterator c = R.begin(); c != R.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } // "Commit" the non-transaction. This doesn't really do anything since // NonTransaction doesn't start a backend transaction. T.commit(); } } // namespace PQXX_REGISTER_TEST_CT(test_035, lazyconnection, robusttransaction<>) libpqxx-4.0.1+dfsg/test/test036.cxx000066400000000000000000000015261224474465600170570ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Open connection to database, start // a dummy transaction to gain nontransactional access, and perform a query. namespace { class ReadTables : public transactor { result m_Result; public: ReadTables() : transactor("ReadTables") {} void operator()(argument_type &T) { m_Result = T.exec("SELECT * FROM pg_tables"); } void on_commit() { for (result::const_iterator c = m_Result.begin(); c != m_Result.end(); ++c) { string N; c[0].to(N); cout << '\t' << to_string(c.num()) << '\t' << N << endl; } } }; void test_036(transaction_base &) { lazyconnection C; C.perform(ReadTables()); } } // namespace PQXX_REGISTER_TEST_NODB(test_036) libpqxx-4.0.1+dfsg/test/test037.cxx000066400000000000000000000052571224474465600170650ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Verify abort behaviour of RobustTransaction with // a lazy connection. // // The program will attempt to add an entry to a table called "pqxxevents", // with a key column called "year"--and then abort the change. namespace { // Let's take a boring year that is not going to be in the "pqxxevents" table const int BoringYear = 1977; // Count events and specifically events occurring in Boring Year, leaving the // former count in the result pair's first member, and the latter in second. class CountEvents : public transactor { string m_Table; pair &m_Results; public: CountEvents(string Table, pair &Results) : transactor("CountEvents"), m_Table(Table), m_Results(Results) { } void operator()(argument_type &T) { const string CountQuery = "SELECT count(*) FROM " + m_Table; result R; R = T.exec(CountQuery.c_str()); R.at(0).at(0).to(m_Results.first); R = T.exec(CountQuery + " WHERE year=" + to_string(BoringYear)); R.at(0).at(0).to(m_Results.second); } }; struct deliberate_error : exception { }; class FailedInsert : public transactor > { string m_Table; static string LastReason; public: FailedInsert(string Table) : transactor("FailedInsert037"), m_Table(Table) { } void operator()(argument_type &T) { T.exec("INSERT INTO " + m_Table + " VALUES (" + to_string(BoringYear) + ", " "'yawn')"); throw deliberate_error(); } void on_abort(const char Reason[]) throw () { if (Reason != LastReason) { pqxx::test::expected_exception( "Transactor " + Name() + " failed: " + Reason); LastReason = Reason; } } }; string FailedInsert::LastReason; void test_037(transaction_base &) { lazyconnection C; { nontransaction T(C); test::create_pqxxevents(T); } const string Table = "pqxxevents"; pair Before; C.perform(CountEvents(Table, Before)); PQXX_CHECK_EQUAL( Before.second, 0, "Already have event for " + to_string(BoringYear) + ", cannot test."); const FailedInsert DoomedTransaction(Table); { quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.perform(DoomedTransaction), deliberate_error, "Did not get expected exception from failing transactor."); } pair After; C.perform(CountEvents(Table, After)); PQXX_CHECK_EQUAL(After.first, Before.first, "Number of events changed."); PQXX_CHECK_EQUAL( After.second, Before.second, "Number of events for " + to_string(BoringYear) + " changed."); } } // namespace PQXX_REGISTER_TEST_NODB(test_037) libpqxx-4.0.1+dfsg/test/test039.cxx000066400000000000000000000041631224474465600170620ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Modify the database inside a NonTransaction, and // verify that the change gets made regardless of whether the NonTransaction is // eventually committed or aborted. A lazy connection is used. namespace { int BoringYear = 1977; void test_039(transaction_base &T1) { test::create_pqxxevents(T1); connection_base &C(T1.conn()); const string Table = "pqxxevents"; // Verify our start condition before beginning: there must not be a 1977 // record already. result R( T1.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)) ); PQXX_CHECK_EQUAL( R.size(), 0u, "Already have a row for " + to_string(BoringYear) + ", cannot test."); // (Not needed, but verify that clear() works on empty containers) R.clear(); PQXX_CHECK(R.empty(), "Result is non-empty after clear()."); // OK. Having laid that worry to rest, add a record for 1977. T1.exec("INSERT INTO " + Table + " VALUES" "(" + to_string(BoringYear) + "," "'Yawn'" ")"); // Abort T1. Since T1 is a NonTransaction, which provides only the // transaction class interface without providing any form of transactional // integrity, this is not going to undo our work. T1.abort(); // Verify that our record was added, despite the Abort() nontransaction T2(C, "T2"); R = T2.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); PQXX_CHECK_EQUAL(R.size(), 1u, "Unexpected result size."); PQXX_CHECK(R.capacity() >= R.size(), "Result's capacity is too small."); R.clear(); PQXX_CHECK(R.empty(), "result::clear() is broken."); // Now remove our record again T2.exec("DELETE FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); T2.commit(); // And again, verify results nontransaction T3(C, "T3"); R = T3.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); PQXX_CHECK_EQUAL(R.size(), 0u, "Record is not gone as expected."); } } // namespace PQXX_REGISTER_TEST_CT(test_039, lazyconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test046.cxx000066400000000000000000000036461224474465600170650ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Streams test program for libpqxx. Insert a result field into various // types of streams. namespace { void test_046(transaction_base &T) { result R( T.exec("SELECT count(*) FROM pg_tables") ); cout << "Count was " << R.at(0).at(0) << endl; // Read the value into a stringstream stringstream I; I << R[0][0]; // Now convert the stringstream into a numeric type long L, L2; I >> L; cout << "As a long, it's " << L << endl; R[0][0].to(L2); PQXX_CHECK_EQUAL(L, L2, "Inconsistency between conversion methods."); float F, F2; stringstream I2; I2 << R[0][0]; I2 >> F; cout << "As a float, it's " << F << endl; R[0][0].to(F2); PQXX_CHECK_BOUNDS(F2, F-0.01, F+0.01, "Bad floating-point result."); float F3; from_string(R[0][0].c_str(), F3); PQXX_CHECK_BOUNDS(F3, F-0.01, F+0.01, "Bad float from from_string."); double D; from_string(R[0][0].c_str(), D); PQXX_CHECK_BOUNDS(D, F-0.01, F+0.01, "Bad double from from_string."); #if defined(PQXX_HAVE_LONG_DOUBLE) long double LD; from_string(R[0][0].c_str(), LD); PQXX_CHECK_BOUNDS(LD, F-0.01, F+0.01, "Bad long double from from_string."); #endif string S, S2, S3; from_string(R[0][0].c_str(), S); from_string(string(R[0][0].c_str()), S2); from_string(R[0][0], S3); PQXX_CHECK_EQUAL( S2, S, "from_string(const char[], std::string &) " "is inconsistent with " "from_string(const std::string &, std::string &)."); PQXX_CHECK_EQUAL( S3, S2, "from_string(const result::field &, std::string &) " "is inconsistent with " "from _string(const std::string &, std::string &)."); PQXX_CHECK( T.exec("SELECT 1=1").at(0).at(0).as(), "1=1 doesn't yield 'true.'"); PQXX_CHECK( !T.exec("SELECT 2+2=5").at(0).at(0).as(), "2+2=5 yields 'true.'"); } } // namespace PQXX_REGISTER_TEST(test_046) libpqxx-4.0.1+dfsg/test/test048.cxx000066400000000000000000000051231224474465600170570ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx's Large Objects interface. namespace { /* Read contents of Stream into a single string. The data will go through * input formatting, so whitespace will be taken as separators between chunks * of data. */ template string UnStream(T &Stream) { string Result, X; while (Stream >> X) Result += X; return Result; } class WriteLargeObject : public transactor<> { public: WriteLargeObject(const string &Contents, largeobject &O) : transactor<>("WriteLargeObject"), m_Contents(Contents), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; olostream S(T, m_Object); S << m_Contents; } void on_commit() { m_ObjectOutput = m_Object; } private: string m_Contents; largeobject m_Object; largeobject &m_ObjectOutput; }; class ReadLargeObject : public transactor<> { public: ReadLargeObject(string &Contents, largeobject O) : transactor<>("ReadLargeObject"), m_Contents(), m_ContentsOutput(Contents), m_Object(O) { } void operator()(argument_type &T) { ilostream S(T, m_Object.id()); m_Contents = UnStream(S); } void on_commit() { m_ContentsOutput = m_Contents; } private: string m_Contents; string &m_ContentsOutput; largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_048(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj(oid_none); const string Contents = "Testing, testing, 1-2-3"; C.perform(WriteLargeObject(Contents, Obj)); string Readback; // Contents as read back from large object C.perform(ReadLargeObject(Readback, Obj)); C.perform(DeleteLargeObject(Obj)); /* Reconstruct what will happen to our contents string if we put it into a * stream and then read it back. We can compare this with what comes back * from our large object stream. */ stringstream TestStream; TestStream << Contents; const string StreamedContents = UnStream(TestStream); cout << StreamedContents << endl << Readback << endl; PQXX_CHECK_EQUAL( Readback, StreamedContents, "Got wrong number of bytes from large object."); } } // namespace PQXX_REGISTER_TEST_T(test_048, nontransaction) libpqxx-4.0.1+dfsg/test/test049.cxx000066400000000000000000000046541224474465600170700ustar00rootroot00000000000000#include #include #include #include #include #include "test_helpers.hxx" // For count_if workaround #include using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Run a query and try various standard C++ // algorithms on it. namespace { #ifndef PQXX_HAVE_COUNT_IF template inline long count_if(IN first, IN last, P p) { long cnt; for (cnt=0; first!=last; ++first) cnt += p(*first); return cnt; } #endif // Adds first element of each tuple it receives to a container template struct Add { CONTAINER &Container; string Key; Add(string K, CONTAINER &C) : Container(C), Key(K) {} void operator()(const pqxx::tuple &T) { Container.push_back(T[Key].c_str()); } }; template Add AdderFor(string K, CONTAINER &C) { return Add(K, C); } struct Cmp : binary_function { string Key; explicit Cmp(string K) : Key(K) {} bool operator()(const pqxx::tuple &L, const pqxx::tuple &R) const { return string(L[Key].c_str()) < string(R[Key].c_str()); } }; struct CountGreaterSmaller : unary_function { string Key; const result &R; CountGreaterSmaller(string K, const result &X) : Key(K), R(X) {} void operator()(const pqxx::tuple &T) const { // Count number of entries with key greater/smaller than first row's key // using std::count_if<>() const ptrdiff_t Greater = count_if(R.begin(), R.end(), bind2nd(Cmp(Key),T)), Smaller = count_if(R.begin(), R.end(), bind1st(Cmp(Key),T)); cout << "'" << T[Key] << "': " << Greater << " greater, " << Smaller << " smaller " << "(" << (Greater + Smaller) << " total)" << endl; PQXX_CHECK( Greater + Smaller < ptrdiff_t(R.size()), "More non-equal rows than rows."); } }; void test_049(transaction_base &T) { string Table="pg_tables", Key="tablename"; result R( T.exec("SELECT * FROM " + Table + " ORDER BY " + Key) ); cout << "Read " << R.size() << " tuples." << endl; PQXX_CHECK(!R.empty(), "No rows in " + Table + "."); // Verify that for each key in R, the number of greater and smaller keys // are sensible; use std::for_each<>() to iterate over rows in R for_each(R.begin(), R.end(), CountGreaterSmaller(Key, R)); } } // namespace PQXX_REGISTER_TEST(test_049) libpqxx-4.0.1+dfsg/test/test050.cxx000066400000000000000000000057231224474465600170560ustar00rootroot00000000000000#include #include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx's Large Objects interface. namespace { const string Contents = "Large object test contents"; class CreateLargeObject : public transactor<> { public: explicit CreateLargeObject(largeobject &O) : transactor<>("CreateLargeObject"), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; } void on_commit() { m_ObjectOutput = m_Object; } private: largeobject m_Object; largeobject &m_ObjectOutput; }; class WriteLargeObject : public transactor<> { public: explicit WriteLargeObject(largeobject &O) : transactor<>("WriteLargeObject"), m_Object(O) { } void operator()(argument_type &T) { largeobjectaccess A(T, m_Object); const largeobjectaccess::pos_type orgpos = A.ctell(), copyorgpos = A.ctell(); PQXX_CHECK_EQUAL(orgpos, 0, "Bad initial position in large object."); PQXX_CHECK_EQUAL(copyorgpos, orgpos, "ctell() affected positioning."); const largeobjectaccess::pos_type cxxorgpos = A.tell(); PQXX_CHECK_EQUAL(cxxorgpos, orgpos, "tell() reports bad position."); A.process_notice("Writing to large object #" + to_string(largeobject(A).id()) + "\n"); long Bytes = A.cwrite( Contents.c_str(), largeobject::size_type(Contents.size())); PQXX_CHECK_EQUAL( Bytes, long(Contents.size()), "Wrote wrong number of bytes."); PQXX_CHECK_EQUAL( A.tell(), A.ctell(), "tell() is inconsistent with ctell()."); PQXX_CHECK_EQUAL(A.tell(), Bytes, "Bad large-object position."); char Buf[200]; const size_t Size = sizeof(Buf) - 1; PQXX_CHECK_EQUAL( A.cread(Buf, Size), 0, "Bad return value from cread() after writing."); PQXX_CHECK_EQUAL( size_t(A.cseek(0, ios::cur)), Contents.size(), "Unexpected position after cseek(0, cur)."); PQXX_CHECK_EQUAL( A.cseek(1, ios::beg), 1, "Unexpected cseek() result after seeking to position 1."); PQXX_CHECK_EQUAL( A.cseek(-1, ios::cur), 0, "Unexpected cseek() result after seeking -1 from position 1."); PQXX_CHECK(size_t(A.read(Buf, Size)) <= Size, "Got too many bytes."); PQXX_CHECK_EQUAL( string(Buf, string::size_type(Bytes)), Contents, "Large-object contents were mutilated."); } private: largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_050(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(CreateLargeObject(Obj)); C.perform(WriteLargeObject(Obj)); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_050, nontransaction) libpqxx-4.0.1+dfsg/test/test051.cxx000066400000000000000000000055621224474465600170600ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx's Large Objects interface. namespace { const string Contents = "Large object test contents"; class WriteLargeObject : public transactor<> { public: explicit WriteLargeObject(largeobject &O) : transactor<>("WriteLargeObject"), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { largeobjectaccess A(T); cout << "Created large object #" << A.id() << endl; m_Object = largeobject(A); A.write(Contents); typedef largeobjectaccess::size_type lobj_size_t; char Buf[200]; const lobj_size_t Size = sizeof(Buf) - 1; lobj_size_t Offset = A.seek(0, ios::beg); PQXX_CHECK_EQUAL(Offset, 0, "Wrong position after seek to beginning."); PQXX_CHECK_EQUAL( size_t(A.read(Buf, Size)), Contents.size(), "Unexpected read() result."); PQXX_CHECK_EQUAL( string(Buf, Contents.size()), Contents, "Large object contents were mutilated."); // Now write contents again, this time as a C string PQXX_CHECK_EQUAL( A.seek(-int(Contents.size()), ios::end), 0, "Bad position after seeking to beginning of large object."); A.write(Buf, lobj_size_t(Contents.size())); A.seek(0, ios::beg); PQXX_CHECK_EQUAL( size_t(A.read(Buf, Size)), Contents.size(), "Bad length for rewritten large object."); PQXX_CHECK_EQUAL( string(Buf, Contents.size()), Contents, "Rewritten large object was mangled."); } void on_commit() { PQXX_CHECK( m_ObjectOutput != m_Object, "Large objects: false negative on operator!=()."); PQXX_CHECK( !(m_ObjectOutput == m_Object), "Large objects: false positive on operator==()."); m_ObjectOutput = m_Object; PQXX_CHECK( !(m_ObjectOutput != m_Object), "Large objects: false positive on operator!=()."); PQXX_CHECK( m_ObjectOutput == m_Object, "Large objects: false negative on operator==()."); PQXX_CHECK( m_ObjectOutput <= m_Object, "Large objects: false negative on operator<=()."); PQXX_CHECK( m_ObjectOutput >= m_Object, "Large objects: false negative on operator>=()."); PQXX_CHECK( !(m_ObjectOutput < m_Object), "Large objects: false positive on operator<()."); PQXX_CHECK( !(m_ObjectOutput > m_Object), "Large objects: false positive on operator>()."); } private: largeobject m_Object; largeobject &m_ObjectOutput; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_051(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(WriteLargeObject(Obj)); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_051, nontransaction) libpqxx-4.0.1+dfsg/test/test052.cxx000066400000000000000000000035301224474465600170520ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx: write large object to test files. namespace { const string Contents = "Large object test contents"; class CreateLargeObject : public transactor<> { public: explicit CreateLargeObject(largeobject &O) : transactor<>("CreateLargeObject"), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; } void on_commit() { m_ObjectOutput = m_Object; } private: largeobject m_Object; largeobject &m_ObjectOutput; }; class WriteLargeObject : public transactor<> { public: explicit WriteLargeObject(largeobject &O) : transactor<>("WriteLargeObject"), m_Object(O) { } void operator()(argument_type &T) { largeobjectaccess A(T, m_Object.id(), ios::out); cout << "Writing to large object #" << largeobject(A).id() << endl; A.write(Contents); } private: largeobject m_Object; }; class CopyLargeObject : public transactor<> { public: explicit CopyLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.to_file(T, "pqxxlo.txt"); } private: largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_052(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(CreateLargeObject(Obj)); C.perform(WriteLargeObject(Obj)); C.perform(CopyLargeObject(Obj)); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_052, nontransaction) libpqxx-4.0.1+dfsg/test/test053.cxx000066400000000000000000000032521224474465600170540ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx: import file to large object namespace { const string Contents = "Large object test contents"; class ImportLargeObject : public transactor<> { public: explicit ImportLargeObject(largeobject &O, const string &File) : transactor<>("ImportLargeObject"), m_Object(O), m_File(File) { } void operator()(argument_type &T) { m_Object = largeobject(T, m_File); cout << "Imported '" << m_File << "' " "to large object #" << m_Object.id() << endl; } private: largeobject &m_Object; string m_File; }; class ReadLargeObject : public transactor<> { public: explicit ReadLargeObject(largeobject &O) : transactor<>("ReadLargeObject"), m_Object(O) { } void operator()(argument_type &T) { char Buf[200]; largeobjectaccess O(T, m_Object, ios::in); const largeobjectaccess::size_type len = O.read(Buf, sizeof(Buf)-1); PQXX_CHECK_EQUAL( string(Buf, string::size_type(len)), Contents, "Large object contents were mangled."); } private: largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_053(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(ImportLargeObject(Obj, "pqxxlo.txt")); C.perform(ReadLargeObject(Obj)); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_053, nontransaction) libpqxx-4.0.1+dfsg/test/test054.cxx000066400000000000000000000023531224474465600170560ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx: write large object to test files. namespace { const string Contents = "Large object test contents"; class CreateLargeObject : public transactor<> { public: explicit CreateLargeObject(largeobject &O) : transactor<>("CreateLargeObject"), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { largeobjectaccess A(T); m_Object = largeobject(A); cout << "Created large object #" << m_Object.id() << endl; A.write(Contents); A.to_file("pqxxlo.txt"); } void on_commit() { m_ObjectOutput = m_Object; } private: largeobject m_Object; largeobject &m_ObjectOutput; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_054(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(CreateLargeObject(Obj)); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_054, nontransaction) libpqxx-4.0.1+dfsg/test/test055.cxx000066400000000000000000000026221224474465600170560ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx: import file to large object namespace { const string Contents = "Large object test contents"; class ImportLargeObject : public transactor<> { public: explicit ImportLargeObject(largeobject &O, const string &File) : transactor<>("ImportLargeObject"), m_Object(O), m_File(File) { } void operator()(argument_type &T) { largeobjectaccess A(T, "pqxxlo.txt", ios::in); m_Object = largeobject(A); cout << "Imported '" << m_File << "' " "to large object #" << m_Object.id() << endl; char Buf[200]; const largeobjectaccess::size_type len = A.read(Buf, sizeof(Buf)-1); PQXX_CHECK_EQUAL( string(Buf, string::size_type(len)), Contents, "Large object contents were mangled."); } private: largeobject &m_Object; string m_File; }; class DeleteLargeObject : public transactor<> { public: explicit DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_055(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj; C.perform(ImportLargeObject(Obj, "pqxxlo.txt")); C.perform(DeleteLargeObject(Obj)); } } // namespace PQXX_REGISTER_TEST_T(test_055, nontransaction) libpqxx-4.0.1+dfsg/test/test056.cxx000066400000000000000000000006631224474465600170620ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Issue invalid query and handle error. namespace { void test_056(transaction_base &T) { quiet_errorhandler d(T.conn()); PQXX_CHECK_THROWS( T.exec("DELIBERATELY INVALID TEST QUERY...", "invalid_query"), sql_error, "SQL syntax error did not raise expected exception."); } } // namespace PQXX_REGISTER_TEST(test_056) libpqxx-4.0.1+dfsg/test/test057.cxx000066400000000000000000000050621224474465600170610ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx's Large Objects interface. namespace { /* Read contents of Stream into a single string. The data will go through * input formatting, so whitespace will be taken as separators between chunks * of data. */ template string UnStream(T &Stream) { string Result, X; while (Stream >> X) Result += X; return Result; } class WriteLargeObject : public transactor<> { public: WriteLargeObject(const string &Contents, largeobject &O) : transactor<>("WriteLargeObject"), m_Contents(Contents), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; olostream S(T, m_Object.id()); S << m_Contents; } void on_commit() { m_ObjectOutput = m_Object; } private: string m_Contents; largeobject m_Object; largeobject &m_ObjectOutput; }; class ReadLargeObject : public transactor<> { public: ReadLargeObject(string &Contents, largeobject O) : transactor<>("ReadLargeObject"), m_Contents(), m_ContentsOutput(Contents), m_Object(O) { } void operator()(argument_type &T) { ilostream S(T, m_Object); m_Contents = UnStream(S); } void on_commit() { m_ContentsOutput = m_Contents; } private: string m_Contents; string &m_ContentsOutput; largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_057(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj(oid_none); const string Contents = "Testing, testing, 1-2-3"; C.perform(WriteLargeObject(Contents, Obj)); string Readback; // Contents as read back from large object C.perform(ReadLargeObject(Readback, Obj)); C.perform(DeleteLargeObject(Obj)); /* Reconstruct what will happen to our contents string if we put it into a * stream and then read it back. We can compare this with what comes back * from our large object stream. */ stringstream TestStream; TestStream << Contents; const string StreamedContents = UnStream(TestStream); cout << StreamedContents << endl << Readback << endl; PQXX_CHECK_EQUAL(Readback, StreamedContents, "Contents were mangled."); } } // namespace PQXX_REGISTER_TEST_T(test_057, nontransaction) libpqxx-4.0.1+dfsg/test/test058.cxx000066400000000000000000000037251224474465600170660ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Mixed-mode, seeking test program for libpqxx's Large Objects interface. namespace { const string Contents = "Large object test contents"; class WriteLargeObject : public transactor<> { public: explicit WriteLargeObject() : transactor<>("WriteLargeObject") { } void operator()(argument_type &T) { largeobjectaccess A(T); cout << "Writing to large object #" << largeobject(A).id() << endl; A.write(Contents); char Buf[200]; const size_t Size = sizeof(Buf) - 1; PQXX_CHECK_EQUAL( A.read(Buf, Size), 0, "Could read bytes from large object after writing."); // Overwrite terminating zero largeobjectaccess::size_type Here = A.seek(-1, ios::cur); // Redundant typedef to work around bug in Visual C++.NET typedef largeobjectaccess::size_type loa_size; PQXX_CHECK_EQUAL( Here, loa_size(Contents.size()-1), "Ended up in wrong place after moving back 1 byte."); A.write("!", 1); // Now check that we really did PQXX_CHECK_EQUAL( A.seek(-1, ios::cur), loa_size(Contents.size()-1), "Inconsistent seek."); char Check; PQXX_CHECK_EQUAL( A.read(&Check, 1), 1, "Unexpected result from read()."); PQXX_CHECK_EQUAL(string(&Check, 1), "!", "Read back wrong character."); PQXX_CHECK_EQUAL( A.seek(0, ios::beg), 0, "Ended up in wrong place after seeking back to beginning."); PQXX_CHECK_EQUAL( A.read(&Check, 1), 1, "Unexpected result when trying to read back 1st byte."); PQXX_CHECK_EQUAL( string(&Check, 1), string(Contents, 0, 1), "Wrong first character in large object."); // Clean up after ourselves A.remove(T); } private: largeobject m_Object; }; void test_058(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); C.perform(WriteLargeObject()); } } // namespace PQXX_REGISTER_TEST_T(test_058, nontransaction) libpqxx-4.0.1+dfsg/test/test059.cxx000066400000000000000000000050771224474465600170710ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx's Large Objects interface. namespace { /* Read contents of Stream into a single string. The data will go through * input formatting, so whitespace will be taken as separators between chunks * of data. */ template string UnStream(T &Stream) { string Result, X; while (Stream >> X) Result += X; return Result; } class WriteLargeObject : public transactor<> { public: WriteLargeObject(const string &Contents, largeobject &O) : transactor<>("WriteLargeObject"), m_Contents(Contents), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; lostream S(T, m_Object.id()); S << m_Contents; } void on_commit() { m_ObjectOutput = m_Object; } private: string m_Contents; largeobject m_Object; largeobject &m_ObjectOutput; }; class ReadLargeObject : public transactor<> { public: ReadLargeObject(string &Contents, largeobject O) : transactor<>("ReadLargeObject"), m_Contents(), m_ContentsOutput(Contents), m_Object(O) { } void operator()(argument_type &T) { lostream S(T, m_Object, ios::in); m_Contents = UnStream(S); } void on_commit() { m_ContentsOutput = m_Contents; } private: string m_Contents; string &m_ContentsOutput; largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_059(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); largeobject Obj(oid_none); const string Contents = "Testing, testing, 1-2-3"; C.perform(WriteLargeObject(Contents, Obj)); string Readback; // Contents as read back from large object C.perform(ReadLargeObject(Readback, Obj)); C.perform(DeleteLargeObject(Obj)); /* Reconstruct what will happen to our contents string if we put it into a * stream and then read it back. We can compare this with what comes back * from our large object stream. */ stringstream TestStream; TestStream << Contents; const string StreamedContents = UnStream(TestStream); cout << StreamedContents << endl << Readback << endl; PQXX_CHECK_EQUAL( Readback, StreamedContents, "Large object contents were mangled."); } } // namespace PQXX_REGISTER_TEST(test_059) libpqxx-4.0.1+dfsg/test/test060.cxx000066400000000000000000000036561224474465600170620ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Test session variable functionality. namespace { string GetDatestyle(connection_base &C) { return nontransaction(C, "getdatestyle").get_variable("DATESTYLE"); } string SetDatestyle(connection_base &C, string style) { C.set_variable("DATESTYLE", style); const string fullname = GetDatestyle(C); cout << "Set datestyle to " << style << ": " << fullname << endl; PQXX_CHECK( !fullname.empty(), "Setting datestyle to " + style + " makes it an empty string."); return fullname; } void CheckDatestyle(connection_base &C, string expected) { PQXX_CHECK_EQUAL(GetDatestyle(C), expected, "Got wrong datestyle."); } void RedoDatestyle(connection_base &C, string style, string expected) { PQXX_CHECK_EQUAL(SetDatestyle(C, style), expected, "Set wrong datestyle."); } void ActivationTest(connection_base &C, string style, string expected) { RedoDatestyle(C, style, expected); cout << "Deactivating connection..." << endl; C.deactivate(); CheckDatestyle(C, expected); cout << "Reactivating connection..." << endl; C.activate(); CheckDatestyle(C, expected); } void test_060(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); PQXX_CHECK(!GetDatestyle(C).empty(), "Initial datestyle not set."); const string ISOname = SetDatestyle(C, "ISO"); const string SQLname = SetDatestyle(C, "SQL"); PQXX_CHECK_NOT_EQUAL(ISOname, SQLname, "Same datestyle in SQL and ISO."); RedoDatestyle(C, "SQL", SQLname); ActivationTest(C, "ISO", ISOname); ActivationTest(C, "SQL", SQLname); // Prove that setting an unknown variable causes an error, as expected quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.set_variable("NONEXISTENT_VARIABLE_I_HOPE", "1"), sql_error, "Setting unknown variable failed to fail."); } } // namespace PQXX_REGISTER_TEST_T(test_060, nontransaction) libpqxx-4.0.1+dfsg/test/test061.cxx000066400000000000000000000025131224474465600170520ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Test local variable functionality. namespace { string GetDatestyle(transaction_base &T) { return T.get_variable("DATESTYLE"); } string SetDatestyle(transaction_base &T, string style) { T.set_variable("DATESTYLE", style); const string fullname = GetDatestyle(T); cout << "Set datestyle to " << style << ": " << fullname << endl; PQXX_CHECK( !fullname.empty(), "Setting datestyle to " + style + " makes it an empty string."); return fullname; } void RedoDatestyle(transaction_base &T, string style, string expected) { PQXX_CHECK_EQUAL(SetDatestyle(T, style), expected, "Set wrong datestyle."); } void test_061(transaction_base &T) { PQXX_CHECK(!GetDatestyle(T).empty(), "Initial datestyle not set."); const string ISOname = SetDatestyle(T, "ISO"); const string SQLname = SetDatestyle(T, "SQL"); PQXX_CHECK_NOT_EQUAL(ISOname, SQLname, "Same datestyle in SQL and ISO."); RedoDatestyle(T, "SQL", SQLname); // Prove that setting an unknown variable causes an error, as expected quiet_errorhandler d(T.conn()); PQXX_CHECK_THROWS( T.set_variable("NONEXISTENT_VARIABLE_I_HOPE", "1"), sql_error, "Setting unknown variable failed to fail."); } } // namespace PQXX_REGISTER_TEST(test_061) libpqxx-4.0.1+dfsg/test/test062.cxx000066400000000000000000000055641224474465600170640ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Test binarystring functionality. namespace { void test_062(transaction_base &T) { const string TestStr = "Nasty\n\030Test\n\t String with \200\277 weird bytes " "\r\0 and Trailer\\\\\0"; T.exec("CREATE TEMP TABLE pqxxbin (binfield bytea)"); const string Esc = T.esc_raw(TestStr), Chk = T.esc_raw(reinterpret_cast(TestStr.c_str()), strlen(TestStr.c_str())); PQXX_CHECK_EQUAL(Chk, Esc, "Inconsistent results from esc_raw()."); T.exec("INSERT INTO pqxxbin VALUES ('" + Esc + "')"); result R = T.exec("SELECT * from pqxxbin"); T.exec("DELETE FROM pqxxbin"); binarystring B( R.at(0).at(0) ); PQXX_CHECK(!B.empty(), "Binary string became empty in conversion."); PQXX_CHECK_EQUAL(B.size(), TestStr.size(), "Binary string was mangled."); binarystring::const_iterator c; binarystring::size_type i; for (i=0, c=B.begin(); i0; --i, ++r) { PQXX_CHECK( r != B.rend(), "Premature rend to binary string at " + to_string(i) + "."); typedef unsigned char uchar; PQXX_CHECK_EQUAL( int(B[i-1]), int(uchar(TestStr.at(i-1))), "Reverse iterator is broken."); } PQXX_CHECK(r == B.rend(), "rend() of binary string not reached."); #endif PQXX_CHECK_EQUAL(B.str(), TestStr, "Binary string was mangled."); const string TestStr2("(More conventional text)"); T.exec("INSERT INTO pqxxbin VALUES ('" + TestStr2 + "')"); R = T.exec("SELECT * FROM pqxxbin"); binarystring B2(R.front().front()); PQXX_CHECK(!(B2 == B), "False positive on binarystring::operator==()."); PQXX_CHECK(B2 != B, "False negative on binarystring::operator!=()."); binarystring B1c(B), B2c(B2); PQXX_CHECK(!(B1c != B), "Copied binarystring differs from original."); PQXX_CHECK(B2c == B2, "Copied binarystring not equal to original."); B1c.swap(B2c); PQXX_CHECK(B2c != B1c, "binarystring::swap() produced identical strings."); PQXX_CHECK(B2c == B, "binarystring::swap() is broken."); PQXX_CHECK(B1c == B2, "Cross-check of swapped binarystrings failed."); } } // namespace PQXX_REGISTER_TEST(test_062) libpqxx-4.0.1+dfsg/test/test063.cxx000066400000000000000000000012011224474465600170450ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx's asyncconnection. Asynchronously open a // connection to the database, start a transaction, and perform a query inside // it. namespace { void test_063(transaction_base &T) { result R( T.exec("SELECT * FROM pg_tables") ); PQXX_CHECK(!R.empty(), "No tables found. Cannot test."); for (result::const_iterator c = R.begin(); c != R.end(); ++c) cout << '\t' << to_string(c.num()) << '\t' << c[0].as(string()) << endl; T.commit(); } } // namespace PQXX_REGISTER_TEST_C(test_063, asyncconnection) libpqxx-4.0.1+dfsg/test/test064.cxx000066400000000000000000000036071224474465600170620ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Test session variables with asyncconnection. namespace { string GetDatestyle(connection_base &C) { return nontransaction(C, "getdatestyle").get_variable("DATESTYLE"); } string SetDatestyle(connection_base &C, string style) { C.set_variable("DATESTYLE", style); const string fullname = GetDatestyle(C); cout << "Set datestyle to " << style << ": " << fullname << endl; PQXX_CHECK( !fullname.empty(), "Setting datestyle to " + style + " makes it an empty string."); return fullname; } void CheckDatestyle(connection_base &C, string expected) { PQXX_CHECK_EQUAL(GetDatestyle(C), expected, "Got wrong datestyle."); } void RedoDatestyle(connection_base &C, string style, string expected) { PQXX_CHECK_EQUAL(SetDatestyle(C, style), expected, "Set wrong datestyle."); } void ActivationTest(connection_base &C, string style, string expected) { RedoDatestyle(C, style, expected); cout << "Deactivating connection..." << endl; C.deactivate(); CheckDatestyle(C, expected); cout << "Reactivating connection..." << endl; C.activate(); CheckDatestyle(C, expected); } void test_064(transaction_base &) { asyncconnection C; PQXX_CHECK(!GetDatestyle(C).empty(), "Initial datestyle not set."); const string ISOname = SetDatestyle(C, "ISO"); const string SQLname = SetDatestyle(C, "SQL"); PQXX_CHECK_NOT_EQUAL(ISOname, SQLname, "Same datestyle in SQL and ISO."); RedoDatestyle(C, "SQL", SQLname); ActivationTest(C, "ISO", ISOname); ActivationTest(C, "SQL", SQLname); // Prove that setting an unknown variable causes an error, as expected quiet_errorhandler d(C); PQXX_CHECK_THROWS( C.set_variable("NONEXISTENT_VARIABLE_I_HOPE", "1"), sql_error, "Setting unknown variable failed to fail."); } } // namespace PQXX_REGISTER_TEST_NODB(test_064) libpqxx-4.0.1+dfsg/test/test065.cxx000066400000000000000000000050741224474465600170630ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx's large objects on asynchronous connection. namespace { /* Read contents of Stream into a single string. The data will go through * input formatting, so whitespace will be taken as separators between chunks * of data. */ template string UnStream(T &Stream) { string Result, X; while (Stream >> X) Result += X; return Result; } class WriteLargeObject : public transactor<> { public: WriteLargeObject(const string &Contents, largeobject &O) : transactor<>("WriteLargeObject"), m_Contents(Contents), m_Object(), m_ObjectOutput(O) { } void operator()(argument_type &T) { m_Object = largeobject(T); cout << "Created large object #" << m_Object.id() << endl; lostream S(T, m_Object.id()); S << m_Contents; } void on_commit() { m_ObjectOutput = m_Object; } private: string m_Contents; largeobject m_Object; largeobject &m_ObjectOutput; }; class ReadLargeObject : public transactor<> { public: ReadLargeObject(string &Contents, largeobject O) : transactor<>("ReadLargeObject"), m_Contents(), m_ContentsOutput(Contents), m_Object(O) { } void operator()(argument_type &T) { lostream S(T, m_Object, ios::in); m_Contents = UnStream(S); } void on_commit() { m_ContentsOutput = m_Contents; } private: string m_Contents; string &m_ContentsOutput; largeobject m_Object; }; class DeleteLargeObject : public transactor<> { public: DeleteLargeObject(largeobject O) : m_Object(O) {} void operator()(argument_type &T) { m_Object.remove(T); } private: largeobject m_Object; }; void test_065(transaction_base &) { asyncconnection C(""); largeobject Obj(oid_none); const string Contents = "Testing, testing, 1-2-3"; C.perform(WriteLargeObject(Contents, Obj)); string Readback; // Contents as read back from large object C.perform(ReadLargeObject(Readback, Obj)); C.perform(DeleteLargeObject(Obj)); /* Reconstruct what will happen to our contents string if we put it into a * stream and then read it back. We can compare this with what comes back * from our large object stream. */ stringstream TestStream; TestStream << Contents; const string StreamedContents = UnStream(TestStream); cout << StreamedContents << endl << Readback << endl; PQXX_CHECK_EQUAL(Readback, StreamedContents, "Large object was mangled."); } } // namespace PQXX_REGISTER_TEST_NODB(test_065) libpqxx-4.0.1+dfsg/test/test066.cxx000066400000000000000000000042461224474465600170640ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Modify the database inside a NonTransaction, and // verify that the change gets made regardless of whether the NonTransaction is // eventually committed or aborted. An asynchronous connection is used. namespace { int BoringYear = 1977; void test_066(transaction_base &T1) { test::create_pqxxevents(T1); connection_base &C(T1.conn()); const string Table = "pqxxevents"; // Verify our start condition before beginning: there must not be a 1977 // record already. result R( T1.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)) ); PQXX_CHECK_EQUAL( R.size(), 0u, "Already have a row for " + to_string(BoringYear) + ", cannot test."); // (Not needed, but verify that clear() works on empty containers) R.clear(); PQXX_CHECK(R.empty(), "Result is not empty after clear()."); // OK. Having laid that worry to rest, add a record for 1977. T1.exec("INSERT INTO " + Table + " VALUES" "(" + to_string(BoringYear) + "," "'Yawn'" ")"); // Abort T1. Since T1 is a NonTransaction, which provides only the // transaction class interface without providing any form of transactional // integrity, this is not going to undo our work. T1.abort(); // Verify that our record was added, despite the Abort() nontransaction T2(C, "T2"); R = T2.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); PQXX_CHECK_EQUAL( R.size(), 1u, "Wrong number of records for " + to_string(BoringYear) + "."); PQXX_CHECK(R.capacity() >= R.size(), "Result's capacity is too small."); R.clear(); PQXX_CHECK(R.empty(), "result::clear() doesn't always work."); // Now remove our record again T2.exec("DELETE FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); T2.commit(); // And again, verify results nontransaction T3(C, "T3"); R = T3.exec("SELECT * FROM " + Table + " " "WHERE year=" + to_string(BoringYear)); PQXX_CHECK_EQUAL( R.size(), 0u, "Deleted row still seems to be there."); } } // namespace PQXX_REGISTER_TEST_CT(test_066, asyncconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test067.cxx000066400000000000000000000062751224474465600170710ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. See which fields in a query are null, and figure // out whether any fields are lexicographically sorted. Use asyncconnection. namespace { template void InitVector(VEC &V, typename VEC::size_type s, VAL val) { V.resize(s); for (typename VEC::iterator i = V.begin(); i != V.end(); ++i) *i = val; } void test_067(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string Table = "pg_tables"; // Tell C we won't be needing it for a while (not true, but let's pretend) C.deactivate(); // Now set up some data structures vector NullFields; // Maps column to no. of null fields vector SortedUp, SortedDown; // Does column appear to be sorted? // ...And reactivate C (not really needed, but it sounds more polite) C.activate(); work T(C, "test67"); result R( T.exec("SELECT * FROM " + Table) ); InitVector(NullFields, R.columns(), 0); InitVector(SortedUp, R.columns(), true); InitVector(SortedDown, R.columns(), true); for (result::const_iterator i = R.begin(); i != R.end(); i++) { PQXX_CHECK_EQUAL( (*i).rownumber(), i->rownumber(), "operator*() is inconsistent with operator->()."); PQXX_CHECK_EQUAL(i->size(), R.columns(), "result::columns() is broken."); // Look for null fields for (pqxx::tuple::size_type f=0; fsize(); ++f) { NullFields[f] += i.at(f).is_null(); string A, B; PQXX_CHECK_EQUAL( i[f].to(A), i[f].to(B, string("")), "Variants of to() disagree on nullness."); PQXX_CHECK_EQUAL(A, B, "to() variants return different values."); } // Compare fields to those of preceding row if (i != R.begin()) { const result::const_iterator j = i - 1; // First perform some sanity checks on j vs. i and how libpqxx handles // their interrelationship... PQXX_CHECK_EQUAL(i - j, 1, "Successor is at wrong distance."); // ...Now let's do meaningful stuff with j, such as finding out which // fields may be sorted. Don't do anything fancy like trying to // detect numbers and comparing them as such, just compare them as // simple strings. for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) { if (!j[f].is_null() && !i[f].is_null()) { const bool U = SortedUp[f], D = SortedDown[f]; SortedUp[f] = (U && (j[f].as() <= i[f].as())); SortedDown[f] = (D && (j[f].as() >= i[f].as())); } } } } // Now report on what we've found cout << "Read " << to_string(R.size()) << " rows." << endl; cout << "Field \t Field Name\t Nulls\t Sorted" << endl; for (pqxx::tuple::size_type f = 0; f < R.columns(); ++f) { cout << to_string(f) << ":\t" << R.column_name(f) << '\t' << NullFields[f] << '\t' << (SortedUp[f] ? (SortedDown[f] ? "equal" : "up" ) : (SortedDown[f] ? "down" : "no" ) ) << endl; PQXX_CHECK_BOUNDS( NullFields[f], 0, int(R.size()+1), "Found impossible number of nulls."); } } } // namespace PQXX_REGISTER_TEST_CT(test_067, asyncconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test069.cxx000066400000000000000000000021631224474465600170630ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Issue a query repeatedly through a pipeline, and // compare results. namespace { void TestPipeline(pipeline &P, int numqueries) { const string Q("SELECT count(*) FROM pg_tables"); for (int i=numqueries; i; --i) P.insert(Q); PQXX_CHECK(!numqueries || !P.empty(), "pipeline::empty() is broken."); int res = 0; for (int i=numqueries; i; --i) { PQXX_CHECK(!P.empty(), "Got wrong number of queries from pipeline."); pair R = P.retrieve(); cout << "Query #" << R.first << ": " << R.second.at(0).at(0) << endl; if (res) PQXX_CHECK_EQUAL( R.second[0][0].as(), res, "Got unexpected result out of pipeline."); res = R.second[0][0].as(); } PQXX_CHECK(P.empty(), "Pipeline not empty after retrieval."); } void test_069(transaction_base &W) { pipeline P(W); PQXX_CHECK(P.empty(), "Pipeline is not empty initially."); for (int i=0; i<5; ++i) TestPipeline(P, i); } } // namespace PQXX_REGISTER_TEST_C(test_069, asyncconnection) libpqxx-4.0.1+dfsg/test/test070.cxx000066400000000000000000000052071224474465600170550ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; namespace { void TestPipeline(pipeline &P, int numqueries) { const string Q("SELECT count(*) FROM pg_tables"); const result Empty; PQXX_CHECK(Empty.empty(), "Default-constructed result is not empty."); PQXX_CHECK(Empty.query().empty(), "Default-constructed result has query"); P.retain(); for (int i=numqueries; i; --i) P.insert(Q); P.resume(); PQXX_CHECK(!numqueries || !P.empty(), "pipeline::empty() is broken."); int res = 0; result Prev; PQXX_CHECK_EQUAL(Prev, Empty, "Default-constructed results are not equal."); for (int i=numqueries; i; --i) { PQXX_CHECK(!P.empty(), "Got no results from pipeline."); pair R = P.retrieve(); PQXX_CHECK_NOT_EQUAL(R.second, Empty, "Got empty result."); if (Prev != Empty) PQXX_CHECK_EQUAL(R.second, Prev, "Results to same query are different."); Prev = R.second; PQXX_CHECK_EQUAL(Prev, R.second, "Assignment breaks result equality."); PQXX_CHECK_EQUAL(R.second.query(), Q, "Result is for unexpected query."); if (res) PQXX_CHECK_EQUAL(Prev[0][0].as(), res, "Bad result from pipeline."); res = Prev[0][0].as(); } PQXX_CHECK(P.empty(), "Pipeline was not empty after retrieval."); } // Test program for libpqxx. Issue a query repeatedly through a pipeline, and // compare results. Use retain() and resume() for performance. void test_070(transaction_base &W) { pipeline P(W); PQXX_CHECK(P.empty(), "Pipeline is not empty initially."); // Try to confuse the pipeline by feeding it a query and flushing P.retain(); const string Q = "SELECT * FROM pg_tables"; P.insert(Q); P.flush(); PQXX_CHECK(P.empty(), "Pipeline was not empty after flush()."); // See if complete() breaks retain() as it should P.retain(); P.insert(Q); PQXX_CHECK(!P.empty(), "Pipeline was empty after insert()."); P.complete(); PQXX_CHECK(!P.empty(), "complete() emptied pipeline."); PQXX_CHECK_EQUAL( P.retrieve().second.query(), Q, "Result is for wrong query."); PQXX_CHECK(P.empty(), "Pipeline not empty after retrieve()."); // See if retrieve() breaks retain() when it needs to P.retain(); P.insert(Q); PQXX_CHECK_EQUAL( P.retrieve().second.query(), Q, "Got result for wrong query."); // See if regular retain()/resume() works for (int i=0; i<5; ++i) TestPipeline(P, i); // See if retrieve() fails on an empty pipeline, as it should quiet_errorhandler d(W.conn()); PQXX_CHECK_THROWS( P.retrieve(), exception, "Empty pipeline allows retrieve()."); } } // namespace PQXX_REGISTER_TEST_C(test_070, asyncconnection) libpqxx-4.0.1+dfsg/test/test071.cxx000066400000000000000000000036461224474465600170630ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Issue queries through a pipeline, and retrieve // results both in-order and out-of-order. namespace { typedef map Exp; template void checkresult(pipeline &P, MAPIT c) { const result r = P.retrieve(c->first); const int val = r.at(0).at(0).as(int(0)); PQXX_CHECK_EQUAL(val, c->second, "Wrong result from pipeline."); } void test_071(transaction_base &W) { pipeline P(W); // Keep expected result for every query we issue Exp values; // Insert queries returning various numbers for (int i=1; i<10; ++i) values[P.insert("SELECT " + to_string(i))] = i; // Retrieve results in query_id order, and compare to expected values for (Exp::const_iterator c=values.begin(); c!=values.end(); ++c) checkresult(P, c); PQXX_CHECK(P.empty(), "Pipeline was not empty retrieving all results."); values.clear(); // Insert more queries returning various numbers P.retain(20); for (int i=100; i>90; --i) values[P.insert("SELECT " + to_string(i))] = i; P.resume(); #ifdef PQXX_HAVE_REVERSE_ITERATOR // Retrieve results in reverse order for (Exp::reverse_iterator c=values.rbegin(); c!=values.rend(); ++c) checkresult(P, c); #endif // PQXX_HAVE_REVERSE_ITERATOR values.clear(); P.retain(10); for (int i=1010; i>1000; --i) values[P.insert("SELECT "+to_string(i))] = i; for (Exp::const_iterator c=values.begin(); c!=values.end(); ++c) { if (P.is_finished(c->first)) cout << "Query #" << c->first << " completed despite retain()" << endl; } // See that all results are retrieved by complete() P.complete(); for (Exp::const_iterator c=values.begin(); c!=values.end(); ++c) PQXX_CHECK(P.is_finished(c->first), "Query not finished after complete()."); } } // namespace PQXX_REGISTER_TEST_C(test_071, asyncconnection) libpqxx-4.0.1+dfsg/test/test072.cxx000066400000000000000000000031051224474465600170520ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test error handling for pipeline. namespace { void test_072(transaction_base &W) { pipeline P(W); // Ensure all queries are issued at once to make the test more interesting P.retain(); // The middle query should fail; the surrounding two should succeed const pipeline::query_id id_1 = P.insert("SELECT 1"); const pipeline::query_id id_f = P.insert("SELECT * FROM pg_nonexist"); const pipeline::query_id id_2 = P.insert("SELECT 2"); // See that we can process the queries without stumbling over the error P.complete(); // We should be able to get the first result, which preceeds the error cout << "Retrieving initial result..." << endl; const int res_1 = P.retrieve(id_1).at(0).at(0).as(); cout << " - result was " << res_1 << endl; PQXX_CHECK_EQUAL(res_1, 1, "Got wrong result from pipeline."); // We should *not* get a result for the query behind the error cout << "Retrieving post-error result..." << endl; { quiet_errorhandler d(W.conn()); PQXX_CHECK_THROWS( P.retrieve(id_2).at(0).at(0).as(), runtime_error, "Pipeline wrongly resumed after SQL error."); } // Now see that we get an exception when we touch the failed result cout << "Retrieving result for failed query..." << endl; { quiet_errorhandler d(W.conn()); PQXX_CHECK_THROWS( P.retrieve(id_f), sql_error, "Pipeline failed to register SQL error."); } } } // namespace PQXX_REGISTER_TEST_CT(test_072, asyncconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test073.cxx000066400000000000000000000034101224474465600170520ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test pipeline's handling of SQL syntax errors on a // more exotic connection type. Using nontransaction so the pipeline gets to // trigger the setup of the real connection. namespace { void test_073(transaction_base &W) { pipeline P(W, "pipe73"); // Ensure all queries are issued at once to make the test more interesting P.retain(); cout << "Opened " << P.classname() << " " << P.name() << ": " << P.description() << endl; // The middle query should fail; the surrounding two should succeed const pipeline::query_id id_1 = P.insert("SELECT 1"); const pipeline::query_id id_f = P.insert("DELIBERATE SYNTAX ERROR"); const pipeline::query_id id_2 = P.insert("SELECT 2"); // See that we can process the queries without stumbling over the error P.complete(); // We should be able to get the first result, which preceeds the error cout << "Retrieving initial result..." << endl; const int res_1 = P.retrieve(id_1).at(0).at(0).as(); cout << " - result was " << res_1 << endl; PQXX_CHECK_EQUAL(res_1, 1, "Got bad result from pipeline."); // We should *not* get a result for the query behind the error cout << "Retrieving post-error result..." << endl; quiet_errorhandler d(W.conn()); PQXX_CHECK_THROWS( P.retrieve(id_2).at(0).at(0).as(), runtime_error, "Pipeline wrongly resumed after SQL error."); // Now see that we get an exception when we touch the failed result cout << "Retrieving result for failed query..." << endl; PQXX_CHECK_THROWS( P.retrieve(id_f), sql_error, "Pipeline failed to register SQL error."); } } // namespace PQXX_REGISTER_TEST_CT(test_073, asyncconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test074.cxx000066400000000000000000000035261224474465600170630ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test fieldstream. namespace { void test_074(transaction_base &W) { result R = W.exec("SELECT * FROM pg_tables"); const string sval = R.at(0).at(1).c_str(); string sval2; fieldstream fs1(R.front()[1]); fs1 >> sval2; PQXX_CHECK_EQUAL(sval2, sval, "fieldstream returned wrong value."); R = W.exec("SELECT count(*) FROM pg_tables"); int ival; fieldstream fs2(R.at(0).at(0)); fs2 >> ival; PQXX_CHECK_EQUAL( ival, R.front().front().as(), "fieldstream::front() is broken."); double dval; (fieldstream(R.at(0).at(0))) >> dval; PQXX_CHECK_BOUNDS( dval, R[0][0].as() - 0.1, R[0][0].as() + 0.1, "Got wrong double from fieldstream."); const float roughpi = static_cast(3.1415926435); R = W.exec("SELECT " + to_string(roughpi)); float pival; (fieldstream(R.at(0).at(0))) >> pival; PQXX_CHECK_BOUNDS( pival, roughpi - 0.001, roughpi + 0.001, "Pi approximation came back wrong from fieldstream."); PQXX_CHECK_EQUAL( to_string(R[0][0]), R[0][0].c_str(), "to_string(result::field) is inconsistent with c_str()."); float float_pi; from_string(to_string(roughpi), float_pi); PQXX_CHECK_BOUNDS( float_pi, roughpi - 0.00001, roughpi + 0.00001, "Float changed in conversion."); double double_pi; from_string(to_string(double(roughpi)), double_pi); PQXX_CHECK_BOUNDS( double_pi, roughpi - 0.00001, roughpi + 0.00001, "Double changed in conversion."); #if defined(PQXX_HAVE_LONG_DOUBLE) const long double ld = roughpi; long double long_double_pi; from_string(to_string(ld), long_double_pi); PQXX_CHECK_BOUNDS( long_double_pi, roughpi - 0.00001, roughpi + 0.00001, "long double changed in conversion."); #endif } } // namespace PQXX_REGISTER_TEST(test_074) libpqxx-4.0.1+dfsg/test/test075.cxx000066400000000000000000000077521224474465600170710ustar00rootroot00000000000000#include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Compare const_reverse_iterator iteration of a // result to a regular, const_iterator iteration. namespace { void test_075(transaction_base &W) { test::create_pqxxevents(W); const result R( W.exec("SELECT year FROM pqxxevents") ); PQXX_CHECK(!R.empty(), "No events found, cannot test."); PQXX_CHECK_EQUAL(R[0], R.at(0), "Inconsistent result indexing."); PQXX_CHECK(!(R[0] != R.at(0)), "result::tuple::operator!=() is broken."); PQXX_CHECK_EQUAL(R[0][0], R[0].at(0), "Inconsistent row indexing."); PQXX_CHECK( !(R[0][0] != R[0].at(0)), "result::field::operator!=() is broken."); vector contents; for (result::const_iterator i=R.begin(); i!=R.end(); ++i) contents.push_back(i->at(0).as()); cout << to_string(contents.size()) << " years read" << endl; PQXX_CHECK_EQUAL( contents.size(), vector::size_type(R.size()), "Number of values does not match result size."); for (result::size_type i=0; i ri2, "reverse_iterator operator>() is broken."); PQXX_CHECK(ri3 >= ri2, "reverse_iterator operator>=() is broken."); PQXX_CHECK(ri2 < ri3, "reverse_iterator operator<() is broken."); PQXX_CHECK(ri2 <= ri3, "reverse_iterator operator<=() is broken."); PQXX_CHECK(ri3 == ri2 + 1, "Adding int to reverse_iterator is broken."); PQXX_CHECK( ri2 == ri3 - 1, "Subtracting int from reverse_iterator is broken."); PQXX_CHECK(ri3 == ++ri2, "reverse_iterator pre-increment is broken."); PQXX_CHECK(ri3 >= ri2, "operator>=() breaks on equal reverse_iterators."); PQXX_CHECK(ri3 >= ri2, "operator<=() breaks on equal reverse_iterators."); PQXX_CHECK( ri3.base() == R.back(), "reverse_iterator does not arrive at back()."); PQXX_CHECK( ri1->at(0) == (*ri1).at(0), "reverse_iterator operator->() is inconsistent with operator*()."); PQXX_CHECK(ri2-- == ri3, "reverse_iterator post-decrement is broken."); PQXX_CHECK(ri2 == --ri3, "reverse_iterator pre-decrement is broken."); PQXX_CHECK(ri2 == R.rbegin(), "reverse_iterator decrement is broken."); ri2 += 1; ri3 -= -1; PQXX_CHECK(ri2 != R.rbegin(), "Adding to reverse_iterator does not work."); PQXX_CHECK( ri3 == ri2, "reverse_iterator operator-=() breaks on negative distances."); ri2 -= 1; PQXX_CHECK( ri2 == R.rbegin(), "reverse_iterator operator+=() and operator-=() do not cancel out."); // Now verify that reverse iterator also sees the same results... vector::reverse_iterator l = contents.rbegin(); for (result::const_reverse_iterator i = R.rbegin(); i != R.rend(); ++i, ++l) PQXX_CHECK_EQUAL( *l, i->at(0).c_str(), "Inconsistent reverse iteration."); PQXX_CHECK(l == contents.rend(), "Reverse iteration ended too soon."); #endif // PQXX_HAVE_REVERSE_ITERATOR PQXX_CHECK(!R.empty(), "No events found in table, cannot test."); } } // namespace PQXX_REGISTER_TEST(test_075) libpqxx-4.0.1+dfsg/test/test076.cxx000066400000000000000000000031361224474465600170620ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Simple test program for libpqxx. Test string conversion routines. namespace { void test_076(transaction_base &T) { result RFalse = T.exec("SELECT 1=0"), RTrue = T.exec("SELECT 1=1"); bool False, True; from_string(RFalse[0][0], False); from_string(RTrue[0][0], True); PQXX_CHECK(!False, "False bool converted to true."); PQXX_CHECK(True, "True bool converted to false."); RFalse = T.exec("SELECT " + to_string(False)); RTrue = T.exec("SELECT " + to_string(True)); from_string(RFalse[0][0], False); from_string(RTrue[0][0], True); PQXX_CHECK(!False, "False bool converted to true."); PQXX_CHECK(True, "True bool converted to false."); const short svals[] = { -1, 1, 999, -32767, -32768, 32767, 0 }; for (int i=0; svals[i]; ++i) { short s; from_string(to_string(svals[i]), s); PQXX_CHECK_EQUAL(s, svals[i], "short/string conversion not bijective."); from_string(T.exec("SELECT " + to_string(svals[i]))[0][0].c_str(), s); PQXX_CHECK_EQUAL(s, svals[i], "Roundtrip through backend changed short."); } const unsigned short uvals[] = { 1, 999, 32767, 32768, 65535, 0 }; for (int i=0; uvals[i]; ++i) { unsigned short u; from_string(to_string(uvals[i]), u); PQXX_CHECK_EQUAL( u, uvals[i], "unsigned short/string conversion not bijective."); from_string(T.exec("SELECT " + to_string(uvals[i]))[0][0].c_str(), u); PQXX_CHECK_EQUAL( u, uvals[i], "Roundtrip through backend changed unsigned short."); } } } // namespace PQXX_REGISTER_TEST_T(test_076, nontransaction) libpqxx-4.0.1+dfsg/test/test077.cxx000066400000000000000000000011421224474465600170560ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test result::swap() namespace { void test_077(transaction_base &T) { result RFalse = T.exec("SELECT 1=0"), RTrue = T.exec("SELECT 1=1"); bool f, t; from_string(RFalse[0][0], f); from_string(RTrue[0][0], t); PQXX_CHECK(!f && t, "Booleans converted incorrectly; can't trust this test."); RFalse.swap(RTrue); from_string(RFalse[0][0], f); from_string(RTrue[0][0], t); PQXX_CHECK(f && !t, "result::swap() is broken."); } } // namespace PQXX_REGISTER_TEST_T(test_077, nontransaction) libpqxx-4.0.1+dfsg/test/test078.cxx000066400000000000000000000037631224474465600170720ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Send notification to self, using a notification // name with unusal characters, and without polling. namespace { // Sample implementation of notification receiver. class TestListener : public notification_receiver { bool m_done; public: explicit TestListener(connection_base &C, string Name) : notification_receiver(C, Name), m_done(false) { } virtual void operator()(const string &, int be_pid) { m_done = true; PQXX_CHECK_EQUAL( be_pid, conn().backendpid(), "Got notification from wrong backend process."); cout << "Received notification: " << channel() << " pid=" << be_pid << endl; } bool done() const { return m_done; } }; // A transactor to trigger our notification listener class Notify : public transactor<> { string m_notif; public: explicit Notify(string NotifName) : transactor<>("Notifier"), m_notif(NotifName) { } void operator()(argument_type &T) { T.exec("NOTIFY \"" + m_notif + "\""); } void on_abort(const char Reason[]) throw () { try { cerr << "Notify failed!" << endl; if (Reason) cerr << "Reason: " << Reason << endl; } catch (const exception &) { } } }; void test_078(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string NotifName = "my listener"; cout << "Adding listener..." << endl; TestListener L(C, NotifName); cout << "Sending notification..." << endl; C.perform(Notify(L.channel())); int notifs = 0; for (int i=0; (i < 20) && !L.done(); ++i) { PQXX_CHECK_EQUAL(notifs, 0, "Got unexpected notifications."); cout << "."; notifs = C.await_notification(); } cout << endl; PQXX_CHECK(L.done(), "No notification received."); PQXX_CHECK_EQUAL(notifs, 1, "Got unexpected number of notifications."); } } // namespace PQXX_REGISTER_TEST_T(test_078, nontransaction) libpqxx-4.0.1+dfsg/test/test079.cxx000066400000000000000000000041231224474465600170620ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Example program for libpqxx. Test waiting for notification with timeout. namespace { // Sample implementation of notification receiver. class TestListener : public notification_receiver { bool m_done; public: explicit TestListener(connection_base &C, string Name) : notification_receiver(C, Name), m_done(false) { } virtual void operator()(const string &, int be_pid) { m_done = true; PQXX_CHECK_EQUAL( be_pid, conn().backendpid(), "Notification came from wrong backend."); cout << "Received notification: " << channel() << " pid=" << be_pid << endl; } bool done() const { return m_done; } }; // A transactor to trigger our notification listener class Notify : public transactor<> { string m_notif; public: explicit Notify(string NotifName) : transactor<>("Notifier"), m_notif(NotifName) { } void operator()(argument_type &T) { T.exec("NOTIFY " + m_notif); } void on_abort(const char Reason[]) throw () { try { cerr << "Notify failed!" << endl; if (Reason) cerr << "Reason: " << Reason << endl; } catch (const exception &) { } } }; void test_079(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string NotifName = "mylistener"; cout << "Adding listener..." << endl; TestListener L(C, NotifName); // First see if the timeout really works: we're not expecting any notifs int notifs = C.await_notification(0, 1); PQXX_CHECK_EQUAL(notifs, 0, "Got unexpected notification."); cout << "Sending notification..." << endl; C.perform(Notify(L.channel())); for (int i=0; (i < 20) && !L.done(); ++i) { PQXX_CHECK_EQUAL(notifs, 0, "Got notifications, but no handler called."); cout << "."; notifs = C.await_notification(1,0); } cout << endl; PQXX_CHECK(L.done(), "No notifications received."); PQXX_CHECK_EQUAL(notifs, 1, "Got unexpected notifications."); } } // namespace PQXX_REGISTER_TEST_T(test_079, nontransaction) libpqxx-4.0.1+dfsg/test/test082.cxx000066400000000000000000000121471224474465600170610ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Read and print table using tuple iterators. namespace { void test_082(transaction_base &T) { test::create_pqxxevents(T); const string Table = "pqxxevents"; result R( T.exec("SELECT * FROM " + Table) ); T.conn().disconnect(); PQXX_CHECK(!R.empty(), "Got empty result."); const string nullstr("[null]"); for (pqxx::tuple::const_iterator f = R[0].begin(); f != R[0].end(); ++f) cout << f->name() << '\t'; cout << endl << endl; for (result::const_iterator r = R.begin(); r != R.end(); ++r) { pqxx::tuple::const_iterator f2(r[0]); for (pqxx::tuple::const_iterator f=r->begin(); f!=r->end(); ++f, f2++) { cout << f->c_str() << '\t'; PQXX_CHECK_EQUAL( (*f2).as(nullstr), f->as(nullstr), "Inconsistent iteration result."); } PQXX_CHECK( r->begin() + pqxx::tuple::difference_type(r->size()) == r->end(), "Tuple end() appears to be in the wrong place."); PQXX_CHECK( pqxx::tuple::difference_type(r->size()) + r->begin() == r->end(), "Tuple iterator addition is not commutative."); PQXX_CHECK_EQUAL(r->begin()->num(), 0u, "Wrong column number at begin()."); pqxx::tuple::const_iterator f3(r[r->size()]); PQXX_CHECK(f3 == r->end(), "Did not get end() at end of tuple."); PQXX_CHECK(f3 > r->begin(), "Tuple end() appears to precede its begin()."); PQXX_CHECK( f3 >= r->end() && r->begin() < f3, "Tuple iterator operator<() is broken."); PQXX_CHECK(f3 > r->begin(), "Tuple end() not greater than begin()."); pqxx::tuple::const_iterator f4(*r, r->size()); PQXX_CHECK(f4 == f3, "Tuple iterator constructor with offset is broken."); f3--; f4 -= 1; PQXX_CHECK(f3 < r->end(), "Last field in tuple is not before end()."); PQXX_CHECK(f3 >= r.begin(), "Last field in tuple precedes begin()."); PQXX_CHECK(f3 == r.end()-1, "Back from end() doese not yield end()-1."); PQXX_CHECK_EQUAL( r->end() - f3, 1, "Wrong distance from last tuple to end()."); PQXX_CHECK(f4 == f3, "Tuple iterator operator-=() is broken."); f4 += 1; PQXX_CHECK(f4 == r->end(), "Tuple iterator operator+=() is broken."); for (pqxx::tuple::const_reverse_iterator fr = r->rbegin(); fr != r->rend(); ++fr, --f3) PQXX_CHECK_EQUAL( *fr, *f3, "Reverse traversal is not consistent with forward traversal."); cout < ri2, "reverse_iterator operator>() is broken."); PQXX_CHECK(ri3 >= ri2, "reverse_iterator operator>=() is broken."); PQXX_CHECK(ri2 < ri3, "reverse_iterator operator<() is broken."); PQXX_CHECK(ri2 <= ri3, "reverse_iterator operator<=() is broken."); PQXX_CHECK(ri3 == ri2 + 1, "Adding number to reverse_iterator goes wrong."); PQXX_CHECK(ri2 == ri3 - 1, "Subtracting from reverse_iterator goes wrong."); PQXX_CHECK( ri3 == ++ri2, "reverse_iterator pre-incremen returns wrong result."); PQXX_CHECK( ri3 >= ri2, "reverse_iterator operator>=() breaks on equal iterators."); PQXX_CHECK( ri3 >= ri2, "reverse_iterator operator<=() breaks on equal iterators."); PQXX_CHECK( ri3.base() == R.front().back(), "reverse_iterator does not arrive at back()."); PQXX_CHECK( ri1->c_str()[0] == (*ri1).c_str()[0], "reverse_iterator operator->() is inconsistent with operator*()."); PQXX_CHECK( ri2-- == ri3, "reverse_iterator post-decrement returns wrong result."); PQXX_CHECK( ri2 == --ri3, "reverse_iterator pre-increment returns wrong result."); PQXX_CHECK( ri2 == R.front().rbegin(), "Moving iterator back and forth doesn't get it back to origin."); ri2 += 1; ri3 -= -1; PQXX_CHECK( ri2 != R.front().rbegin(), "Adding to reverse_iterator doesn't work."); PQXX_CHECK( ri2 != R.front().rbegin(), "Adding to reverse_iterator doesn't work."); PQXX_CHECK( ri3 == ri2, "reverse_iterator operator-=() breaks on negative numbers."); ri2 -= 1; PQXX_CHECK( ri2 == R.front().rbegin(), "reverse_iterator operator+=() and operator-=() do not cancel out"); } } // namespace PQXX_REGISTER_TEST_T(test_082, nontransaction) libpqxx-4.0.1+dfsg/test/test083.cxx000066400000000000000000000026651224474465600170660ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Create a table of numbers, write data to it using // a tablewriter back_insert_iterator, then verify the table's contents using // field iterators namespace { void test_083(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string Table = "pqxxnumbers"; items > contents; for (int x=0; x<10; ++x) { items n(x+1); contents.push_back(n); } try { nontransaction Drop(C, "drop_" + Table); quiet_errorhandler d(C); Drop.exec("DROP TABLE " + Table); } catch (const exception &e) { pqxx::test::expected_exception(string("Could not drop table: ") + e.what()); } work T(C, "test83"); T.exec("CREATE TEMP TABLE " + Table + "(num INTEGER)"); tablewriter W(T, Table); back_insert_iterator b(W); items >::const_iterator i = contents.begin(); *b = *i++; ++b; *b++ = *i++; back_insert_iterator c(W); c = b; *c++ = *i; W.complete(); const result R = T.exec("SELECT * FROM " + Table + " ORDER BY num DESC"); items >::const_reverse_iterator j(++i); for (result::const_iterator r = R.begin(); r != R.end(); ++j, ++r) PQXX_CHECK_EQUAL( r->at(0).as(0), (*j)[0], "Writing numbers with tablewriter went wrong."); T.commit(); } } // namespace PQXX_REGISTER_TEST_T(test_083, nontransaction) libpqxx-4.0.1+dfsg/test/test084.cxx000066400000000000000000000055561224474465600170710ustar00rootroot00000000000000#include #include #include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // "Adopted SQL Cursor" test program for libpqxx. Create SQL cursor, wrap it in // a cursor stream, then use it to fetch data and check for consistent results. // Compare results against an icursor_iterator so that is tested as well. namespace { void test_084(transaction_base &T) { const string Table = "pg_tables", Key = "tablename"; // Count rows. result R( T.exec("SELECT count(*) FROM " + Table) ); PQXX_CHECK( R.at(0).at(0).as() > 20, "Not enough rows in " + Table + ", cannot test."); // Create an SQL cursor and, for good measure, muddle up its state a bit. const string CurName = "MYCUR", Query = "SELECT * FROM " + Table + " ORDER BY " + Key; const int InitialSkip = 2, GetRows = 3; T.exec("DECLARE \"" + CurName + "\" CURSOR FOR " + Query); T.exec("MOVE " + to_string(InitialSkip*GetRows) + " IN \""+CurName+'\"'); // Wrap cursor in cursor stream. Apply some trickery to get its name inside // a result field for this purpose. This isn't easy because it's not // supposed to be easy; normally we'd only construct streams around existing // SQL cursors if they were being returned by functions. icursorstream C(T, T.exec("SELECT '"+T.esc(CurName)+"'")[0][0], GetRows); // Create parallel cursor to check results icursorstream C2(T, Query, "CHECKCUR", GetRows); icursor_iterator i2(C2); // Remember, our adopted cursor is at position (InitialSkip*GetRows) icursor_iterator i3(i2); PQXX_CHECK( (i3 == i2) && !(i3 != i2), "Equality on copy-constructed icursor_iterator is broken."); PQXX_CHECK( !(i3 > i2) && !(i3 < i2) && (i3 <= i2) && (i3 >= i2), "Comparison on identical icursor_iterators is broken."); i3 += InitialSkip; PQXX_CHECK(!(i3 <= i2), "icursor_iterator operator<=() is broken."); icursor_iterator iend, i4; PQXX_CHECK(i3 != iend, "Early end to icursor_iterator iteration."); i4 = iend; PQXX_CHECK(i4 == iend, "Assigning empty icursor_iterator fails."); // Now start testing our new Cursor. C >> R; i2 = i3; result R2( *i2++ ); PQXX_CHECK_EQUAL( R.size(), result::size_type(GetRows), "Got unexpected number of rows."); PQXX_CHECK_EQUAL(R, R2, "Unexpected result at [1]"); C.get(R); R2 = *i2; PQXX_CHECK_EQUAL(R, R2, "Unexpected result at [2]"); i2 += 1; C.ignore(GetRows); C.get(R); R2 = *++i2; PQXX_CHECK_EQUAL(R, R2, "Unexpected result at [3]"); ++i2; R2 = *i2++; for (int i=1; C.get(R) && i2 != iend; R2 = *i2++, ++i) PQXX_CHECK_EQUAL( R, R2, "Unexpected result in iteration at " + to_string(i)); PQXX_CHECK(i2 == iend, "Adopted cursor terminated early."); PQXX_CHECK(!(C >> R), "icursor_iterator terminated early."); } } // namespace PQXX_REGISTER_TEST_T(test_084, transaction) libpqxx-4.0.1+dfsg/test/test086.cxx000066400000000000000000000013701224474465600170610ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test inhibition of connection reactivation namespace { void test_086(transaction_base &N1) { connection_base &C(N1.conn()); const string Query = "SELECT * from pg_tables"; cout << "Some datum: " << N1.exec(Query)[0][0] << endl; N1.commit(); C.inhibit_reactivation(true); C.deactivate(); quiet_errorhandler d(C); { nontransaction N2(C, "test86N2"); PQXX_CHECK_THROWS( N2.exec(Query), broken_connection, "Deactivated connection did not throw broken_connection on exec()."); } C.inhibit_reactivation(false); work W(C, "test86W"); W.exec(Query); W.commit(); } } // namespace PQXX_REGISTER_TEST_T(test_086, nontransaction) libpqxx-4.0.1+dfsg/test/test087.cxx000066400000000000000000000060551224474465600170670ustar00rootroot00000000000000#include #include #include #include #include #if defined(PQXX_HAVE_SYS_SELECT_H) #include #else #include #if defined(PQXX_HAVE_UNISTD_H) #include #endif #if defined(_WIN32) #define NOMINMAX #include #endif #endif // PQXX_HAVE_SYS_SELECT_H #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Send notification to self, and select() on socket // as returned by the connection to wait for it to come in. Normally one would // use connection_base::await_notification() for this, but the socket may be // needed for event loops waiting on multiple sources of events. namespace { // Sample implementation of notification receiver. class TestListener : public notification_receiver { bool m_done; public: explicit TestListener(connection_base &C, string Name) : notification_receiver(C, Name), m_done(false) { } virtual void operator()(const string &, int be_pid) { m_done = true; PQXX_CHECK_EQUAL( be_pid, conn().backendpid(), "Notification came from wrong backend process."); cout << "Received notification: " << channel() << " pid=" << be_pid << endl; } bool done() const { return m_done; } }; // A transactor to trigger our notification listener class Notify : public transactor { string m_channel; public: explicit Notify(string NotifName) : transactor("Notifier"), m_channel(NotifName) { } void operator()(argument_type &T) { T.exec("NOTIFY \"" + m_channel + "\""); } void on_abort(const char Reason[]) throw () { try { cerr << "Notify failed!" << endl; if (Reason) cerr << "Reason: " << Reason << endl; } catch (const exception &) { } } }; extern "C" { static void set_fdbit(fd_set &s, int b) { #ifdef _MSC_VER // Suppress pointless, unfixable warnings in Visual Studio. #pragma warning ( push ) #pragma warning ( disable: 4389 ) // Signed/unsigned mismatch. #pragma warning ( disable: 4127 ) // Conditional expression is constant. #endif // Do the actual work. FD_SET(b,&s); #ifdef _MSV_VER // Restore prevalent warning settings. #pragma warning ( pop ) #endif } } void test_087(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); const string NotifName = "my notification"; cout << "Adding listener..." << endl; TestListener L(C, NotifName); cout << "Sending notification..." << endl; C.perform(Notify(L.channel())); int notifs = 0; for (int i=0; (i < 20) && !L.done(); ++i) { PQXX_CHECK_EQUAL(notifs, 0, "Got unexpected notifications."); cout << "."; const int fd = C.sock(); fd_set fds; FD_ZERO(&fds); set_fdbit(fds,fd); timeval timeout = { 1, 0 }; select(fd+1, &fds, 0, &fds, &timeout); notifs = C.get_notifs(); } cout << endl; PQXX_CHECK(L.done(), "No notification received."); PQXX_CHECK_EQUAL(notifs, 1, "Got unexpected number of notifications."); } } // namespace PQXX_REGISTER_TEST_T(test_087, nontransaction) libpqxx-4.0.1+dfsg/test/test088.cxx000066400000000000000000000056001224474465600170630ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Attempt to perform nested transactions. namespace { void test_088(transaction_base &T0) { test::create_pqxxevents(T0); connection_base &C(T0.conn()); if (!C.supports(connection_base::cap_nested_transactions)) { cout << "Backend version does not support nested transactions. " "Skipping test." << endl; return; } // Trivial test: create subtransactions, and commit/abort cout << T0.exec("SELECT 'T0 starts'")[0][0].c_str() << endl; subtransaction T0a(static_cast(T0), "T0a"); T0a.commit(); subtransaction T0b(static_cast(T0), "T0b"); T0b.abort(); cout << T0.exec("SELECT 'T0 ends'")[0][0].c_str() << endl; T0.commit(); // Basic functionality: perform query in subtransaction; abort, continue work T1(C, "T1"); cout << T1.exec("SELECT 'T1 starts'")[0][0].c_str() << endl; subtransaction T1a(T1, "T1a"); cout << T1a.exec("SELECT ' a'")[0][0].c_str() << endl; T1a.commit(); subtransaction T1b(T1, "T1b"); cout << T1b.exec("SELECT ' b'")[0][0].c_str() << endl; T1b.abort(); subtransaction T1c(T1, "T1c"); cout << T1c.exec("SELECT ' c'")[0][0].c_str() << endl; T1c.commit(); cout << T1.exec("SELECT 'T1 ends'")[0][0].c_str() << endl; T1.commit(); // Commit/rollback functionality work T2(C, "T2"); const string Table = "test088"; T2.exec("CREATE TEMP TABLE " + Table + "(no INTEGER, text VARCHAR)"); T2.exec("INSERT INTO " + Table + " VALUES(1,'T2')"); subtransaction T2a(T2, "T2a"); T2a.exec("INSERT INTO "+Table+" VALUES(2,'T2a')"); T2a.commit(); subtransaction T2b(T2, "T2b"); T2b.exec("INSERT INTO "+Table+" VALUES(3,'T2b')"); T2b.abort(); subtransaction T2c(T2, "T2c"); T2c.exec("INSERT INTO "+Table+" VALUES(4,'T2c')"); T2c.commit(); const result R = T2.exec("SELECT * FROM " + Table + " ORDER BY no"); for (result::const_iterator i=R.begin(); i!=R.end(); ++i) cout << '\t' << i[0].c_str() << '\t' << i[1].c_str() << endl; PQXX_CHECK_EQUAL(R.size(), 3u, "Wrong number of results."); int expected[3] = { 1, 2, 4 }; for (result::size_type n=0; n(), expected[n], "Hit unexpected row number."); T2.abort(); // Auto-abort should only roll back the subtransaction. work T3(C, "T3"); subtransaction T3a(T3, "T3a"); PQXX_CHECK_THROWS( T3a.exec("SELECT * FROM nonexistent_table WHERE nonattribute=0"), sql_error, "Bogus query did not fail."); // Subtransaction can only be aborted now, because there was an error. T3a.abort(); // We're back in our top-level transaction. This did not abort. T3.exec("SELECT count(*) FROM pqxxevents"); // Make sure we can commit exactly one more level of transaction. T3.commit(); } } // namespace PQXX_REGISTER_TEST(test_088) libpqxx-4.0.1+dfsg/test/test089.cxx000066400000000000000000000057721224474465600170760ustar00rootroot00000000000000#include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Attempt to perform nested queries on various types // of connections. namespace { void do_test(connection_base &C, const string &desc) { cout << "Testing " << desc << ":" << endl; // Trivial test: create subtransactions, and commit/abort work T0(C, "T0"); cout << T0.exec("SELECT 'T0 starts'")[0][0].c_str() << endl; subtransaction T0a(T0, "T0a"); T0a.commit(); subtransaction T0b(T0, "T0b"); T0b.abort(); cout << T0.exec("SELECT 'T0 ends'")[0][0].c_str() << endl; T0.commit(); // Basic functionality: perform query in subtransaction; abort, continue work T1(C, "T1"); cout << T1.exec("SELECT 'T1 starts'")[0][0].c_str() << endl; subtransaction T1a(T1, "T1a"); cout << T1a.exec("SELECT ' a'")[0][0].c_str() << endl; T1a.commit(); subtransaction T1b(T1, "T1b"); cout << T1b.exec("SELECT ' b'")[0][0].c_str() << endl; T1b.abort(); subtransaction T1c(T1, "T1c"); cout << T1c.exec("SELECT ' c'")[0][0].c_str() << endl; T1c.commit(); cout << T1.exec("SELECT 'T1 ends'")[0][0].c_str() << endl; T1.commit(); } bool test_and_catch(connection_base &C, const string &desc) { bool ok = false; try { do_test(C,desc); ok = true; } catch (const broken_connection &) { throw; } catch (const logic_error &) { throw; } catch (const exception &) { if (C.supports(connection_base::cap_nested_transactions)) throw feature_not_supported( "Backend does not support nested transactions."); throw; } return ok; } void test_089(transaction_base &) { asyncconnection A1; bool ok = test_and_catch(A1, "asyncconnection (virgin)"); asyncconnection A2; A2.activate(); if (!A2.supports(connection_base::cap_nested_transactions)) { if (ok) { /* A1 supported nested transactions but A2 says it doesn't. What may * have happened is we weren't able to establish the connections' * capabilities, and the capability for nested transactions was deduced * from the fact that that first subtransaction actually worked. * If so, try that again. */ try { work W(A2); subtransaction s(W); s.commit(); } catch (const exception &) { PQXX_CHECK_NOTREACHED( "First asyncconnection supported nested " "transactions, but second one doesn't!"); } } else { throw feature_not_supported( "Backend does not support nested transactions."); } } PQXX_CHECK( ok, "Virgin asyncconnection supports nested transactions, " "but initialized one doesn't!"); do_test(A2, "asyncconnection (initialized)"); lazyconnection L1; do_test(L1, "lazyconnection (virgin)"); lazyconnection L2; L2.activate(); do_test(L2, "lazyconnection (initialized)"); connection C; C.activate(); C.deactivate(); do_test(C, "connection (deactivated)"); } } // namespace PQXX_REGISTER_TEST_NODB(test_089) libpqxx-4.0.1+dfsg/test/test090.cxx000066400000000000000000000010461224474465600170540ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test adorn_name. namespace { void test_090(transaction_base &N) { connection_base &C(N.conn()); // Test connection's adorn_name() function for uniqueness const string nametest = "basename"; const string nt1 = C.adorn_name(nametest), nt2 = C.adorn_name(nametest); PQXX_CHECK_NOT_EQUAL(C.adorn_name(nametest), C.adorn_name(nametest), "\"Unique\" names are not unique."); } } // namespace PQXX_REGISTER_TEST(test_090) libpqxx-4.0.1+dfsg/test/test092.cxx000066400000000000000000000036541224474465600170650ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test binary parameters to prepared statements. namespace { void test_092(transaction_base &T) { const char databuf[] = "Test\0data"; const string data(databuf, sizeof(databuf)); PQXX_CHECK(data.size() > strlen(databuf), "Unknown data length problem."); const string Table = "pqxxbin", Field = "binfield", Stat = "nully"; T.exec("CREATE TEMP TABLE " + Table + " (" + Field + " BYTEA)"); T.conn().prepare(Stat, "INSERT INTO " + Table + " VALUES ($1)"); T.prepared(Stat)(binarystring(data)).exec(); const result L( T.exec("SELECT length("+Field+") FROM " + Table) ); PQXX_CHECK_EQUAL(L[0][0].as(), data.size(), "Length of field in database does not match original length."); const result R( T.exec("SELECT " + Field + " FROM " + Table) ); const binarystring roundtrip(R[0][0]); PQXX_CHECK_EQUAL(string(roundtrip.str()), data, "Data came back different."); PQXX_CHECK_EQUAL(roundtrip.size(), data.size(), "Binary string reports wrong size."); // People seem to like the multi-line invocation style, where you get your // invocation object first, then add parameters in separate C++ statements. // As John Mudd found, that used to break the code. Let's test it. T.exec("CREATE TEMP TABLE tuple (one INTEGER, two VARCHAR)"); T.conn().prepare("maketuple", "INSERT INTO tuple VALUES ($1, $2)"); pqxx::prepare::invocation i( T.prepared("maketuple") ); const string f = "frobnalicious"; i(6); i(f); i.exec(); const result t( T.exec("SELECT * FROM tuple") ); PQXX_CHECK_EQUAL(t.size(), 1u, "Wrong result size."); PQXX_CHECK_EQUAL(t[0][0].as(), "6", "Unexpected result value."); PQXX_CHECK_EQUAL(t[0][1].c_str(), f, "Unexpected string result."); } } // namespace PQXX_REGISTER_TEST_CT(test_092, lazyconnection, nontransaction) libpqxx-4.0.1+dfsg/test/test093.cxx000066400000000000000000000043301224474465600170560ustar00rootroot00000000000000#include #include #include // Get some information about our libpq version #include #include "test_helpers.hxx" #include using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Test querying of result column origins. namespace { void test_093(transaction_base &T) { result R, X; { T.exec("CREATE TEMP TABLE pqxxfoo (x varchar, y integer, z integer)"); T.exec("INSERT INTO pqxxfoo VALUES ('xx', 1, 2)"); R = T.exec("SELECT z,y,x FROM pqxxfoo"); X = T.exec("SELECT x,y,z,99 FROM pqxxfoo"); if (!T.conn().supports(connection_base::cap_table_column)) { cout << "No support for querying table columns. Skipping." << endl; return; } // T and connection are closed here; result objects remain } pqxx::tuple::size_type x = R.table_column(2), y = R.table_column(1), z = R.table_column(int(0)); PQXX_CHECK_EQUAL(x, 0u, "Wrong column number."); PQXX_CHECK_EQUAL(y, 1u, "Wrong column number."); PQXX_CHECK_EQUAL(z, 2u, "Wrong column number."); x = R.table_column("x"); y = R.table_column("y"); z = R.table_column("z"); PQXX_CHECK_EQUAL(x, 0u, "Wrong number for named column."); PQXX_CHECK_EQUAL(y, 1u, "Wrong number for named column."); PQXX_CHECK_EQUAL(z, 2u, "Wrong number for named column."); pqxx::tuple::size_type xx = X[0].table_column(int(0)), yx = X[0].table_column(pqxx::tuple::size_type(1)), zx = X[0].table_column("z"); PQXX_CHECK_EQUAL(xx, 0u, "Bad result from table_column(int)."); PQXX_CHECK_EQUAL(yx, 1u, "Bad result from table_column(size_type)."); PQXX_CHECK_EQUAL(zx, 2u, "Bad result from table_column(string)."); for (pqxx::tuple::size_type i=0; i #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Simulate "in-doubt" transaction failure. namespace { // Transaction class that simulates connection failure during commit. class basic_flakytransaction : public dbtransaction { public: bool simulate_failure; protected: basic_flakytransaction(connection_base &C, const string &I) : namedclass("flakytransaction"), dbtransaction(C, I), simulate_failure(false) {} private: virtual void do_commit() { if (simulate_failure) conn().simulate_failure(); try { DirectExec("COMMIT"); } catch (const exception &e) { if (conn().is_open()) { PQXX_CHECK(!simulate_failure, "Connection did not simulate failure."); cerr << "Unexpected exception (connection still open)" << endl; throw; } process_notice(e.what() + string("\n")); const string Msg = (simulate_failure ? "Simulating commit failure" : "UNEXPECTED COMMIT FAILURE"); process_notice(Msg + "\n"); throw in_doubt_error(Msg); } } }; template class flakytransaction : public basic_flakytransaction { public: typedef isolation_traits isolation_tag; explicit flakytransaction(connection_base &C, const string &TName) : namedclass(fullname("transaction",isolation_tag::name()), TName), basic_flakytransaction(C, isolation_tag::name()) { Begin(); } explicit flakytransaction(connection_base &C) : namedclass(fullname("transaction",isolation_tag::name())), basic_flakytransaction(C, isolation_tag::name()) { Begin(); } virtual ~flakytransaction() throw () { End(); } }; // A transactor build to fail, at least for the first m_failcount commits class FlakyTransactor : public transactor > { int m_failcount; public: explicit FlakyTransactor(int failcount=0) : transactor >("FlakyTransactor"), m_failcount(failcount) {} void operator()(argument_type &T) { T.simulate_failure = (m_failcount > 0); T.exec("SELECT count(*) FROM pg_tables"); } void on_doubt() throw () { try { if (m_failcount > 0) { --m_failcount; pqxx::test::expected_exception("Transactor outcome in doubt."); } else { cerr << "Transactor outcome in doubt!" << endl; } } catch (const exception &) { } } }; void test_094(transaction_base &orgT) { connection_base &C(orgT.conn()); orgT.abort(); // Run without simulating failure C.perform(FlakyTransactor(0), 1); // Simulate one failure. The transactor will succeed on a second attempt, but // since this is an in-doubt error, the framework does not retry. PQXX_CHECK_THROWS( C.perform(FlakyTransactor(1), 2), in_doubt_error, "Simulated failure did not lead to in-doubt error."); } } // namespace PQXX_REGISTER_TEST_T(test_094, nontransaction) libpqxx-4.0.1+dfsg/test/test_helpers.hxx000066400000000000000000000241041224474465600203520ustar00rootroot00000000000000#include #include namespace pqxx { namespace test { class test_failure : public PGSTD::logic_error { const PGSTD::string m_file; int m_line; public: test_failure( const PGSTD::string &ffile, int fline, const PGSTD::string &desc); ~test_failure() throw (); const PGSTD::string &file() const throw () { return m_file; } int line() const throw () { return m_line; } }; /// For backends that don't have generate_series(): sequence of ints /** If the backend lacks generate_series(), prepares a temp table called * series" containing given range of numbers (including lowest and highest). * * Use select_series() to construct a query selecting a range of numbers. For * the workaround on older backends to work, the ranges of numbers passed to * select_series() must be subsets of the range passed here. */ void prepare_series(transaction_base &t, int lowest, int highest); /// Generate query selecting series of numbers from lowest to highest, inclusive /** Needs to see connection object to determine whether the backend supports * generate_series(). */ PGSTD::string select_series(connection_base &conn, int lowest, int highest); /// Drop a table, if it exists. void drop_table(transaction_base &, const PGSTD::string &table); class base_test; typedef PGSTD::map test_map; /// Register test (if given); return test_map. const test_map ®ister_test(base_test *); /// Base class for test cases. class base_test { public: typedef void (*testfunc)(transaction_base &); base_test(const PGSTD::string &tname, testfunc func); /// Overridable: run test case. virtual void run() =0; virtual ~base_test() =0; const PGSTD::string &name() const throw () { return m_name; } private: PGSTD::string m_name; protected: testfunc m_func; }; /// Runner class for libpqxx tests. Sets up a connection and transaction. template class test_case : public base_test { public: // func takes connection and transaction as arguments. test_case(const PGSTD::string &tname, testfunc func) : base_test(tname, func) { } ~test_case() {} virtual void run() { CONNECTION c; TRANSACTION t(c, name()); // Workaround for older backend versions that lack generate_series(). prepare_series(t, 0, 100); m_func(t); } }; // Register a function taking (connection_base &, transaction_base &) as a test. #define PQXX_REGISTER_TEST(function) \ namespace \ { \ pqxx::test::test_case<> test(#function, function); \ } // Register a test function using given connection and transaction types. #define PQXX_REGISTER_TEST_CT(function, connection_type, transaction_type) \ namespace \ { \ pqxx::test::test_case< connection_type, transaction_type > \ test(#function, function); \ } // Register a test function using a given connection type (instead of the // default "connection"). #define PQXX_REGISTER_TEST_C(function, connection_type) \ PQXX_REGISTER_TEST_CT(function, connection_type, pqxx::work) // Register a test function using a given transaction type (default is "work"). #define PQXX_REGISTER_TEST_T(function, transaction_type) \ PQXX_REGISTER_TEST_CT(function, pqxx::connection, transaction_type) // Register test function that takes a nullconnection and nontransaction. #define PQXX_REGISTER_TEST_NODB(function) \ PQXX_REGISTER_TEST_CT( \ function, \ pqxx::nullconnection, \ pqxx::nontransaction) // Unconditional test failure. #define PQXX_CHECK_NOTREACHED(desc) \ pqxx::test::check_notreached(__FILE__, __LINE__, (desc)) void check_notreached(const char file[], int line, PGSTD::string desc); // Verify that a condition is met, similar to assert() #define PQXX_CHECK(condition, desc) \ pqxx::test::check(__FILE__, __LINE__, (condition), #condition, (desc)) void check( const char file[], int line, bool condition, const char text[], PGSTD::string desc); // Verify that variable has the expected value. #define PQXX_CHECK_EQUAL(actual, expected, desc) \ pqxx::test::check_equal( \ __FILE__, \ __LINE__, \ (actual), \ #actual, \ (expected), \ #expected, \ (desc)) template inline void check_equal( const char file[], int line, ACTUAL actual, const char actual_text[], EXPECTED expected, const char expected_text[], PGSTD::string desc) { if (expected == actual) return; const PGSTD::string fulldesc = desc + " (" + actual_text + " <> " + expected_text + ": " "expected=" + to_string(expected) + ", " "actual=" + to_string(actual) + ")"; throw test_failure(file, line, fulldesc); } // Verify that two values are not equal. #define PQXX_CHECK_NOT_EQUAL(value1, value2, desc) \ pqxx::test::check_not_equal( \ __FILE__, \ __LINE__, \ (value1), \ #value1, \ (value2), \ #value2, \ (desc)) template inline void check_not_equal( const char file[], int line, VALUE1 value1, const char text1[], VALUE2 value2, const char text2[], PGSTD::string desc) { if (value1 != value2) return; const PGSTD::string fulldesc = desc + " (" + text1 + " == " + text2 + ": " "both are " + to_string(value2) + ")"; throw test_failure(file, line, fulldesc); } // Verify that value1 is less than value2. #define PQXX_CHECK_LESS(value1, value2, desc) \ pqxx::test::check_less( \ __FILE__, \ __LINE__, \ (value1), \ #value1, \ (value2), \ #value2, \ (desc)) template inline void check_less( const char file[], int line, VALUE1 value1, const char text1[], VALUE2 value2, const char text2[], PGSTD::string desc) { if (value1 < value2) return; const PGSTD::string fulldesc = desc + " (" + text1 + " >= " + text2 + ": " "\"lower\"=" + to_string(value1) + ", " "\"upper\"=" + to_string(value2) + ")"; throw test_failure(file, line, fulldesc); } struct failure_to_fail {}; namespace internal { /// Syntactic placeholder: require (and accept) semicolon after block. inline void end_of_statement() { } } // Verify that "action" throws "exception_type." #define PQXX_CHECK_THROWS(action, exception_type, desc) \ { \ try \ { \ action ; \ throw pqxx::test::failure_to_fail(); \ } \ catch (const pqxx::test::failure_to_fail &) \ { \ PQXX_CHECK_NOTREACHED( \ PGSTD::string(desc) + \ " (\"" #action "\" did not throw " #exception_type ")"); \ } \ catch (const exception_type &) {} \ catch (...) \ { \ PQXX_CHECK_NOTREACHED( \ PGSTD::string(desc) + \ " (\"" #action "\" " \ "threw exception other than " #exception_type ")"); \ } \ } \ pqxx::test::internal::end_of_statement() #define PQXX_CHECK_BOUNDS(value, lower, upper, desc) \ pqxx::test::check_bounds( \ __FILE__, \ __LINE__, \ (value), \ #value, \ (lower), \ #lower, \ (upper), \ #upper, \ (desc)) template inline void check_bounds( const char file[], int line, VALUE value, const char text[], LOWER lower, const char lower_text[], UPPER upper, const char upper_text[], const PGSTD::string &desc) { const PGSTD::string range_check = PGSTD::string(lower_text) + " < " + upper_text, lower_check = PGSTD::string("!(") + text + " < " + lower_text + ")", upper_check = PGSTD::string(text) + " < " + upper_text; pqxx::test::check( file, line, lower < upper, range_check.c_str(), desc + " (acceptable range is empty; value was " + text + ")"); pqxx::test::check( file, line, !(value < lower), lower_check.c_str(), desc + " (" + text + " is below lower bound " + lower_text + ")"); pqxx::test::check( file, line, value < upper, upper_check.c_str(), desc + " (" + text + " is not below upper bound " + upper_text + ")"); } // Report expected exception void expected_exception(const PGSTD::string &); // Represent result tuple as string PGSTD::string list_tuple(tuple); // Represent result as string PGSTD::string list_result(result); // Represent result iterator as string PGSTD::string list_result_iterator(result::const_iterator); // @deprecated Set up test data for legacy tests. void create_pqxxevents(transaction_base &); } // namespace test // Support string conversion on result rows for debug output. template<> struct string_traits { static const char *name() { return "pqxx::tuple"; } static bool has_null() { return false; } static bool is_null(tuple) { return false; } static result null(); // Not needed static void from_string(const char Str[], result &Obj); // Not needed static PGSTD::string to_string(tuple Obj) { return pqxx::test::list_tuple(Obj); } }; // Support string conversion on result objects for debug output. template<> struct string_traits { static const char *name() { return "pqxx::result"; } static bool has_null() { return true; } static bool is_null(result r) { return r.empty(); } static result null() { return result(); } static void from_string(const char Str[], result &Obj); // Not needed static PGSTD::string to_string(result Obj) { return pqxx::test::list_result(Obj); } }; // Support string conversion on result::const_iterator for debug output. template<> struct string_traits { typedef result::const_iterator subject_type; static const char *name() { return "pqxx::result::const_iterator"; } static bool has_null() { return false; } static bool is_null(subject_type) { return false; } static result null(); // Not needed static void from_string(const char Str[], subject_type &Obj); // Not needed static PGSTD::string to_string(subject_type Obj) { return pqxx::test::list_result_iterator(Obj); } }; // Support string conversion on vector for debug output. template<> struct string_traits > { typedef PGSTD::vector subject_type; static const char *name() { return "vector"; } static bool has_null() { return false; } static bool is_null(subject_type) { return false; } static subject_type null(); // Not needed static void from_string(const char Str[], subject_type &Obj); // Not needed static PGSTD::string to_string(const subject_type &Obj) { return separated_list("; ", Obj); } }; } // namespace pqxx libpqxx-4.0.1+dfsg/test/test_main.hxx000066400000000000000000000137361224474465600176450ustar00rootroot00000000000000/* main() definition for libpqxx test runners. */ #include #include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; using namespace pqxx::test; namespace { // Does this backend have generate_series()? bool have_generate_series(const connection_base &c) { return c.server_version() >= 80000; } string deref_field(const field &f) { return f.c_str(); } } // namespace namespace pqxx { namespace test { test_failure::test_failure(const string &ffile, int fline, const string &desc) : logic_error(desc), m_file(ffile), m_line(fline) { } test_failure::~test_failure() throw () {} base_test::base_test(const string &tname, testfunc func) : m_name(tname), m_func(func) { register_test(this); } base_test::~base_test() {} const test_map ®ister_test(base_test *tc) { static test_map tests; if (tc) tests[tc->name()] = tc; return tests; } void prepare_series(transaction_base &t, int lowest, int highest) { connection_base &conn = t.conn(); // Don't do this for nullconnections, so nullconnection tests can run. if (conn.is_open() && !have_generate_series(conn)) { t.exec("CREATE TEMP TABLE series(x integer)"); for (int x=lowest; x <= highest; ++x) t.exec("INSERT INTO series(x) VALUES (" + to_string(x) + ")"); } } string select_series(connection_base &conn, int lowest, int highest) { if (have_generate_series(conn)) return "SELECT generate_series(" + to_string(lowest) + ", " + to_string(highest) + ")"; return "SELECT x FROM series " "WHERE " "x >= " + to_string(lowest) + " AND " "x <= " + to_string(highest) + " " "ORDER BY x"; } namespace { bool drop_table_if_exists(transaction_base &t, const PGSTD::string &table) { if (t.conn().server_version() < 80100) return false; t.exec("DROP TABLE IF EXISTS " + table); return true; } } void drop_table(transaction_base &t, const PGSTD::string &table) { if (drop_table_if_exists(t, table)) return; dbtransaction *dbt(dynamic_cast(&t)); if (dbt) { subtransaction s(*dbt, "drop_table"); try { s.exec("DROP TABLE " + table); } catch (const sql_error &e) { PGSTD::cerr << e.what() << PGSTD::endl; s.abort(); } s.commit(); } else { nontransaction *nt(dynamic_cast(&t)); try { nt->exec("DROP TABLE " + table); } catch (const sql_error &e) { PGSTD::cerr << e.what() << PGSTD::endl; } } } void PQXX_NORETURN check_notreached(const char file[], int line, string desc) { throw test_failure(file, line, desc); } void check( const char file[], int line, bool condition, const char text[], string desc) { if (!condition) throw test_failure( file, line, desc + " (failed expression: " + text + ")"); } void expected_exception(const string &message) { cout << "(Expected) " << message << endl; } string list_tuple(tuple Obj) { return separated_list(", ", Obj.begin(), Obj.end(), deref_field); } string list_result(result Obj) { if (Obj.empty()) return ""; return "{" + separated_list("}\n{", Obj) + "}"; } string list_result_iterator(result::const_iterator Obj) { return ""; } void create_pqxxevents(transaction_base &t) { t.exec( "CREATE TEMP TABLE pqxxevents(year integer, event varchar) " "ON COMMIT PRESERVE ROWS"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (71, 'jtv')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (38, 'time_t overflow')"); t.exec( "INSERT INTO pqxxevents(year, event) VALUES (1, '''911'' WTC attack')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (81, 'C:\\>')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (1978, 'bloody\t\tcold')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (99, '')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (2002, 'libpqxx')"); t.exec( "INSERT INTO pqxxevents(year, event) " "VALUES (1989, 'Ode an die Freiheit')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (2001, 'New millennium')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (1974, '')"); t.exec("INSERT INTO pqxxevents(year, event) VALUES (97, 'Asian crisis')"); t.exec( "INSERT INTO pqxxevents(year, event) VALUES (2001, 'A Space Odyssey')"); } } // namespace pqxx::test } // namespace pqxx int main(int, const char *argv[]) { const char *const test_name = argv[1]; const test_map &tests = register_test(NULL); int test_count = 0; list failed; for (test_map::const_iterator i = tests.begin(); i != tests.end(); ++i) if (!test_name || test_name == i->first) { cout << endl << "Running: " << i->first << endl; bool success = false; try { i->second->run(); success = true; } catch (const test_failure &e) { cerr << "Test failure in " + e.file() + " line " + to_string(e.line()) << ": " << e.what() << endl; } catch (const bad_alloc &) { cerr << "Out of memory!" << endl; } catch (const feature_not_supported &e) { cerr << "Not testing unsupported feature: " << e.what() << endl; success = true; --test_count; } catch (const sql_error &e) { cerr << "SQL error: " << e.what() << endl << "Query was: " << e.query() << endl; } catch (const exception &e) { cerr << "Exception: " << e.what() << endl; } catch (...) { cerr << "Unknown exception" << endl; } if (!success) { cerr << "FAILED: " << i->first << endl; failed.push_back(i->first); } ++test_count; } cout << "Ran " << test_count << " test(s)." << endl; if (!failed.empty()) { cerr << "*** " << failed.size() << " test(s) failed: ***" << endl; for (list::const_iterator i=failed.begin(); i!=failed.end(); ++i) cerr << "\t" << *i << endl; } return int(failed.size()); } libpqxx-4.0.1+dfsg/test/unit/000077500000000000000000000000001224474465600160765ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/test/unit/Makefile.am000066400000000000000000000032231224474465600201320ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/test/unit/Makefile.am.template'. ################################################################################ #MAINTAINERCLEANFILES=Makefile.in EXTRA_DIST = Makefile.am.template INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/test -I$(srcdir)/.. -I$(srcdir)/../../include ${POSTGRES_INCLUDE} DEFAULT_INCLUDES= MAINTAINERCLEANFILES=Makefile.in runner_SOURCES = \ test_binarystring.cxx \ test_cancel_query.cxx \ test_error_verbosity.cxx \ test_errorhandler.cxx \ test_escape.cxx \ test_exceptions.cxx \ test_float.cxx \ test_notification.cxx \ test_parameterized.cxx \ test_pipeline.cxx \ test_prepared_statement.cxx \ test_read_transaction.cxx \ test_result_slicing.cxx \ test_simultaneous_transactions.cxx \ test_sql_cursor.cxx \ test_stateless_cursor.cxx \ test_string_conversion.cxx \ test_test_helpers.cxx \ test_thread_safety_model.cxx \ runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} TESTS = runner check_PROGRAMS = ${TESTS} # ###MAKTEMPLATE:FOREACH test/unit/test_*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} libpqxx-4.0.1+dfsg/test/unit/Makefile.am.template000066400000000000000000000012011224474465600217360ustar00rootroot00000000000000#MAINTAINERCLEANFILES=Makefile.in EXTRA_DIST = Makefile.am.template INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/test -I$(srcdir)/.. -I$(srcdir)/../../include ${POSTGRES_INCLUDE} DEFAULT_INCLUDES= MAINTAINERCLEANFILES=Makefile.in runner_SOURCES = \ ###MAKTEMPLATE:FOREACH test/unit/test_*.cxx ###BASENAME###.cxx \ ###MAKTEMPLATE:ENDFOREACH runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} TESTS = runner check_PROGRAMS = ${TESTS} # ###MAKTEMPLATE:FOREACH test/unit/test_*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} libpqxx-4.0.1+dfsg/test/unit/Makefile.in000066400000000000000000000535521224474465600201550ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ ################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/test/unit/Makefile.am.template'. ################################################################################ #MAINTAINERCLEANFILES=Makefile.in VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ TESTS = runner$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) subdir = test/unit DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = runner$(EXEEXT) am_runner_OBJECTS = test_binarystring.$(OBJEXT) \ test_cancel_query.$(OBJEXT) test_error_verbosity.$(OBJEXT) \ test_errorhandler.$(OBJEXT) test_escape.$(OBJEXT) \ test_exceptions.$(OBJEXT) test_float.$(OBJEXT) \ test_notification.$(OBJEXT) test_parameterized.$(OBJEXT) \ test_pipeline.$(OBJEXT) test_prepared_statement.$(OBJEXT) \ test_read_transaction.$(OBJEXT) test_result_slicing.$(OBJEXT) \ test_simultaneous_transactions.$(OBJEXT) \ test_sql_cursor.$(OBJEXT) test_stateless_cursor.$(OBJEXT) \ test_string_conversion.$(OBJEXT) test_test_helpers.$(OBJEXT) \ test_thread_safety_model.$(OBJEXT) runner.$(OBJEXT) runner_OBJECTS = $(am_runner_OBJECTS) am__DEPENDENCIES_1 = runner_DEPENDENCIES = $(top_builddir)/src/libpqxx.la \ $(am__DEPENDENCIES_1) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(runner_SOURCES) DIST_SOURCES = $(runner_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ EXTRA_DIST = Makefile.am.template INCLUDES = -I$(top_builddir)/include -I$(top_builddir)/test -I$(srcdir)/.. -I$(srcdir)/../../include ${POSTGRES_INCLUDE} DEFAULT_INCLUDES = MAINTAINERCLEANFILES = Makefile.in runner_SOURCES = \ test_binarystring.cxx \ test_cancel_query.cxx \ test_error_verbosity.cxx \ test_errorhandler.cxx \ test_escape.cxx \ test_exceptions.cxx \ test_float.cxx \ test_notification.cxx \ test_parameterized.cxx \ test_pipeline.cxx \ test_prepared_statement.cxx \ test_read_transaction.cxx \ test_result_slicing.cxx \ test_simultaneous_transactions.cxx \ test_sql_cursor.cxx \ test_stateless_cursor.cxx \ test_string_conversion.cxx \ test_test_helpers.cxx \ test_thread_safety_model.cxx \ runner.cxx runner_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/unit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu test/unit/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list runner$(EXEEXT): $(runner_OBJECTS) $(runner_DEPENDENCIES) $(EXTRA_runner_DEPENDENCIES) @rm -f runner$(EXEEXT) $(CXXLINK) $(runner_OBJECTS) $(runner_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_binarystring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cancel_query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_error_verbosity.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_errorhandler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_escape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_exceptions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_float.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_notification.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_parameterized.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pipeline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_prepared_statement.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_read_transaction.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_result_slicing.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_simultaneous_transactions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_sql_cursor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stateless_cursor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_string_conversion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_test_helpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_thread_safety_model.Po@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # ###MAKTEMPLATE:FOREACH test/unit/test_*.cxx # ###BASENAME###_SOURCES = ###BASENAME###.cxx # ###BASENAME###_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/test/unit/runner.cxx000066400000000000000000000000311224474465600201250ustar00rootroot00000000000000#include "test_main.hxx" libpqxx-4.0.1+dfsg/test/unit/test_binarystring.cxx000066400000000000000000000072661224474465600224070ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; namespace { binarystring make_binarystring(transaction_base &T, string content) { return binarystring(T.exec("SELECT " + T.quote_raw(content))[0][0]); } void test_binarystring(transaction_base &T) { binarystring b = make_binarystring(T, ""); PQXX_CHECK(b.empty(), "Empty binarystring is not empty."); PQXX_CHECK_EQUAL(b.str(), "", "Empty binarystring doesn't work."); PQXX_CHECK_EQUAL(b.size(), 0u, "Empty binarystring has nonzero size."); PQXX_CHECK_EQUAL(b.length(), 0u, "Length/size mismatch."); PQXX_CHECK(b.begin() == b.end(), "Empty binarystring iterates."); PQXX_CHECK(b.rbegin() == b.rend(), "Empty binarystring reverse-iterates."); PQXX_CHECK_THROWS(b.at(0), out_of_range, "Empty binarystring accepts at()."); b = make_binarystring(T, "z"); PQXX_CHECK_EQUAL(b.str(), "z", "Basic nonempty binarystring is broken."); PQXX_CHECK(!b.empty(), "Nonempty binarystring is empty."); PQXX_CHECK_EQUAL(b.size(), 1u, "Bad binarystring size."); PQXX_CHECK_EQUAL(b.length(), 1u, "Length/size mismatch."); PQXX_CHECK(b.begin() != b.end(), "Nonempty binarystring does not iterate."); PQXX_CHECK( b.rbegin() != b.rend(), "Nonempty binarystring does not reverse-iterate."); PQXX_CHECK(b.begin() + 1 == b.end(), "Bad iteration."); PQXX_CHECK(b.rbegin() + 1 == b.rend(), "Bad reverse iteration."); PQXX_CHECK(b.front() == 'z', "Unexpected front()."); PQXX_CHECK(b.back() == 'z', "Unexpected back()."); PQXX_CHECK(b.at(0) == 'z', "Unexpected data at index 0."); PQXX_CHECK_THROWS(b.at(1), out_of_range, "Failed to catch range error."); const string simple("ab"); b = make_binarystring(T, simple); PQXX_CHECK_EQUAL( b.str(), simple, "Binary (un)escaping went wrong somewhere."); PQXX_CHECK_EQUAL(b.size(), simple.size(), "Escaping confuses length."); const string simple_escaped(T.esc_raw(simple)); for (string::size_type i=0; i(simple_escaped[i]); PQXX_CHECK(uc <= 127, "Non-ASCII byte in escaped string."); } PQXX_CHECK_EQUAL( T.quote_raw( reinterpret_cast(simple.c_str()), simple.size()), T.quote(b), "quote_raw is broken"); PQXX_CHECK_EQUAL( T.quote(b), T.quote_raw(simple), "Binary quoting is broken."); PQXX_CHECK_EQUAL( binarystring(T.exec("SELECT " + T.quote(b))[0][0]).str(), simple, "Binary string is not idempotent."); const string bytes("\x01\x23\x23\xa1\x2b\x0c\xff"); b = make_binarystring(T, bytes); PQXX_CHECK_EQUAL(b.str(), bytes, "Binary data breaks (un)escaping."); const string nully("a\0b", 3); b = make_binarystring(T, nully); PQXX_CHECK_EQUAL(b.str(), nully, "Nul byte broke binary (un)escaping."); PQXX_CHECK_EQUAL(b.size(), 3u, "Nul byte broke binarystring size."); b = make_binarystring(T, "foo"); PQXX_CHECK_EQUAL(string(b.get(), 3), "foo", "get() appears broken."); binarystring b1 = make_binarystring(T, "1"), b2 = make_binarystring(T, "2"); PQXX_CHECK_NOT_EQUAL(b1.get(), b2.get(), "Madness rules."); PQXX_CHECK_NOT_EQUAL(b1.str(), b2.str(), "Logic has no more meaning."); b1.swap(b2); PQXX_CHECK_NOT_EQUAL(b1.str(), b2.str(), "swap() equalized binarystrings."); PQXX_CHECK_NOT_EQUAL(b1.str(), "1", "swap() did not happen."); PQXX_CHECK_EQUAL(b1.str(), "2", "swap() is broken."); PQXX_CHECK_EQUAL(b2.str(), "1", "swap() went insane."); b = make_binarystring(T, "bar"); b.swap(b); PQXX_CHECK_EQUAL(b.str(), "bar", "Self-swap confuses binarystring."); b = make_binarystring(T, "\\x"); PQXX_CHECK_EQUAL(b.str(), "\\x", "Hex-escape header confused (un)escaping."); } } // namespace PQXX_REGISTER_TEST(test_binarystring) libpqxx-4.0.1+dfsg/test/unit/test_cancel_query.cxx000066400000000000000000000010001224474465600223220ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_cancel_query(transaction_base &t) { // Calling cancel_query() while none is in progress has no effect. t.conn().cancel_query(); // Nothing much is guaranteed about cancel_query, except that it doesn't make // the process die in flames. pipeline p(t, "test_cancel_query"); p.retain(0); p.insert("SELECT pg_sleep(1)"); t.conn().cancel_query(); } } // namespace PQXX_REGISTER_TEST(test_cancel_query) libpqxx-4.0.1+dfsg/test/unit/test_error_verbosity.cxx000066400000000000000000000016341224474465600231240ustar00rootroot00000000000000#include "test_helpers.hxx" extern "C" { #include "libpq-fe.h" } using namespace PGSTD; using namespace pqxx; namespace { void test_error_verbosity(transaction_base &trans) { PQXX_CHECK_EQUAL( int(connection_base::terse), int(PQERRORS_TERSE), "error_verbosity enum should match PGVerbosity."); PQXX_CHECK_EQUAL( int(connection_base::normal), int(PQERRORS_DEFAULT), "error_verbosity enum should match PGVerbosity."); PQXX_CHECK_EQUAL( int(connection_base::verbose), int(PQERRORS_VERBOSE), "error_verbosity enum should match PGVerbosity."); PQXX_CHECK_EQUAL( int(trans.conn().get_verbosity()), int(connection_base::normal), "Unexpected initial error verbosity."); trans.conn().set_verbosity(connection_base::terse); PQXX_CHECK_EQUAL( int(trans.conn().get_verbosity()), int(connection_base::terse), "Setting verbosity did not work."); } } // namespace PQXX_REGISTER_TEST(test_error_verbosity) libpqxx-4.0.1+dfsg/test/unit/test_errorhandler.cxx000066400000000000000000000137221224474465600223550ustar00rootroot00000000000000#include #include using namespace PGSTD; using namespace pqxx; namespace { class TestErrorHandler : public errorhandler { public: TestErrorHandler( connection_base &c, vector &activated_handlers, bool retval=true) : errorhandler(c), return_value(retval), message(), handler_list(activated_handlers) {} virtual bool operator()(const char msg[]) throw () { message = string(msg); handler_list.push_back(this); return return_value; } bool return_value; string message; vector &handler_list; }; } // Support printing of TestErrorHandler. namespace pqxx { template<> struct string_traits { typedef TestErrorHandler *subject_type; static const char *name() { return "TestErrorHandler"; } static bool has_null() { return true; } static bool is_null(TestErrorHandler *t) { return !t; } static string to_string(TestErrorHandler *t) { return "TestErrorHandler at " + pqxx::to_string(ptrdiff_t(t)); } }; } namespace { void test_process_notice_calls_errorhandler(connection_base &c) { vector dummy; TestErrorHandler handler(c, dummy); c.process_notice("Error!\n"); PQXX_CHECK_EQUAL(handler.message, "Error!\n", "Error not handled."); } void test_error_handlers_get_called_newest_to_oldest(connection_base &c) { vector handlers; TestErrorHandler h1(c, handlers); TestErrorHandler h2(c, handlers); TestErrorHandler h3(c, handlers); c.process_notice("Warning.\n"); PQXX_CHECK_EQUAL(h3.message, "Warning.\n", "Message not handled."); PQXX_CHECK_EQUAL(h2.message, "Warning.\n", "Broken handling chain."); PQXX_CHECK_EQUAL(h1.message, "Warning.\n", "Insane handling chain."); PQXX_CHECK_EQUAL(handlers.size(), 3u, "Wrong number of handler calls."); PQXX_CHECK_EQUAL(&h3, handlers[0], "Unexpected handling order."); PQXX_CHECK_EQUAL(&h2, handlers[1], "Insane handling order."); PQXX_CHECK_EQUAL(&h1, handlers[2], "Impossible handling order."); } void test_returning_false_stops_error_handling(connection_base &c) { vector handlers; TestErrorHandler starved(c, handlers); TestErrorHandler blocker(c, handlers, false); c.process_notice("Error output.\n"); PQXX_CHECK_EQUAL(handlers.size(), 1u, "Handling chain was not stopped."); PQXX_CHECK_EQUAL(handlers[0], &blocker, "Wrong handler got message."); PQXX_CHECK_EQUAL(blocker.message, "Error output.\n", "Didn't get message."); PQXX_CHECK_EQUAL(starved.message, "", "Message received; it shouldn't be."); } void test_destroyed_error_handlers_are_not_called(connection_base &c) { vector handlers; { TestErrorHandler doomed(c, handlers); } c.process_notice("Unheard output."); PQXX_CHECK(handlers.empty(), "Message was received on dead errorhandler."); } void test_destroying_connection_unregisters_handlers() { TestErrorHandler *survivor; vector handlers; { connection c; survivor = new TestErrorHandler(c, handlers); } // Make some pointless use of survivor just to prove that this doesn't crash. (*survivor)("Hi"); PQXX_CHECK_EQUAL( handlers.size(), 1u, "Ghost of dead ex-connection haunts handler."); } class MinimalErrorHandler: public errorhandler { public: MinimalErrorHandler(connection_base &c) : errorhandler(c) {} virtual bool operator()(const char[]) throw () { return true; } }; void test_get_errorhandlers(connection_base &c) { MinimalErrorHandler *eh3 = NULL; const vector handlers_before = c.get_errorhandlers(); const size_t base_handlers = handlers_before.size(); { MinimalErrorHandler eh1(c); const vector handlers_with_eh1 = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_with_eh1.size(), base_handlers + 1, "Registering a handler didn't create exactly one handler."); PQXX_CHECK_EQUAL( size_t(*handlers_with_eh1.rbegin()), size_t(&eh1), "Wrong handler or wrong order."); { MinimalErrorHandler eh2(c); const vector handlers_with_eh2 = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_with_eh2.size(), base_handlers + 2, "Adding second handler didn't work."); PQXX_CHECK_EQUAL( size_t(*(handlers_with_eh2.rbegin() + 1)), size_t(&eh1), "Second handler upset order."); PQXX_CHECK_EQUAL( size_t(*handlers_with_eh2.rbegin()), size_t(&eh2), "Second handler isn't right."); } const vector handlers_without_eh2 = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_without_eh2.size(), base_handlers + 1, "Handler destruction produced wrong-sized handlers list."); PQXX_CHECK_EQUAL( size_t(*handlers_without_eh2.rbegin()), size_t(&eh1), "Destroyed wrong handler."); eh3 = new MinimalErrorHandler(c); const vector handlers_with_eh3 = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_with_eh3.size(), base_handlers + 2, "Remove-and-add breaks."); PQXX_CHECK_EQUAL( size_t(*handlers_with_eh3.rbegin()), size_t(eh3), "Added wrong third handler."); } const vector handlers_without_eh1 = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_without_eh1.size(), base_handlers + 1, "Destroying oldest handler didn't work as expected."); PQXX_CHECK_EQUAL( size_t(*handlers_without_eh1.rbegin()), size_t(eh3), "Destroyed wrong handler."); delete eh3; const vector handlers_without_all = c.get_errorhandlers(); PQXX_CHECK_EQUAL( handlers_without_all.size(), base_handlers, "Destroying all custom handlers didn't work as expected."); } void test_errorhandler(transaction_base &t) { test_process_notice_calls_errorhandler(t.conn()); test_error_handlers_get_called_newest_to_oldest(t.conn()); test_returning_false_stops_error_handling(t.conn()); test_destroyed_error_handlers_are_not_called(t.conn()); test_destroying_connection_unregisters_handlers(); test_get_errorhandlers(t.conn()); } } // namespace PQXX_REGISTER_TEST(test_errorhandler) libpqxx-4.0.1+dfsg/test/unit/test_escape.cxx000066400000000000000000000046731224474465600211330ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void compare_esc(connection_base &c, transaction_base &t, const char str[]) { const size_t len = string(str).size(); PQXX_CHECK_EQUAL(c.esc(str, len), t.esc(str, len), "Connection & transaction escape differently."); PQXX_CHECK_EQUAL(t.esc(str, len), t.esc(str), "Length argument to esc() changes result."); PQXX_CHECK_EQUAL(t.esc(string(str)), t.esc(str), "esc(std::string()) differs from esc(const char[])."); PQXX_CHECK_EQUAL(str, t.exec("SELECT '" + t.esc(str, len) + "'")[0][0].as(), "esc() is not idempotent."); PQXX_CHECK_EQUAL(t.esc(str, len), t.esc(str), "Oversized buffer affects esc()."); } void test_esc(connection_base &c, transaction_base &t) { PQXX_CHECK_EQUAL(t.esc("", 0), "", "Empty string doesn't escape properly."); PQXX_CHECK_EQUAL(t.esc("'", 1), "''", "Single quote escaped incorrectly."); const char *const escstrings[] = { "x", " ", "", NULL }; for (size_t i=0; escstrings[i]; ++i) compare_esc(c, t, escstrings[i]); } void test_quote(connection_base &c, transaction_base &t) { PQXX_CHECK_EQUAL(t.quote("x"), "'x'", "Basic quote() fails."); PQXX_CHECK_EQUAL(t.quote(1), "'1'", "quote() not dealing with int properly."); PQXX_CHECK_EQUAL(t.quote(0), "'0'", "Quoting zero is a problem."); const char *const null_ptr = NULL; PQXX_CHECK_EQUAL(t.quote(null_ptr), "NULL", "Not quoting NULL correctly."); PQXX_CHECK_EQUAL(t.quote(string("'")), "''''", "Escaping quotes goes wrong."); PQXX_CHECK_EQUAL(t.quote("x"), c.quote("x"), "Connection and transaction quote differently."); const char *test_strings[] = { "", "x", "\\", "\\\\", "'", "''", "\\'", "\t", "\n", NULL }; for (size_t i=0; test_strings[i]; ++i) { result r = t.exec("SELECT " + t.quote(test_strings[i])); PQXX_CHECK_EQUAL( r[0][0].as(), test_strings[i], "Selecting quoted string does not come back equal."); } } void test_quote_name(transaction_base &t) { PQXX_CHECK_EQUAL( "\"A b\"", t.quote_name("A b"), "Escaped identifier is not as expected."); PQXX_CHECK_EQUAL( string("A b"), t.exec("SELECT 1 AS " + t.quote_name("A b")).column_name(0), "Escaped identifier does not work in SQL."); } void test_escaping(transaction_base &t) { test_esc(t.conn(), t); test_quote(t.conn(), t); test_quote_name(t); } } // namespace PQXX_REGISTER_TEST(test_escaping) libpqxx-4.0.1+dfsg/test/unit/test_exceptions.cxx000066400000000000000000000013411224474465600220410ustar00rootroot00000000000000#include #include using namespace PGSTD; using namespace pqxx; namespace { void test_exceptions(transaction_base &) { const string broken_query = "SELECT HORRIBLE ERROR", err = "Error message"; try { throw sql_error(err, broken_query); } catch (const pqxx_exception &e) { PQXX_CHECK_EQUAL(e.base().what(), err, "Exception contains wrong message."); const sql_error *downcast = dynamic_cast(&e.base()); PQXX_CHECK(downcast, "pqxx_exception-to-sql_error downcast is broken."); PQXX_CHECK_EQUAL( downcast->query(), broken_query, "Getting query from pqxx_exception is broken."); } } } // namespace PQXX_REGISTER_TEST_NODB(test_exceptions) libpqxx-4.0.1+dfsg/test/unit/test_float.cxx000066400000000000000000000013521224474465600207670ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { template T make_infinity() { return #ifdef PQXX_HAVE_LIMITS numeric_limits::infinity(); #else INFINITY; #endif } void infinity_test(transaction_base &) { double inf = make_infinity(); string inf_string; double back_conversion; inf_string = to_string(inf); from_string(inf_string, back_conversion); PQXX_CHECK_LESS( 999999999, back_conversion, "Infinity doesn't convert back to something huge."); inf_string = to_string(-inf); from_string(inf_string, back_conversion); PQXX_CHECK_LESS(back_conversion, -999999999, "Negative infinity is broken"); } } // namespace PQXX_REGISTER_TEST_NODB(infinity_test) libpqxx-4.0.1+dfsg/test/unit/test_notification.cxx000066400000000000000000000034131224474465600223500ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { class TestReceiver : public notification_receiver { public: string payload; int backend_pid; bool done; TestReceiver(connection_base &c, const string &channel_name) : notification_receiver(c, channel_name), payload(), backend_pid(0) { } virtual void operator()(const string &payload_string, int backend) { this->payload = payload_string; this->backend_pid = backend; } }; void test_receive( transaction_base &t, const string &channel, const char payload[] = NULL) { connection_base &conn(t.conn()); string SQL = "NOTIFY \"" + channel + "\""; if (payload) SQL += ", " + t.quote(payload); TestReceiver receiver(t.conn(), channel); // Clear out any previously pending notifications that might otherwise // confuse the test. conn.get_notifs(); // Notify, and receive. t.exec(SQL); t.commit(); int notifs = 0; for (int i=0; (i < 10) && !notifs; ++i, pqxx::internal::sleep_seconds(1)) notifs = conn.get_notifs(); PQXX_CHECK_EQUAL(notifs, 1, "Got wrong number of notifications."); PQXX_CHECK_EQUAL(receiver.backend_pid, conn.backendpid(), "Bad pid."); if (payload) PQXX_CHECK_EQUAL(receiver.payload, payload, "Bad payload."); else PQXX_CHECK(receiver.payload.empty(), "Unexpected payload."); } void test_notification(transaction_base &t) { connection_base &conn(t.conn()); TestReceiver receiver(conn, "mychannel"); PQXX_CHECK_EQUAL(receiver.channel(), "mychannel", "Bad channel."); test_receive(t, "channel1"); if (conn.supports(connection_base::cap_notify_payload)) { nontransaction u(conn); test_receive(u, "channel2", "payload"); } } } // namespace PQXX_REGISTER_TEST_T(test_notification, nontransaction) libpqxx-4.0.1+dfsg/test/unit/test_parameterized.cxx000066400000000000000000000012151224474465600225140ustar00rootroot00000000000000#include "test_helpers.hxx" #include "pqxx/config-internal-libpq.h" using namespace PGSTD; using namespace pqxx; namespace { void test_exec_params(transaction_base &trans) { if (!trans.conn().supports(connection_base::cap_parameterized_statements)) return; result r = trans.parameterized("SELECT $1 + 1")(12).exec(); PQXX_CHECK_EQUAL( r[0][0].as(), 13, "Bad outcome from parameterized statement."); r = trans.parameterized("SELECT $1 || 'bar'")("foo").exec(); PQXX_CHECK_EQUAL( r[0][0].as(), "foobar", "Incorrect string result from parameterized statement."); } } // namespace PQXX_REGISTER_TEST(test_exec_params) libpqxx-4.0.1+dfsg/test/unit/test_pipeline.cxx000066400000000000000000000033171224474465600214720ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_pipeline(transaction_base &trans) { // A pipeline grabs transaction focus, blocking regular queries and such. pipeline pipe(trans, "test_pipeline_detach"); PQXX_CHECK_THROWS( trans.exec("SELECT 1"), logic_error, "Pipeline does not block regular queries"); // Flushing a pipeline relinquishes transaction focus. pipe.flush(); result r = trans.exec("SELECT 2"); PQXX_CHECK_EQUAL(r.size(), 1u, "Wrong query result after flushing pipeline."); PQXX_CHECK_EQUAL( r[0][0].as(), 2, "Query returns wrong data after flushing pipeline."); // Inserting a query makes the pipeline grab transaction focus back. pipeline::query_id q = pipe.insert("SELECT 2"); PQXX_CHECK_THROWS( trans.exec("SELECT 3"), logic_error, "Pipeline does not block regular queries"); // Invoking complete() also detaches the pipeline from the transaction. pipe.complete(); r = trans.exec("SELECT 4"); PQXX_CHECK_EQUAL(r.size(), 1u, "Wrong query result after complete()."); PQXX_CHECK_EQUAL( r[0][0].as(), 4, "Query returns wrong data after complete()."); // The complete() also received any pending query results from the backend. r = pipe.retrieve(q); PQXX_CHECK_EQUAL(r.size(), 1u, "Wrong result from pipeline."); PQXX_CHECK_EQUAL( r[0][0].as(), 2, "Pipeline returned wrong data."); // We can cancel while the pipe is empty, and things will still work. pipe.cancel(); // Issue a query and cancel it. pipe.retain(0); pipe.insert("pg_sleep(10)"); pipe.cancel(); // TODO: Measure time to ensure we don't really wait. } } // namespace PQXX_REGISTER_TEST(test_pipeline) libpqxx-4.0.1+dfsg/test/unit/test_prepared_statement.cxx000066400000000000000000000136011224474465600235500ustar00rootroot00000000000000#include #include #include #include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; // Test program for libpqxx. Define and use prepared statements. #define COMPARE_RESULTS(name, lhs, rhs) \ PQXX_CHECK_EQUAL( \ rhs, \ lhs, \ "Executing " name " as prepared statement yields different results."); namespace { string stringize(transaction_base &t, const string &arg) { return "'" + t.esc(arg) + "'"; } template string stringize(transaction_base &t, T i) { return stringize(t, to_string(i)); } // Substitute variables in raw query. This is not likely to be very robust, // but it should do for just this test. The main shortcomings are escaping, // and not knowing when to quote the variables. // Note we do the replacement backwards (meaning forward_only iterators won't // do!) to avoid substituting e.g. "$12" as "$1" first. template string subst(transaction_base &t, string q, ITER patbegin, ITER patend) { ptrdiff_t i = pqxx::internal::distance(patbegin, patend); for (ITER arg = patend; i > 0; --i) { --arg; const string marker = "$" + to_string(i), var = stringize(t, *arg); const string::size_type msz = marker.size(); while (q.find(marker) != string::npos) q.replace(q.find(marker),msz,var); } return q; } template string subst(transaction_base &t, string q, const CNTNR &patterns) { return subst(t, q, patterns.begin(), patterns.end()); } void test_prepared_statement(transaction_base &T) { connection_base &C(T.conn()); const string Q_readpgtables = "SELECT * FROM pg_tables", Q_seetable = Q_readpgtables + " WHERE tablename = $1", Q_seetables = Q_seetable + " OR tablename = $2"; try { PQXX_CHECK( !(T.prepared("CountToTen").exists()), "Nonexistent prepared statement thinks it exists."); // Prepare a simple statement. C.prepare("CountToTen", "SELECT * FROM generate_series(1, 10)"); PQXX_CHECK( T.prepared("CountToTen").exists(), "Prepared statement thinks it doesn't exist."); // See if a basic prepared statement works just like a regular query. PQXX_CHECK_EQUAL( T.prepared("CountToTen").exec(), T.exec("SELECT * FROM generate_series(1, 10)"), "CountToTen"); } catch (const feature_not_supported &) { cout << "Backend version does not support prepared statements. Skipping." << endl; return; } // Try prepare_now() on an already prepared statement. C.prepare_now("CountToTen"); // Drop prepared statement. C.unprepare("CountToTen"); PQXX_CHECK_THROWS( C.prepare_now("CountToTen"), exception, "prepare_now() succeeded on dropped statement."); // It's okay to unprepare a statement repeatedly. C.unprepare("CountToTen"); C.unprepare("CountToTen"); // Executing an unprepared statement fails. PQXX_CHECK_THROWS( T.prepared("CountToTen").exec(), exception, "Execute unprepared statement didn't fail."); // Once unprepared, a statement can be prepared and used again. C.prepare("CountToTen", "SELECT generate_series FROM generate_series(1, 10)"); C.prepare_now("CountToTen"); COMPARE_RESULTS("CountToTen_2", T.prepared("CountToTen").exec(), T.exec("SELECT * FROM generate_series(1, 10)")); // Double preparation of identical statement should be ignored... C.prepare("CountToTen", "SELECT generate_series FROM generate_series(1, 10)"); COMPARE_RESULTS("CountToTen_double", T.prepared("CountToTen").exec(), T.exec("SELECT * FROM generate_series(1, 10)")); // ...But a modified definition shouldn't. PQXX_CHECK_THROWS( C.prepare( "CountToTen", "SELECT generate_series FROM generate_series(1, 11)"), exception, "Bad redefinition of statement went unnoticed."); // Test prepared statement with parameter. C.prepare("CountUpToTen", "SELECT * FROM generate_series($1, 10)"); vector args; args.push_back(2); COMPARE_RESULTS("CountUpToTen_seq", T.prepared("CountUpToTen")(args[0]).exec(), T.exec(subst(T, "SELECT * FROM generate_series($1, 10)", args))); // Test prepared statement with 2 parameters. C.prepare("CountRange", "SELECT * FROM generate_series($1::int, $2::int)"); COMPARE_RESULTS("CountRange_seq", T.prepared("CountRange")(2)(5).exec(), T.exec("SELECT * FROM generate_series(2, 5)")); // Test prepared statement with a null parameter. vector ptrs; ptrs.push_back(0); ptrs.push_back("99"); COMPARE_RESULTS("CountRange_null1", T.prepared("CountRange")(ptrs[0])(ptrs[1]).exec(), T.exec("SELECT * FROM generate_series(NULL, 99)")); // Test prepared statement with a binary parameter. C.prepare("GimmeBinary", "SELECT $1::bytea"); const binarystring bin_data(string("x \x01 \x02 \xff y")); PQXX_CHECK_EQUAL( binarystring(T.prepared("GimmeBinary")(bin_data).exec()[0][0]).str(), bin_data.str(), "Binary parameter was mangled somewhere along the way."); const binarystring nully("x\0y", 3); PQXX_CHECK_EQUAL( binarystring(T.prepared("GimmeBinary")(nully).exec()[0][0]).str(), nully.str(), "Binary string breaks on nul byte."); if (C.supports(connection_base::cap_prepare_unnamed_statement)) { // Test unnamed prepared statement. C.prepare("SELECT 2*$1"); int outcome = T.prepared()(9).exec()[0][0].as(); PQXX_CHECK_EQUAL(outcome, 18, "Unnamed prepared statement went mad."); // Redefine unnamed prepared statement. Does not need to be unprepared // first. C.prepare("SELECT 2*$1 + $2"); outcome = T.prepared()(9)(2).exec()[0][0].as(); PQXX_CHECK_EQUAL(outcome, 20, "Unnamed statement not properly redefined."); // Unlike how the unnamed prepared statement works in libpq, we can issue // other queries and then re-use the unnamed prepared statement. T.exec("SELECT 12"); outcome = T.prepared()(3)(1).exec()[0][0].as(); PQXX_CHECK_EQUAL(outcome, 7, "Unnamed statement isn't what it was."); } } } // namespace PQXX_REGISTER_TEST(test_prepared_statement) libpqxx-4.0.1+dfsg/test/unit/test_read_transaction.cxx000066400000000000000000000011171224474465600232010ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_read_transaction(transaction_base &trans) { PQXX_CHECK_EQUAL( trans.exec("SELECT 1")[0][0].as(), 1, "Bad result from read transaction."); // This error terminates the test on 7.4 backends, so can't test for it there. if (trans.conn().server_version() >= 80000) PQXX_CHECK_THROWS( trans.exec("CREATE TABLE should_not_exist(x integer)"), sql_error, "Read-only transaction allows database to be modified."); } } PQXX_REGISTER_TEST_T(test_read_transaction, read_transaction) libpqxx-4.0.1+dfsg/test/unit/test_result_slicing.cxx000066400000000000000000000076521224474465600227210ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace pqxx { template<> struct PQXX_PRIVATE string_traits { static const char *name() { return "tuple::const_iterator"; } static bool has_null() { return false; } static bool is_null(tuple::const_iterator) { return false; } static string to_string(tuple::const_iterator) { return "[tuple::const_iterator]"; } }; template<> struct PQXX_PRIVATE string_traits { static const char *name() { return "tuple::const_reverse_iterator"; } static bool has_null() { return false; } static bool is_null(tuple::const_reverse_iterator) { return false; } static string to_string(tuple::const_reverse_iterator) { return "[tuple::const_reverse_iterator]"; } }; } namespace { void test_result_slicing(transaction_base &t) { result r = t.exec("SELECT 1"); PQXX_CHECK(!r[0].empty(), "A plain tuple shows up as empty."); // Empty slice at beginning of tuple. pqxx::tuple s = r[0].slice(0, 0); PQXX_CHECK(s.empty(), "Empty slice does not show up as empty."); PQXX_CHECK_EQUAL(s.size(), 0u, "Slicing produces wrong tuple size."); PQXX_CHECK_EQUAL(s.begin(), s.end(), "Slice begin()/end() are broken."); PQXX_CHECK_EQUAL(s.rbegin(), s.rend(), "Slice rbegin()/rend() are broken."); PQXX_CHECK_THROWS(s.at(0), pqxx::range_error, "at() does not throw."); PQXX_CHECK_THROWS(r[0].slice(0, 2), pqxx::range_error, "No range check."); PQXX_CHECK_THROWS(r[0].slice(1, 0), pqxx::range_error, "Can reverse-slice."); // Empty slice at end of tuple. s = r[0].slice(1, 1); PQXX_CHECK(s.empty(), "empty() is broken."); PQXX_CHECK_EQUAL(s.size(), 0u, "size() is broken."); PQXX_CHECK_EQUAL(s.begin(), s.end(), "begin()/end() are broken."); PQXX_CHECK_EQUAL(s.rbegin(), s.rend(), "rbegin()/rend() are broken."); PQXX_CHECK_THROWS(s.at(0), pqxx::range_error, "at() is inconsistent."); // Slice that matches the entire tuple. s = r[0].slice(0, 1); PQXX_CHECK(!s.empty(), "Nonempty slice shows up as empty."); PQXX_CHECK_EQUAL(s.size(), 1u, "size() breaks for non-empty slice."); PQXX_CHECK_EQUAL(s.begin() + 1, s.end(), "Iteration is broken."); PQXX_CHECK_EQUAL(s.rbegin() + 1, s.rend(), "Reverse iteration is broken."); PQXX_CHECK_EQUAL(s.at(0).as(), 1, "Accessing a slice is broken."); PQXX_CHECK_EQUAL(s[0].as(), 1, "operator[] is broken."); PQXX_CHECK_THROWS(s.at(1).as(), pqxx::range_error, "at() is off."); // Meaningful slice at beginning of tuple. r = t.exec("SELECT 1, 2, 3"); s = r[0].slice(0, 1); PQXX_CHECK(!s.empty(), "Slicing confuses empty()."); PQXX_CHECK_THROWS( s.at(1).as(), pqxx::range_error, "at() does not enforce slice."); // Meaningful slice that skips an initial column. s = r[0].slice(1, 2); PQXX_CHECK(!s.empty(), "Slicing away leading columns confuses empty()."); PQXX_CHECK_EQUAL(s[0].as(), 2, "Slicing offset is broken."); PQXX_CHECK_EQUAL(s.begin()->as(), 2, "Iteration uses wrong offset."); PQXX_CHECK_EQUAL(s.begin() + 1, s.end(), "Iteration has wrong range."); PQXX_CHECK_EQUAL( s.rbegin() + 1, s.rend(), "Reverse iteration has wrong range."); PQXX_CHECK_THROWS( s.at(1).as(), pqxx::range_error, "Offset slicing is broken."); // Column names in a slice. r = t.exec("SELECT 1 AS one, 2 AS two, 3 AS three"); s = r[0].slice(1, 2); PQXX_CHECK_EQUAL(s["two"].as(), 2, "Column addressing breaks."); PQXX_CHECK_THROWS( s.column_number("one"), argument_error, "Can access column name before slice."); PQXX_CHECK_THROWS( s.column_number("three"), argument_error, "Can access column name after slice."); PQXX_CHECK_EQUAL( s.column_number("Two"), 0u, "Column name is case sensitive."); // Identical column names. r = t.exec("SELECT 1 AS x, 2 AS x"); s = r[0].slice(1, 2); PQXX_CHECK_EQUAL(s["x"].as(), 2, "Identical column names break slice."); } } // namespace PQXX_REGISTER_TEST(test_result_slicing) libpqxx-4.0.1+dfsg/test/unit/test_simultaneous_transactions.cxx000066400000000000000000000006121224474465600252000ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_simultaneous_transactions(transaction_base &t) { connection_base &c(t.conn()); t.abort(); nontransaction n1(c); PQXX_CHECK_THROWS( nontransaction n2(c), logic_error, "Allowed to open simultaneous nontransactions."); } } // namespace PQXX_REGISTER_TEST(test_simultaneous_transactions) libpqxx-4.0.1+dfsg/test/unit/test_sql_cursor.cxx000066400000000000000000000261561224474465600220670ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_forward_sql_cursor(transaction_base &trans) { // Plain owned, scoped, forward-only read-only cursor. internal::sql_cursor forward( trans, pqxx::test::select_series(trans.conn(), 1, 4), "forward", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false); PQXX_CHECK_EQUAL(forward.pos(), 0, "Wrong initial position"); PQXX_CHECK_EQUAL(forward.endpos(), -1, "Wrong initial endpos()"); result empty_result = forward.empty_result(); PQXX_CHECK_EQUAL(empty_result.size(), 0u, "Empty result not empty"); cursor_base::difference_type displacement = 0; result one = forward.fetch(1, displacement); PQXX_CHECK_EQUAL(one.size(), 1u, "Fetched wrong number of rows"); PQXX_CHECK_EQUAL(one[0][0].as(), "1", "Unexpected result"); PQXX_CHECK_EQUAL(displacement, 1, "Wrong displacement"); PQXX_CHECK_EQUAL(forward.pos(), 1, "In wrong position"); cursor_base::difference_type offset = forward.move(1, displacement); PQXX_CHECK_EQUAL(offset, 1, "Unexpected offset from move()"); PQXX_CHECK_EQUAL(displacement, 1, "Unexpected displacement after move()"); PQXX_CHECK_EQUAL(forward.pos(), 2, "Wrong position after move()"); PQXX_CHECK_EQUAL(forward.endpos(), -1, "endpos() unexpectedly set"); result row = forward.fetch(0, displacement); PQXX_CHECK_EQUAL(row.size(), 0u, "fetch(0, displacement) returns rows"); PQXX_CHECK_EQUAL(displacement, 0, "Unexpected displacement after fetch(0)"); PQXX_CHECK_EQUAL(forward.pos(), 2, "fetch(0, displacement) affected pos()"); row = forward.fetch(0); PQXX_CHECK_EQUAL(row.size(), 0u, "fetch(0) fetched wrong number of rows"); PQXX_CHECK_EQUAL(forward.pos(), 2, "fetch(0) moved cursor"); PQXX_CHECK_EQUAL(forward.pos(), 2, "fetch(0) affected pos()"); offset = forward.move(1); PQXX_CHECK_EQUAL(offset, 1, "move(1) returned unexpected value"); PQXX_CHECK_EQUAL(forward.pos(), 3, "move(1) after fetch(0) broke"); row = forward.fetch(1); PQXX_CHECK_EQUAL(row.size(), 1u, "fetch(1) returned wrong number of rows"); PQXX_CHECK_EQUAL(forward.pos(), 4, "fetch(1) results in bad pos()"); PQXX_CHECK_EQUAL(row[0][0].as(), "4", "pos() is lying"); empty_result = forward.fetch(1, displacement); PQXX_CHECK_EQUAL(empty_result.size(), 0u, "Got rows at end of cursor"); PQXX_CHECK_EQUAL(forward.pos(), 5, "Not at one-past-end position"); PQXX_CHECK_EQUAL(forward.endpos(), 5, "Failed to notice end position"); PQXX_CHECK_EQUAL(displacement, 1, "Wrong displacement at end position"); offset = forward.move(5, displacement); PQXX_CHECK_EQUAL(offset, 0, "move() lied at end of result set"); PQXX_CHECK_EQUAL(forward.pos(), 5, "pos() is beyond end"); PQXX_CHECK_EQUAL(forward.endpos(), 5, "endpos() changed after end position"); PQXX_CHECK_EQUAL(displacement, 0, "Wrong displacement after end position"); // Move through entire result set at once. internal::sql_cursor forward2( trans, pqxx::test::select_series(trans.conn(), 1, 4), "forward", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false); // Move through entire result set at once. offset = forward2.move(cursor_base::all(), displacement); PQXX_CHECK_EQUAL(offset, 4, "Unexpected number of rows in result set"); PQXX_CHECK_EQUAL(displacement, 5, "displacement != rows+1"); PQXX_CHECK_EQUAL(forward2.pos(), 5, "Bad pos() after skipping all rows"); PQXX_CHECK_EQUAL(forward2.endpos(), 5, "Bad endpos() after skipping"); internal::sql_cursor forward3( trans, pqxx::test::select_series(trans.conn(), 1, 4), "forward", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false); // Fetch entire result set at once. result rows = forward3.fetch(cursor_base::all(), displacement); PQXX_CHECK_EQUAL(rows.size(), 4u, "Unexpected number of rows in result set"); PQXX_CHECK_EQUAL(displacement, 5, "displacement != rows+1"); PQXX_CHECK_EQUAL(forward3.pos(), 5, "Bad pos() after fetching all rows"); PQXX_CHECK_EQUAL(forward3.endpos(), 5, "Bad endpos() after fetching"); internal::sql_cursor forward_empty( trans, pqxx::test::select_series(trans.conn(), 0, -1), "forward_empty", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false); offset = forward_empty.move(3, displacement); PQXX_CHECK_EQUAL(forward_empty.pos(), 1, "Bad pos() at end of result"); PQXX_CHECK_EQUAL(forward_empty.endpos(), 1, "Bad endpos() in empty result"); PQXX_CHECK_EQUAL(displacement, 1, "Bad displacement in empty result"); PQXX_CHECK_EQUAL(offset, 0, "move() in empty result counted rows"); } void test_scroll_sql_cursor(transaction_base &trans) { internal::sql_cursor scroll( trans, pqxx::test::select_series(trans.conn(), 1, 10), "scroll", cursor_base::random_access, cursor_base::read_only, cursor_base::owned, false); PQXX_CHECK_EQUAL(scroll.pos(), 0, "Scroll cursor's initial pos() is wrong"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "New scroll cursor has endpos() set"); result rows = scroll.fetch(cursor_base::next()); PQXX_CHECK_EQUAL(rows.size(), 1u, "Scroll cursor is broken"); PQXX_CHECK_EQUAL(scroll.pos(), 1, "Scroll cursor's pos() is broken"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "endpos() set prematurely"); // Turn cursor around. This is where we begin to feel SQL cursors' semantics: // we pre-decrement, ending up on the position in front of the first row and // returning no rows. rows = scroll.fetch(cursor_base::prior()); PQXX_CHECK_EQUAL(rows.empty(), true, "Turning around on fetch() broke"); PQXX_CHECK_EQUAL(scroll.pos(), 0, "pos() is not back at zero"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "endpos() set on wrong side of result"); // Bounce off the left-hand side of the result set. Can't move before the // starting position. cursor_base::difference_type offset = 0, displacement = 0; offset = scroll.move(-3, displacement); PQXX_CHECK_EQUAL(offset, 0, "Rows found before beginning"); PQXX_CHECK_EQUAL(displacement, 0, "Failed to bounce off beginning"); PQXX_CHECK_EQUAL(scroll.pos(), 0, "pos() moved back from zero"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "endpos() set on left-side bounce"); // Try bouncing off the left-hand side a little harder. Take 4 paces away // from the boundary and run into it. offset = scroll.move(4, displacement); PQXX_CHECK_EQUAL(offset, 4, "Offset mismatch"); PQXX_CHECK_EQUAL(displacement, 4, "Displacement mismatch"); PQXX_CHECK_EQUAL(scroll.pos(), 4, "Position mismatch"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "endpos() set at weird time"); offset = scroll.move(-10, displacement); PQXX_CHECK_EQUAL(offset, 3, "Offset mismatch"); PQXX_CHECK_EQUAL(displacement, -4, "Displacement mismatch"); PQXX_CHECK_EQUAL(scroll.pos(), 0, "Hard bounce failed"); PQXX_CHECK_EQUAL(scroll.endpos(), -1, "endpos() set during hard bounce"); rows = scroll.fetch(3); PQXX_CHECK_EQUAL(scroll.pos(), 3, "Bad pos()"); PQXX_CHECK_EQUAL(rows.size(), 3u, "Wrong number of rows"); PQXX_CHECK_EQUAL(rows[2][0].as(), 3, "pos() does not match data"); rows = scroll.fetch(-1); PQXX_CHECK_EQUAL(scroll.pos(), 2, "Bad pos()"); PQXX_CHECK_EQUAL(rows[0][0].as(), 2, "pos() does not match data"); rows = scroll.fetch(1); PQXX_CHECK_EQUAL(scroll.pos(), 3, "Bad pos() after inverse turnaround"); PQXX_CHECK_EQUAL(rows[0][0].as(), 3, "Data position mismatch"); } void test_adopted_sql_cursor(connection_base &conn, transaction_base &trans) { trans.exec( "DECLARE adopted SCROLL CURSOR FOR " + pqxx::test::select_series(conn, 1, 3)); internal::sql_cursor adopted(trans, "adopted", cursor_base::owned); PQXX_CHECK_EQUAL(adopted.pos(), -1, "Adopted cursor has known pos()"); PQXX_CHECK_EQUAL(adopted.endpos(), -1, "Adopted cursor has known endpos()"); cursor_base::difference_type displacement = 0; result rows = adopted.fetch(cursor_base::all(), displacement); PQXX_CHECK_EQUAL(rows.size(), 3u, "Wrong number of rows in result"); PQXX_CHECK_EQUAL(rows[0][0].as(), 1, "Wrong result data"); PQXX_CHECK_EQUAL(rows[2][0].as(), 3, "Wrong result data"); PQXX_CHECK_EQUAL(displacement, 4, "Wrong displacement"); PQXX_CHECK_EQUAL(adopted.pos(), -1, "End-of-result set pos() on adopted cur"); PQXX_CHECK_EQUAL(adopted.endpos(), -1, "endpos() set too early"); rows = adopted.fetch(cursor_base::backward_all(), displacement); PQXX_CHECK_EQUAL(rows.size(), 3u, "Wrong number of rows in result"); PQXX_CHECK_EQUAL(rows[0][0].as(), 3, "Wrong result data"); PQXX_CHECK_EQUAL(rows[2][0].as(), 1, "Wrong result data"); PQXX_CHECK_EQUAL(displacement, -4, "Wrong displacement"); PQXX_CHECK_EQUAL(adopted.pos(), 0, "Failed to recognize starting position"); PQXX_CHECK_EQUAL(adopted.endpos(), -1, "endpos() set too early"); cursor_base::difference_type offset = adopted.move(cursor_base::all()); PQXX_CHECK_EQUAL(offset, 3, "Unexpected move() offset"); PQXX_CHECK_EQUAL(adopted.pos(), 4, "Bad position on adopted cursor"); PQXX_CHECK_EQUAL(adopted.endpos(), 4, "endpos() not set properly"); // Owned adopted cursors are cleaned up on destruction. connection conn2; work trans2(conn2, "trans2"); pqxx::test::prepare_series(trans2, 0, 5); trans2.exec( "DECLARE adopted2 CURSOR FOR " + pqxx::test::select_series(conn2, 1, 3)); { internal::sql_cursor(trans2, "adopted2", cursor_base::owned); } if (conn2.server_version() >= 80000) { // Modern backends: accessing the cursor now is an error, as you'd expect. PQXX_CHECK_THROWS( trans2.exec("FETCH 1 IN adopted2"), sql_error, "Owned adopted cursor not cleaned up"); } else { // Old backends: see that we can at least create a new cursor with the same // name. trans2.exec("DECLARE adopted2 CURSOR FOR SELECT TRUE"); } trans2.abort(); work trans3(conn2, "trans3"); pqxx::test::prepare_series(trans3, 1, 3); trans3.exec( "DECLARE adopted3 CURSOR FOR " + pqxx::test::select_series(conn2, 1, 3)); { internal::sql_cursor(trans3, "adopted3", cursor_base::loose); } trans3.exec("MOVE 1 IN adopted3"); } void test_hold_cursor(connection_base &conn, transaction_base &trans) { // "WITH HOLD" cursors require backend version 7.4 or better. if (conn.server_version() <= 70400) return; // "With hold" cursor is kept after commit. internal::sql_cursor with_hold( trans, pqxx::test::select_series(conn, 1, 3), "hold_cursor", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, true); trans.commit(); work trans2(conn, "trans2"); result rows = with_hold.fetch(1); PQXX_CHECK_EQUAL(rows.size(), 1u, "Did not get 1 row from with-hold cursor"); // Cursor without hold is closed on commit. internal::sql_cursor no_hold( trans2, pqxx::test::select_series(conn, 1, 3), "no_hold_cursor", cursor_base::forward_only, cursor_base::read_only, cursor_base::owned, false); trans2.commit(); work trans3(conn, "trans3"); PQXX_CHECK_THROWS(no_hold.fetch(1), sql_error, "Cursor not closed on commit"); } void cursor_tests(transaction_base &t) { test_forward_sql_cursor(t); test_scroll_sql_cursor(t); test_adopted_sql_cursor(t.conn(), t); test_hold_cursor(t.conn(), t); } } // namespace PQXX_REGISTER_TEST(cursor_tests) libpqxx-4.0.1+dfsg/test/unit/test_stateless_cursor.cxx000066400000000000000000000060401224474465600232650ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; namespace { void test_stateless_cursor(transaction_base &trans) { stateless_cursor empty( trans, pqxx::test::select_series(trans.conn(), 0, -1), "empty", false); result rows = empty.retrieve(0, 0); PQXX_CHECK_EQUAL(rows.empty(), true, "Empty result not empty"); rows = empty.retrieve(0, 1); PQXX_CHECK_EQUAL(rows.size(), 0u, "Empty result returned rows"); PQXX_CHECK_EQUAL(empty.size(), 0u, "Empty cursor not empty"); PQXX_CHECK_THROWS( empty.retrieve(1, 0), out_of_range, "Empty cursor tries to retrieve"); stateless_cursor stateless( trans, pqxx::test::select_series(trans.conn(), 0, 9), "stateless", false); PQXX_CHECK_EQUAL(stateless.size(), 10u, "stateless_cursor::size() mismatch"); // Retrieve nothing. rows = stateless.retrieve(1, 1); PQXX_CHECK_EQUAL(rows.size(), 0u, "1-to-1 retrieval not empty"); // Retrieve two rows. rows = stateless.retrieve(1, 3); PQXX_CHECK_EQUAL(rows.size(), 2u, "Retrieved wrong number of rows"); PQXX_CHECK_EQUAL(rows[0][0].as(), 1, "Data/position mismatch"); PQXX_CHECK_EQUAL(rows[1][0].as(), 2, "Data/position mismatch"); // Retrieve same rows in reverse. rows = stateless.retrieve(2, 0); PQXX_CHECK_EQUAL(rows.size(), 2u, "Retrieved wrong number of rows"); PQXX_CHECK_EQUAL(rows[0][0].as(), 2, "Data/position mismatch"); PQXX_CHECK_EQUAL(rows[1][0].as(), 1, "Data/position mismatch"); // Retrieve beyond end. rows = stateless.retrieve(9, 13); PQXX_CHECK_EQUAL(rows.size(), 1u, "Row count wrong at end"); PQXX_CHECK_EQUAL(rows[0][0].as(), 9, "Data/pos mismatch at end"); // Retrieve beyond beginning. rows = stateless.retrieve(0, -4); PQXX_CHECK_EQUAL(rows.size(), 1u, "Row count wrong at beginning"); PQXX_CHECK_EQUAL(rows[0][0].as(), 0, "Data/pos mismatch at beginning"); // Retrieve entire result set backwards. rows = stateless.retrieve(10, -15); PQXX_CHECK_EQUAL(rows.size(), 10u, "Reverse complete retrieval is broken"); PQXX_CHECK_EQUAL(rows[0][0].as(), 9, "Data mismatch"); PQXX_CHECK_EQUAL(rows[9][0].as(), 0, "Data mismatch"); // Normal usage pattern: step through result set, 4 rows at a time. rows = stateless.retrieve(0, 4); PQXX_CHECK_EQUAL(rows.size(), 4u, "Wrong batch size"); PQXX_CHECK_EQUAL(rows[0][0].as(), 0, "Batch in wrong place"); PQXX_CHECK_EQUAL(rows[3][0].as(), 3, "Batch in wrong place"); rows = stateless.retrieve(4, 8); PQXX_CHECK_EQUAL(rows.size(), 4u, "Wrong batch size"); PQXX_CHECK_EQUAL(rows[0][0].as(), 4, "Batch in wrong place"); PQXX_CHECK_EQUAL(rows[3][0].as(), 7, "Batch in wrong place"); rows = stateless.retrieve(8, 12); PQXX_CHECK_EQUAL(rows.size(), 2u, "Wrong batch size"); PQXX_CHECK_EQUAL(rows[0][0].as(), 8, "Batch in wrong place"); PQXX_CHECK_EQUAL(rows[1][0].as(), 9, "Batch in wrong place"); } } // namespace PQXX_REGISTER_TEST(test_stateless_cursor) libpqxx-4.0.1+dfsg/test/unit/test_string_conversion.cxx000066400000000000000000000035611224474465600234410ustar00rootroot00000000000000#include "test_helpers.hxx" using namespace PGSTD; using namespace pqxx; namespace { void test_string_conversion(transaction_base &) { PQXX_CHECK_EQUAL( "C string array", to_string("C string array"), "C-style string constant does not convert to string properly."); char text_array[] = "C char array"; PQXX_CHECK_EQUAL( "C char array", to_string(text_array), "C-style non-const char array does not convert to string properly."); const char *text_ptr = "C string pointer"; PQXX_CHECK_EQUAL( "C string pointer", to_string(text_ptr), "C-style string pointer does not convert to string properly."); const string cxx_string = "C++ string"; PQXX_CHECK_EQUAL( "C++ string", to_string(cxx_string), "C++-style string object does not convert to string properly."); PQXX_CHECK_EQUAL("0", to_string(0), "Zero does not convert right."); PQXX_CHECK_EQUAL("1", to_string(1), "Basic integer does not convert right."); PQXX_CHECK_EQUAL("-1", to_string(-1), "Negative numbers don't work."); PQXX_CHECK_EQUAL("9999", to_string(9999), "Larger numbers don't work."); PQXX_CHECK_EQUAL( "-9999", to_string(-9999), "Larger negative numbers don't work."); int x; from_string("0", x); PQXX_CHECK_EQUAL(0, x, "Zero does not parse right."); from_string("1", x); PQXX_CHECK_EQUAL(1, x, "Basic integer does not parse right."); from_string("-1", x); PQXX_CHECK_EQUAL(-1, x, "Negative numbers don't work."); from_string("9999", x); PQXX_CHECK_EQUAL(9999, x, "Larger numbers don't work."); from_string("-9999", x); PQXX_CHECK_EQUAL(-9999, x, "Larger negative numbers don't work."); // Bug #263 describes a case where this kind of overflow went undetected. if (sizeof(unsigned int) == 4) { unsigned int u; PQXX_CHECK_THROWS( from_string("4772185884", u), pqxx::failure, "Overflow not detected."); } } } PQXX_REGISTER_TEST_NODB(test_string_conversion) libpqxx-4.0.1+dfsg/test/unit/test_test_helpers.cxx000066400000000000000000000107771224474465600223760ustar00rootroot00000000000000#include using namespace PGSTD; using namespace pqxx; using namespace pqxx::test; namespace { void empty() {} void test_test_helpers(transaction_base &) { bool failed = true; // At a minimum, PQXX_CHECK_NOTREACHED must work. try { PQXX_CHECK_NOTREACHED("(expected)"); failed = false; } catch (const test_failure &) { // This is what we expect. } if (!failed) throw test_failure(__FILE__, __LINE__, "PQXX_CHECK_NOTREACHED is broken."); // Another very basic test macro is PQXX_CHECK. PQXX_CHECK(true, "PQXX_CHECK is broken."); failed = true; try { PQXX_CHECK(false, "(expected)"); failed = false; } catch (const test_failure &) { } if (!failed) PQXX_CHECK_NOTREACHED("PQXX_CHECK failed to notice failure."); // PQXX_CHECK_THROWS is more complicated. // It can handle a std::exception... PQXX_CHECK_THROWS( throw exception(), exception, "Plain exception not handled properly by PQXX_CHECK_THROWS."); // ...or any other type of exception. PQXX_CHECK_THROWS( throw test_failure(__FILE__, __LINE__, "(expected)"), test_failure, "PQXX_CHECK_THROWS() failed to catch expected exception."); // Even if it's not std::exception-derived. PQXX_CHECK_THROWS(throw 1, int, "(expected)"); // PQXX_CHECK_THROWS means there _must_ be an exception. failed = true; try { // If the test fails to throw, PQXX_CHECK_THROWS throws a failure. PQXX_CHECK_THROWS(empty(), exception, "(expected)"); // So we shouldn't get to this point. failed = false; } catch (const test_failure &) { // Instead, we go straight here. } PQXX_CHECK(failed, "PQXX_CHECK_THROWS did not notice missing exception."); // The exception must be of the right type (or a subclass of the right type). failed = true; try { // If the test throws the wrong type, PQXX_CHECK_THROWS throws a failure. PQXX_CHECK_THROWS(throw exception(), test_failure, "(expected)"); failed = false; } catch (const test_failure &) { // Instead, we go straight here. } PQXX_CHECK(failed, "PQXX_CHECK_THROWS did not notice wrong exception type."); // PQXX_CHECK_THROWS can test itself... PQXX_CHECK_THROWS( PQXX_CHECK_THROWS(empty(), test_failure, "(expected)"), test_failure, "PQXX_CHECK_THROWS failed to throw for missing exception."); PQXX_CHECK_THROWS( PQXX_CHECK_THROWS(throw 1, exception, "(expected)"), test_failure, "PQXX_CHECK_THROWS failed to throw for wrong exception type."); // ...and other test helpers. PQXX_CHECK_THROWS( PQXX_CHECK_NOTREACHED("(expected)"), test_failure, "PQXX_CHECK_THROWS did not catch PQXX_CHECK_NOTREACHED."); PQXX_CHECK_THROWS( PQXX_CHECK(false, "(expected)"), test_failure, "PQXX_CHECK_THROWS did not catch failing PQXX_CHECK."); PQXX_CHECK_THROWS( PQXX_CHECK_THROWS( PQXX_CHECK(true, "(shouldn't happen)"), test_failure, "(expected)"), test_failure, "PQXX_CHECK_THROWS on successful PQXX_CHECK failed to throw."); // PQXX_CHECK_EQUAL tests for equality. Its arguments need not be of the same // type, as long as equality between them is defined. PQXX_CHECK_EQUAL(1, 1, "PQXX_CHECK_EQUAL is broken."); PQXX_CHECK_EQUAL(1, 1L, "PQXX_CHECK_EQUAL breaks on type mismatch."); PQXX_CHECK_THROWS( PQXX_CHECK_EQUAL(1, 2, "(expected)"), test_failure, "PQXX_CHECK_EQUAL fails to spot inequality."); // PQXX_CHECK_NOT_EQUAL is like PQXX_CHECK_EQUAL, but tests for inequality. PQXX_CHECK_NOT_EQUAL(1, 2, "PQXX_CHECK_NOT_EQUAL is broken."); PQXX_CHECK_THROWS( PQXX_CHECK_NOT_EQUAL(1, 1, "(expected)"), test_failure, "PQXX_CHECK_NOT_EQUAL fails to fail when arguments are equal."); PQXX_CHECK_THROWS( PQXX_CHECK_NOT_EQUAL(1, 1L, "(expected)"), test_failure, "PQXX_CHECK_NOT_EQUAL breaks on type mismatch."); // PQXX_CHECK_BOUNDS checks a value against a range. PQXX_CHECK_BOUNDS(2, 1, 3, "PQXX_CHECK_BOUNDS wrongly finds fault."); PQXX_CHECK_THROWS( PQXX_CHECK_BOUNDS(1, 2, 3, "(Expected)"), test_failure, "PQXX_CHECK_BOUNDS did not detect value below permitted range."); // PQXX_CHECK_BOUNDS tests against a half-open interval. PQXX_CHECK_BOUNDS(1, 1, 3, "PQXX_CHECK_BOUNDS goes wrong on lower bound."); PQXX_CHECK_THROWS( PQXX_CHECK_BOUNDS(3, 1, 3, "(Expected)"), test_failure, "PQXX_CHECK_BOUNDS interval is not half-open."); // PQXX_CHECK_BOUNDS deals well with empty intervals. PQXX_CHECK_THROWS( PQXX_CHECK_BOUNDS(1, 2, 1, "(Expected)"), test_failure, "PQXX_CHECK_BOUNDS did not detect empty interval."); } } // namespace PQXX_REGISTER_TEST_NODB(test_test_helpers) libpqxx-4.0.1+dfsg/test/unit/test_thread_safety_model.cxx000066400000000000000000000012431224474465600236630ustar00rootroot00000000000000#include #include using namespace PGSTD; using namespace pqxx; namespace { void test_thread_safety_model(transaction_base &) { const thread_safety_model model = describe_thread_safety(); if (model.have_safe_strerror && model.safe_libpq && model.safe_query_cancel && model.safe_result_copy && model.safe_kerberos) PQXX_CHECK_EQUAL( model.description, "", "Thread-safety looks okay but model description is nonempty."); else PQXX_CHECK_NOT_EQUAL( model.description, "", "Thread-safety model is imperfect but lacks description."); } } // namespace PQXX_REGISTER_TEST_NODB(test_thread_safety_model) libpqxx-4.0.1+dfsg/tools/000077500000000000000000000000001224474465600153005ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/tools/Makefile.am000066400000000000000000000011711224474465600173340ustar00rootroot00000000000000EXTRA_DIST = \ extract_version \ lint \ maketemporary \ release \ rmlo.cxx \ splitconfig \ template2mak.py \ pqxxthreadsafety.cxx INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include ${POSTGRES_INCLUDE} # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES= noinst_PROGRAMS = rmlo pqxxthreadsafety rmlo_SOURCES = rmlo.cxx rmlo_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} pqxxthreadsafety_SOURCES = pqxxthreadsafety.cxx pqxxthreadsafety_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} libpqxx-4.0.1+dfsg/tools/Makefile.in000066400000000000000000000405001224474465600173440ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = rmlo$(EXEEXT) pqxxthreadsafety$(EXEEXT) subdir = tools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_pqxxthreadsafety_OBJECTS = pqxxthreadsafety.$(OBJEXT) pqxxthreadsafety_OBJECTS = $(am_pqxxthreadsafety_OBJECTS) am__DEPENDENCIES_1 = pqxxthreadsafety_DEPENDENCIES = $(top_builddir)/src/libpqxx.la \ $(am__DEPENDENCIES_1) am_rmlo_OBJECTS = rmlo.$(OBJEXT) rmlo_OBJECTS = $(am_rmlo_OBJECTS) rmlo_DEPENDENCIES = $(top_builddir)/src/libpqxx.la \ $(am__DEPENDENCIES_1) depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(pqxxthreadsafety_SOURCES) $(rmlo_SOURCES) DIST_SOURCES = $(pqxxthreadsafety_SOURCES) $(rmlo_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ EXTRA_DIST = \ extract_version \ lint \ maketemporary \ release \ rmlo.cxx \ splitconfig \ template2mak.py \ pqxxthreadsafety.cxx INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include ${POSTGRES_INCLUDE} # Override automatically generated list of default includes. It contains only # unnecessary entries, and incorrectly mentions include/pqxx directly. DEFAULT_INCLUDES = rmlo_SOURCES = rmlo.cxx rmlo_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} pqxxthreadsafety_SOURCES = pqxxthreadsafety.cxx pqxxthreadsafety_LDADD = $(top_builddir)/src/libpqxx.la ${POSTGRES_LIB} all: all-am .SUFFIXES: .SUFFIXES: .cxx .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list pqxxthreadsafety$(EXEEXT): $(pqxxthreadsafety_OBJECTS) $(pqxxthreadsafety_DEPENDENCIES) $(EXTRA_pqxxthreadsafety_DEPENDENCIES) @rm -f pqxxthreadsafety$(EXEEXT) $(CXXLINK) $(pqxxthreadsafety_OBJECTS) $(pqxxthreadsafety_LDADD) $(LIBS) rmlo$(EXEEXT): $(rmlo_OBJECTS) $(rmlo_DEPENDENCIES) $(EXTRA_rmlo_DEPENDENCIES) @rm -f rmlo$(EXEEXT) $(CXXLINK) $(rmlo_OBJECTS) $(rmlo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pqxxthreadsafety.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmlo.Po@am__quote@ .cxx.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cxx.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/tools/extract_version000077500000000000000000000011511224474465600204430ustar00rootroot00000000000000#! /bin/sh set -e ARG="$1" case "$ARG" in '') MODE="lib" ;; -h|--help) cat <&2 Unknown argument. Try $0 --help for usage information. EOF exit 1 esac get_version() { grep -w 'PQXX_VERSION' VERSION | sed -E -e 's/^[[:space:]A-Z_]*([^[:space:]#]+).*$/\1/' } case "$MODE" in lib) get_version ;; abi) get_version | sed -e 's/\([^.]*\.[^.]*\)\..*/\1/' ;; *) echo "Unknown mode." 2>&1 exit 2 ;; esac libpqxx-4.0.1+dfsg/tools/lint000077500000000000000000000032761224474465600162040ustar00rootroot00000000000000#! /bin/sh # # Routine sanity checks for libpqxx source tree. PQXXVERSION="`./tools/extract_version`" # This version must be at the top of the NEWS file. check_news_version() { if ! head -n1 NEWS | grep -q "^$PQXXVERSION\$" then cat <&2 Version $PQXXVERSION is not at the top of NEWS. EOF exit 1 fi } # This version must be at the top of the Debian changelog. check_debian_changelog() { if ! head -n1 debian/changelog | grep -q "^libpqxx ($PQXXVERSION\\>" then cat <&2 Version $PQXXVERSION is not at the top of debian/changelog. EOF exit 1 fi } # Count number of times header $1 is included from each of given input files. # Output is lines of :, one line per file, sorted. count_includes() { HEADER_NAME="$1" shift WS="[[:space:]]*" PAT="^$WS#$WSinclude$WS[<\"]$HEADER_NAME[>\"]" grep -c "$PAT" $* | sort } # Any file that includes compiler-internal-pre.hxx must also include # compiler-internal-post.hxx, and vice versa. check_compiler_internal_headers() { TEMPDIR="`mktemp --tmpdir -d pqxx-pre-release-check.XXXX`" if test -z "$TEMPDIR" then cat <&2 Argh: TEMPDIR is empty. Don't know how, but would have caused nasty problems. EOF fi PRE="$TEMPDIR/pre" POST="$TEMPDIR/post" count_includes pqxx/compiler-internal-pre.hxx include/pqxx/* >"$PRE" count_includes pqxx/compiler-internal-post.hxx include/pqxx/* >"$POST" DIFF="`diff "$PRE" "$POST"`" || /bin/true rm -rf -- "$TEMPDIR" if test -n "$DIFF" then cat <&2 The number of inclusions of compiler-internal.post.hxx does not match the number of inclusions of compiler-internal.post.hxx: $DIFF EOF exit 1 fi } check_news_version check_debian_changelog check_compiler_internal_headers libpqxx-4.0.1+dfsg/tools/maketemporary000077500000000000000000000006421224474465600201100ustar00rootroot00000000000000#! /bin/sh # Work around differences in mktemp implementations TMPDIR="${TMPDIR:-/tmp}" export TMPDIR T="`mktemp`" if test -z "$T" ; then T="`mktemp -t pqxx.XXXXXX`" fi if test -z "$T" ; then T="`mktemp pqxx.XXXXXX`" fi if test -z "$T" ; then T="`mktemp "$TMPDIR/pqxx.XXXXXX"`" fi if test -z "$T" ; then UNIQUE="`date '%s.%N'`" T="pqxx.$UNIQUE" if test -d "$TMPDIR" ; then T="$TMPDIR/$T" fi fi echo "$T" libpqxx-4.0.1+dfsg/tools/pqxxthreadsafety.cxx000066400000000000000000000003161224474465600214300ustar00rootroot00000000000000// Print thread-safety information for present libpqxx build. #include #include "pqxx/util" using namespace PGSTD; int main() { cout << pqxx::describe_thread_safety().description << endl; } libpqxx-4.0.1+dfsg/tools/release000077500000000000000000000050071224474465600166500ustar00rootroot00000000000000#! /bin/bash # Release current libpqxx trunk (or other branch). # # Use this after a successful full test run in the parent series. # # Arguments: # [parent] # # The next version number is the one for a future release in the parent series, # not the version that's being released now. So if you're releasing x.y.0, that # would be x.y+1.0. If you're releasing some other x.y.z, it's x.y.z+1. # # The parent branch defaults to "trunk." For x.y.z releases (where z > 0), use # branches/x.y. set -e NEXTVERSION="$1" if test -z "$NEXTVERSION" then echo "Usage: $0 [parent]" >&2 exit 1 fi PARENT="$2" if test -z "$PARENT" then PARENT="trunk" fi REPO="svn+ssh://pqxx.org/srv/svn/libpqxx/" FTP="/srv/ftp/libpqxx" SNAPSHOT="/home/jtv/public_html/tmp/pqxx/snapshot" DOC="/srv/www/devprojects/libpqxx/doc" CHECKOUT="`mktemp -p /tmp -d pqxx.XXXXXXXXXX`" echo "** Checking out source tree to $CHECKOUT **" cd -- "$CHECKOUT" svn co -q "$REPO" cd libpqxx/ export PATH="$PATH:$CHECKOUT/libpqxx/$PARENT/tools" pushd "$PARENT" >/dev/null PQXXVERSION="`extract_version`" popd >/dev/null if test "$PQXXVERSION" = "$NEXTVERSION" then cat <&2 The given "next version" is the same as the existing version in $PARENT/PQXXVERSION. Instead, give the next version for a future release in the same series. EOF exit 2 fi RELEASEDATE="`date +'%a, %d %b %y %T %z'`" echo "** Updating source tree **" svn cp "$PARENT" "tags/$PQXXVERSION" # Mark new trunk in debian/changelog. cat - <"$PARENT"/debian/changelog libpqxx ($NEXTVERSION-1) unstable; urgency=medium * Forked release $PQXXVERSION. -- Jeroen T. Vermeulen $RELEASEDATE EOF # Mark next version in NEWS. cat - <"$PARENT/NEWS" $NEXTVERSION EOF echo "PQXX_VERSION $NEXTVERSION" >"$PARENT"/VERSION cd /tmp echo "** Setting up new documentation **" TEMPDOC="`mktemp -p /tmp -d pqxxdoc.XXXXXXXXXX`" cd -- "$TEMPDOC" tar xzf "$SNAPSHOT"/libpqxx-*.tar.gz cd libpqxx-*/ PREVIOUS='' for d in `ls "$DOC" | grep '[0-9]'` do PREVIOUS="$PREVIOUS --link-dest='$DOC/$d'" done rsync -r $PREVIOUS doc/html "$DOC/$PQXXVERSION" cd /tmp rm -rf "$TEMPDOC" if test "$PARENT" = "trunk" then # Move snapshot tarball to FTP directory. mv "$SNAPSHOT"/libpqxx-*.tar.* "$FTP/" else echo "*** Remember: Build tarball and make available for upload ***" fi cd -- "$CHECKOUT" svn commit -m "Forking release $PQXXVERSION, moving on to $NEXTVERSION." cd /tmp rm -rf -- "$CHECKOUT" echo "** Done **" libpqxx-4.0.1+dfsg/tools/rmlo.cxx000066400000000000000000000015041224474465600167750ustar00rootroot00000000000000// Remove large objects given on the command line from the default database #include #include "pqxx/pqxx" using namespace PGSTD; using namespace pqxx; namespace { class RemoveLO : public transactor<> { oid m_O; public: explicit RemoveLO(oid O) : m_O(O) {} void operator()(argument_type &T) { largeobject L(m_O); L.remove(T); } }; } int main(int, char *argv[]) { lazyconnection C; bool Failures = false; try { for (int i=1; argv[i]; ++i) { oid O; from_string(argv[i], O); try { C.perform(RemoveLO(O)); } catch (const exception &e) { cerr << e.what() << endl; Failures = true; } } } catch (const exception &e) { cerr << e.what() << endl; return 2; } return Failures; } libpqxx-4.0.1+dfsg/tools/splitconfig000077500000000000000000000114651224474465600175560ustar00rootroot00000000000000#! /usr/bin/python """Extract configuration items into various configuration headers. This uses the configitems file, a database consisting of text lines with the following single-tab-separated fields: - Name of the configuration item, e.g. PQXX_HAVE_PTRDIFF_T. - Publication marker: public or internal. - A single environmental factor determining the item, e.g. libpq or compiler. """ from __future__ import ( absolute_import, print_function, unicode_literals, ) __metaclass__ = type import os.path import re import sys usage = """\ Usage: splitconfig [srcdir] where [srcdir] is the main libpqxx source directory containing the configitems file, the include directory etc. This defaults to the current directory. """ def help_and_exit(error_string=None): if error_string != None: sys.stderr.write(error_string + '\n') print(usage) if ok: sys.exit(0) else: sys.exit(1) def read_configitems(filename): """Read the configuration-items database. :param filename: Path to the configitems file. :return: Sequence of text lines from configitems file. """ text = open(filename, 'rb').read().decode('ascii') return [line.split() for line in text.splitlines()] def map_configitems(items): """Map each config item to publication/factor. :param items: Sequence of config items: (name, publication, factor). :return: Dict mapping each item name to a tuple (publication, factor). """ return dict( (item, (publication, factor)) for item, publication, factor in items) def read_header(filename): """Read the original config.h generated by autoconf. :param filename: Path to the config.h file. :return: Sequence of text lines from config.h. """ return open(filename, 'rb').read().decode('ascii').splitlines() def extract_macro_name(config_line): """Extract a cpp macro name from a configuration line. :param config_line: Text line from config.h which may define a macro. :return: Name of macro defined in `config_line` if it is a `#define` statement, or None. """ config_line = config_line.strip() match = re.match('\s*#\s*define\s+([^\s]+)', config_line) if match is None: return None else: return match.group(1) def extract_section(header_lines, items, publication, factor): """Extract config items for given publication/factor from header lines. :param header_lines: Sequence of header lines from config.h. :param items: Dict mapping macro names to (publication, factor). :param publication: Extract only macros for this publication tag. :param factor: Extract only macros for this environmental factor. :return: Sequence of `#define` lines from `header_lines` insofar they fall within the requested section. """ return sorted( line.strip() for line in header_lines if items.get(extract_macro_name(line)) == (publication, factor)) def generate_config(header_lines, items, publication, factor): """Generate config file for a given section. Skip empty ones. :param header_lines: Sequence of header lines from config.h. :param items: Dict mapping macro names to (publication, factor). :param publication: Extract only macros for this publication tag. :param factor: Extract only macros for this environmental factor. """ config_file = "include/pqxx/config-%s-%s.h" % (publication, factor) section = extract_section(header_lines, items, publication, factor) if len(section) == 0: print("Generating %s: no items--skipping." % config_file) return with open(config_file, 'wb') as header: header.write( "/* Automatically generated from config.h: %s/%s config. */\n" % (publication, factor)) header.write('\n'.join(section)) header.write('\n') print("Generating %s: %d item(s)." % (config_file, len(section))) def check_args(argv): if len(argv) > 2: help_and_exit("Too many arguments.") if len(argv) == 2: if argv[1] in ('-h', '--help'): help_and_exit() if not os.path.isdir(argv[1]): help_and_exit("%s is not a directory." % srcdir) def get_base_dir(argv): if len(argv) > 1: return argv[1] else: return "." if __name__ == '__main__': check_args(sys.argv) srcdir = get_base_dir(sys.argv) items = read_configitems(os.path.join(srcdir, "configitems")) config = map_configitems(items) publications = sorted(set(item[1] for item in items)) factors = sorted(set(item[2] for item in items)) original_header = read_header("include/pqxx/config.h") items_map = map_configitems(items) for publication in publications: for factor in factors: generate_config(original_header, items_map, publication, factor) libpqxx-4.0.1+dfsg/tools/template2mak.py000077500000000000000000000071041224474465600202450ustar00rootroot00000000000000#! /usr/bin/python r""" ------------------------------------------------------------------------- FILE tools/template2mak.py DESCRIPTION Translates a template MAK file into a real MAK file. Used for generating VC++ makefiles. Copyright (c) 2006, Bart Samwel and Jeroen T. Vermeulen See COPYING for copyright license. If you did not receive a file called COPYING with this source code, please notify the distributor of this mistake, or contact the author. ------------------------------------------------------------------------- """ import sys, glob, os # Expand a foreach template with the given path, and write the results to # outfile. def expand_foreach_template(path,template,outfile): basepath = os.path.splitext(os.path.basename(path))[0] for line in template: line = line.replace("###FILENAME###", path) line = line.replace("###BASENAME###", basepath) outfile.write(line) # Expand the given foreach template with the given list of file patterns, and # write the results to outfile. def foreach_file_in_patterns_expand_template(filepatterns,template,outfile): for pattern in filepatterns: files = glob.glob(pattern) files.sort() for path in files: expand_foreach_template(path,template,outfile) # Transform the template in infile into a makfile, and write the results to # outfile. The available template commands are: # # Expand a template section for each file in a list of file patterns: # # ###MAKTEMPLATE:FOREACH my/path*/*.cxx,other*.cxx # ... # ###MAKTEMPLATE:ENDFOREACH # # In the template section, you can use ###BASENAME### to get the base name of # the file being processed (e.g. "base" for "../base.cxx"), and you can use # ###FILENAME### to get the full filename. def template2mak(infile,outfile): lines = infile.readlines() foreachcmd = r"###MAKTEMPLATE:FOREACH " endforeachcmd = r"###MAKTEMPLATE:ENDFOREACH" while lines: line = lines[0] if line.strip().upper().startswith(foreachcmd): filepatterns = line.strip() [ len(foreachcmd): ].split(',') lines = lines[1:] l = 0 for line in lines: if line.strip().upper().startswith(endforeachcmd): break l = l + 1 template = lines[:l] lines = lines[l+1:] foreach_file_in_patterns_expand_template(filepatterns,template,outfile) else: outfile.write(line) lines = lines[1:] if __name__ == '__main__': if len(sys.argv) > 3: print "Too many arguments." sys.exit(1) me = os.path.basename(sys.argv[0]) hr = "#"*80 + "\n" input = sys.stdin inarg = None output = sys.stdout outarg = None if len(sys.argv) >= 2: inarg = os.path.abspath(sys.argv[1]) input = file(inarg) if len(sys.argv) >= 3: outarg = sys.argv[2] output = file(outarg, 'w') #os.chdir(os.path.dirname(inarg)) output.write(hr) output.write("""# AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's %s script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The %s script should be available in the tools directory of the # libpqxx source archive. """ % (me, me)) if len(sys.argv) > 1: output.write("#\n") output.write("# Generated from template '%s'.\n" % inarg) output.write(hr) template2mak(input, output) libpqxx-4.0.1+dfsg/win32/000077500000000000000000000000001224474465600151025ustar00rootroot00000000000000libpqxx-4.0.1+dfsg/win32/INSTALL.txt000066400000000000000000000546361224474465600167670ustar00rootroot00000000000000Welcome to libpqxx, the C++ API to the PostgreSQL database management system. This file documents building and installation of libpqxx on Windows systems. Please see the regular README for general instructions on building, installing, and using the library. If you are using Cygwin, MSYS, or another Unix-like environment please try the Unix configuration & build procedure instead of the one described here. Some help for the MSYS/MinGW combination is given below, but in general, things are a bit more complicated for Windows than they are for other environments. The only Windows compilers currently documented here are: Visual C++ (7.0 or above) MinGW If you are using a different compiler, you should still be able to get it to work. If you do, or if you fail, please report your results so any problems can be resolved, and so that we can add support for your compiler in the standard libpqxx distribution. We'll be using the command line throughout this document. Build Environment ----------------- Before you start, make sure your development environment is reasonably up to date. If you use MSYS, be sure your "grep" program is up to date and that you have the "mktemp" program installed (these can be downloaded from http://gnuwin32.sf.net/). If you use Visual C++, make sure you have at least version 7.0 or you'll run into serious compilation trouble. The latest build has been tested against Visual Studio 8, 9.0 and 10.0, so if you build with Visual C++ 7.0 you might have to make some adjustments to these instructions and scripts for the build to succeeed. Obtaining libpq --------------- Next, make sure you have a working installation of libpq, the C-level client library included with PostgreSQL. There are two ways to make libpq available on a Windows system: Install it or build it from sources. Installing libpq ---------------- The easiest way to get libpq on a Windows system, is to install PostgreSQL. The PostgreSQL installer from Windows can be obtained from http://www.postgresql.org/download/windows This build procedure has been tested against all the versions of the One click installer up to the current version 9.1.1-1. If you opt for the pgInstaller, you will have to make some adjustments to these instructions and scripts for the build to succeeed. After installing PostgreSQL, you will be able to find libpq under C:\Program Files\PostgreSQL\{Version}\lib Building libpq from sources --------------------------- If you prefer to build libpq from sources, you can compile a recent version of PostgreSQL. Its source tree should then contain libpq in binary form, as well as the corresponding headers. Look for these in src/interfaces/libpq. Visual C++ will generate separate Debug and Release versions in subdirectories called Debug and Release, respectively, at that location. Note these locations; they will become important in the next section. The source code for PostgreSQL can be obtained from http://postgresql.org/download/ Select a recent version of postgres and download the corrresponding .tar.gz or .tar.bz2 archive for that version. Unpack the sources to some directory on your computer. Select "Visual Studio Command Prompt" from the Start menu. Alternatively, open a Command Prompt window and run: VCVARS32.BAT to prepare the environment. From the Command Prompt window, "cd" into the postgres source tree directory and run: nmake /f win32.mak You'll also want to build a Debug-flavour libpq, so then run: nmake /f win32.mak DEBUG=1 The libpq binaries will be produced in src/interfaces/libpq/Release and src/interface/libpq/Debug, respecitively, and the Debug versions will have an extra "D" in their names. (Instructions for building PostgreSQL with MinGW are given in the MSYS section below). Preparing to Compile libpqxx ---------------------------- The rest of this text will assume that you have the libpq library in its binary form(s), as well as its header files. Now, to work on building libpqxx! Before you can build libpqxx you need to provide certain common settings: i) Copy win32/common-sample to win32/common, and edit the latter to reflect the paths to your PostgreSQL includes and library files: - If you compiled PostgreSQL for yourself to obtain libpq, simply set PGSQLSRC in win32/common to point to the "src" subdirectory in your PostgreSQL source tree. - If you installed libpq using the One Click Installer, verify that PGSQLSRC points to your specific installation of PostgreSQL. Then follow the instructions in the win32/common file to comment several lines out and uncomment several others. - If you obtained libpq in any other way, you may be able to build libpqxx by making the appropriate adjustments to the 'common' file. ii) Create the configuration headers: include/pqxx/config-*-*.h. The easiest start for this is to copy from available samples. In config/sample-headers, find the directories most accurately describing your compiler and libpq version, respectively. Take the config-*-*.h headers from those directories and copy them into the include/pqxx/ directory. On a Unix-like system these headers would be generated automatically by the configure script; in the Windows case they may need some editing. How these files work is described in more detail below. iii) If you are building libpqxx from a development source tree rather than from a release distribution, you may not have the makefiles for your compiler. These makefiles should be in the win32 directory and have names ending in ".mak": "mingw.mak," "vc-libpqxx.mak," "vc-test.mak," and so on. If you don't have these files but you do have a python interpreter, you can generate them using the template2mak.py script in the tools directory: ./tools/template2mak.py win32/mingw.mak.template win32/mingw.mak ./tools/template2mak.py win32/vc-libpqxx.mak.template win32/vc-libpqxx.mak ./tools/template2mak.py win32/vc-test.mak.template win32/vc-test.mak ./tools/template2mak.py win32/vc-test-unit.mak.template win32/vc-test-unit.mak Building libpqxx ---------------- The rest of the procedure depends on your compiler. If you're using Visual C++: 1) Select Visual Studio Command Prompt from the Start menu. Alternatively, open a Command Prompt window and run VCVARS32.BAT to prepare the environment. Then CD into the main directory of the libpqxx source tree. Among other things it will contain the files "configure" and "Makefile.am," and subdirectories "src," "include," "win32" etc. 2) Run: "nmake /f win32/vc-libpqxx.mak ALL" to compile all dynamic, static, debug and release libraries. Once completed, you will find them in these libraries in the lib directory. The build script also copies the libpq dlls and stub libraries to the lib directory. You will have to link with these files when building applications that use libpqxx clases and methods. 3) Your version of the libpq DLL may require other DLLs in order to execute. If you installed libpq with the one click installer, these DLLs can be found in the same folder as libpq itself. The exact set of DLLs varies depending on the version of PostgreSQL that you installed. For the current versions of the One Click Installer, they are: - Version 8.3.16-1 - comerr32.dll, gssapi32.dll, k5sprt32.dll, krb5_32.dll libiconv-2.dll and libintl-8.dll - Version 8.4.9-1 - comerr32.dll, gssapi32.dll, k5sprt32.dll, krb5_32.dll libiconv-2.dll and libintl-8.dll - Version 9.0.5-1 - libiconv-2.dll and libintl-8.dll - Version 9.1.1-1 - libeay32.dll, libiconv-2.dll, libintl-8.dll and ssleay32.dll 4) Once you have identified any additional DLLs, you should copy them to another location (perhaps the libpqxx lib folder. 5) At this point, you will no longer need to keep the postgres sources or binaries on your computer to build applications with libpqxx. Feel free to remove them from your system if you wish to do so. If you're using MinGW (but without a Unix-like environment, see above): 1) Run "mingw32-make -f win32/MinGW.mak" 2) Consider installing a Unix-like environment like MSYS to automate all this! Running the test suite ---------------------- After building libpqxx, it is recommended that you compile and run the self-test programs included in the package. Unix, Cygwin, or MSYS users simply type "make check" to build and run the entire regression test. For Visual C++ users, the following steps should accomplish the same: 1) To build all of the self-test configurations, run: nmake /f win32\vc-test.mak ALL nmake /f win32\vc-test.mak ALL DEBUG=1 nmake /f win32\vc-test.mak ALL DLL=1 nmake /f win32\vc-test.mak ALL DLL=1 DEBUG=1 This will create four new directories: TestStaticDebug, TestStaticRelease, TestDllDebug, and TestDllRelease. Each of these folders will contain the program "runner.exe," as well as any required DLLs. 2) Make sure a PostgreSQL database is running and accessible, and set up the environment variables PGDATABASE, PGHOST, PGPORT, and PGUSER as described in the libpqxx README file so the test program can connect without needing to pass a connection string. 3) Run runner.exe from any of the test directories. When runner.exe runs, it executes each of the test programs in order. Some of the tests will produce lots of output, some won't produce any. Error messages that are expected in the course of a normal test run are prefixed with "(Expected)" to show that they are not harmful. All tests should complete successfully. Running the unit tests ---------------------- You may also want to compile and run the unit test programs included in the package. The procedure for doing so for Visual Studio users is nearly identical to the procedure for running the main test suite, except for the name of the .mak file, which is win32\vc-unit.mak. The output build directories are UnitStaticDebug, UnitStaticRelease, UnitDllDebug, and UnitDllRelease. The test application name is again runner.exe. All of these tests should complete successfully as well. Setting Up a Visual Studio Project ---------------------------------- Here's how to set up a Visual C++ project file for your own program using libpqxx (based on description by Alexandre Hanft, 2006-03-06): 1) Create a new project in the Visual C++ development environment. 2) Add your first C++ file and provide some initial code, e.g. by copying the example from the libpqxx home page. 3) Edit Project Properties, C++: Additional Include Directories. Add the location of the "include" directory found in your libpqxx source tree, e.g. C:\src\libpqxx\include if you keep libpqxx in C:\src\libpqxx. 4) Edit Project Properties, Linker: Additional Library Directories. Add the directory where your libpq and libpqxx libraries are, for example: C:\src\libpqxx\lib 5) Edit Project Properties, Linker, Input: Additional Dependencies. Add: libpqxx.lib. That is for your Release build. Do the same for your Debug build, but replace that "libpqxx.lib" in there with "libpqxxD.lib". 6) Your program should build successfully now. It may not be ready to run yet, because some dynamically loaded libraries are needed when starting your program. Copy the necessary libpq and libpqxx DLLs from the lib directory in your libpqxx tree, directly into your project's build directory so the system can find them when your development environment launches your program. 7) Your program should now be able to run. However, you may need to tell it how to connect to a database. If you set the environment variables PGDATABASE, PGHOST, PGPORT, and PGUSER as described in the libpqxx README file, your program should be able to connect without passing further parameters. 8) Once your program gets to the point where users should be able to configure it properly, change it to pass a connection string where it connects to any databases, and include your user's configuration settings. A typical connection string setting all parameters named above might look like: "dbname=testbase user=testuser host=my.dbserver.somewhere.com" 9) For any other problems, please check the project homepage as listed in the main libpqxx README file. Getting Started with MinGW and MSYS ----------------------------------- (based on contribution by Michael J. Pedersen, 2004-08-17) MSYS is a Unix-like environment for Windows. Once you have this installed, building libpqxx should be a lot more like it is under Unix except that the locations of libraries and such aren't sufficiently standardized. Packages to download if you don't have them already: 1) MinGW (http://www.mingw.org/), plus any updates. 2) MSYS (http://www.mingw.org/), again with any updates. 3) w32api (http://www.mingw.org/). 4) PostgreSQL (http://www.postgresql.org/). 5) zlib (http://www.zlib.org/). It is generally recommended to get the latest versions of these packages. Compiling and installing PostgreSQL before you get to libpqxx: 1) Install MinGW (install to c:\mingw) 2) Install MSYS--but not into the MinGW directory tree! 3) Run MSYS (Start -> Programs -> MinGW -> MSYS -> msys) 4) Extract, compile, and install zlib # From the main source directory of zlib: ./configure --prefix=c:/mingw/local && make && make install 5) Extract, compile, and install postgres # From the main source directory of PostgreSQL: ./configure --prefix=c:/mingw/local --with-includes=c:/mingw/local/include --with-libs=c:/mingw/local/lib make && make install 6) Extract, compile, and install libpqxx export lDFLAGS=-lws2_32 ./configure --prefix=c:/mingw/local --enable-static make && make install If you don't have and don't want to install MSYS, you won't be able to perform the "./configure" step. You can build libpqxx without it, but it takes a bit more work and doesn't build the self-test. Use the special makefile MinGW.mak in the win32 directory instead of the regular Makefile, and follow the procedure described below to use the prefabricated configuration headers enclosed in the source archive. Building libpqxx without MSYS ----------------------------- # (first set up configuration headers, see below) export LDFLAGS=-lws2_32 make -f win32/MinGW.mak # (install library, headers and pqxx-config manually on your system) Having installed libpqxx, when compiling your own programs, use the following steps (examples only here): g++ -c -o myfile.o myfile.cpp `pqxx-config --cflags` g++ -o myexec myfile.o `pqxx-config --libs` -lws2_32 Note that the linker step (g++ -o myexec) will give a spurious warning about not knowing how to use the -R flag, but the executable will still be generated, and work just fine. The last argument to that linker step MUST be -lws2_32. Without it, the link will provide errors about undefined references to select(). If it's not the last argument, you will get the same results. Make sure it's there, and make sure it's last. Trust me, you'll be happier. Setting up the configuration headers ------------------------------------ Several headers, normally generated by the configure script, define certain aspects of your compilation environment so that the library can work around compiler shortcomings, functions missing in older libpq versions, etc. (Samples for various compiler and libpq versions can be found in the subdirectory config/sample-headers, so if you find you need to provide these headers yourself, look there first.) Each of the aspects mentioned below is represented by a configuration item--a preprocessor macro that is either #define'd to some value or not defined at all. Most of the items are of a Boolean nature, i.e. some feature or workaround is enabled if the corresponding macro is defined or disabled if the macro is left undefined. Note that defining these macros to anything at all, even 0, means that the corresponding option is enabled. They are normally defined to 1, but that value seems to have been chosen more for convention than anything else. A few of the items require a textual value however, e.g. PGSTD needs to be defined to the name of the standard namespace. You'll typically want to have this defined to "std" (leave out the quotes though!), but you may want to change that if you use a standard library other than the default one shipped with your compiler. At the time of writing, there are 3 of these configuration headers that you need to concern yourself about, all of which should be created in the include/pqxx subdirectory: config-internal-compiler.h config-internal-libpq.h config-public-compiler.h The names contain two variables: 1. Internal or public. Configuration items that affect the compilation of your client program are located in the config-public-*.h files (currently only one file); ones that affect only the compilation of the library itself are kept in the config-internal-*.h ones and are not included at all when compiling client programs. Public configuration items (except PGSTD) are prefixed with PQXX_ to avoid clashes with macros defined by other code. 2. Autotools-related, compiler-related, or libpq-related. The autotools items are of no real interest, but the compiler and libpq ones are different. The compiler-related ones describe features and shortcomings of the compiler environment, such as the availability of the header or the ability to compile certain complex C++ language constructs. The libpq items describe what features are available in the version of libpq you're compiling against. At the time of writing, the latter all take the HAVE_... form; defining such a macro indicates that the corresponding feature is available. A complete list of configuration items and their categorizations can be found in the configitems file. The normal configure script reads the list of items from include/pqxx/config.h.in and writes them to include/pqxx/config.h, then splits them up into the five smaller files as directed by the configitems database. Again, sample versions of these headers for various compilers and libpq versions can be found in the config/sample-headers/ directory. Try copying the three headers for the compiler and libpq version most resembling your own environment to include/pqxx/ and, if you have any problems compiling with those, editing them by hand to enable or disable features that appear to be giving you trouble. Shared and Static Libraries, or .DLL vs. .LIB --------------------------------------------- There are two ways to build the libpqxx library: as a shared library (known in the Unix world as a Shared Object or "so," but in the Windows world as a Dynamically Loaded Library or DLL) or as a static library (whose name would end in ".a" on Unix systems but in ".LIB" on Windows systems). Linking your own applications to these types of libraries is quite similar, except with a DLL the system will also have to be able to find the library when your program is loaded--not just when you are compiling it. Unlike the situation in the Unix world, however, your choice on this point must be known as you compile your application code. With libpqxx you do this by defining the preprocessor macro PQXX_SHARED when compiling your code for use with a libpqxx DLL. Leave this definition out if you intend to link to the static version of the library. (Internally, when compiling libpqxx, this variable will also be set according to which kind of library is being built. It has a slightly different meaning in that case, but this should really only matter to you if you are helping debug the library) Similarly, you may choose to link to either the static or the shared version of libpq. The default is to use the dynamic library, which makes more sense there because libpq's API and ABI are much simpler and more stable. To build a libpqxx for use with a static libpq, however, define the preprocessor symbol PQXX_PQ_STATIC both when compiling libpqxx and while building your own application. Troubleshooting: config headers ------------------------------- The biggest typical problem for Windows/VC++ users is the need to edit the configuration headers manually, resulting usually in compile errors, e.g. for missing header files. Thus, if you get a compile error, the first places to look are the config-*-*.h and config-*-*.h files in include/pqxx. If, for instance, the error states that the header file is missing, you will find a configuration variable called PQXX_HAVE_SYS_SELECT_H, which should not be set if your system doesn't have sys/select.h. Remove the line defining this variable from the configuration header where it is defined (see the configitems file for a list of locations) and the error should disappear on the next compilation attempt. If you have to edit your configuration headers, please send your results to the author or to the libpqxx-general mailing list so that headers corresponding to your environment can be included in later libpqxx releases. Be sure to give a usable personal name so you can be properly credited in the changelog! CAUTION: DO NOT try to unset yes/no configuration items by defining their macros to zero. A value of zero counts as "yes." If a macro is defined at all, that means "yes" (or "true," or "enabled" etc.) regardless of what actual value you set. To disable an item, make sure it is not defined at all. Troubleshooting: linking ------------------------ When you link your application to libpqxx on Windows, you may also need to link to ws2_32.lib. On Visual C++, add these in the compiler user interface under: Project Properties::Linker::Input::Additional Dependencies We recommend that you specify libpqxx_static.lib and ws2_32.lib there, in that order. Visual C++: min() and max() --------------------------- This has been giving people no end of trouble. The Visual C++ compiler, by default, defines min() and max() as preprocessor macros--meaning that a lot of correct, standard-conforming code will not compile properly. The libpqxx headers disable this feature by defining the NOMINMAX preprocessor macro, which tells the Visual C++ headers not to #define min() and max(). However this seems to cause some of Visual C++'s own headers to fail to compile. One way around this is always to include libpqxx headers before system headers, and #undef NOMINMAX between the two sets of #includes. Another workaround, suggested by Trigve Siver, is to include first the system headers and then the libpqxx headers, and finally: #include #define max(x,y) std::max(x,y) #define min(x,y) std::min(x,y) libpqxx-4.0.1+dfsg/win32/Makefile.am000066400000000000000000000003451224474465600171400ustar00rootroot00000000000000EXTRA_DIST = \ common-sample \ INSTALL.txt \ libpqxx.cxx \ mingw.mak.template \ MinGW.mak \ vc-libpqxx.mak.template \ vc-libpqxx.mak \ vc-test.mak.template \ vc-test.mak \ vc-test-unit.mak.template \ vc-test-unit.mak libpqxx-4.0.1+dfsg/win32/Makefile.in000066400000000000000000000255671224474465600171660ustar00rootroot00000000000000# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = win32 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4/libtool.m4 \ $(top_srcdir)/config/m4/ltoptions.m4 \ $(top_srcdir)/config/m4/ltsugar.m4 \ $(top_srcdir)/config/m4/ltversion.m4 \ $(top_srcdir)/config/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/pqxx/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR = @MKDIR@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PG_CONFIG = @PG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@ POSTGRES_INCLUDE = @POSTGRES_INCLUDE@ POSTGRES_LIB = @POSTGRES_LIB@ PQXXVERSION = @PQXXVERSION@ PQXX_ABI = @PQXX_ABI@ PQXX_MAJOR = @PQXX_MAJOR@ PQXX_MINOR = @PQXX_MINOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ with_postgres_include = @with_postgres_include@ with_postgres_lib = @with_postgres_lib@ EXTRA_DIST = \ common-sample \ INSTALL.txt \ libpqxx.cxx \ mingw.mak.template \ MinGW.mak \ vc-libpqxx.mak.template \ vc-libpqxx.mak \ vc-test.mak.template \ vc-test.mak \ vc-test-unit.mak.template \ vc-test-unit.mak all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu win32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu win32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # 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. .NOEXPORT: libpqxx-4.0.1+dfsg/win32/MinGW.mak000066400000000000000000000116601224474465600165610ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/win32/mingw.mak.template'. ################################################################################ # MinGW makefile for libpqxx. Don't use this; use the configure script instead! # Based on original contributed by Pasquale Fersini include win32/common CXX = g++.exe OBJ = \ src/binarystring.o \ src/connection.o \ src/connection_base.o \ src/cursor.o \ src/dbtransaction.o \ src/errorhandler.o \ src/except.o \ src/field.o \ src/largeobject.o \ src/nontransaction.o \ src/notification.o \ src/notify-listen.o \ src/pipeline.o \ src/prepared_statement.o \ src/result.o \ src/robusttransaction.o \ src/statement_parameters.o \ src/strconv.o \ src/subtransaction.o \ src/tablereader.o \ src/tablestream.o \ src/tablewriter.o \ src/transaction.o \ src/transaction_base.o \ src/tuple.o \ src/util.o \ LDFLAGS = -L$(LIBPQPATH) --export-all-symbols --add-stdcall-alias -fpic LIBS = -lpq -lm -lws2_32 CPPFLAGS = -Iinclude -I$(PGSQLINC) -I$(LIBPQINC) \ -DBUILDING_DLL -DPQXX_SHARED -DPGSTD=$(STD) BIN = libpqxx.dll .PHONY: all clean all: libpqxx.dll clean: rm -f $(OBJ) $(BIN) DLLWRAP=dllwrap.exe DEFFILE=libpqxx.def STATICLIB=libpqxx.a $(BIN): $(OBJ) $(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(OBJ) $(LDFLAGS) $(LIBS) -o $(BIN) src/binarystring.o: src/binarystring.cxx $(CXX) $(CPPFLAGS) -c src/binarystring.cxx -o src/binarystring.o $(CXXFLAGS) src/connection.o: src/connection.cxx $(CXX) $(CPPFLAGS) -c src/connection.cxx -o src/connection.o $(CXXFLAGS) src/connection_base.o: src/connection_base.cxx $(CXX) $(CPPFLAGS) -c src/connection_base.cxx -o src/connection_base.o $(CXXFLAGS) src/cursor.o: src/cursor.cxx $(CXX) $(CPPFLAGS) -c src/cursor.cxx -o src/cursor.o $(CXXFLAGS) src/dbtransaction.o: src/dbtransaction.cxx $(CXX) $(CPPFLAGS) -c src/dbtransaction.cxx -o src/dbtransaction.o $(CXXFLAGS) src/errorhandler.o: src/errorhandler.cxx $(CXX) $(CPPFLAGS) -c src/errorhandler.cxx -o src/errorhandler.o $(CXXFLAGS) src/except.o: src/except.cxx $(CXX) $(CPPFLAGS) -c src/except.cxx -o src/except.o $(CXXFLAGS) src/field.o: src/field.cxx $(CXX) $(CPPFLAGS) -c src/field.cxx -o src/field.o $(CXXFLAGS) src/largeobject.o: src/largeobject.cxx $(CXX) $(CPPFLAGS) -c src/largeobject.cxx -o src/largeobject.o $(CXXFLAGS) src/nontransaction.o: src/nontransaction.cxx $(CXX) $(CPPFLAGS) -c src/nontransaction.cxx -o src/nontransaction.o $(CXXFLAGS) src/notification.o: src/notification.cxx $(CXX) $(CPPFLAGS) -c src/notification.cxx -o src/notification.o $(CXXFLAGS) src/notify-listen.o: src/notify-listen.cxx $(CXX) $(CPPFLAGS) -c src/notify-listen.cxx -o src/notify-listen.o $(CXXFLAGS) src/pipeline.o: src/pipeline.cxx $(CXX) $(CPPFLAGS) -c src/pipeline.cxx -o src/pipeline.o $(CXXFLAGS) src/prepared_statement.o: src/prepared_statement.cxx $(CXX) $(CPPFLAGS) -c src/prepared_statement.cxx -o src/prepared_statement.o $(CXXFLAGS) src/result.o: src/result.cxx $(CXX) $(CPPFLAGS) -c src/result.cxx -o src/result.o $(CXXFLAGS) src/robusttransaction.o: src/robusttransaction.cxx $(CXX) $(CPPFLAGS) -c src/robusttransaction.cxx -o src/robusttransaction.o $(CXXFLAGS) src/statement_parameters.o: src/statement_parameters.cxx $(CXX) $(CPPFLAGS) -c src/statement_parameters.cxx -o src/statement_parameters.o $(CXXFLAGS) src/strconv.o: src/strconv.cxx $(CXX) $(CPPFLAGS) -c src/strconv.cxx -o src/strconv.o $(CXXFLAGS) src/subtransaction.o: src/subtransaction.cxx $(CXX) $(CPPFLAGS) -c src/subtransaction.cxx -o src/subtransaction.o $(CXXFLAGS) src/tablereader.o: src/tablereader.cxx $(CXX) $(CPPFLAGS) -c src/tablereader.cxx -o src/tablereader.o $(CXXFLAGS) src/tablestream.o: src/tablestream.cxx $(CXX) $(CPPFLAGS) -c src/tablestream.cxx -o src/tablestream.o $(CXXFLAGS) src/tablewriter.o: src/tablewriter.cxx $(CXX) $(CPPFLAGS) -c src/tablewriter.cxx -o src/tablewriter.o $(CXXFLAGS) src/transaction.o: src/transaction.cxx $(CXX) $(CPPFLAGS) -c src/transaction.cxx -o src/transaction.o $(CXXFLAGS) src/transaction_base.o: src/transaction_base.cxx $(CXX) $(CPPFLAGS) -c src/transaction_base.cxx -o src/transaction_base.o $(CXXFLAGS) src/tuple.o: src/tuple.cxx $(CXX) $(CPPFLAGS) -c src/tuple.cxx -o src/tuple.o $(CXXFLAGS) src/util.o: src/util.cxx $(CXX) $(CPPFLAGS) -c src/util.cxx -o src/util.o $(CXXFLAGS) libpqxx-4.0.1+dfsg/win32/common-sample000066400000000000000000000074141224474465600176020ustar00rootroot00000000000000# Common options for Visual C++ makefiles to build libpqxx and its regression # test. # THE ORIGINAL OF THIS FILE IS CALLED common-sample; DON'T EDIT THE ORIGINAL or # you may lose your changes when you upgrade your libpqxx sources. # Instead, copy "common-sample" to "common" and edit just the file "common". # Caution: on Windows, some environments, such as the "make" that comes with # Visual C++, expect you to use backslashes as path separators (for example, # "C:\src\libpqxx") whereas others like MinGW want you to use more conventional # slashes (as in "C:/src/libpqxx"). # Standard library namespace. # There are only two reasons why you might want to change this: # # 1. Your compiler doesn't define the standard library in the "std" namespace # but in the global namespace, in which case PGSTD should be the empty string. # However, a compiler with that problem is not likely to be good enough to # compile libpqxx. # # 2. You are using a third-party standard library implementation such as # STLport, which lives in another namespace to avoid clashes with the # implementation that came with the compiler. # # In the latter case, PGSTD must be set to the namespace used by your preferred # implementation. In all other cases, just leave this set to "std". STD="std" # If you are using a 3rd-party STL like STLport, remember to check your path # and be sure the STLport is included before the MSVC includes. VCVARS32.BAT # doesn't know anything about the directories as defined in the IDE. I use # # set INCLUDE=\Utility\Code\STLport-4.5\stlport;%INCLUDE% # # ...and set STD to "_STL". # Depending on your STL library min/max need to be defined. Using STLport # there is no need for libpqxx to redefine these for me. # The next line gives us the directory under which all PostgreSQL include # directories, DLLs and LIB files can be found. # # If you built PostgreSQL from source, this is probably the only line you # will need to change. # # If you installed PostgreSQL using the One Click Installer from EnterpriseDB, # comment out the following line and uncomment the line after it. # # Edit the appropriate line to match your specific installation. PGSQLSRC="C:\Sources\postgresql-9.1.1\src" #PGSQLSRC="C:\Program Files\PostgreSQL\9.1" # This is the directory where the Postgres header files, e.g. postgres_ext.h, # are found. PGSQLINC=$(PGSQLSRC)\include # This is the directory where the libpq header files, e.g. libpq-fe.h, # are found. If you used the One Click Installer, comment out the next line # and uncomment the one following it: LIBPQINC=$(PGSQLSRC)\interfaces\libpq #LIBPQINC=$(PGSQLSRC)\include # This is the directory where the release build of the libpq DLL # and its corresponding LIB file are found, as well as the names of # those two files. # # If you installed PostgreSQL using the One Click Installer from EnterpriseDB, # comment out the next three lines and uncomment the following three: LIBPQPATH=$(PGSQLSRC)\interfaces\libpq\Release LIBPQDLL=libpq.dll LIBPQLIB=libpqdll.lib #LIBPQPATH=$(PGSQLSRC)\lib #LIBPQDLL=libpq.dll #LIBPQLIB=libpq.lib # This is the directory where the debug build of the libpq DLL # and its corresponding LIB file are found, as well as the names of # those two files. # # NOTE: If you don't have access to a debug build of libpq, just # provide the same information as above here. The debug builds of # libpqxx will reference the release version of libpq, which will # only limit your ability to debug libpq sources but otherwise should # work just fine. # # If you installed PostgreSQL using the One Click Installer from EnterpriseDB, # comment out the next three lines and uncomment the following three. LIBPQDPATH=$(PGSQLSRC)\interfaces\libpq\Debug LIBPQDDLL=libpqd.dll LIBPQDLIB=libpqddll.lib #LIBPQDPATH=$(PGSQLSRC)\lib #LIBPQDDLL=libpq.dll #LIBPQDLIB=libpq.lib libpqxx-4.0.1+dfsg/win32/libpqxx.cxx000066400000000000000000000003541224474465600173170ustar00rootroot00000000000000// libpqxx.cxx : Defines the entry point for the DLL application. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include BOOL APIENTRY DllMain(HANDLE, DWORD, LPVOID) { return TRUE; } libpqxx-4.0.1+dfsg/win32/mingw.mak.template000066400000000000000000000016701224474465600205330ustar00rootroot00000000000000# MinGW makefile for libpqxx. Don't use this; use the configure script instead! # Based on original contributed by Pasquale Fersini include win32/common CXX = g++.exe OBJ = \ ###MAKTEMPLATE:FOREACH src/*.cxx src/###BASENAME###.o \ ###MAKTEMPLATE:ENDFOREACH LDFLAGS = -L$(LIBPQPATH) --export-all-symbols --add-stdcall-alias -fpic LIBS = -lpq -lm -lws2_32 CPPFLAGS = -Iinclude -I$(PGSQLINC) -I$(LIBPQINC) \ -DBUILDING_DLL -DPQXX_SHARED -DPGSTD=$(STD) BIN = libpqxx.dll .PHONY: all clean all: libpqxx.dll clean: rm -f $(OBJ) $(BIN) DLLWRAP=dllwrap.exe DEFFILE=libpqxx.def STATICLIB=libpqxx.a $(BIN): $(OBJ) $(DLLWRAP) --output-def $(DEFFILE) --driver-name c++ --implib $(STATICLIB) $(OBJ) $(LDFLAGS) $(LIBS) -o $(BIN) ###MAKTEMPLATE:FOREACH src/*.cxx src/###BASENAME###.o: src/###BASENAME###.cxx $(CXX) $(CPPFLAGS) -c src/###BASENAME###.cxx -o src/###BASENAME###.o $(CXXFLAGS) ###MAKTEMPLATE:ENDFOREACH libpqxx-4.0.1+dfsg/win32/vc-libpqxx.mak000066400000000000000000001001341224474465600176700ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/win32/vc-libpqxx.mak.template'. ################################################################################ # Visual C++ makefile for libpqxx # This file was created by Bart Samwel. default: @echo LIBPQXX Makefile for Visual C++ Available Targets @echo ------------------------------------------------- @echo. @echo Static library targets: @echo. @echo STATIC @echo STATICRELEASE (release mode only) @echo STATICDEBUG (debug mode only) @echo. @echo Dynamic Link Library (DLL) targets: @echo. @echo DLL @echo DLLRELEASE @echo DLLDEBUG @echo. @echo Other targets: @echo. @echo ALL: build both the DLL and STATIC builds. @echo CLEAN: clean up all output. @echo. @echo It is recommended that you link to libpqxx statically. Therefore, you should @echo normally build the "STATIC" target. If you want to link your programto libpqxx @echo dynamically, build target "DLL" and compile your program with preprocessor @echo define "PQXX_SHARED". This will make your program link against the DLL version @echo of libpqxx. !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !include win32/common ######################################################## # Configuration ######################################################## # Output DLL/LIB files. No extensions, they are added automatically! OUTDIR=lib OUTFILE_STATICDEBUG=$(OUTDIR)\libpqxx_staticD OUTFILE_STATICRELEASE=$(OUTDIR)\libpqxx_static OUTFILE_DLLDEBUG=$(OUTDIR)\libpqxxD OUTFILE_DLLRELEASE=$(OUTDIR)\libpqxx # Directories for intermediate output. INTDIR_STATICDEBUG=ObjStaticDebug INTDIR_STATICRELEASE=ObjStaticRelease INTDIR_DLLDEBUG=ObjDllDebug INTDIR_DLLRELEASE=ObjDllRelease # C++ compiler, linker (for DLLs) and library tool (for static builds). CXX=cl.exe LINK=link.exe LIBTOOL=link.exe -lib # The options common to all the different builds. CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /I $(PGSQLINC) /I $(LIBPQINC) \ /D PGSTD=$(STD) /D "WIN32" /D "_MBCS" /D "_WINDOWS" /D "PQXX_INTERNAL" CXX_FLAGS_DLLRELEASE=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" /D "PQXX_SHARED" CXX_FLAGS_DLLDEBUG=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /D "PQXX_SHARED" /RTC1 CXX_FLAGS_STATICRELEASE=$(CXX_FLAGS_BASE) /MD /D "_LIB" /D "NDEBUG" CXX_FLAGS_STATICDEBUG=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_LIB" /D "_DEBUG" /RTC1 LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /dll /machine:I386 shell32.lib secur32.lib wldap32.lib LINK_FLAGS_DLLRELEASE=$(LINK_FLAGS_BASE) /libpath:$(LIBPQPATH) $(LIBPQLIB) LINK_FLAGS_DLLDEBUG=$(LINK_FLAGS_BASE) /libpath:$(LIBPQDPATH) $(LIBPQDLIB) /debug LIB_FLAGS=/nologo ######################################################## # List of intermediate files ######################################################## OBJ_STATICDEBUG=\ "$(INTDIR_STATICDEBUG)\binarystring.obj" \ "$(INTDIR_STATICDEBUG)\connection.obj" \ "$(INTDIR_STATICDEBUG)\connection_base.obj" \ "$(INTDIR_STATICDEBUG)\cursor.obj" \ "$(INTDIR_STATICDEBUG)\dbtransaction.obj" \ "$(INTDIR_STATICDEBUG)\errorhandler.obj" \ "$(INTDIR_STATICDEBUG)\except.obj" \ "$(INTDIR_STATICDEBUG)\field.obj" \ "$(INTDIR_STATICDEBUG)\largeobject.obj" \ "$(INTDIR_STATICDEBUG)\nontransaction.obj" \ "$(INTDIR_STATICDEBUG)\notification.obj" \ "$(INTDIR_STATICDEBUG)\notify-listen.obj" \ "$(INTDIR_STATICDEBUG)\pipeline.obj" \ "$(INTDIR_STATICDEBUG)\prepared_statement.obj" \ "$(INTDIR_STATICDEBUG)\result.obj" \ "$(INTDIR_STATICDEBUG)\robusttransaction.obj" \ "$(INTDIR_STATICDEBUG)\statement_parameters.obj" \ "$(INTDIR_STATICDEBUG)\strconv.obj" \ "$(INTDIR_STATICDEBUG)\subtransaction.obj" \ "$(INTDIR_STATICDEBUG)\tablereader.obj" \ "$(INTDIR_STATICDEBUG)\tablestream.obj" \ "$(INTDIR_STATICDEBUG)\tablewriter.obj" \ "$(INTDIR_STATICDEBUG)\transaction.obj" \ "$(INTDIR_STATICDEBUG)\transaction_base.obj" \ "$(INTDIR_STATICDEBUG)\tuple.obj" \ "$(INTDIR_STATICDEBUG)\util.obj" \ OBJ_STATICRELEASE=\ "$(INTDIR_STATICRELEASE)\binarystring.obj" \ "$(INTDIR_STATICRELEASE)\connection.obj" \ "$(INTDIR_STATICRELEASE)\connection_base.obj" \ "$(INTDIR_STATICRELEASE)\cursor.obj" \ "$(INTDIR_STATICRELEASE)\dbtransaction.obj" \ "$(INTDIR_STATICRELEASE)\errorhandler.obj" \ "$(INTDIR_STATICRELEASE)\except.obj" \ "$(INTDIR_STATICRELEASE)\field.obj" \ "$(INTDIR_STATICRELEASE)\largeobject.obj" \ "$(INTDIR_STATICRELEASE)\nontransaction.obj" \ "$(INTDIR_STATICRELEASE)\notification.obj" \ "$(INTDIR_STATICRELEASE)\notify-listen.obj" \ "$(INTDIR_STATICRELEASE)\pipeline.obj" \ "$(INTDIR_STATICRELEASE)\prepared_statement.obj" \ "$(INTDIR_STATICRELEASE)\result.obj" \ "$(INTDIR_STATICRELEASE)\robusttransaction.obj" \ "$(INTDIR_STATICRELEASE)\statement_parameters.obj" \ "$(INTDIR_STATICRELEASE)\strconv.obj" \ "$(INTDIR_STATICRELEASE)\subtransaction.obj" \ "$(INTDIR_STATICRELEASE)\tablereader.obj" \ "$(INTDIR_STATICRELEASE)\tablestream.obj" \ "$(INTDIR_STATICRELEASE)\tablewriter.obj" \ "$(INTDIR_STATICRELEASE)\transaction.obj" \ "$(INTDIR_STATICRELEASE)\transaction_base.obj" \ "$(INTDIR_STATICRELEASE)\tuple.obj" \ "$(INTDIR_STATICRELEASE)\util.obj" \ OBJ_DLLDEBUG=\ "$(INTDIR_DLLDEBUG)\binarystring.obj" \ "$(INTDIR_DLLDEBUG)\connection.obj" \ "$(INTDIR_DLLDEBUG)\connection_base.obj" \ "$(INTDIR_DLLDEBUG)\cursor.obj" \ "$(INTDIR_DLLDEBUG)\dbtransaction.obj" \ "$(INTDIR_DLLDEBUG)\errorhandler.obj" \ "$(INTDIR_DLLDEBUG)\except.obj" \ "$(INTDIR_DLLDEBUG)\field.obj" \ "$(INTDIR_DLLDEBUG)\largeobject.obj" \ "$(INTDIR_DLLDEBUG)\nontransaction.obj" \ "$(INTDIR_DLLDEBUG)\notification.obj" \ "$(INTDIR_DLLDEBUG)\notify-listen.obj" \ "$(INTDIR_DLLDEBUG)\pipeline.obj" \ "$(INTDIR_DLLDEBUG)\prepared_statement.obj" \ "$(INTDIR_DLLDEBUG)\result.obj" \ "$(INTDIR_DLLDEBUG)\robusttransaction.obj" \ "$(INTDIR_DLLDEBUG)\statement_parameters.obj" \ "$(INTDIR_DLLDEBUG)\strconv.obj" \ "$(INTDIR_DLLDEBUG)\subtransaction.obj" \ "$(INTDIR_DLLDEBUG)\tablereader.obj" \ "$(INTDIR_DLLDEBUG)\tablestream.obj" \ "$(INTDIR_DLLDEBUG)\tablewriter.obj" \ "$(INTDIR_DLLDEBUG)\transaction.obj" \ "$(INTDIR_DLLDEBUG)\transaction_base.obj" \ "$(INTDIR_DLLDEBUG)\tuple.obj" \ "$(INTDIR_DLLDEBUG)\util.obj" \ "$(INTDIR_DLLDEBUG)\libpqxx.obj" \ OBJ_DLLRELEASE=\ "$(INTDIR_DLLRELEASE)\binarystring.obj" \ "$(INTDIR_DLLRELEASE)\connection.obj" \ "$(INTDIR_DLLRELEASE)\connection_base.obj" \ "$(INTDIR_DLLRELEASE)\cursor.obj" \ "$(INTDIR_DLLRELEASE)\dbtransaction.obj" \ "$(INTDIR_DLLRELEASE)\errorhandler.obj" \ "$(INTDIR_DLLRELEASE)\except.obj" \ "$(INTDIR_DLLRELEASE)\field.obj" \ "$(INTDIR_DLLRELEASE)\largeobject.obj" \ "$(INTDIR_DLLRELEASE)\nontransaction.obj" \ "$(INTDIR_DLLRELEASE)\notification.obj" \ "$(INTDIR_DLLRELEASE)\notify-listen.obj" \ "$(INTDIR_DLLRELEASE)\pipeline.obj" \ "$(INTDIR_DLLRELEASE)\prepared_statement.obj" \ "$(INTDIR_DLLRELEASE)\result.obj" \ "$(INTDIR_DLLRELEASE)\robusttransaction.obj" \ "$(INTDIR_DLLRELEASE)\statement_parameters.obj" \ "$(INTDIR_DLLRELEASE)\strconv.obj" \ "$(INTDIR_DLLRELEASE)\subtransaction.obj" \ "$(INTDIR_DLLRELEASE)\tablereader.obj" \ "$(INTDIR_DLLRELEASE)\tablestream.obj" \ "$(INTDIR_DLLRELEASE)\tablewriter.obj" \ "$(INTDIR_DLLRELEASE)\transaction.obj" \ "$(INTDIR_DLLRELEASE)\transaction_base.obj" \ "$(INTDIR_DLLRELEASE)\tuple.obj" \ "$(INTDIR_DLLRELEASE)\util.obj" \ "$(INTDIR_DLLRELEASE)\libpqxx.obj" \ ######################################################## # Logical targets ######################################################## static: staticdebug staticrelease dll: dlldebug dllrelease all: static dll $(OUTDIR): -@mkdir $(OUTDIR) staticdebug: $(OUTFILE_STATICDEBUG).lib $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL) $(OUTDIR)\$(LIBPQDLIB) staticrelease: $(OUTFILE_STATICRELEASE).lib $(OUTDIR) $(OUTDIR)\$(LIBPQDLL) $(OUTDIR)\$(LIBPQLIB) dlldebug: $(OUTFILE_DLLDEBUG).dll $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL) dllrelease: $(OUTFILE_DLLRELEASE).dll $(OUTDIR) $(OUTDIR)\$(LIBPQDLL) clean: @echo Deleting all intermediate output files and the contents of $(OUTDIR). -@del /Q "$(INTDIR_STATICDEBUG)\*" -@del /Q "$(INTDIR_STATICRELEASE)\*" -@del /Q "$(INTDIR_DLLDEBUG)\*" -@del /Q "$(INTDIR_DLLRELEASE)\*" -@del /Q "$(OUTDIR)\*" ######################################################## # Physical targets ######################################################## $(OUTDIR)\$(LIBPQDLL): $(OUTDIR) @echo ------------------------------------------------------------- @echo Copying $(LIBPQDLL) to $(OUTDIR). @echo. @echo IMPORTANT: you MUST copy this $(LIBPQDLL) into the directory @echo where your program's .EXE resides. The system $(LIBPQDLL) is @echo not necessarily compatible with the libpq include files that @echo you built libpqxx with. Do NOT copy this file into your @echo Windows system32 directory, that may break other programs. @echo Instead, keep it with your program and distribute it along @echo with the program. @echo ------------------------------------------------------------- copy $(LIBPQPATH)\$(LIBPQDLL) $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL): $(OUTDIR) @echo ------------------------------------------------------------- @echo Copying $(LIBPQDDLL) to $(OUTDIR). @echo. @echo IMPORTANT: you MUST copy this $(LIBPQDDLL) into the directory @echo where your program's .EXE resides, or you must make sure that @echo it is in your system PATH. @echo ------------------------------------------------------------- copy $(LIBPQDPATH)\$(LIBPQDDLL) $(OUTDIR) $(OUTDIR)\$(LIBPQLIB): $(OUTDIR) copy $(LIBPQPATH)\$(LIBPQLIB) $(OUTDIR) $(OUTDIR)\$(LIBPQDLIB): $(OUTDIR) copy $(LIBPQDPATH)\$(LIBPQDLIB) $(OUTDIR) $(OUTFILE_STATICDEBUG).lib: $(OUTDIR) $(OBJ_STATICDEBUG) $(LIBTOOL) $(LIB_FLAGS) $(OBJ_STATICDEBUG) /out:"$(OUTFILE_STATICDEBUG).lib" $(OUTFILE_STATICRELEASE).lib: $(OUTDIR) $(OBJ_STATICRELEASE) $(LIBTOOL) $(LIB_FLAGS) $(OBJ_STATICRELEASE) /out:"$(OUTFILE_STATICRELEASE).lib" $(OUTFILE_DLLDEBUG).dll: $(OUTDIR) $(OBJ_DLLDEBUG) $(LINK) $(LINK_FLAGS_DLLDEBUG) $(OBJ_DLLDEBUG) /out:"$(OUTFILE_DLLDEBUG).dll" /implib:"$(OUTFILE_DLLDEBUG).lib" $(OUTFILE_DLLRELEASE).dll: $(OUTDIR) $(OBJ_DLLRELEASE) $(LINK) $(LINK_FLAGS_DLLRELEASE) $(OBJ_DLLRELEASE) /out:"$(OUTFILE_DLLRELEASE).dll" /implib:"$(OUTFILE_DLLRELEASE).lib" $(INTDIR_STATICDEBUG): -@mkdir $(INTDIR_STATICDEBUG) $(INTDIR_STATICRELEASE): -@mkdir $(INTDIR_STATICRELEASE) $(INTDIR_DLLDEBUG): -@mkdir $(INTDIR_DLLDEBUG) $(INTDIR_DLLRELEASE): -@mkdir $(INTDIR_DLLRELEASE) ######################################################## # Physical intermediate files ######################################################## "$(INTDIR_STATICRELEASE)\binarystring.obj": src/binarystring.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/binarystring.cxx "$(INTDIR_STATICDEBUG)\binarystring.obj": src/binarystring.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/binarystring.cxx "$(INTDIR_STATICRELEASE)\connection.obj": src/connection.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/connection.cxx "$(INTDIR_STATICDEBUG)\connection.obj": src/connection.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/connection.cxx "$(INTDIR_STATICRELEASE)\connection_base.obj": src/connection_base.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/connection_base.cxx "$(INTDIR_STATICDEBUG)\connection_base.obj": src/connection_base.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/connection_base.cxx "$(INTDIR_STATICRELEASE)\cursor.obj": src/cursor.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/cursor.cxx "$(INTDIR_STATICDEBUG)\cursor.obj": src/cursor.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/cursor.cxx "$(INTDIR_STATICRELEASE)\dbtransaction.obj": src/dbtransaction.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/dbtransaction.cxx "$(INTDIR_STATICDEBUG)\dbtransaction.obj": src/dbtransaction.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/dbtransaction.cxx "$(INTDIR_STATICRELEASE)\errorhandler.obj": src/errorhandler.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/errorhandler.cxx "$(INTDIR_STATICDEBUG)\errorhandler.obj": src/errorhandler.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/errorhandler.cxx "$(INTDIR_STATICRELEASE)\except.obj": src/except.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/except.cxx "$(INTDIR_STATICDEBUG)\except.obj": src/except.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/except.cxx "$(INTDIR_STATICRELEASE)\field.obj": src/field.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/field.cxx "$(INTDIR_STATICDEBUG)\field.obj": src/field.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/field.cxx "$(INTDIR_STATICRELEASE)\largeobject.obj": src/largeobject.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/largeobject.cxx "$(INTDIR_STATICDEBUG)\largeobject.obj": src/largeobject.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/largeobject.cxx "$(INTDIR_STATICRELEASE)\nontransaction.obj": src/nontransaction.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/nontransaction.cxx "$(INTDIR_STATICDEBUG)\nontransaction.obj": src/nontransaction.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/nontransaction.cxx "$(INTDIR_STATICRELEASE)\notification.obj": src/notification.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/notification.cxx "$(INTDIR_STATICDEBUG)\notification.obj": src/notification.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/notification.cxx "$(INTDIR_STATICRELEASE)\notify-listen.obj": src/notify-listen.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/notify-listen.cxx "$(INTDIR_STATICDEBUG)\notify-listen.obj": src/notify-listen.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/notify-listen.cxx "$(INTDIR_STATICRELEASE)\pipeline.obj": src/pipeline.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/pipeline.cxx "$(INTDIR_STATICDEBUG)\pipeline.obj": src/pipeline.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/pipeline.cxx "$(INTDIR_STATICRELEASE)\prepared_statement.obj": src/prepared_statement.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/prepared_statement.cxx "$(INTDIR_STATICDEBUG)\prepared_statement.obj": src/prepared_statement.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/prepared_statement.cxx "$(INTDIR_STATICRELEASE)\result.obj": src/result.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/result.cxx "$(INTDIR_STATICDEBUG)\result.obj": src/result.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/result.cxx "$(INTDIR_STATICRELEASE)\robusttransaction.obj": src/robusttransaction.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/robusttransaction.cxx "$(INTDIR_STATICDEBUG)\robusttransaction.obj": src/robusttransaction.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/robusttransaction.cxx "$(INTDIR_STATICRELEASE)\statement_parameters.obj": src/statement_parameters.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/statement_parameters.cxx "$(INTDIR_STATICDEBUG)\statement_parameters.obj": src/statement_parameters.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/statement_parameters.cxx "$(INTDIR_STATICRELEASE)\strconv.obj": src/strconv.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/strconv.cxx "$(INTDIR_STATICDEBUG)\strconv.obj": src/strconv.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/strconv.cxx "$(INTDIR_STATICRELEASE)\subtransaction.obj": src/subtransaction.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/subtransaction.cxx "$(INTDIR_STATICDEBUG)\subtransaction.obj": src/subtransaction.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/subtransaction.cxx "$(INTDIR_STATICRELEASE)\tablereader.obj": src/tablereader.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/tablereader.cxx "$(INTDIR_STATICDEBUG)\tablereader.obj": src/tablereader.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/tablereader.cxx "$(INTDIR_STATICRELEASE)\tablestream.obj": src/tablestream.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/tablestream.cxx "$(INTDIR_STATICDEBUG)\tablestream.obj": src/tablestream.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/tablestream.cxx "$(INTDIR_STATICRELEASE)\tablewriter.obj": src/tablewriter.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/tablewriter.cxx "$(INTDIR_STATICDEBUG)\tablewriter.obj": src/tablewriter.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/tablewriter.cxx "$(INTDIR_STATICRELEASE)\transaction.obj": src/transaction.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/transaction.cxx "$(INTDIR_STATICDEBUG)\transaction.obj": src/transaction.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/transaction.cxx "$(INTDIR_STATICRELEASE)\transaction_base.obj": src/transaction_base.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/transaction_base.cxx "$(INTDIR_STATICDEBUG)\transaction_base.obj": src/transaction_base.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/transaction_base.cxx "$(INTDIR_STATICRELEASE)\tuple.obj": src/tuple.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/tuple.cxx "$(INTDIR_STATICDEBUG)\tuple.obj": src/tuple.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/tuple.cxx "$(INTDIR_STATICRELEASE)\util.obj": src/util.cxx $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" src/util.cxx "$(INTDIR_STATICDEBUG)\util.obj": src/util.cxx $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" src/util.cxx "$(INTDIR_DLLRELEASE)\binarystring.obj": src/binarystring.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/binarystring.cxx "$(INTDIR_DLLDEBUG)\binarystring.obj": src/binarystring.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/binarystring.cxx "$(INTDIR_DLLRELEASE)\connection.obj": src/connection.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/connection.cxx "$(INTDIR_DLLDEBUG)\connection.obj": src/connection.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/connection.cxx "$(INTDIR_DLLRELEASE)\connection_base.obj": src/connection_base.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/connection_base.cxx "$(INTDIR_DLLDEBUG)\connection_base.obj": src/connection_base.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/connection_base.cxx "$(INTDIR_DLLRELEASE)\cursor.obj": src/cursor.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/cursor.cxx "$(INTDIR_DLLDEBUG)\cursor.obj": src/cursor.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/cursor.cxx "$(INTDIR_DLLRELEASE)\dbtransaction.obj": src/dbtransaction.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/dbtransaction.cxx "$(INTDIR_DLLDEBUG)\dbtransaction.obj": src/dbtransaction.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/dbtransaction.cxx "$(INTDIR_DLLRELEASE)\errorhandler.obj": src/errorhandler.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/errorhandler.cxx "$(INTDIR_DLLDEBUG)\errorhandler.obj": src/errorhandler.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/errorhandler.cxx "$(INTDIR_DLLRELEASE)\except.obj": src/except.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/except.cxx "$(INTDIR_DLLDEBUG)\except.obj": src/except.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/except.cxx "$(INTDIR_DLLRELEASE)\field.obj": src/field.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/field.cxx "$(INTDIR_DLLDEBUG)\field.obj": src/field.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/field.cxx "$(INTDIR_DLLRELEASE)\largeobject.obj": src/largeobject.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/largeobject.cxx "$(INTDIR_DLLDEBUG)\largeobject.obj": src/largeobject.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/largeobject.cxx "$(INTDIR_DLLRELEASE)\nontransaction.obj": src/nontransaction.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/nontransaction.cxx "$(INTDIR_DLLDEBUG)\nontransaction.obj": src/nontransaction.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/nontransaction.cxx "$(INTDIR_DLLRELEASE)\notification.obj": src/notification.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/notification.cxx "$(INTDIR_DLLDEBUG)\notification.obj": src/notification.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/notification.cxx "$(INTDIR_DLLRELEASE)\notify-listen.obj": src/notify-listen.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/notify-listen.cxx "$(INTDIR_DLLDEBUG)\notify-listen.obj": src/notify-listen.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/notify-listen.cxx "$(INTDIR_DLLRELEASE)\pipeline.obj": src/pipeline.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/pipeline.cxx "$(INTDIR_DLLDEBUG)\pipeline.obj": src/pipeline.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/pipeline.cxx "$(INTDIR_DLLRELEASE)\prepared_statement.obj": src/prepared_statement.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/prepared_statement.cxx "$(INTDIR_DLLDEBUG)\prepared_statement.obj": src/prepared_statement.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/prepared_statement.cxx "$(INTDIR_DLLRELEASE)\result.obj": src/result.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/result.cxx "$(INTDIR_DLLDEBUG)\result.obj": src/result.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/result.cxx "$(INTDIR_DLLRELEASE)\robusttransaction.obj": src/robusttransaction.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/robusttransaction.cxx "$(INTDIR_DLLDEBUG)\robusttransaction.obj": src/robusttransaction.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/robusttransaction.cxx "$(INTDIR_DLLRELEASE)\statement_parameters.obj": src/statement_parameters.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/statement_parameters.cxx "$(INTDIR_DLLDEBUG)\statement_parameters.obj": src/statement_parameters.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/statement_parameters.cxx "$(INTDIR_DLLRELEASE)\strconv.obj": src/strconv.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/strconv.cxx "$(INTDIR_DLLDEBUG)\strconv.obj": src/strconv.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/strconv.cxx "$(INTDIR_DLLRELEASE)\subtransaction.obj": src/subtransaction.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/subtransaction.cxx "$(INTDIR_DLLDEBUG)\subtransaction.obj": src/subtransaction.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/subtransaction.cxx "$(INTDIR_DLLRELEASE)\tablereader.obj": src/tablereader.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/tablereader.cxx "$(INTDIR_DLLDEBUG)\tablereader.obj": src/tablereader.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/tablereader.cxx "$(INTDIR_DLLRELEASE)\tablestream.obj": src/tablestream.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/tablestream.cxx "$(INTDIR_DLLDEBUG)\tablestream.obj": src/tablestream.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/tablestream.cxx "$(INTDIR_DLLRELEASE)\tablewriter.obj": src/tablewriter.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/tablewriter.cxx "$(INTDIR_DLLDEBUG)\tablewriter.obj": src/tablewriter.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/tablewriter.cxx "$(INTDIR_DLLRELEASE)\transaction.obj": src/transaction.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/transaction.cxx "$(INTDIR_DLLDEBUG)\transaction.obj": src/transaction.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/transaction.cxx "$(INTDIR_DLLRELEASE)\transaction_base.obj": src/transaction_base.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/transaction_base.cxx "$(INTDIR_DLLDEBUG)\transaction_base.obj": src/transaction_base.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/transaction_base.cxx "$(INTDIR_DLLRELEASE)\tuple.obj": src/tuple.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/tuple.cxx "$(INTDIR_DLLDEBUG)\tuple.obj": src/tuple.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/tuple.cxx "$(INTDIR_DLLRELEASE)\util.obj": src/util.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" src/util.cxx "$(INTDIR_DLLDEBUG)\util.obj": src/util.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" src/util.cxx "$(INTDIR_DLLRELEASE)\libpqxx.obj": win32/libpqxx.cxx $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" win32/libpqxx.cxx "$(INTDIR_DLLDEBUG)\libpqxx.obj": win32/libpqxx.cxx $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" win32/libpqxx.cxx libpqxx-4.0.1+dfsg/win32/vc-libpqxx.mak.template000066400000000000000000000162761224474465600215170ustar00rootroot00000000000000# Visual C++ makefile for libpqxx # This file was created by Bart Samwel. default: @echo LIBPQXX Makefile for Visual C++ Available Targets @echo ------------------------------------------------- @echo. @echo Static library targets: @echo. @echo STATIC @echo STATICRELEASE (release mode only) @echo STATICDEBUG (debug mode only) @echo. @echo Dynamic Link Library (DLL) targets: @echo. @echo DLL @echo DLLRELEASE @echo DLLDEBUG @echo. @echo Other targets: @echo. @echo ALL: build both the DLL and STATIC builds. @echo CLEAN: clean up all output. @echo. @echo It is recommended that you link to libpqxx statically. Therefore, you should @echo normally build the "STATIC" target. If you want to link your programto libpqxx @echo dynamically, build target "DLL" and compile your program with preprocessor @echo define "PQXX_SHARED". This will make your program link against the DLL version @echo of libpqxx. !IF "$(OS)" == "Windows_NT" NULL= !ELSE NULL=nul !ENDIF !include win32/common ######################################################## # Configuration ######################################################## # Output DLL/LIB files. No extensions, they are added automatically! OUTDIR=lib OUTFILE_STATICDEBUG=$(OUTDIR)\libpqxx_staticD OUTFILE_STATICRELEASE=$(OUTDIR)\libpqxx_static OUTFILE_DLLDEBUG=$(OUTDIR)\libpqxxD OUTFILE_DLLRELEASE=$(OUTDIR)\libpqxx # Directories for intermediate output. INTDIR_STATICDEBUG=ObjStaticDebug INTDIR_STATICRELEASE=ObjStaticRelease INTDIR_DLLDEBUG=ObjDllDebug INTDIR_DLLRELEASE=ObjDllRelease # C++ compiler, linker (for DLLs) and library tool (for static builds). CXX=cl.exe LINK=link.exe LIBTOOL=link.exe -lib # The options common to all the different builds. CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /I $(PGSQLINC) /I $(LIBPQINC) \ /D PGSTD=$(STD) /D "WIN32" /D "_MBCS" /D "_WINDOWS" /D "PQXX_INTERNAL" CXX_FLAGS_DLLRELEASE=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" /D "PQXX_SHARED" CXX_FLAGS_DLLDEBUG=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /D "PQXX_SHARED" /RTC1 CXX_FLAGS_STATICRELEASE=$(CXX_FLAGS_BASE) /MD /D "_LIB" /D "NDEBUG" CXX_FLAGS_STATICDEBUG=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_LIB" /D "_DEBUG" /RTC1 LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /dll /machine:I386 shell32.lib secur32.lib wldap32.lib LINK_FLAGS_DLLRELEASE=$(LINK_FLAGS_BASE) /libpath:$(LIBPQPATH) $(LIBPQLIB) LINK_FLAGS_DLLDEBUG=$(LINK_FLAGS_BASE) /libpath:$(LIBPQDPATH) $(LIBPQDLIB) /debug LIB_FLAGS=/nologo ######################################################## # List of intermediate files ######################################################## OBJ_STATICDEBUG=\ ###MAKTEMPLATE:FOREACH src/*.cxx "$(INTDIR_STATICDEBUG)\###BASENAME###.obj" \ ###MAKTEMPLATE:ENDFOREACH OBJ_STATICRELEASE=\ ###MAKTEMPLATE:FOREACH src/*.cxx "$(INTDIR_STATICRELEASE)\###BASENAME###.obj" \ ###MAKTEMPLATE:ENDFOREACH OBJ_DLLDEBUG=\ ###MAKTEMPLATE:FOREACH src/*.cxx,win32/libpqxx.cxx "$(INTDIR_DLLDEBUG)\###BASENAME###.obj" \ ###MAKTEMPLATE:ENDFOREACH OBJ_DLLRELEASE=\ ###MAKTEMPLATE:FOREACH src/*.cxx,win32/libpqxx.cxx "$(INTDIR_DLLRELEASE)\###BASENAME###.obj" \ ###MAKTEMPLATE:ENDFOREACH ######################################################## # Logical targets ######################################################## static: staticdebug staticrelease dll: dlldebug dllrelease all: static dll $(OUTDIR): -@mkdir $(OUTDIR) staticdebug: $(OUTFILE_STATICDEBUG).lib $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL) $(OUTDIR)\$(LIBPQDLIB) staticrelease: $(OUTFILE_STATICRELEASE).lib $(OUTDIR) $(OUTDIR)\$(LIBPQDLL) $(OUTDIR)\$(LIBPQLIB) dlldebug: $(OUTFILE_DLLDEBUG).dll $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL) dllrelease: $(OUTFILE_DLLRELEASE).dll $(OUTDIR) $(OUTDIR)\$(LIBPQDLL) clean: @echo Deleting all intermediate output files and the contents of $(OUTDIR). -@del /Q "$(INTDIR_STATICDEBUG)\*" -@del /Q "$(INTDIR_STATICRELEASE)\*" -@del /Q "$(INTDIR_DLLDEBUG)\*" -@del /Q "$(INTDIR_DLLRELEASE)\*" -@del /Q "$(OUTDIR)\*" ######################################################## # Physical targets ######################################################## $(OUTDIR)\$(LIBPQDLL): $(OUTDIR) @echo ------------------------------------------------------------- @echo Copying $(LIBPQDLL) to $(OUTDIR). @echo. @echo IMPORTANT: you MUST copy this $(LIBPQDLL) into the directory @echo where your program's .EXE resides. The system $(LIBPQDLL) is @echo not necessarily compatible with the libpq include files that @echo you built libpqxx with. Do NOT copy this file into your @echo Windows system32 directory, that may break other programs. @echo Instead, keep it with your program and distribute it along @echo with the program. @echo ------------------------------------------------------------- copy $(LIBPQPATH)\$(LIBPQDLL) $(OUTDIR) $(OUTDIR)\$(LIBPQDDLL): $(OUTDIR) @echo ------------------------------------------------------------- @echo Copying $(LIBPQDDLL) to $(OUTDIR). @echo. @echo IMPORTANT: you MUST copy this $(LIBPQDDLL) into the directory @echo where your program's .EXE resides, or you must make sure that @echo it is in your system PATH. @echo ------------------------------------------------------------- copy $(LIBPQDPATH)\$(LIBPQDDLL) $(OUTDIR) $(OUTDIR)\$(LIBPQLIB): $(OUTDIR) copy $(LIBPQPATH)\$(LIBPQLIB) $(OUTDIR) $(OUTDIR)\$(LIBPQDLIB): $(OUTDIR) copy $(LIBPQDPATH)\$(LIBPQDLIB) $(OUTDIR) $(OUTFILE_STATICDEBUG).lib: $(OUTDIR) $(OBJ_STATICDEBUG) $(LIBTOOL) $(LIB_FLAGS) $(OBJ_STATICDEBUG) /out:"$(OUTFILE_STATICDEBUG).lib" $(OUTFILE_STATICRELEASE).lib: $(OUTDIR) $(OBJ_STATICRELEASE) $(LIBTOOL) $(LIB_FLAGS) $(OBJ_STATICRELEASE) /out:"$(OUTFILE_STATICRELEASE).lib" $(OUTFILE_DLLDEBUG).dll: $(OUTDIR) $(OBJ_DLLDEBUG) $(LINK) $(LINK_FLAGS_DLLDEBUG) $(OBJ_DLLDEBUG) /out:"$(OUTFILE_DLLDEBUG).dll" /implib:"$(OUTFILE_DLLDEBUG).lib" $(OUTFILE_DLLRELEASE).dll: $(OUTDIR) $(OBJ_DLLRELEASE) $(LINK) $(LINK_FLAGS_DLLRELEASE) $(OBJ_DLLRELEASE) /out:"$(OUTFILE_DLLRELEASE).dll" /implib:"$(OUTFILE_DLLRELEASE).lib" $(INTDIR_STATICDEBUG): -@mkdir $(INTDIR_STATICDEBUG) $(INTDIR_STATICRELEASE): -@mkdir $(INTDIR_STATICRELEASE) $(INTDIR_DLLDEBUG): -@mkdir $(INTDIR_DLLDEBUG) $(INTDIR_DLLRELEASE): -@mkdir $(INTDIR_DLLRELEASE) ######################################################## # Physical intermediate files ######################################################## ###MAKTEMPLATE:FOREACH src/*.cxx "$(INTDIR_STATICRELEASE)\###BASENAME###.obj": ###FILENAME### $(INTDIR_STATICRELEASE) $(CXX) $(CXX_FLAGS_STATICRELEASE) /Fo"$(INTDIR_STATICRELEASE)\\" /Fd"$(INTDIR_STATICRELEASE)\\" ###FILENAME### "$(INTDIR_STATICDEBUG)\###BASENAME###.obj": ###FILENAME### $(INTDIR_STATICDEBUG) $(CXX) $(CXX_FLAGS_STATICDEBUG) /Fo"$(INTDIR_STATICDEBUG)\\" /Fd"$(INTDIR_STATICDEBUG)\\" ###FILENAME### ###MAKTEMPLATE:ENDFOREACH ###MAKTEMPLATE:FOREACH src/*.cxx,win32/libpqxx.cxx "$(INTDIR_DLLRELEASE)\###BASENAME###.obj": ###FILENAME### $(INTDIR_DLLRELEASE) $(CXX) $(CXX_FLAGS_DLLRELEASE) /Fo"$(INTDIR_DLLRELEASE)\\" /Fd"$(INTDIR_DLLRELEASE)\\" ###FILENAME### "$(INTDIR_DLLDEBUG)\###BASENAME###.obj": ###FILENAME### $(INTDIR_DLLDEBUG) $(CXX) $(CXX_FLAGS_DLLDEBUG) /Fo"$(INTDIR_DLLDEBUG)\\" /Fd"$(INTDIR_DLLDEBUG)\\" ###FILENAME### ###MAKTEMPLATE:ENDFOREACH libpqxx-4.0.1+dfsg/win32/vc-test-unit.mak000066400000000000000000000144301224474465600201400ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/win32/vc-test-unit.mak.template'. ################################################################################ # Visual C++ Makefile for libpqxx unit tests # This file was written by Sam Kapilivsky, based on Bart Samwel's original. default: @echo LIBPQXX unit test suite Makefile for Visual C++ Available Targets @echo ----------------------------------------------------------------- @echo. @echo ALL: perform all tests @echo TEST_xxx: perform specific test xxx @echo CLEAN: clean up all output so that tests will run again. @echo. @echo Pass the option DLL=1 to link the test suite against the libpqxx DLL instead @echo of against the static libpqxx library, and pass DEBUG=1 to link against @echo the debug build of libpqxx. !include win32\common LIBDIR=lib # C++ compiler, linker CXX=cl.exe LINK=link.exe !IF "$(DLL)" == "1" PQXX_SHARED=/D "PQXX_SHARED" PQXXLIBTYPE=Dll PQXXLIBTYPESUFFIX= PQXXLIBEXT=dll !ELSE PQXXLIBTYPE=Static PQXXLIBEXT=lib PQXXLIBTYPESUFFIX=_static !ENDIF CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /I "test" /I $(PGSQLINC) /I $(LIBPQINC) \ /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" $(PQXX_SHARED) LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /machine:I386 /libpath:"$(LIBDIR)" !IF "$(DEBUG)" == "1" BUILDMODE=Debug DEBUGSUFFIX=D CXX_FLAGS=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /RTC1 LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQDLIB) /debug LIBPQ=$(LIBPQDDLL) !ELSE BUILDMODE=Release DEBUGSUFFIX= CXX_FLAGS=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQLIB) LIBPQ=$(LIBPQDLL) !ENDIF INTDIR=Unit$(PQXXLIBTYPE)$(BUILDMODE) PQXXLIB=libpqxx$(PQXXLIBTYPESUFFIX)$(DEBUGSUFFIX).lib PQXX=libpqxx$(DEBUGSUFFIX).dll !IF "$(DLL)" == "1" DLLS=$(INTDIR)\$(LIBPQ) $(INTDIR)\$(PQXX) !ELSE DLLS=$(INTDIR)\$(LIBPQ) !ENDIF OBJS= \ $(INTDIR)\test_binarystring.obj \ $(INTDIR)\test_cancel_query.obj \ $(INTDIR)\test_error_verbosity.obj \ $(INTDIR)\test_errorhandler.obj \ $(INTDIR)\test_escape.obj \ $(INTDIR)\test_exceptions.obj \ $(INTDIR)\test_float.obj \ $(INTDIR)\test_notification.obj \ $(INTDIR)\test_parameterized.obj \ $(INTDIR)\test_pipeline.obj \ $(INTDIR)\test_prepared_statement.obj \ $(INTDIR)\test_read_transaction.obj \ $(INTDIR)\test_result_slicing.obj \ $(INTDIR)\test_simultaneous_transactions.obj \ $(INTDIR)\test_sql_cursor.obj \ $(INTDIR)\test_stateless_cursor.obj \ $(INTDIR)\test_string_conversion.obj \ $(INTDIR)\test_test_helpers.obj \ $(INTDIR)\test_thread_safety_model.obj \ $(INTDIR)\runner.obj ######################################################## # Logical targets ######################################################## all: runner runner: $(INTDIR) $(INTDIR)\runner.exe clean: -@del /Q $(INTDIR)\*.* $(INTDIR): @mkdir $(INTDIR) ######################################################## # Test implementations ######################################################## $(INTDIR)\runner.success: $(INTDIR)\runner.exe @$(INTDIR)\runner.exe @echo >$(INTDIR)\runner.success $(INTDIR)\runner.exe: $(OBJS) $(DLLS) @$(LINK) $(LINK_FLAGS) $(OBJS) $(PQXXLIB) /out:"$(INTDIR)\\runner.exe" $(INTDIR)\runner.obj: @$(CXX) $(CXX_FLAGS) test/unit/runner.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_binarystring.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_binarystring.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_cancel_query.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_cancel_query.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_error_verbosity.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_error_verbosity.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_errorhandler.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_errorhandler.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_escape.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_escape.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_exceptions.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_exceptions.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_float.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_float.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_notification.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_notification.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_parameterized.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_parameterized.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_pipeline.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_pipeline.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_prepared_statement.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_prepared_statement.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_read_transaction.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_read_transaction.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_result_slicing.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_result_slicing.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_simultaneous_transactions.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_simultaneous_transactions.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_sql_cursor.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_sql_cursor.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_stateless_cursor.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_stateless_cursor.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_string_conversion.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_string_conversion.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_test_helpers.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_test_helpers.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test_thread_safety_model.obj: @$(CXX) $(CXX_FLAGS) test/unit/test_thread_safety_model.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\$(LIBPQ): @copy $(LIBDIR)\$(LIBPQ) $(INTDIR) $(INTDIR)\$(PQXX): @copy $(LIBDIR)\$(PQXX) $(INTDIR) libpqxx-4.0.1+dfsg/win32/vc-test-unit.mak.template000066400000000000000000000052631224474465600217560ustar00rootroot00000000000000# Visual C++ Makefile for libpqxx unit tests # This file was written by Sam Kapilivsky, based on Bart Samwel's original. default: @echo LIBPQXX unit test suite Makefile for Visual C++ Available Targets @echo ----------------------------------------------------------------- @echo. @echo ALL: perform all tests @echo TEST_xxx: perform specific test xxx @echo CLEAN: clean up all output so that tests will run again. @echo. @echo Pass the option DLL=1 to link the test suite against the libpqxx DLL instead @echo of against the static libpqxx library, and pass DEBUG=1 to link against @echo the debug build of libpqxx. !include win32\common LIBDIR=lib # C++ compiler, linker CXX=cl.exe LINK=link.exe !IF "$(DLL)" == "1" PQXX_SHARED=/D "PQXX_SHARED" PQXXLIBTYPE=Dll PQXXLIBTYPESUFFIX= PQXXLIBEXT=dll !ELSE PQXXLIBTYPE=Static PQXXLIBEXT=lib PQXXLIBTYPESUFFIX=_static !ENDIF CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /I "test" /I $(PGSQLINC) /I $(LIBPQINC) \ /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" $(PQXX_SHARED) LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /machine:I386 /libpath:"$(LIBDIR)" !IF "$(DEBUG)" == "1" BUILDMODE=Debug DEBUGSUFFIX=D CXX_FLAGS=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /RTC1 LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQDLIB) /debug LIBPQ=$(LIBPQDDLL) !ELSE BUILDMODE=Release DEBUGSUFFIX= CXX_FLAGS=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQLIB) LIBPQ=$(LIBPQDLL) !ENDIF INTDIR=Unit$(PQXXLIBTYPE)$(BUILDMODE) PQXXLIB=libpqxx$(PQXXLIBTYPESUFFIX)$(DEBUGSUFFIX).lib PQXX=libpqxx$(DEBUGSUFFIX).dll !IF "$(DLL)" == "1" DLLS=$(INTDIR)\$(LIBPQ) $(INTDIR)\$(PQXX) !ELSE DLLS=$(INTDIR)\$(LIBPQ) !ENDIF OBJS= \ ###MAKTEMPLATE:FOREACH test/unit/test*.cxx $(INTDIR)\###BASENAME###.obj \ ###MAKTEMPLATE:ENDFOREACH $(INTDIR)\runner.obj ######################################################## # Logical targets ######################################################## all: runner runner: $(INTDIR) $(INTDIR)\runner.exe clean: -@del /Q $(INTDIR)\*.* $(INTDIR): @mkdir $(INTDIR) ######################################################## # Test implementations ######################################################## $(INTDIR)\runner.success: $(INTDIR)\runner.exe @$(INTDIR)\runner.exe @echo >$(INTDIR)\runner.success $(INTDIR)\runner.exe: $(OBJS) $(DLLS) @$(LINK) $(LINK_FLAGS) $(OBJS) $(PQXXLIB) /out:"$(INTDIR)\\runner.exe" ###MAKTEMPLATE:FOREACH test/unit/*.cxx $(INTDIR)\###BASENAME###.obj: @$(CXX) $(CXX_FLAGS) ###FILENAME### /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" ###MAKTEMPLATE:ENDFOREACH $(INTDIR)\$(LIBPQ): @copy $(LIBDIR)\$(LIBPQ) $(INTDIR) $(INTDIR)\$(PQXX): @copy $(LIBDIR)\$(PQXX) $(INTDIR) libpqxx-4.0.1+dfsg/win32/vc-test.mak000066400000000000000000000274641224474465600171760ustar00rootroot00000000000000################################################################################ # AUTOMATICALLY GENERATED FILE--DO NOT EDIT # # This file is generated automatically by libpqxx's template2mak.py script. # # If you modify this file, chances are your modifications will be lost because # the file will be re-written from time to time. # # The template2mak.py script should be available in the tools directory of the # libpqxx source archive. # # Generated from template '/home/jtv/proj/libpqxx/tags/4.0.1/win32/vc-test.mak.template'. ################################################################################ # Visual C++ Makefile for libpqxx test suite # This file was written by Bart Samwel. default: @echo LIBPQXX testsuite Makefile for Visual C++ Available Targets @echo ----------------------------------------------------------- @echo. @echo ALL: perform all tests @echo TESTxxx: perform specific test xxx @echo CLEAN: clean up all output so that tests will run again. @echo. @echo Pass the option DLL=1 to link the test suite against the libpqxx DLL instead @echo of against the static libpqxx library, and pass DEBUG=1 to link against @echo the debug build of libpqxx. !include win32\common LIBDIR=lib # C++ compiler, linker CXX=cl.exe LINK=link.exe !IF "$(DLL)" == "1" PQXX_SHARED=/D "PQXX_SHARED" PQXXLIBTYPE=Dll PQXXLIBTYPESUFFIX= PQXXLIBEXT=dll !ELSE PQXXLIBTYPE=Static PQXXLIBEXT=lib PQXXLIBTYPESUFFIX=_static !ENDIF CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" $(PQXX_SHARED) LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /machine:I386 /libpath:"$(LIBDIR)" !IF "$(DEBUG)" == "1" BUILDMODE=Debug DEBUGSUFFIX=D CXX_FLAGS=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /RTC1 LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQDLIB) /debug LIBPQ=$(LIBPQDDLL) !ELSE BUILDMODE=Release DEBUGSUFFIX= CXX_FLAGS=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQLIB) LIBPQ=$(LIBPQDLL) !ENDIF INTDIR=Test$(PQXXLIBTYPE)$(BUILDMODE) PQXXLIB=libpqxx$(PQXXLIBTYPESUFFIX)$(DEBUGSUFFIX).lib PQXX=libpqxx$(DEBUGSUFFIX).dll !IF "$(DLL)" == "1" DLLS=$(INTDIR)\$(LIBPQ) $(INTDIR)\$(PQXX) !ELSE DLLS=$(INTDIR)\$(LIBPQ) !ENDIF OBJS= \ $(INTDIR)\test000.obj \ $(INTDIR)\test001.obj \ $(INTDIR)\test002.obj \ $(INTDIR)\test004.obj \ $(INTDIR)\test007.obj \ $(INTDIR)\test010.obj \ $(INTDIR)\test011.obj \ $(INTDIR)\test012.obj \ $(INTDIR)\test013.obj \ $(INTDIR)\test014.obj \ $(INTDIR)\test015.obj \ $(INTDIR)\test016.obj \ $(INTDIR)\test017.obj \ $(INTDIR)\test018.obj \ $(INTDIR)\test020.obj \ $(INTDIR)\test021.obj \ $(INTDIR)\test023.obj \ $(INTDIR)\test026.obj \ $(INTDIR)\test029.obj \ $(INTDIR)\test030.obj \ $(INTDIR)\test031.obj \ $(INTDIR)\test032.obj \ $(INTDIR)\test033.obj \ $(INTDIR)\test034.obj \ $(INTDIR)\test035.obj \ $(INTDIR)\test036.obj \ $(INTDIR)\test037.obj \ $(INTDIR)\test039.obj \ $(INTDIR)\test046.obj \ $(INTDIR)\test048.obj \ $(INTDIR)\test049.obj \ $(INTDIR)\test050.obj \ $(INTDIR)\test051.obj \ $(INTDIR)\test052.obj \ $(INTDIR)\test053.obj \ $(INTDIR)\test054.obj \ $(INTDIR)\test055.obj \ $(INTDIR)\test056.obj \ $(INTDIR)\test057.obj \ $(INTDIR)\test058.obj \ $(INTDIR)\test059.obj \ $(INTDIR)\test060.obj \ $(INTDIR)\test061.obj \ $(INTDIR)\test062.obj \ $(INTDIR)\test063.obj \ $(INTDIR)\test064.obj \ $(INTDIR)\test065.obj \ $(INTDIR)\test066.obj \ $(INTDIR)\test067.obj \ $(INTDIR)\test069.obj \ $(INTDIR)\test070.obj \ $(INTDIR)\test071.obj \ $(INTDIR)\test072.obj \ $(INTDIR)\test073.obj \ $(INTDIR)\test074.obj \ $(INTDIR)\test075.obj \ $(INTDIR)\test076.obj \ $(INTDIR)\test077.obj \ $(INTDIR)\test078.obj \ $(INTDIR)\test079.obj \ $(INTDIR)\test082.obj \ $(INTDIR)\test083.obj \ $(INTDIR)\test084.obj \ $(INTDIR)\test086.obj \ $(INTDIR)\test087.obj \ $(INTDIR)\test088.obj \ $(INTDIR)\test089.obj \ $(INTDIR)\test090.obj \ $(INTDIR)\test092.obj \ $(INTDIR)\test093.obj \ $(INTDIR)\test094.obj \ $(INTDIR)\runner.obj ######################################################## # Logical targets ######################################################## all: runner runner: $(INTDIR) $(INTDIR)\runner.exe clean: -@del /Q $(INTDIR)\*.* $(INTDIR): @mkdir $(INTDIR) ######################################################## # Test implementations ######################################################## $(INTDIR)\runner.success: $(INTDIR)\runner.exe @$(INTDIR)\runner.exe @echo >$(INTDIR)\runner.success $(INTDIR)\runner.exe: $(OBJS) $(DLLS) @$(LINK) $(LINK_FLAGS) $(OBJS) $(PQXXLIB) \ /out:"$(INTDIR)\\runner.exe" $(INTDIR)\runner.obj: @$(CXX) $(CXX_FLAGS) test/runner.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test000.obj: @$(CXX) $(CXX_FLAGS) test/test000.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test001.obj: @$(CXX) $(CXX_FLAGS) test/test001.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test002.obj: @$(CXX) $(CXX_FLAGS) test/test002.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test004.obj: @$(CXX) $(CXX_FLAGS) test/test004.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test007.obj: @$(CXX) $(CXX_FLAGS) test/test007.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test010.obj: @$(CXX) $(CXX_FLAGS) test/test010.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test011.obj: @$(CXX) $(CXX_FLAGS) test/test011.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test012.obj: @$(CXX) $(CXX_FLAGS) test/test012.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test013.obj: @$(CXX) $(CXX_FLAGS) test/test013.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test014.obj: @$(CXX) $(CXX_FLAGS) test/test014.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test015.obj: @$(CXX) $(CXX_FLAGS) test/test015.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test016.obj: @$(CXX) $(CXX_FLAGS) test/test016.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test017.obj: @$(CXX) $(CXX_FLAGS) test/test017.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test018.obj: @$(CXX) $(CXX_FLAGS) test/test018.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test020.obj: @$(CXX) $(CXX_FLAGS) test/test020.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test021.obj: @$(CXX) $(CXX_FLAGS) test/test021.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test023.obj: @$(CXX) $(CXX_FLAGS) test/test023.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test026.obj: @$(CXX) $(CXX_FLAGS) test/test026.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test029.obj: @$(CXX) $(CXX_FLAGS) test/test029.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test030.obj: @$(CXX) $(CXX_FLAGS) test/test030.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test031.obj: @$(CXX) $(CXX_FLAGS) test/test031.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test032.obj: @$(CXX) $(CXX_FLAGS) test/test032.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test033.obj: @$(CXX) $(CXX_FLAGS) test/test033.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test034.obj: @$(CXX) $(CXX_FLAGS) test/test034.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test035.obj: @$(CXX) $(CXX_FLAGS) test/test035.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test036.obj: @$(CXX) $(CXX_FLAGS) test/test036.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test037.obj: @$(CXX) $(CXX_FLAGS) test/test037.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test039.obj: @$(CXX) $(CXX_FLAGS) test/test039.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test046.obj: @$(CXX) $(CXX_FLAGS) test/test046.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test048.obj: @$(CXX) $(CXX_FLAGS) test/test048.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test049.obj: @$(CXX) $(CXX_FLAGS) test/test049.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test050.obj: @$(CXX) $(CXX_FLAGS) test/test050.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test051.obj: @$(CXX) $(CXX_FLAGS) test/test051.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test052.obj: @$(CXX) $(CXX_FLAGS) test/test052.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test053.obj: @$(CXX) $(CXX_FLAGS) test/test053.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test054.obj: @$(CXX) $(CXX_FLAGS) test/test054.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test055.obj: @$(CXX) $(CXX_FLAGS) test/test055.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test056.obj: @$(CXX) $(CXX_FLAGS) test/test056.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test057.obj: @$(CXX) $(CXX_FLAGS) test/test057.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test058.obj: @$(CXX) $(CXX_FLAGS) test/test058.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test059.obj: @$(CXX) $(CXX_FLAGS) test/test059.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test060.obj: @$(CXX) $(CXX_FLAGS) test/test060.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test061.obj: @$(CXX) $(CXX_FLAGS) test/test061.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test062.obj: @$(CXX) $(CXX_FLAGS) test/test062.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test063.obj: @$(CXX) $(CXX_FLAGS) test/test063.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test064.obj: @$(CXX) $(CXX_FLAGS) test/test064.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test065.obj: @$(CXX) $(CXX_FLAGS) test/test065.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test066.obj: @$(CXX) $(CXX_FLAGS) test/test066.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test067.obj: @$(CXX) $(CXX_FLAGS) test/test067.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test069.obj: @$(CXX) $(CXX_FLAGS) test/test069.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test070.obj: @$(CXX) $(CXX_FLAGS) test/test070.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test071.obj: @$(CXX) $(CXX_FLAGS) test/test071.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test072.obj: @$(CXX) $(CXX_FLAGS) test/test072.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test073.obj: @$(CXX) $(CXX_FLAGS) test/test073.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test074.obj: @$(CXX) $(CXX_FLAGS) test/test074.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test075.obj: @$(CXX) $(CXX_FLAGS) test/test075.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test076.obj: @$(CXX) $(CXX_FLAGS) test/test076.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test077.obj: @$(CXX) $(CXX_FLAGS) test/test077.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test078.obj: @$(CXX) $(CXX_FLAGS) test/test078.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test079.obj: @$(CXX) $(CXX_FLAGS) test/test079.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test082.obj: @$(CXX) $(CXX_FLAGS) test/test082.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test083.obj: @$(CXX) $(CXX_FLAGS) test/test083.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test084.obj: @$(CXX) $(CXX_FLAGS) test/test084.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test086.obj: @$(CXX) $(CXX_FLAGS) test/test086.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test087.obj: @$(CXX) $(CXX_FLAGS) test/test087.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test088.obj: @$(CXX) $(CXX_FLAGS) test/test088.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test089.obj: @$(CXX) $(CXX_FLAGS) test/test089.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test090.obj: @$(CXX) $(CXX_FLAGS) test/test090.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test092.obj: @$(CXX) $(CXX_FLAGS) test/test092.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test093.obj: @$(CXX) $(CXX_FLAGS) test/test093.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\test094.obj: @$(CXX) $(CXX_FLAGS) test/test094.cxx /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" $(INTDIR)\$(LIBPQ): @copy $(LIBDIR)\$(LIBPQ) $(INTDIR) $(INTDIR)\$(PQXX): @copy $(LIBDIR)\$(PQXX) $(INTDIR) libpqxx-4.0.1+dfsg/win32/vc-test.mak.template000066400000000000000000000051151224474465600207750ustar00rootroot00000000000000# Visual C++ Makefile for libpqxx test suite # This file was written by Bart Samwel. default: @echo LIBPQXX testsuite Makefile for Visual C++ Available Targets @echo ----------------------------------------------------------- @echo. @echo ALL: perform all tests @echo TESTxxx: perform specific test xxx @echo CLEAN: clean up all output so that tests will run again. @echo. @echo Pass the option DLL=1 to link the test suite against the libpqxx DLL instead @echo of against the static libpqxx library, and pass DEBUG=1 to link against @echo the debug build of libpqxx. !include win32\common LIBDIR=lib # C++ compiler, linker CXX=cl.exe LINK=link.exe !IF "$(DLL)" == "1" PQXX_SHARED=/D "PQXX_SHARED" PQXXLIBTYPE=Dll PQXXLIBTYPESUFFIX= PQXXLIBEXT=dll !ELSE PQXXLIBTYPE=Static PQXXLIBEXT=lib PQXXLIBTYPESUFFIX=_static !ENDIF CXX_FLAGS_BASE=/nologo /W3 /EHsc /FD /GR /c \ /I "include" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" $(PQXX_SHARED) LINK_FLAGS_BASE=kernel32.lib ws2_32.lib advapi32.lib /nologo /machine:I386 /libpath:"$(LIBDIR)" !IF "$(DEBUG)" == "1" BUILDMODE=Debug DEBUGSUFFIX=D CXX_FLAGS=$(CXX_FLAGS_BASE) /MDd /Gm /ZI /Od /D "_DEBUG" /RTC1 LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQDLIB) /debug LIBPQ=$(LIBPQDDLL) !ELSE BUILDMODE=Release DEBUGSUFFIX= CXX_FLAGS=$(CXX_FLAGS_BASE) /MD /D "NDEBUG" LINK_FLAGS=$(LINK_FLAGS_BASE) $(LIBPQLIB) LIBPQ=$(LIBPQDLL) !ENDIF INTDIR=Test$(PQXXLIBTYPE)$(BUILDMODE) PQXXLIB=libpqxx$(PQXXLIBTYPESUFFIX)$(DEBUGSUFFIX).lib PQXX=libpqxx$(DEBUGSUFFIX).dll !IF "$(DLL)" == "1" DLLS=$(INTDIR)\$(LIBPQ) $(INTDIR)\$(PQXX) !ELSE DLLS=$(INTDIR)\$(LIBPQ) !ENDIF OBJS= \ ###MAKTEMPLATE:FOREACH test/test*.cxx $(INTDIR)\###BASENAME###.obj \ ###MAKTEMPLATE:ENDFOREACH $(INTDIR)\runner.obj ######################################################## # Logical targets ######################################################## all: runner runner: $(INTDIR) $(INTDIR)\runner.exe clean: -@del /Q $(INTDIR)\*.* $(INTDIR): @mkdir $(INTDIR) ######################################################## # Test implementations ######################################################## $(INTDIR)\runner.success: $(INTDIR)\runner.exe @$(INTDIR)\runner.exe @echo >$(INTDIR)\runner.success $(INTDIR)\runner.exe: $(OBJS) $(DLLS) @$(LINK) $(LINK_FLAGS) $(OBJS) $(PQXXLIB) \ /out:"$(INTDIR)\\runner.exe" ###MAKTEMPLATE:FOREACH test/*.cxx $(INTDIR)\###BASENAME###.obj: @$(CXX) $(CXX_FLAGS) ###FILENAME### /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" ###MAKTEMPLATE:ENDFOREACH $(INTDIR)\$(LIBPQ): @copy $(LIBDIR)\$(LIBPQ) $(INTDIR) $(INTDIR)\$(PQXX): @copy $(LIBDIR)\$(PQXX) $(INTDIR)