You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2009/08/03 21:28:26 UTC
svn commit: r800505 - in /apr/apr/trunk: dbd/apr_dbd_mysql.c
include/private/apu_config.hw
Author: wrowe
Date: Mon Aug 3 19:28:26 2009
New Revision: 800505
URL: http://svn.apache.org/viewvc?rev=800505&view=rev
Log:
Reorder the config into sanity, prefer include/mysql/ structure
if found, and *be consistent*. Includes rpluem's patch to
maintain load order of these cleaned up includes.
It appears my_sys.h is actually not required for my_init(), and it
certainly won't compile under Visual C/Win32. So carefully omit it
only on platforms where my_sys.h is not found/not usable, and retain
the existing unix compilation.
Forward ports: 799780, 800402, 800431
Modified:
apr/apr/trunk/dbd/apr_dbd_mysql.c
apr/apr/trunk/include/private/apu_config.hw
Modified: apr/apr/trunk/dbd/apr_dbd_mysql.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/dbd/apr_dbd_mysql.c?rev=800505&r1=800504&r2=800505&view=diff
==============================================================================
--- apr/apr/trunk/dbd/apr_dbd_mysql.c (original)
+++ apr/apr/trunk/dbd/apr_dbd_mysql.c Mon Aug 3 19:28:26 2009
@@ -15,7 +15,6 @@
*/
#include "apu.h"
-#define HAVE_MYSQL_MYSQL_H
#if APU_HAVE_MYSQL
@@ -25,22 +24,24 @@
#include <ctype.h>
#include <stdlib.h>
-#ifdef HAVE_MY_GLOBAL_H
-#include <my_global.h>
-#elif defined(HAVE_MYSQL_MY_GLOBAL_H)
+#if defined(HAVE_MYSQL_MYSQL_H)
+#if defined(HAVE_MYSQL_MY_GLOBAL_H)
#include <mysql/my_global.h>
+#if defined(HAVE_MYSQL_MY_SYS_H)
+#include <mysql/my_sys.h>
+#endif
#endif
-#ifdef HAVE_MY_SYS_H
+#include <mysql/mysql.h>
+#include <mysql/errmsg.h>
+#else /* !defined(HAVE_MYSQL_MYSQL_H) */
+#if defined(HAVE_MY_GLOBAL_H)
+#include <my_global.h>
+#if defined(HAVE_MY_SYS_H)
#include <my_sys.h>
-#elif defined(HAVE_MYSQL_MY_SYS_H)
-#include <mysql/my_sys.h>
#endif
-#ifdef HAVE_MYSQL_H
+#endif
#include <mysql.h>
#include <errmsg.h>
-#elif defined(HAVE_MYSQL_MYSQL_H)
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h>
#endif
#include "apr_strings.h"
Modified: apr/apr/trunk/include/private/apu_config.hw
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/private/apu_config.hw?rev=800505&r1=800504&r2=800505&view=diff
==============================================================================
--- apr/apr/trunk/include/private/apu_config.hw (original)
+++ apr/apr/trunk/include/private/apu_config.hw Mon Aug 3 19:28:26 2009
@@ -31,6 +31,12 @@
#define APU_DSO_BUILD 1
#endif
+/* Presume a standard, modern (5.x) mysql sdk/
+#define HAVE_MY_GLOBAL_H 1
+
+/* my_sys.h is broken on VC/Win32, and apparently not required */
+/* #undef HAVE_MY_SYS_H 0 */
+
/*
* Windows does not have GDBM, and we always use the bundled (new) Expat
*/