Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

compiler.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  *   FILE
00004  *      pqxx/compiler.h
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-2005, 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_COMPILER_H
00019 #define PQXX_COMPILER_H
00020 
00021 
00022 // Workarounds & definitions needed to compile libpqxx into a library
00023 #include "pqxx/config-internal-compiler.h"
00024 
00025 // Library-private configuration related to libpq version
00026 #include "pqxx/config-internal-libpq.h"
00027 
00028 // Macros generated by autoconf/automake/libtool/...
00029 #include "pqxx/config-internal-autotools.h"
00030 
00031 #ifdef _WIN32
00032 #ifdef PQXX_SHARED
00033 #undef  PQXX_LIBEXPORT
00034 #define PQXX_LIBEXPORT __declspec(dllexport)
00035 // TODO: Does Windows have a way to "unexport" a symbol in an exported class?
00036 #define PQXX_PRIVATE
00037 #endif  // PQXX_SHARED
00038 #elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY)    // !_WIN32
00039 #define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
00040 #define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
00041 #endif  // __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
00042 
00043 
00044 #include "pqxx/libcompiler.h"
00045 
00046 #ifdef PQXX_HAVE_LIMITS
00047 #include <limits>
00048 #else // PQXX_HAVE_LIMITS
00049 #include <climits>
00050 namespace PGSTD
00051 {
00053 template<typename T> struct numeric_limits
00054 {
00055   static T max() throw ();
00056   static T min() throw ();
00057 };
00058 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00059 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00060 }
00061 #endif // PQXX_HAVE_LIMITS
00062 
00063 #endif
00064 

Generated on Mon Oct 3 20:28:58 2005 for libpqxx by  doxygen 1.4.2