00001 00002 00003 00004 00005 /*********************************************************************** 00006 Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by 00007 MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc. 00008 Others may also hold copyrights on code in this file. See the CREDITS 00009 file in the top directory of the distribution for details. 00010 00011 This file is part of MySQL++. 00012 00013 MySQL++ is free software; you can redistribute it and/or modify it 00014 under the terms of the GNU Lesser General Public License as published 00015 by the Free Software Foundation; either version 2.1 of the License, or 00016 (at your option) any later version. 00017 00018 MySQL++ is distributed in the hope that it will be useful, but WITHOUT 00019 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00020 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00021 License for more details. 00022 00023 You should have received a copy of the GNU Lesser General Public 00024 License along with MySQL++; if not, write to the Free Software 00025 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00026 USA 00027 ***********************************************************************/ 00028 00029 #if !defined(MYSQLPP_DEFS_H) 00030 #define MYSQLPP_DEFS_H 00031 00032 #include "platform.h" 00033 00034 #include <mysql.h> 00035 00036 namespace mysqlpp { 00037 00040 const bool use_exceptions = true; 00041 00043 enum sql_cmp_type {sql_use_compare}; 00044 00045 #if !defined(DOXYGEN_IGNORE) 00046 // Figure out how to get large integer support on this system. Suppress 00047 // refman documentation for these typedefs, as they're system-dependent. 00048 #if defined(NO_LONG_LONGS) 00049 // Alias "longlong" and "ulonglong" to the regular "long" counterparts 00050 typedef unsigned long ulonglong; 00051 typedef long longlong; 00052 #elif defined(_MSC_VER) 00053 // It's VC++, so we'll use Microsoft's 64-bit integer types 00054 typedef unsigned __int64 ulonglong; 00055 typedef __int64 longlong; 00056 #else 00057 // No better idea, so assume the C99 convention. If your compiler 00058 // doesn't support this, please provide a patch to extend this ifdef, or 00059 // define NO_LONG_LONGS. 00060 typedef unsigned long long ulonglong; 00061 typedef long long longlong; 00062 #endif 00063 #endif // !defined(DOXYGEN_IGNORE) 00064 00066 typedef MYSQL_FIELD Field; 00067 00069 typedef const char cchar; 00070 00071 #if !defined(MYSQLPP_NO_UNSIGNED_INT_TYPES) 00073 typedef unsigned int uint; 00075 typedef unsigned long ulong; 00076 #endif 00077 00078 } // end namespace mysqlpp 00079 00080 // The MySQL headers define these macros, which is completely wrong in a 00081 // C++ project. Undo the damage. 00082 #undef min 00083 #undef max 00084 00085 #endif 00086