Author: wyoung
Date: Tue Jun 26 02:49:11 2007
New Revision: 1604

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1604&view=rev
Log:
Simplified mysql_shutdown() level argument detection.  Already had to do
a version number ifdef check for the Windows case, so there's really no
point to doing it with autoconf on Unixy platforms.  Moved version
number check into lib/connection.cpp, and nuked the separate autoconf
and Windows tests.

Removed:
    trunk/config/mysql_shutdown.m4
Modified:
    trunk/configure.ac
    trunk/lib/common.h
    trunk/lib/connection.cpp

Removed: trunk/config/mysql_shutdown.m4
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/config/mysql_shutdown.m4?rev=1603&view=auto
==============================================================================
--- trunk/config/mysql_shutdown.m4 (original)
+++ trunk/config/mysql_shutdown.m4 (removed)
@@ -1,26 +1,0 @@
-dnl @synopsis MYSQL_SHUTDOWN_ARG
-dnl 
-dnl This macro determines whether mysql_shutdown() API call takes
-dnl extra 'level' argument.  This was added in MySQL 4.1.3 and 5.0.1.
-dnl
-dnl @version 1.1, 2005/02/28
-dnl @author Warren Young <[EMAIL PROTECTED]>
-AC_DEFUN([MYSQL_SHUTDOWN_ARG],
-[
-       AC_CACHE_CHECK([for level argument to mysql_shutdown()], 
ac_cv_mysql_shutdown_arg,
-       [
-               AC_TRY_LINK(
-                       [ #include <mysql.h> ],
-                       [ mysql_shutdown(0, SHUTDOWN_DEFAULT); ],
-                       ac_cv_mysql_shutdown_arg=yes,
-                       ac_cv_mysql_shutdown_arg=no)
-       ])
-
-       if test x"$ac_cv_mysql_shutdown_arg" = "xyes"
-       then
-               AC_DEFINE(HAVE_MYSQL_SHUTDOWN_LEVEL_ARG, 1, 
-                       [ Define if mysql_shutdown() has a second 'level' 
argument ])
-       fi
-]) dnl MYSQL_SHUTDOWN_ARG
-
-

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/configure.ac?rev=1604&r1=1603&r2=1604&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Jun 26 02:49:11 2007
@@ -57,7 +57,6 @@
 LIB_MATH
 LIB_SOCKET_NSL
 MYSQL_API_LOCATION
-MYSQL_SHUTDOWN_ARG
 MYSQL_WITH_SSL
 AX_C_LOCALTIME_R
 AC_CHECK_LIB(intl, main)

Modified: trunk/lib/common.h
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/common.h?rev=1604&r1=1603&r2=1604&view=diff
==============================================================================
--- trunk/lib/common.h (original)
+++ trunk/lib/common.h Tue Jun 26 02:49:11 2007
@@ -43,11 +43,6 @@
        // Windows compiler support.  Tested with Microsoft Visual C++,
        // Borland C++ Builder, and MinGW GCC.
 #      include <winsock.h>
-
-       // The shutdown_level argument was added in MySQL 4.1.3 and in 5.0.1.
-#      if ((MYSQL_VERSION_ID >= 40103) && (MYSQL_VERSION_ID <= 49999)) || 
(MYSQL_VERSION_ID >= 50001)
-#              define HAVE_MYSQL_SHUTDOWN_LEVEL_ARG
-#      endif
 
        // Stuff for Visual C++ only
 #      if defined(_MSC_VER)

Modified: trunk/lib/connection.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/connection.cpp?rev=1604&r1=1603&r2=1604&view=diff
==============================================================================
--- trunk/lib/connection.cpp (original)
+++ trunk/lib/connection.cpp Tue Jun 26 02:49:11 2007
@@ -32,7 +32,8 @@
 #include "query.h"
 #include "result.h"
 
-#if defined(HAVE_MYSQL_SHUTDOWN_LEVEL_ARG)
+// An argument was added to mysql_shutdown() in MySQL 4.1.3 and 5.0.1.
+#if ((MYSQL_VERSION_ID >= 40103) && (MYSQL_VERSION_ID <= 49999)) || 
(MYSQL_VERSION_ID >= 50001)
 #      define SHUTDOWN_ARG ,SHUTDOWN_DEFAULT
 #else
 #      define SHUTDOWN_ARG


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to