Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | 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-2003, 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 // Workarounds & definitions needed to compile libpqxx into a library
00022 #include "pqxx/config.h"
00023 #include "pqxx/libcompiler.h"
00024 
00025 
00026 #ifdef HAVE_LIMITS
00027 #include <limits>
00028 #else // HAVE_LIMITS
00029 #include <climits>
00030 namespace PGSTD
00031 {
00033 template<typename T> struct numeric_limits
00034 {
00035   static T max() throw ();
00036   static T min() throw ();
00037 };
00038 
00040 template<> inline long numeric_limits<long>::max() throw () {return LONG_MAX;}
00042 template<> inline long numeric_limits<long>::min() throw () {return LONG_MIN;}
00043 }
00044 #endif // HAVE_LIMITS
00045 
00046 
00047 #ifndef HAVE_ABS_LONG
00048 // For compilers that feel abs(long) is ambiguous
00049 long abs(long n) { return (n >= 0) ? n : -n; }
00050 #endif // HAVE_ABS_LONG
00051 
00052 #endif
00053 

Generated on Fri Oct 24 20:21:37 2003 for libpqxx by doxygen 1.3.4