compiler-internal.hxx

00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/compiler-internal.hxx
00005  *
00006  *   DESCRIPTION
00007  *      Compiler deficiency workarounds for compiling libpqxx itself.
00008  *      DO NOT INCLUDE THIS FILE when building client programs.
00009  *
00010  * Copyright (c) 2002-2015, Jeroen T. Vermeulen <jtv@xs4all.nl>
00011  *
00012  * See COPYING for copyright license.  If you did not receive a file called
00013  * COPYING with this source code, please notify the distributor of this mistake,
00014  * or contact the author.
00015  *
00016  *-------------------------------------------------------------------------
00017  */
00018 #ifndef PQXX_H_COMPILER_INTERNAL
00019 #define PQXX_H_COMPILER_INTERNAL
00020 
00021 
00022 // Workarounds & definitions needed to compile libpqxx into a library
00023 #include "pqxx/config-internal-compiler.h"
00024 
00025 #ifdef _WIN32
00026 
00027 #ifdef PQXX_SHARED
00028 #undef  PQXX_LIBEXPORT
00029 #define PQXX_LIBEXPORT  __declspec(dllexport)
00030 // TODO: Does Windows have a way to "unexport" a symbol in an exported class?
00031 #define PQXX_PRIVATE    __declspec()
00032 #endif  // PQXX_SHARED
00033 
00034 #ifdef _MSC_VER
00035 #pragma warning (disable: 4251 4275 4273)
00036 #pragma warning (disable: 4258) // Complains that for-scope usage is correct.
00037 #pragma warning (disable: 4290)
00038 #pragma warning (disable: 4351)
00039 #pragma warning (disable: 4355)
00040 #pragma warning (disable: 4786)
00041 #pragma warning (disable: 4800) // Performance warning for boolean conversions.
00042 #pragma warning (disable: 4996) // Complains that strncpy() "may" be unsafe.
00043 #endif
00044 
00045 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY)    // !_WIN32
00046 
00047 #define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
00048 #define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
00049 
00050 #endif  // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
00051 
00052 
00053 #include "pqxx/compiler-public.hxx"
00054 
00055 #include <cstddef>
00056 #include <limits>
00057 
00058 #endif

Generated on 17 Mar 2017 for libpqxx by  doxygen 1.6.1