diff --git a/include/Makefile.am b/include/Makefile.am index de8f31b34..83d2b1970 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -38,7 +38,6 @@ nobase_include_HEADERS= pqxx/pqxx \ pqxx/version pqxx/version.hxx \ pqxx/internal/array-composite.hxx \ pqxx/internal/callgate.hxx \ - pqxx/internal/compiler-public.hxx \ pqxx/internal/concat.hxx \ pqxx/internal/conversions.hxx \ pqxx/internal/encoding_group.hxx \ diff --git a/include/Makefile.in b/include/Makefile.in index 716d3664e..6b9eac914 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -387,7 +387,6 @@ nobase_include_HEADERS = pqxx/pqxx \ pqxx/version pqxx/version.hxx \ pqxx/internal/array-composite.hxx \ pqxx/internal/callgate.hxx \ - pqxx/internal/compiler-public.hxx \ pqxx/internal/concat.hxx \ pqxx/internal/conversions.hxx \ pqxx/internal/encoding_group.hxx \ diff --git a/include/pqxx/array b/include/pqxx/array index db9013ad2..689f5b27b 100644 --- a/include/pqxx/array +++ b/include/pqxx/array @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/array.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/array.hxx b/include/pqxx/array.hxx index 07bc463bc..8440a244f 100644 --- a/include/pqxx/array.hxx +++ b/include/pqxx/array.hxx @@ -11,17 +11,17 @@ #ifndef PQXX_H_ARRAY #define PQXX_H_ARRAY -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif -#include "pqxx/internal/encoding_group.hxx" -#include "pqxx/internal/encodings.hxx" - #include #include #include +#include "pqxx/internal/encoding_group.hxx" +#include "pqxx/internal/encodings.hxx" + namespace pqxx { diff --git a/include/pqxx/binarystring b/include/pqxx/binarystring index bd1f8a578..77551d9f7 100644 --- a/include/pqxx/binarystring +++ b/include/pqxx/binarystring @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/binarystring.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/binarystring.hxx b/include/pqxx/binarystring.hxx index e935208c1..47c82a035 100644 --- a/include/pqxx/binarystring.hxx +++ b/include/pqxx/binarystring.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_BINARYSTRING #define PQXX_H_BINARYSTRING -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/blob b/include/pqxx/blob index 6727a0283..3fd0afac9 100644 --- a/include/pqxx/blob +++ b/include/pqxx/blob @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/blob.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/blob.hxx b/include/pqxx/blob.hxx index 2a0ed897b..6d77be724 100644 --- a/include/pqxx/blob.hxx +++ b/include/pqxx/blob.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_BLOB #define PQXX_H_BLOB -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/composite b/include/pqxx/composite index fbf4c0457..2bfa7ade9 100644 --- a/include/pqxx/composite +++ b/include/pqxx/composite @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/composite.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/composite.hxx b/include/pqxx/composite.hxx index c2ba0bb5c..439b133a8 100644 --- a/include/pqxx/composite.hxx +++ b/include/pqxx/composite.hxx @@ -1,7 +1,7 @@ #ifndef PQXX_H_COMPOSITE #define PQXX_H_COMPOSITE -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/connection b/include/pqxx/connection index 218274200..82ff43aa5 100644 --- a/include/pqxx/connection +++ b/include/pqxx/connection @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/connection.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/connection.hxx b/include/pqxx/connection.hxx index d352e1584..663960679 100644 --- a/include/pqxx/connection.hxx +++ b/include/pqxx/connection.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_CONNECTION #define PQXX_H_CONNECTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/cursor b/include/pqxx/cursor index ae5ef7fda..e20b3a4fa 100644 --- a/include/pqxx/cursor +++ b/include/pqxx/cursor @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/cursor.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/cursor.hxx b/include/pqxx/cursor.hxx index 2c02923d4..b392e2407 100644 --- a/include/pqxx/cursor.hxx +++ b/include/pqxx/cursor.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_CURSOR #define PQXX_H_CURSOR -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/dbtransaction b/include/pqxx/dbtransaction index 0a86859f6..fa8d26476 100644 --- a/include/pqxx/dbtransaction +++ b/include/pqxx/dbtransaction @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/dbtransaction.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/dbtransaction.hxx b/include/pqxx/dbtransaction.hxx index 03d1df657..d85cb170f 100644 --- a/include/pqxx/dbtransaction.hxx +++ b/include/pqxx/dbtransaction.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_DBTRANSACTION #define PQXX_H_DBTRANSACTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/errorhandler b/include/pqxx/errorhandler index 6a3130d0d..ea572ee79 100644 --- a/include/pqxx/errorhandler +++ b/include/pqxx/errorhandler @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/errorhandler.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/errorhandler.hxx b/include/pqxx/errorhandler.hxx index 87eb7e08f..2ffb5703c 100644 --- a/include/pqxx/errorhandler.hxx +++ b/include/pqxx/errorhandler.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_ERRORHANDLER #define PQXX_H_ERRORHANDLER -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/except b/include/pqxx/except index 82acb521f..e5dd508bf 100644 --- a/include/pqxx/except +++ b/include/pqxx/except @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/except.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/except.hxx b/include/pqxx/except.hxx index 3d4235eb2..24f959437 100644 --- a/include/pqxx/except.hxx +++ b/include/pqxx/except.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_EXCEPT #define PQXX_H_EXCEPT -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/field b/include/pqxx/field index d7170770f..37cb69e84 100644 --- a/include/pqxx/field +++ b/include/pqxx/field @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/field.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/field.hxx b/include/pqxx/field.hxx index 526019b62..b8b869fe4 100644 --- a/include/pqxx/field.hxx +++ b/include/pqxx/field.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_FIELD #define PQXX_H_FIELD -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/internal/compiler-public.hxx b/include/pqxx/internal/compiler-public.hxx deleted file mode 100644 index 6e8318767..000000000 --- a/include/pqxx/internal/compiler-public.hxx +++ /dev/null @@ -1,134 +0,0 @@ -/* Definitions and settings for compiling libpqxx, and client software. - * - * Include this before any other libpqxx code. To do that, put it at the top - * of every public libpqxx header file. - * - * Copyright (c) 2000-2022, 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 - -// Workarounds & definitions that need to be included even in library's headers -#include "pqxx/config-public-compiler.h" - -// Enable ISO-646 alternative operaotr representations: "and" instead of "&&" -// etc. on older compilers. C++20 removes this header. -#if __has_include() -# include -#endif - - -#if defined(PQXX_HAVE_GCC_PURE) -/// Declare function "pure": no side effects, only reads globals and its args. -# define PQXX_PURE __attribute__((pure)) -#else -# define PQXX_PURE /* pure */ -#endif - - -#if defined(__GNUC__) -/// Tell the compiler to optimise a function for size, not speed. -# define PQXX_COLD __attribute__((cold)) -#else -# define PQXX_COLD /* cold */ -#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" - */ -# if defined(PQXX_SHARED) && !defined(PQXX_LIBEXPORT) -# define PQXX_LIBEXPORT __declspec(dllimport) -# endif // PQXX_SHARED && !PQXX_LIBEXPORT - - -// Workarounds for Microsoft Visual C++ -# ifdef _MSC_VER - -// Suppress vtables on abstract classes. -# define PQXX_NOVTABLE __declspec(novtable) - -// 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 -// appropriate libpqxx library. To link with the libpqxx DLL, define -// PQXX_SHARED; the default is to link with the static library. A static link -// is the recommended practice. -// -// 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 macro. -# 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 - -# endif // _MSC_VER - -#elif defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32 - -# define PQXX_LIBEXPORT __attribute__((visibility("default"))) -# define PQXX_PRIVATE __attribute__((visibility("hidden"))) - -#endif // PQXX_HAVE_GCC_VISIBILITY - - -#ifndef PQXX_LIBEXPORT -# define PQXX_LIBEXPORT /* libexport */ -#endif - -#ifndef PQXX_PRIVATE -# define PQXX_PRIVATE /* private */ -#endif - -#ifndef PQXX_NOVTABLE -# define PQXX_NOVTABLE /* novtable */ -#endif - -// C++20: Assume support. -#if defined(PQXX_HAVE_LIKELY) -# define PQXX_LIKELY [[likely]] -# define PQXX_UNLIKELY [[unlikely]] -#else -# define PQXX_LIKELY /* [[likely]] */ -# define PQXX_UNLIKELY /* [[unlikely]] */ -#endif - -#endif diff --git a/include/pqxx/internal/gates/connection-notification_receiver.hxx b/include/pqxx/internal/gates/connection-notification_receiver.hxx index 5475c5f40..0bcb2db17 100644 --- a/include/pqxx/internal/gates/connection-notification_receiver.hxx +++ b/include/pqxx/internal/gates/connection-notification_receiver.hxx @@ -1,6 +1,6 @@ #include -#include +#include "pqxx/connection.hxx" namespace pqxx diff --git a/include/pqxx/internal/gates/connection-pipeline.hxx b/include/pqxx/internal/gates/connection-pipeline.hxx index 59c845657..c6ae6e17a 100644 --- a/include/pqxx/internal/gates/connection-pipeline.hxx +++ b/include/pqxx/internal/gates/connection-pipeline.hxx @@ -1,6 +1,8 @@ #include "pqxx/internal/libpq-forward.hxx" #include +#include "pqxx/pipeline.hxx" + namespace pqxx::internal::gate { class PQXX_PRIVATE connection_pipeline : callgate diff --git a/include/pqxx/internal/gates/connection-stream_to.hxx b/include/pqxx/internal/gates/connection-stream_to.hxx index 5b1c8df96..a6974fb21 100644 --- a/include/pqxx/internal/gates/connection-stream_to.hxx +++ b/include/pqxx/internal/gates/connection-stream_to.hxx @@ -1,5 +1,8 @@ #include +#include "pqxx/stream_to.hxx" + + namespace pqxx::internal::gate { class PQXX_PRIVATE connection_stream_to : callgate diff --git a/include/pqxx/internal/gates/transaction-transaction_focus.hxx b/include/pqxx/internal/gates/transaction-transaction_focus.hxx index f824726ae..ca7939a99 100644 --- a/include/pqxx/internal/gates/transaction-transaction_focus.hxx +++ b/include/pqxx/internal/gates/transaction-transaction_focus.hxx @@ -1,5 +1,7 @@ #include +#include "pqxx/transaction_base.hxx" + namespace pqxx::internal::gate { class PQXX_PRIVATE transaction_transaction_focus : callgate diff --git a/include/pqxx/internal/header-post.hxx b/include/pqxx/internal/header-post.hxx index e7d6ad82e..a98495830 100644 --- a/include/pqxx/internal/header-post.hxx +++ b/include/pqxx/internal/header-post.hxx @@ -14,3 +14,5 @@ #if defined(_MSC_VER) # pragma warning(pop) // Restore compiler's warning state #endif + +#undef PQXX_HEADER_PRE diff --git a/include/pqxx/internal/header-pre.hxx b/include/pqxx/internal/header-pre.hxx index 0b93f2f3e..09715a329 100644 --- a/include/pqxx/internal/header-pre.hxx +++ b/include/pqxx/internal/header-pre.hxx @@ -1,10 +1,14 @@ -/* Compiler deficiency workarounds for compiling libpqxx headers. +/* Compiler settings for compiling libpqxx headers, and workarounds for all. * - * To be called at the start of each libpqxx header, in order to push the - * client program's settings and apply libpqxx's settings. + * Include this before including any other libpqxx headers from within libpqxx. + * And to balance it out, also include header-post.hxx at the end of the batch + * of headers. * - * Must be balanced by an include of -header-post.hxx at the end - * of the header. + * The public libpqxx headers (e.g. ``) include this already; + * there's no need to do this from within an application. + * + * Include this file at the highest aggregation level possible to avoid nesting + * and to keep things simple. * * Copyright (c) 2000-2022, Jeroen T. Vermeulen. * @@ -12,13 +16,12 @@ * COPYING with this source code, please notify the distributor of this * mistake, or contact the author. */ -// NO GUARD HERE! This code should be included every time this file is. +// NO GUARD HERE! This part should be included every time this file is. #if defined(_MSC_VER) -// Save compiler's warning state, and set warning level 4. -// Setting the warning level explicitly ensures that libpqxx -// headers will compile at this warning level as well. +// Save compiler's warning state, and set warning level 4 for maximum +// sensitivity to warnings. # pragma warning(push, 4) // Visual C++ generates some entirely unreasonable warnings. Disable them. @@ -37,3 +40,130 @@ # pragma warning(disable : 4275) #endif // _MSC_VER + + +#if defined(PQXX_HEADER_PRE) +#error "Avoid nesting #include of pqxx/internal/header-pre.hxx." +#endif + +#define PQXX_HEADER_PRE + + +// Workarounds & definitions that need to be included even in library's headers +# include "pqxx/config-public-compiler.h" + +// Enable ISO-646 alternative operaotr representations: "and" instead of "&&" +// etc. on older compilers. C++20 removes this header. +# if __has_include() +# include +# endif + + +# if defined(PQXX_HAVE_GCC_PURE) +/// Declare function "pure": no side effects, only reads globals and its args. +# define PQXX_PURE __attribute__((pure)) +# else +# define PQXX_PURE /* pure */ +# endif + + +# if defined(__GNUC__) +/// Tell the compiler to optimise a function for size, not speed. +# define PQXX_COLD __attribute__((cold)) +# else +# define PQXX_COLD /* cold */ +# 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" + */ +# if defined(PQXX_SHARED) && !defined(PQXX_LIBEXPORT) +# define PQXX_LIBEXPORT __declspec(dllimport) +# endif // PQXX_SHARED && !PQXX_LIBEXPORT + + +// Workarounds for Microsoft Visual C++ +# ifdef _MSC_VER + +// Suppress vtables on abstract classes. +# define PQXX_NOVTABLE __declspec(novtable) + +// 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 +// appropriate libpqxx library. To link with the libpqxx DLL, define +// PQXX_SHARED; the default is to link with the static library. A static link +// is the recommended practice. +// +// 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 macro. +# 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 + +# endif // _MSC_VER + +# elif defined(PQXX_HAVE_GCC_VISIBILITY) // !_WIN32 + +# define PQXX_LIBEXPORT __attribute__((visibility("default"))) +# define PQXX_PRIVATE __attribute__((visibility("hidden"))) + +# endif // PQXX_HAVE_GCC_VISIBILITY + + +# ifndef PQXX_LIBEXPORT +# define PQXX_LIBEXPORT /* libexport */ +# endif + +# ifndef PQXX_PRIVATE +# define PQXX_PRIVATE /* private */ +# endif + +# ifndef PQXX_NOVTABLE +# define PQXX_NOVTABLE /* novtable */ +# endif + +// C++20: Assume support. +# if defined(PQXX_HAVE_LIKELY) +# define PQXX_LIKELY [[likely]] +# define PQXX_UNLIKELY [[unlikely]] +# else +# define PQXX_LIKELY /* [[likely]] */ +# define PQXX_UNLIKELY /* [[unlikely]] */ +# endif diff --git a/include/pqxx/internal/statement_parameters.hxx b/include/pqxx/internal/statement_parameters.hxx index a15bfc1d1..b078bf6e0 100644 --- a/include/pqxx/internal/statement_parameters.hxx +++ b/include/pqxx/internal/statement_parameters.hxx @@ -19,9 +19,9 @@ #include #include -#include "pqxx/binarystring" -#include "pqxx/strconv" -#include "pqxx/util" +#include "pqxx/binarystring.hxx" +#include "pqxx/strconv.hxx" +#include "pqxx/util.hxx" namespace pqxx::internal diff --git a/include/pqxx/internal/wait.hxx b/include/pqxx/internal/wait.hxx index baa849627..7a82e6553 100644 --- a/include/pqxx/internal/wait.hxx +++ b/include/pqxx/internal/wait.hxx @@ -1,8 +1,6 @@ #if !defined(PQXX_WAIT_HXX) # define PQXX_WAIT_HXX -# include "pqxx/internal/compiler-public.hxx" - namespace pqxx::internal { /// Wait. diff --git a/include/pqxx/isolation b/include/pqxx/isolation index 12723ae3b..1b801329b 100644 --- a/include/pqxx/isolation +++ b/include/pqxx/isolation @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/isolation.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/isolation.hxx b/include/pqxx/isolation.hxx index ff0392c81..0698c6ab4 100644 --- a/include/pqxx/isolation.hxx +++ b/include/pqxx/isolation.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_ISOLATION #define PQXX_H_ISOLATION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/largeobject b/include/pqxx/largeobject index 485ec51ba..1f2f94790 100644 --- a/include/pqxx/largeobject +++ b/include/pqxx/largeobject @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/largeobject.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/largeobject.hxx b/include/pqxx/largeobject.hxx index 63ffb5a1f..364549e95 100644 --- a/include/pqxx/largeobject.hxx +++ b/include/pqxx/largeobject.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_LARGEOBJECT #define PQXX_H_LARGEOBJECT -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/nontransaction b/include/pqxx/nontransaction index ee3905b7c..bb5b79724 100644 --- a/include/pqxx/nontransaction +++ b/include/pqxx/nontransaction @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/nontransaction.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/nontransaction.hxx b/include/pqxx/nontransaction.hxx index 7119a9a9f..c50715594 100644 --- a/include/pqxx/nontransaction.hxx +++ b/include/pqxx/nontransaction.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_NONTRANSACTION #define PQXX_H_NONTRANSACTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/notification b/include/pqxx/notification index 3148b87ba..a0bd1c73e 100644 --- a/include/pqxx/notification +++ b/include/pqxx/notification @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/notification.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/notification.hxx b/include/pqxx/notification.hxx index d71764b42..b59b8567a 100644 --- a/include/pqxx/notification.hxx +++ b/include/pqxx/notification.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_NOTIFICATION #define PQXX_H_NOTIFICATION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/params b/include/pqxx/params index 344cc28a4..4098782aa 100644 --- a/include/pqxx/params +++ b/include/pqxx/params @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/params.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/params.hxx b/include/pqxx/params.hxx index 68cdcdedb..2d29cdfed 100644 --- a/include/pqxx/params.hxx +++ b/include/pqxx/params.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_PARAMS #define PQXX_H_PARAMS -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/pipeline b/include/pqxx/pipeline index 35a5cfc49..bf828843a 100644 --- a/include/pqxx/pipeline +++ b/include/pqxx/pipeline @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/pipeline.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/pipeline.hxx b/include/pqxx/pipeline.hxx index 74c7fcdf3..049dcdd58 100644 --- a/include/pqxx/pipeline.hxx +++ b/include/pqxx/pipeline.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_PIPELINE #define PQXX_H_PIPELINE -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/pqxx b/include/pqxx/pqxx index 28bcbabe3..5a12c9b35 100644 --- a/include/pqxx/pqxx +++ b/include/pqxx/pqxx @@ -1,21 +1,25 @@ /// Convenience header: include all libpqxx definitions. -#include "pqxx/array" -#include "pqxx/binarystring" -#include "pqxx/blob" -#include "pqxx/connection" -#include "pqxx/cursor" -#include "pqxx/errorhandler" -#include "pqxx/except" -#include "pqxx/largeobject" -#include "pqxx/nontransaction" -#include "pqxx/notification" -#include "pqxx/params" -#include "pqxx/pipeline" -#include "pqxx/prepared_statement" -#include "pqxx/result" -#include "pqxx/robusttransaction" -#include "pqxx/stream_from" -#include "pqxx/stream_to" -#include "pqxx/subtransaction" -#include "pqxx/transaction" -#include "pqxx/transactor" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/array.hxx" +#include "pqxx/binarystring.hxx" +#include "pqxx/blob.hxx" +#include "pqxx/connection.hxx" +#include "pqxx/cursor.hxx" +#include "pqxx/errorhandler.hxx" +#include "pqxx/except.hxx" +#include "pqxx/largeobject.hxx" +#include "pqxx/nontransaction.hxx" +#include "pqxx/notification.hxx" +#include "pqxx/params.hxx" +#include "pqxx/pipeline.hxx" +#include "pqxx/prepared_statement.hxx" +#include "pqxx/result.hxx" +#include "pqxx/robusttransaction.hxx" +#include "pqxx/stream_from.hxx" +#include "pqxx/stream_to.hxx" +#include "pqxx/subtransaction.hxx" +#include "pqxx/transaction.hxx" +#include "pqxx/transactor.hxx" + +#include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/range b/include/pqxx/range index 5b315e32c..11985eca4 100644 --- a/include/pqxx/range +++ b/include/pqxx/range @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/range.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/range.hxx b/include/pqxx/range.hxx index c4b93a61c..dc480e4b7 100644 --- a/include/pqxx/range.hxx +++ b/include/pqxx/range.hxx @@ -1,7 +1,7 @@ #ifndef PQXX_H_RANGE #define PQXX_H_RANGE -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/result b/include/pqxx/result index cdc13df46..523394b72 100644 --- a/include/pqxx/result +++ b/include/pqxx/result @@ -4,7 +4,6 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" #include "pqxx/result.hxx" diff --git a/include/pqxx/result.hxx b/include/pqxx/result.hxx index 59f98a2cd..53caed508 100644 --- a/include/pqxx/result.hxx +++ b/include/pqxx/result.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_RESULT #define PQXX_H_RESULT -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/robusttransaction b/include/pqxx/robusttransaction index 3d13f34da..04b71d7cc 100644 --- a/include/pqxx/robusttransaction +++ b/include/pqxx/robusttransaction @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/robusttransaction.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/robusttransaction.hxx b/include/pqxx/robusttransaction.hxx index 9eab819e6..faf6dbf5e 100644 --- a/include/pqxx/robusttransaction.hxx +++ b/include/pqxx/robusttransaction.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_ROBUSTTRANSACTION #define PQXX_H_ROBUSTTRANSACTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/row b/include/pqxx/row index 2a0eb9413..62a950ac8 100644 --- a/include/pqxx/row +++ b/include/pqxx/row @@ -4,7 +4,6 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" #include "pqxx/result.hxx" #include "pqxx/row.hxx" diff --git a/include/pqxx/row.hxx b/include/pqxx/row.hxx index f419c5659..5a6d50502 100644 --- a/include/pqxx/row.hxx +++ b/include/pqxx/row.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_ROW #define PQXX_H_ROW -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/separated_list b/include/pqxx/separated_list index 8f6b01293..1bdf51c6a 100644 --- a/include/pqxx/separated_list +++ b/include/pqxx/separated_list @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/separated_list.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/separated_list.hxx b/include/pqxx/separated_list.hxx index bf151a60d..d4230ea08 100644 --- a/include/pqxx/separated_list.hxx +++ b/include/pqxx/separated_list.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_SEPARATED_LIST #define PQXX_H_SEPARATED_LIST -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/strconv b/include/pqxx/strconv index 5576aedf2..aa2c40ed5 100644 --- a/include/pqxx/strconv +++ b/include/pqxx/strconv @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/strconv.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/strconv.hxx b/include/pqxx/strconv.hxx index 65fb24f09..863711228 100644 --- a/include/pqxx/strconv.hxx +++ b/include/pqxx/strconv.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_STRCONV #define PQXX_H_STRCONV -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/stream_from b/include/pqxx/stream_from index 18e5027b5..972762443 100644 --- a/include/pqxx/stream_from +++ b/include/pqxx/stream_from @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/stream_from.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/stream_from.hxx b/include/pqxx/stream_from.hxx index cd035ea8f..0ca1b1bd4 100644 --- a/include/pqxx/stream_from.hxx +++ b/include/pqxx/stream_from.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_STREAM_FROM #define PQXX_H_STREAM_FROM -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/stream_to b/include/pqxx/stream_to index fc00cba9b..8760cf1f4 100644 --- a/include/pqxx/stream_to +++ b/include/pqxx/stream_to @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/stream_to.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/stream_to.hxx b/include/pqxx/stream_to.hxx index f235976eb..2a49d8f85 100644 --- a/include/pqxx/stream_to.hxx +++ b/include/pqxx/stream_to.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_STREAM_TO #define PQXX_H_STREAM_TO -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/subtransaction b/include/pqxx/subtransaction index 797dd6f62..e0d154903 100644 --- a/include/pqxx/subtransaction +++ b/include/pqxx/subtransaction @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/subtransaction.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/subtransaction.hxx b/include/pqxx/subtransaction.hxx index 25f49ded8..e66b7a7a8 100644 --- a/include/pqxx/subtransaction.hxx +++ b/include/pqxx/subtransaction.hxx @@ -13,7 +13,7 @@ #ifndef PQXX_H_SUBTRANSACTION #define PQXX_H_SUBTRANSACTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/time b/include/pqxx/time index ef8af7cb6..85df05744 100644 --- a/include/pqxx/time +++ b/include/pqxx/time @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/time.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/time.hxx b/include/pqxx/time.hxx index d65491213..effed05e0 100644 --- a/include/pqxx/time.hxx +++ b/include/pqxx/time.hxx @@ -5,7 +5,7 @@ #ifndef PQXX_H_TIME #define PQXX_H_TIME -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif @@ -13,7 +13,7 @@ #include #include "pqxx/internal/concat.hxx" -#include "pqxx/strconv" +#include "pqxx/strconv.hxx" #if defined(PQXX_HAVE_YEAR_MONTH_DAY) diff --git a/include/pqxx/transaction b/include/pqxx/transaction index 2a00dd6f5..a7ae39d43 100644 --- a/include/pqxx/transaction +++ b/include/pqxx/transaction @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/transaction.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/transaction.hxx b/include/pqxx/transaction.hxx index ba1a5ab3b..e90917e38 100644 --- a/include/pqxx/transaction.hxx +++ b/include/pqxx/transaction.hxx @@ -12,7 +12,7 @@ #ifndef PQXX_H_TRANSACTION #define PQXX_H_TRANSACTION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/transaction_base b/include/pqxx/transaction_base index 155dfe663..c39219aac 100644 --- a/include/pqxx/transaction_base +++ b/include/pqxx/transaction_base @@ -5,8 +5,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/transaction_base.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/transaction_base.hxx b/include/pqxx/transaction_base.hxx index 40d20dc69..37ba37452 100644 --- a/include/pqxx/transaction_base.hxx +++ b/include/pqxx/transaction_base.hxx @@ -14,7 +14,7 @@ #ifndef PQXX_H_TRANSACTION_BASE #define PQXX_H_TRANSACTION_BASE -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/transaction_focus b/include/pqxx/transaction_focus index 35b975b1a..fe78a9bcc 100644 --- a/include/pqxx/transaction_focus +++ b/include/pqxx/transaction_focus @@ -3,8 +3,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/types.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/transaction_focus.hxx b/include/pqxx/transaction_focus.hxx index 3ba16d429..0707e3cc4 100644 --- a/include/pqxx/transaction_focus.hxx +++ b/include/pqxx/transaction_focus.hxx @@ -9,7 +9,7 @@ #ifndef PQXX_H_TRANSACTION_FOCUS #define PQXX_H_TRANSACTION_FOCUS -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/transactor b/include/pqxx/transactor index 93bc90e51..29d1b9640 100644 --- a/include/pqxx/transactor +++ b/include/pqxx/transactor @@ -4,8 +4,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/transactor.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/transactor.hxx b/include/pqxx/transactor.hxx index c80a00eff..eefd04ba1 100644 --- a/include/pqxx/transactor.hxx +++ b/include/pqxx/transactor.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_TRANSACTOR #define PQXX_H_TRANSACTOR -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/types b/include/pqxx/types index 8710b0cb1..23a5caae1 100644 --- a/include/pqxx/types +++ b/include/pqxx/types @@ -3,7 +3,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/types.hxx" #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/types.hxx b/include/pqxx/types.hxx index 45a17a2c4..5d0df676b 100644 --- a/include/pqxx/types.hxx +++ b/include/pqxx/types.hxx @@ -9,7 +9,7 @@ #ifndef PQXX_H_TYPES #define PQXX_H_TYPES -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/util b/include/pqxx/util index 07467bf9e..6d85ab611 100644 --- a/include/pqxx/util +++ b/include/pqxx/util @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/util.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/util.hxx b/include/pqxx/util.hxx index 2e38be0b3..27d3a8aec 100644 --- a/include/pqxx/util.hxx +++ b/include/pqxx/util.hxx @@ -11,7 +11,7 @@ #ifndef PQXX_H_UTIL #define PQXX_H_UTIL -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/version b/include/pqxx/version index 9945758bd..8dd5e48d4 100644 --- a/include/pqxx/version +++ b/include/pqxx/version @@ -2,9 +2,6 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/version.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/include/pqxx/version.hxx b/include/pqxx/version.hxx index 65f2bfcbd..cae5d9e7b 100644 --- a/include/pqxx/version.hxx +++ b/include/pqxx/version.hxx @@ -10,7 +10,7 @@ */ #ifndef PQXX_H_VERSION -# if !defined(PQXX_H_COMPILER_PUBLIC) +# if !defined(PQXX_HEADER_PRE) # error "Include libpqxx headers as , not ." # endif diff --git a/include/pqxx/version.hxx.template b/include/pqxx/version.hxx.template index cd1eb74ee..40837f16a 100644 --- a/include/pqxx/version.hxx.template +++ b/include/pqxx/version.hxx.template @@ -10,7 +10,7 @@ */ #ifndef PQXX_H_VERSION -#if !defined(PQXX_H_COMPILER_PUBLIC) +#if !defined(PQXX_HEADER_PRE) #error "Include libpqxx headers as , not ." #endif diff --git a/include/pqxx/zview b/include/pqxx/zview index 64010a1af..66ea2a625 100644 --- a/include/pqxx/zview +++ b/include/pqxx/zview @@ -2,8 +2,5 @@ */ // Actual definitions in .hxx file so editors and such recognize file type. #include "pqxx/internal/header-pre.hxx" -#include "pqxx/internal/compiler-public.hxx" - #include "pqxx/zview.hxx" - #include "pqxx/internal/header-post.hxx" diff --git a/src/array.cxx b/src/array.cxx index d156d8370..e35aaddce 100644 --- a/src/array.cxx +++ b/src/array.cxx @@ -13,16 +13,16 @@ #include #include -#include "pqxx/array" -#include "pqxx/except" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/array.hxx" +#include "pqxx/except.hxx" #include "pqxx/internal/array-composite.hxx" #include "pqxx/internal/concat.hxx" -#include "pqxx/internal/header-post.hxx" -#include "pqxx/internal/header-pre.hxx" +#include "pqxx/strconv.hxx" +#include "pqxx/util.hxx" -#include "pqxx/strconv" -#include "pqxx/util" +#include "pqxx/internal/header-post.hxx" namespace pqxx diff --git a/src/binarystring.cxx b/src/binarystring.cxx index 2a9265355..936437006 100644 --- a/src/binarystring.cxx +++ b/src/binarystring.cxx @@ -20,9 +20,13 @@ extern "C" #include } -#include "pqxx/binarystring" -#include "pqxx/field" -#include "pqxx/strconv" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/binarystring.hxx" +#include "pqxx/field.hxx" +#include "pqxx/strconv.hxx" + +#include "pqxx/internal/header-post.hxx" namespace diff --git a/src/blob.cxx b/src/blob.cxx index 87377141f..1492d9107 100644 --- a/src/blob.cxx +++ b/src/blob.cxx @@ -6,13 +6,14 @@ #include -#include "pqxx/blob" -#include "pqxx/except" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/blob.hxx" +#include "pqxx/except.hxx" #include "pqxx/internal/concat.hxx" #include "pqxx/internal/gates/connection-largeobject.hxx" + #include "pqxx/internal/header-post.hxx" -#include "pqxx/internal/header-pre.hxx" namespace diff --git a/src/connection.cxx b/src/connection.cxx index ef0a0aa17..9f9679bd3 100644 --- a/src/connection.cxx +++ b/src/connection.cxx @@ -42,21 +42,23 @@ extern "C" #include } -#include "pqxx/binarystring" -#include "pqxx/config-internal-libpq.h" -#include "pqxx/nontransaction" -#include "pqxx/notification" -#include "pqxx/pipeline" -#include "pqxx/result" -#include "pqxx/strconv" -#include "pqxx/transaction" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/binarystring.hxx" #include "pqxx/internal/wait.hxx" +#include "pqxx/nontransaction.hxx" +#include "pqxx/notification.hxx" +#include "pqxx/pipeline.hxx" +#include "pqxx/result.hxx" +#include "pqxx/strconv.hxx" +#include "pqxx/transaction.hxx" #include "pqxx/internal/gates/errorhandler-connection.hxx" #include "pqxx/internal/gates/result-connection.hxx" #include "pqxx/internal/gates/result-creation.hxx" +#include "pqxx/internal/header-post.hxx" + extern "C" { diff --git a/src/cursor.cxx b/src/cursor.cxx index d13536d80..28e8ba42f 100644 --- a/src/cursor.cxx +++ b/src/cursor.cxx @@ -12,13 +12,16 @@ #include -#include "pqxx/cursor" -#include "pqxx/result" -#include "pqxx/strconv" -#include "pqxx/transaction" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/cursor.hxx" #include "pqxx/internal/gates/icursor_iterator-icursorstream.hxx" #include "pqxx/internal/gates/icursorstream-icursor_iterator.hxx" +#include "pqxx/result.hxx" +#include "pqxx/strconv.hxx" +#include "pqxx/transaction.hxx" + +#include "pqxx/internal/header-post.hxx" pqxx::cursor_base::difference_type pqxx::cursor_base::all() noexcept diff --git a/src/encodings.cxx b/src/encodings.cxx index f62502d86..99f038724 100644 --- a/src/encodings.cxx +++ b/src/encodings.cxx @@ -13,22 +13,22 @@ #include #include -#include "pqxx/except" - -#include "pqxx/internal/concat.hxx" -#include "pqxx/internal/encodings.hxx" -#include "pqxx/internal/header-post.hxx" -#include "pqxx/internal/header-pre.hxx" - -#include "pqxx/strconv" - - extern "C" { #include } +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/except.hxx" +#include "pqxx/internal/concat.hxx" +#include "pqxx/internal/encodings.hxx" +#include "pqxx/strconv.hxx" + +#include "pqxx/internal/header-post.hxx" + + namespace pqxx { PQXX_DECLARE_ENUM_CONVERSION(pqxx::internal::encoding_group); diff --git a/src/errorhandler.cxx b/src/errorhandler.cxx index 1e9f5a9d9..de120ff3d 100644 --- a/src/errorhandler.cxx +++ b/src/errorhandler.cxx @@ -10,11 +10,14 @@ */ #include "pqxx-source.hxx" -#include "pqxx/connection" -#include "pqxx/errorhandler" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/connection.hxx" +#include "pqxx/errorhandler.hxx" #include "pqxx/internal/gates/connection-errorhandler.hxx" +#include "pqxx/internal/header-post.hxx" + pqxx::errorhandler::errorhandler(connection &conn) : m_home{&conn} { diff --git a/src/except.cxx b/src/except.cxx index 91dd47edf..4974e8ac0 100644 --- a/src/except.cxx +++ b/src/except.cxx @@ -8,10 +8,12 @@ */ #include "pqxx-source.hxx" -#include "pqxx/except" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/except.hxx" #include "pqxx/internal/concat.hxx" +#include "pqxx/internal/header-post.hxx" pqxx::failure::failure(std::string const &whatarg) : std::runtime_error{whatarg} diff --git a/src/field.cxx b/src/field.cxx index eca02517b..7dcde11ce 100644 --- a/src/field.cxx +++ b/src/field.cxx @@ -12,9 +12,14 @@ #include +#include "pqxx/internal/header-pre.hxx" + #include "pqxx/internal/libpq-forward.hxx" +#include "pqxx/field.hxx" +#include "pqxx/result.hxx" +#include "pqxx/row.hxx" -#include "pqxx/result" +#include "pqxx/internal/header-post.hxx" pqxx::field::field(pqxx::row const &r, pqxx::row::size_type c) noexcept : diff --git a/src/largeobject.cxx b/src/largeobject.cxx index 0ac6ec23e..c57de3c73 100644 --- a/src/largeobject.cxx +++ b/src/largeobject.cxx @@ -19,10 +19,14 @@ extern "C" #include } -#include "pqxx/largeobject" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/connection.hxx" #include "pqxx/internal/concat.hxx" #include "pqxx/internal/gates/connection-largeobject.hxx" +#include "pqxx/largeobject.hxx" + +#include "pqxx/internal/header-post.hxx" #include "pqxx/internal/ignore-deprecated-pre.hxx" diff --git a/src/notification.cxx b/src/notification.cxx index 2cbb06bd9..eb8d5e1a1 100644 --- a/src/notification.cxx +++ b/src/notification.cxx @@ -12,9 +12,12 @@ #include +#include "pqxx/internal/header-pre.hxx" + #include "pqxx/internal/gates/connection-notification_receiver.hxx" +#include "pqxx/notification.hxx" -#include "pqxx/notification" +#include "pqxx/internal/header-post.hxx" pqxx::notification_receiver::notification_receiver( diff --git a/src/params.cxx b/src/params.cxx index 586aa9f23..1308dd0ec 100644 --- a/src/params.cxx +++ b/src/params.cxx @@ -8,7 +8,9 @@ */ #include "pqxx-source.hxx" -#include "pqxx/params" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/params.hxx" +#include "pqxx/internal/header-post.hxx" void pqxx::internal::c_params::reserve(std::size_t n) & diff --git a/src/pipeline.cxx b/src/pipeline.cxx index 34d18e4bd..854b1a70e 100644 --- a/src/pipeline.cxx +++ b/src/pipeline.cxx @@ -12,14 +12,17 @@ #include -#include "pqxx/dbtransaction" -#include "pqxx/pipeline" -#include "pqxx/separated_list" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/dbtransaction.hxx" #include "pqxx/internal/concat.hxx" #include "pqxx/internal/gates/connection-pipeline.hxx" #include "pqxx/internal/gates/result-creation.hxx" #include "pqxx/internal/gates/result-pipeline.hxx" +#include "pqxx/pipeline.hxx" +#include "pqxx/separated_list.hxx" + +#include "pqxx/internal/header-post.hxx" namespace diff --git a/src/pqxx-source.hxx b/src/pqxx-source.hxx index 9fd531e08..1a8f5fb11 100644 --- a/src/pqxx-source.hxx +++ b/src/pqxx-source.hxx @@ -15,7 +15,7 @@ * mistake, or contact the author. */ -// Workarounds & definitions needed to compile libpqxx into a library +// Workarounds & definitions needed to compile libpqxx into a library. #include "pqxx/config-internal-compiler.h" #ifdef _WIN32 @@ -28,5 +28,3 @@ # endif // PQXX_SHARED #endif // _WIN32 - -#include "pqxx/internal/compiler-public.hxx" diff --git a/src/result.cxx b/src/result.cxx index d897000f2..86a739004 100644 --- a/src/result.cxx +++ b/src/result.cxx @@ -19,10 +19,15 @@ extern "C" #include } -#include "pqxx/except" -#include "pqxx/result" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/except.hxx" #include "pqxx/internal/concat.hxx" +#include "pqxx/internal/result_iterator.hxx" +#include "pqxx/result.hxx" +#include "pqxx/row.hxx" + +#include "pqxx/internal/header-post.hxx" namespace pqxx diff --git a/src/robusttransaction.cxx b/src/robusttransaction.cxx index a21966f97..5bbfd64f8 100644 --- a/src/robusttransaction.cxx +++ b/src/robusttransaction.cxx @@ -15,13 +15,16 @@ #include #include -#include "pqxx/connection" -#include "pqxx/nontransaction" -#include "pqxx/result" -#include "pqxx/robusttransaction" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/connection.hxx" #include "pqxx/internal/concat.hxx" #include "pqxx/internal/wait.hxx" +#include "pqxx/nontransaction.hxx" +#include "pqxx/result.hxx" +#include "pqxx/robusttransaction.hxx" + +#include "pqxx/internal/header-post.hxx" using namespace std::literals; diff --git a/src/row.cxx b/src/row.cxx index 6b0ee4cff..f0974c839 100644 --- a/src/row.cxx +++ b/src/row.cxx @@ -18,8 +18,13 @@ extern "C" #include } -#include "pqxx/except" -#include "pqxx/result" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/except.hxx" +#include "pqxx/result.hxx" +#include "pqxx/row.hxx" + +#include "pqxx/internal/header-post.hxx" pqxx::row::row( diff --git a/src/sql_cursor.cxx b/src/sql_cursor.cxx index 226629e4d..5ed7c05f2 100644 --- a/src/sql_cursor.cxx +++ b/src/sql_cursor.cxx @@ -12,12 +12,15 @@ #include -#include "pqxx/cursor" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/cursor.hxx" #include "pqxx/internal/encodings.hxx" #include "pqxx/internal/gates/connection-sql_cursor.hxx" #include "pqxx/internal/gates/transaction-sql_cursor.hxx" +#include "pqxx/internal/header-post.hxx" + using namespace std::literals; diff --git a/src/strconv.cxx b/src/strconv.cxx index 2c0305367..2bd206b2a 100644 --- a/src/strconv.cxx +++ b/src/strconv.cxx @@ -22,8 +22,12 @@ # include #endif -#include "pqxx/except" -#include "pqxx/strconv" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/except.hxx" +#include "pqxx/strconv.hxx" + +#include "pqxx/internal/header-post.hxx" namespace diff --git a/src/stream_from.cxx b/src/stream_from.cxx index 2ce66e286..f710300ea 100644 --- a/src/stream_from.cxx +++ b/src/stream_from.cxx @@ -12,12 +12,15 @@ #include -#include "pqxx/stream_from" +#include "pqxx/internal/header-pre.hxx" #include "pqxx/internal/encodings.hxx" #include "pqxx/internal/gates/connection-stream_from.hxx" +#include "pqxx/stream_from.hxx" #include "pqxx/transaction_base.hxx" +#include "pqxx/internal/header-post.hxx" + namespace { diff --git a/src/stream_to.cxx b/src/stream_to.cxx index 8c4157e50..1693ba377 100644 --- a/src/stream_to.cxx +++ b/src/stream_to.cxx @@ -10,11 +10,15 @@ */ #include "pqxx-source.hxx" -#include "pqxx/stream_from.hxx" -#include "pqxx/stream_to.hxx" +#include "pqxx/internal/header-pre.hxx" #include "pqxx/internal/concat.hxx" #include "pqxx/internal/gates/connection-stream_to.hxx" +#include "pqxx/stream_from.hxx" +#include "pqxx/stream_to.hxx" + +#include "pqxx/internal/header-post.hxx" + namespace { diff --git a/src/subtransaction.cxx b/src/subtransaction.cxx index 179ca83ab..186ad13e8 100644 --- a/src/subtransaction.cxx +++ b/src/subtransaction.cxx @@ -13,10 +13,13 @@ #include #include -#include "pqxx/connection" -#include "pqxx/subtransaction" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/connection.hxx" #include "pqxx/internal/concat.hxx" +#include "pqxx/subtransaction.hxx" + +#include "pqxx/internal/header-post.hxx" namespace diff --git a/src/time.cxx b/src/time.cxx index 74d5c5b1a..bc6925f3a 100644 --- a/src/time.cxx +++ b/src/time.cxx @@ -4,7 +4,9 @@ #include -#include "pqxx/time" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/time.hxx" +#include "pqxx/internal/header-post.hxx" // std::chrono::year_month_day is C++20, so let's worry a bit less about C++17 // compatibility in this file. diff --git a/src/transaction.cxx b/src/transaction.cxx index c93824a71..61ed29ef7 100644 --- a/src/transaction.cxx +++ b/src/transaction.cxx @@ -12,9 +12,13 @@ #include -#include "pqxx/connection" -#include "pqxx/result" -#include "pqxx/transaction" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/connection.hxx" +#include "pqxx/result.hxx" +#include "pqxx/transaction.hxx" + +#include "pqxx/internal/header-post.hxx" pqxx::internal::basic_transaction::basic_transaction( diff --git a/src/transaction_base.cxx b/src/transaction_base.cxx index 03231cd5b..56fd477d8 100644 --- a/src/transaction_base.cxx +++ b/src/transaction_base.cxx @@ -14,16 +14,18 @@ #include #include -#include "pqxx/connection" -#include "pqxx/result" -#include "pqxx/transaction_base" -#include "pqxx/transaction_focus.hxx" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/connection.hxx" +#include "pqxx/internal/concat.hxx" +#include "pqxx/internal/encodings.hxx" #include "pqxx/internal/gates/connection-transaction.hxx" #include "pqxx/internal/gates/transaction-transaction_focus.hxx" +#include "pqxx/result.hxx" +#include "pqxx/transaction_base.hxx" +#include "pqxx/transaction_focus.hxx" -#include "pqxx/internal/concat.hxx" -#include "pqxx/internal/encodings.hxx" +#include "pqxx/internal/header-post.hxx" using namespace std::literals; diff --git a/src/util.cxx b/src/util.cxx index d32c681b4..fe859bd2a 100644 --- a/src/util.cxx +++ b/src/util.cxx @@ -19,12 +19,13 @@ extern "C" #include } -#include "pqxx/except" -#include "pqxx/util" +#include "pqxx/internal/header-pre.hxx" +#include "pqxx/except.hxx" #include "pqxx/internal/concat.hxx" +#include "pqxx/util.hxx" + #include "pqxx/internal/header-post.hxx" -#include "pqxx/internal/header-pre.hxx" using namespace std::literals; diff --git a/src/version.cxx b/src/version.cxx index f13499203..e216ecd4f 100644 --- a/src/version.cxx +++ b/src/version.cxx @@ -8,7 +8,12 @@ */ #include "pqxx-source.hxx" -#include "pqxx/version" +#include "pqxx/internal/header-pre.hxx" + +#include "pqxx/version.hxx" + +#include "pqxx/internal/header-post.hxx" + namespace pqxx::internal { diff --git a/src/wait.cxx b/src/wait.cxx index 581f564d4..4c0541f9d 100644 --- a/src/wait.cxx +++ b/src/wait.cxx @@ -43,9 +43,13 @@ #endif +#include "pqxx/internal/header-pre.hxx" + #include "pqxx/internal/wait.hxx" #include "pqxx/util.hxx" +#include "pqxx/internal/header-post.hxx" + namespace { diff --git a/test/test04.cxx b/test/test04.cxx index e91e5961a..fe19b85f1 100644 --- a/test/test04.cxx +++ b/test/test04.cxx @@ -3,7 +3,10 @@ #include #include +#include #include +#include + #include #include #include diff --git a/test/test87.cxx b/test/test87.cxx index 012941b83..bd83501dc 100644 --- a/test/test87.cxx +++ b/test/test87.cxx @@ -5,7 +5,10 @@ #include #include +#include #include +#include + #include #include #include diff --git a/test/unit/test_notification.cxx b/test/unit/test_notification.cxx index d86ed9707..ef6e79869 100644 --- a/test/unit/test_notification.cxx +++ b/test/unit/test_notification.cxx @@ -1,6 +1,9 @@ #include +#include #include +#include + #include #include