]>
Commit | Line | Data |
---|---|---|
90e4ba9d ER |
1 | Prefix mysql_ to the real names of several symbols that have to be exported |
2 | from libmysqlclient because mysql-connector-odbc and/or PHP depend on them. | |
3 | This limits the intrusion on application namespace. | |
4 | ||
5 | ||
6 | diff -Naur mysql-5.5.8.orig/include/errmsg.h mysql-5.5.8/include/errmsg.h | |
7 | --- mysql-5.5.8.orig/include/errmsg.h 2010-12-03 12:58:24.000000000 -0500 | |
8 | +++ mysql-5.5.8/include/errmsg.h 2010-12-27 14:29:59.184552374 -0500 | |
9 | @@ -24,6 +24,7 @@ | |
10 | #endif | |
11 | void init_client_errs(void); | |
12 | void finish_client_errs(void); | |
13 | +#define client_errors mysql_client_errors /* namespace sanity */ | |
14 | extern const char *client_errors[]; /* Error messages */ | |
15 | #ifdef __cplusplus | |
16 | } | |
17 | diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h | |
18 | --- mysql-5.5.8.orig/include/my_sys.h 2010-12-03 12:58:24.000000000 -0500 | |
19 | +++ mysql-5.5.8/include/my_sys.h 2010-12-27 14:27:23.956926896 -0500 | |
20 | @@ -227,6 +227,7 @@ | |
21 | ||
22 | /* charsets */ | |
23 | #define MY_ALL_CHARSETS_SIZE 2048 | |
24 | +#define default_charset_info mysql_default_charset_info /* namespace sanity */ | |
25 | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info; | |
26 | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE]; | |
27 | extern CHARSET_INFO compiled_charsets[]; | |
28 | @@ -914,6 +915,9 @@ | |
29 | extern uint get_collation_number(const char *name); | |
30 | extern const char *get_charset_name(uint cs_number); | |
31 | ||
32 | +#define get_charset mysql_get_charset /* namespace sanity */ | |
33 | +#define get_charset_by_csname mysql_get_charset_by_csname | |
34 | + | |
35 | extern CHARSET_INFO *get_charset(uint cs_number, myf flags); | |
36 | extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags); | |
37 | extern CHARSET_INFO *get_charset_by_csname(const char *cs_name, | |
38 | diff -Naur mysql-5.5.8.orig/include/mysql.h.pp mysql-5.5.8/include/mysql.h.pp | |
39 | --- mysql-5.5.8.orig/include/mysql.h.pp 2010-12-03 12:58:24.000000000 -0500 | |
40 | +++ mysql-5.5.8/include/mysql.h.pp 2010-12-27 14:27:23.956926896 -0500 | |
41 | @@ -86,7 +86,7 @@ | |
42 | void my_net_local_init(NET *net); | |
43 | void net_end(NET *net); | |
44 | void net_clear(NET *net, my_bool clear_buffer); | |
45 | -my_bool net_realloc(NET *net, size_t length); | |
46 | +my_bool mysql_net_realloc(NET *net, size_t length); | |
47 | my_bool net_flush(NET *net); | |
48 | my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); | |
49 | my_bool net_write_command(NET *net,unsigned char command, | |
50 | diff -Naur mysql-5.5.8.orig/include/mysql_com.h mysql-5.5.8/include/mysql_com.h | |
51 | --- mysql-5.5.8.orig/include/mysql_com.h 2010-12-03 12:58:24.000000000 -0500 | |
52 | +++ mysql-5.5.8/include/mysql_com.h 2010-12-27 14:27:23.957927198 -0500 | |
53 | @@ -448,6 +448,7 @@ | |
54 | void my_net_local_init(NET *net); | |
55 | void net_end(NET *net); | |
56 | void net_clear(NET *net, my_bool clear_buffer); | |
57 | +#define net_realloc mysql_net_realloc /* namespace sanity */ | |
58 | my_bool net_realloc(NET *net, size_t length); | |
59 | my_bool net_flush(NET *net); | |
60 | my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); | |
bb0a6487 ER |
61 | --- mysql-5.5.9/include/m_string.h~ 2011-01-20 00:37:08.000000000 +0200 |
62 | +++ mysql-5.5.9/include/m_string.h 2011-03-31 16:36:35.184588054 +0300 | |
63 | @@ -118,6 +118,7 @@ | |
64 | extern size_t strnlen(const char *s, size_t n); | |
65 | #endif | |
66 | ||
67 | +#define is_prefix mysql_is_prefix /* namespace sanity */ | |
68 | extern int is_prefix(const char *, const char *); | |
69 | ||
70 | /* Conversion routines */ |