diff options
author | Andrey Hristov <andrey@php.net> | 2010-06-14 18:19:13 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-06-14 18:19:13 +0000 |
commit | 83051b1a8650916db1f0872e5abddc80622e9446 (patch) | |
tree | 3cbed90ba691042b4caf26133a6e9b733222d37d /ext/mysqli/php_mysqli_structs.h | |
parent | 1d9c49bb3c222c93544a7bcf1898d592c6dbac18 (diff) | |
download | php-git-83051b1a8650916db1f0872e5abddc80622e9446.tar.gz |
And a fix for MySQL Server which is pre 5.1.23, which doesn't support
preserving of the charset when performing change_user. This is libmysql
only code.
Diffstat (limited to 'ext/mysqli/php_mysqli_structs.h')
-rw-r--r-- | ext/mysqli/php_mysqli_structs.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index bcfa29e0bf..41d14f2002 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -40,8 +40,44 @@ #include "ext/mysqlnd/mysqlnd.h" #include "mysqli_mysqlnd.h" #else + +/* + The libmysql headers (a PITA) also define it and there will be an warning. + Undef it and later we might need to define it again. +*/ +#ifdef HAVE_MBRLEN +#undef HAVE_MBRLEN +#define WE_HAD_MBRLEN +#endif +#ifdef HAVE_MBSTATE_T +#undef HAVE_MBSTATE_T +#define WE_HAD_MBSTATE_T +#endif + +#include <my_global.h> + +#if !defined(HAVE_MBRLEN) && defined(WE_HAD_MBRLEN) +#define HAVE_MBRLEN 1 +#endif + +#if !defined(HAVE_MBSTATE_T) && defined(WE_HAD_MBSTATE_T) +#define HAVE_MBSTATE_T 1 +#endif + +/* + We need more than mysql.h because we need CHARSET_INFO in one place. + This order has been borrowed from the ODBC driver. Nothing can be removed + from the list of headers :( +*/ + +#include <my_sys.h> #include <mysql.h> #include <errmsg.h> +#include <my_list.h> +#include <m_string.h> +#include <mysqld_error.h> +#include <my_list.h> +#include <m_ctype.h> #include "mysqli_libmysql.h" #endif |