| m_ctype.h | | m_ctype.h | |
|
| /* Copyright (C) 2000 MySQL AB | | /* | |
| | | Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| /* | | /* | |
| A better inplementation of the UNIX ctype(3) library. | | A better inplementation of the UNIX ctype(3) library. | |
| Notes: my_global.h should be included before ctype.h | | Notes: my_global.h should be included before ctype.h | |
| */ | | */ | |
| | | | |
| #ifndef _m_ctype_h | | #ifndef _m_ctype_h | |
| #define _m_ctype_h | | #define _m_ctype_h | |
| | | | |
| #include <my_attribute.h> | | #include <my_attribute.h> | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 52 | |
| | | | |
| typedef struct unicase_info_st | | typedef struct unicase_info_st | |
| { | | { | |
| uint16 toupper; | | uint16 toupper; | |
| uint16 tolower; | | uint16 tolower; | |
| uint16 sort; | | uint16 sort; | |
| } MY_UNICASE_INFO; | | } MY_UNICASE_INFO; | |
| | | | |
| extern MY_UNICASE_INFO *my_unicase_default[256]; | | extern MY_UNICASE_INFO *my_unicase_default[256]; | |
| extern MY_UNICASE_INFO *my_unicase_turkish[256]; | | extern MY_UNICASE_INFO *my_unicase_turkish[256]; | |
|
| | | extern MY_UNICASE_INFO *my_unicase_mysql500[256]; | |
| | | | |
| typedef struct uni_ctype_st | | typedef struct uni_ctype_st | |
| { | | { | |
| uchar pctype; | | uchar pctype; | |
| uchar *ctype; | | uchar *ctype; | |
| } MY_UNI_CTYPE; | | } MY_UNI_CTYPE; | |
| | | | |
| extern MY_UNI_CTYPE my_uni_ctype[256]; | | extern MY_UNI_CTYPE my_uni_ctype[256]; | |
| | | | |
| /* wm_wc and wc_mb return codes */ | | /* wm_wc and wc_mb return codes */ | |
| | | | |
| skipping to change at line 306 | | skipping to change at line 309 | |
| extern CHARSET_INFO my_charset_latin1_german2_ci; | | extern CHARSET_INFO my_charset_latin1_german2_ci; | |
| extern CHARSET_INFO my_charset_latin1_bin; | | extern CHARSET_INFO my_charset_latin1_bin; | |
| extern CHARSET_INFO my_charset_latin2_czech_ci; | | extern CHARSET_INFO my_charset_latin2_czech_ci; | |
| extern CHARSET_INFO my_charset_sjis_japanese_ci; | | extern CHARSET_INFO my_charset_sjis_japanese_ci; | |
| extern CHARSET_INFO my_charset_sjis_bin; | | extern CHARSET_INFO my_charset_sjis_bin; | |
| extern CHARSET_INFO my_charset_tis620_thai_ci; | | extern CHARSET_INFO my_charset_tis620_thai_ci; | |
| extern CHARSET_INFO my_charset_tis620_bin; | | extern CHARSET_INFO my_charset_tis620_bin; | |
| extern CHARSET_INFO my_charset_ucs2_general_ci; | | extern CHARSET_INFO my_charset_ucs2_general_ci; | |
| extern CHARSET_INFO my_charset_ucs2_bin; | | extern CHARSET_INFO my_charset_ucs2_bin; | |
| extern CHARSET_INFO my_charset_ucs2_unicode_ci; | | extern CHARSET_INFO my_charset_ucs2_unicode_ci; | |
|
| | | extern CHARSET_INFO my_charset_ucs2_general_mysql500_ci; | |
| extern CHARSET_INFO my_charset_ujis_japanese_ci; | | extern CHARSET_INFO my_charset_ujis_japanese_ci; | |
| extern CHARSET_INFO my_charset_ujis_bin; | | extern CHARSET_INFO my_charset_ujis_bin; | |
| extern CHARSET_INFO my_charset_utf8_general_ci; | | extern CHARSET_INFO my_charset_utf8_general_ci; | |
| extern CHARSET_INFO my_charset_utf8_unicode_ci; | | extern CHARSET_INFO my_charset_utf8_unicode_ci; | |
| extern CHARSET_INFO my_charset_utf8_bin; | | extern CHARSET_INFO my_charset_utf8_bin; | |
|
| | | extern CHARSET_INFO my_charset_utf8_general_mysql500_ci; | |
| extern CHARSET_INFO my_charset_cp1250_czech_ci; | | extern CHARSET_INFO my_charset_cp1250_czech_ci; | |
| extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename; | | extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename; | |
| | | | |
| /* declarations for simple charsets */ | | /* declarations for simple charsets */ | |
| extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, | | extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t, | |
| const uchar *, size_t); | | const uchar *, size_t); | |
| size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); | | size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t); | |
| extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, | | extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t, | |
| const uchar *, size_t, my_bool); | | const uchar *, size_t, my_bool); | |
| | | | |
| | | | |
| skipping to change at line 458 | | skipping to change at line 463 | |
| int my_wildcmp_unicode(CHARSET_INFO *cs, | | int my_wildcmp_unicode(CHARSET_INFO *cs, | |
| const char *str, const char *str_end, | | const char *str, const char *str_end, | |
| const char *wildstr, const char *wildend, | | const char *wildstr, const char *wildend, | |
| int escape, int w_one, int w_many, | | int escape, int w_one, int w_many, | |
| MY_UNICASE_INFO **weights); | | MY_UNICASE_INFO **weights); | |
| | | | |
| extern my_bool my_parse_charset_xml(const char *bug, size_t len, | | extern my_bool my_parse_charset_xml(const char *bug, size_t len, | |
| int (*add)(CHARSET_INFO *cs)); | | int (*add)(CHARSET_INFO *cs)); | |
| extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, | | extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end, | |
| pchar c); | | pchar c); | |
|
| | | extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end | |
| | | , | |
| | | const char *accept); | |
| | | | |
| my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len)
; | | my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len)
; | |
| my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len
); | | my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len
); | |
| | | | |
| uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); | | uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len); | |
| my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); | | my_bool my_charset_is_ascii_based(CHARSET_INFO *cs); | |
| my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); | | my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs); | |
| uint my_charset_repertoire(CHARSET_INFO *cs); | | uint my_charset_repertoire(CHARSET_INFO *cs); | |
| | | | |
| #define _MY_U 01 /* Upper case */ | | #define _MY_U 01 /* Upper case */ | |
| | | | |
End of changes. 6 change blocks. |
| 3 lines changed or deleted | | 12 lines changed or added | |
|
| m_string.h | | m_string.h | |
|
| /* Copyright (C) 2000 MySQL AB | | /* | |
| | | Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| /* There may be prolems include all of theese. Try to test in | | /* There may be prolems include all of theese. Try to test in | |
| configure with ones are needed? */ | | configure with ones are needed? */ | |
| | | | |
| /* This is needed for the definitions of strchr... on solaris */ | | /* This is needed for the definitions of strchr... on solaris */ | |
| | | | |
| #ifndef _m_string_h | | #ifndef _m_string_h | |
| #define _m_string_h | | #define _m_string_h | |
| #ifndef __USE_GNU | | #ifndef __USE_GNU | |
| #define __USE_GNU /* We want to use stpcpy */ | | #define __USE_GNU /* We want to use stpcpy */ | |
| | | | |
| skipping to change at line 36 | | skipping to change at line 38 | |
| #if defined(HAVE_STRINGS_H) | | #if defined(HAVE_STRINGS_H) | |
| #include <strings.h> | | #include <strings.h> | |
| #endif | | #endif | |
| #if defined(HAVE_STRING_H) | | #if defined(HAVE_STRING_H) | |
| #include <string.h> | | #include <string.h> | |
| #endif | | #endif | |
| | | | |
| /* need by my_vsnprintf */ | | /* need by my_vsnprintf */ | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| | | | |
|
| #ifdef _AIX | | | |
| #undef HAVE_BCMP | | | |
| #endif | | | |
| | | | |
| /* This is needed for the definitions of bzero... on solaris */ | | /* This is needed for the definitions of bzero... on solaris */ | |
| #if defined(HAVE_STRINGS_H) | | #if defined(HAVE_STRINGS_H) | |
| #include <strings.h> | | #include <strings.h> | |
| #endif | | #endif | |
| | | | |
| /* This is needed for the definitions of memcpy... on solaris */ | | /* This is needed for the definitions of memcpy... on solaris */ | |
| #if defined(HAVE_MEMORY_H) && !defined(__cplusplus) | | #if defined(HAVE_MEMORY_H) && !defined(__cplusplus) | |
| #include <memory.h> | | #include <memory.h> | |
| #endif | | #endif | |
| | | | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 61 | |
| # define memmove(d, s, n) bmove ((d), (s), (n)) | | # define memmove(d, s, n) bmove ((d), (s), (n)) | |
| #elif defined(HAVE_MEMMOVE) | | #elif defined(HAVE_MEMMOVE) | |
| # define bmove(d, s, n) memmove((d), (s), (n)) | | # define bmove(d, s, n) memmove((d), (s), (n)) | |
| #else | | #else | |
| # define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ | | # define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ | |
| #endif | | #endif | |
| | | | |
| /* Unixware 7 */ | | /* Unixware 7 */ | |
| #if !defined(HAVE_BFILL) | | #if !defined(HAVE_BFILL) | |
| # define bfill(A,B,C) memset((A),(C),(B)) | | # define bfill(A,B,C) memset((A),(C),(B)) | |
|
| # define bmove_align(A,B,C) memcpy((A),(B),(C)) | | | |
| #endif | | #endif | |
| | | | |
|
| #if !defined(HAVE_BCMP) | | #if !defined(bzero) && (!defined(HAVE_BZERO) || !HAVE_DECL_BZERO || defined | |
| # define bcopy(s, d, n) memcpy((d), (s), (n)) | | (_AIX)) | |
| # define bcmp(A,B,C) memcmp((A),(B),(C)) | | /* See autoconf doku: "HAVE_DECL_symbol" will be defined after configure, t | |
| # define bzero(A,B) memset((A),0,(B)) | | o 0 or 1 */ | |
| # define bmove_align(A,B,C) memcpy((A),(B),(C)) | | /* AIX has bzero() as a function, but the declaration prototype is strangel | |
| | | y hidden */ | |
| | | # define bzero(A,B) memset((A),0,(B)) | |
| #endif | | #endif | |
| | | | |
| #if defined(__cplusplus) | | #if defined(__cplusplus) | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| my_str_malloc() and my_str_free() are assigned to implementations in | | my_str_malloc() and my_str_free() are assigned to implementations in | |
| strings/alloc.c, but can be overridden in the calling program. | | strings/alloc.c, but can be overridden in the calling program. | |
| */ | | */ | |
| extern void *(*my_str_malloc)(size_t); | | extern void *(*my_str_malloc)(size_t); | |
| extern void (*my_str_free)(void *); | | extern void (*my_str_free)(void *); | |
| | | | |
|
| #if defined(HAVE_STPCPY) | | #if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPIL | |
| | | ER) | |
| | | #define strmov(A,B) __builtin_stpcpy((A),(B)) | |
| | | #elif defined(HAVE_STPCPY) | |
| #define strmov(A,B) stpcpy((A),(B)) | | #define strmov(A,B) stpcpy((A),(B)) | |
| #ifndef stpcpy | | #ifndef stpcpy | |
| extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 *
/ | | extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 *
/ | |
| #endif | | #endif | |
| #endif | | #endif | |
| | | | |
| /* Declared in int2str() */ | | /* Declared in int2str() */ | |
| extern char NEAR _dig_vec_upper[]; | | extern char NEAR _dig_vec_upper[]; | |
| extern char NEAR _dig_vec_lower[]; | | extern char NEAR _dig_vec_lower[]; | |
| | | | |
| | | | |
| skipping to change at line 119 | | skipping to change at line 117 | |
| #if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512) | | #if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512) | |
| #define bmove512(A,B,C) memcpy(A,B,C) | | #define bmove512(A,B,C) memcpy(A,B,C) | |
| #endif | | #endif | |
| | | | |
| /* Prototypes for string functions */ | | /* Prototypes for string functions */ | |
| | | | |
| #if !defined(bfill) && !defined(HAVE_BFILL) | | #if !defined(bfill) && !defined(HAVE_BFILL) | |
| extern void bfill(uchar *dst,size_t len,pchar fill); | | extern void bfill(uchar *dst,size_t len,pchar fill); | |
| #endif | | #endif | |
| | | | |
|
| #if !defined(bzero) && !defined(HAVE_BZERO) | | | |
| extern void bzero(uchar * dst,size_t len); | | | |
| #endif | | | |
| | | | |
| #if !defined(bcmp) && !defined(HAVE_BCMP) | | | |
| extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len); | | | |
| #endif | | | |
| #ifdef HAVE_purify | | | |
| extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len); | | | |
| #undef bcmp | | | |
| #define bcmp(A,B,C) my_bcmp((A),(B),(C)) | | | |
| #define bzero_if_purify(A,B) bzero(A,B) | | | |
| #else | | | |
| #define bzero_if_purify(A,B) | | | |
| #endif /* HAVE_purify */ | | | |
| | | | |
| #ifndef bmove512 | | #ifndef bmove512 | |
| extern void bmove512(uchar *dst,const uchar *src,size_t len); | | extern void bmove512(uchar *dst,const uchar *src,size_t len); | |
| #endif | | #endif | |
| | | | |
| #if !defined(HAVE_BMOVE) && !defined(bmove) | | #if !defined(HAVE_BMOVE) && !defined(bmove) | |
| extern void bmove(uuchar *dst, const uchar *src,size_t len); | | extern void bmove(uuchar *dst, const uchar *src,size_t len); | |
| #endif | | #endif | |
| | | | |
| extern void bmove_upp(uchar *dst,const uchar *src,size_t len); | | extern void bmove_upp(uchar *dst,const uchar *src,size_t len); | |
| extern void bchange(uchar *dst,size_t old_len,const uchar *src, | | extern void bchange(uchar *dst,size_t old_len,const uchar *src, | |
| | | | |
| skipping to change at line 202 | | skipping to change at line 184 | |
| #ifndef HAVE_STRSTR | | #ifndef HAVE_STRSTR | |
| extern char *strstr(const char *, const char *); | | extern char *strstr(const char *, const char *); | |
| #endif | | #endif | |
| #endif | | #endif | |
| extern int is_prefix(const char *, const char *); | | extern int is_prefix(const char *, const char *); | |
| | | | |
| /* Conversion routines */ | | /* Conversion routines */ | |
| double my_strtod(const char *str, char **end, int *error); | | double my_strtod(const char *str, char **end, int *error); | |
| double my_atof(const char *nptr); | | double my_atof(const char *nptr); | |
| | | | |
|
| | | #ifndef NOT_FIXED_DEC | |
| | | #define NOT_FIXED_DEC 31 | |
| | | #endif | |
| | | | |
| | | /* | |
| | | Max length of a floating point number. | |
| | | */ | |
| | | #define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC) | |
| | | | |
| extern char *llstr(longlong value,char *buff); | | extern char *llstr(longlong value,char *buff); | |
| extern char *ullstr(longlong value,char *buff); | | extern char *ullstr(longlong value,char *buff); | |
| #ifndef HAVE_STRTOUL | | #ifndef HAVE_STRTOUL | |
| extern long strtol(const char *str, char **ptr, int base); | | extern long strtol(const char *str, char **ptr, int base); | |
| extern ulong strtoul(const char *str, char **ptr, int base); | | extern ulong strtoul(const char *str, char **ptr, int base); | |
| #endif | | #endif | |
| | | | |
| extern char *int2str(long val, char *dst, int radix, int upcase); | | extern char *int2str(long val, char *dst, int radix, int upcase); | |
| extern char *int10_to_str(long val,char *dst,int radix); | | extern char *int10_to_str(long val,char *dst,int radix); | |
| extern char *str2int(const char *src,int radix,long lower,long upper, | | extern char *str2int(const char *src,int radix,long lower,long upper, | |
| | | | |
End of changes. 8 change blocks. |
| 30 lines changed or deleted | | 26 lines changed or added | |
|
| my_config.h | | my_config.h | |
| | | | |
| skipping to change at line 77 | | skipping to change at line 77 | |
| /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix)
. | | /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix)
. | |
| */ | | */ | |
| #define HAVE_ALLOCA_H 1 | | #define HAVE_ALLOCA_H 1 | |
| | | | |
| /* Define to 1 if you have the <arpa/inet.h> header file. */ | | /* Define to 1 if you have the <arpa/inet.h> header file. */ | |
| #define HAVE_ARPA_INET_H 1 | | #define HAVE_ARPA_INET_H 1 | |
| | | | |
| /* Define to 1 if you have the <asm/termbits.h> header file. */ | | /* Define to 1 if you have the <asm/termbits.h> header file. */ | |
| #define HAVE_ASM_TERMBITS_H 1 | | #define HAVE_ASM_TERMBITS_H 1 | |
| | | | |
|
| /* Define to 1 if you have the `atomic_add_long' function. */ | | /* Define to 1 if you have the `atomic_add_long_nv' function. */ | |
| /* #undef HAVE_ATOMIC_ADD_LONG */ | | /* #undef HAVE_ATOMIC_ADD_LONG_NV */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_32' function. */ | | /* Define to 1 if you have the `atomic_cas_32' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_32 */ | | /* #undef HAVE_ATOMIC_CAS_32 */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_64' function. */ | | /* Define to 1 if you have the `atomic_cas_64' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_64 */ | | /* #undef HAVE_ATOMIC_CAS_64 */ | |
| | | | |
| /* Define to 1 if you have the `atomic_cas_ulong' function. */ | | /* Define to 1 if you have the `atomic_cas_ulong' function. */ | |
| /* #undef HAVE_ATOMIC_CAS_ULONG */ | | /* #undef HAVE_ATOMIC_CAS_ULONG */ | |
| | | | |
|
| | | /* Define to 1 if you have the `atomic_swap_uchar' function. */ | |
| | | /* #undef HAVE_ATOMIC_SWAP_UCHAR */ | |
| | | | |
| /* Define to 1 if you have the `backtrace' function. */ | | /* Define to 1 if you have the `backtrace' function. */ | |
| #define HAVE_BACKTRACE 1 | | #define HAVE_BACKTRACE 1 | |
| | | | |
| /* Define to 1 if you have the `backtrace_symbols' function. */ | | /* Define to 1 if you have the `backtrace_symbols' function. */ | |
| #define HAVE_BACKTRACE_SYMBOLS 1 | | #define HAVE_BACKTRACE_SYMBOLS 1 | |
| | | | |
| /* Define to 1 if you have the `backtrace_symbols_fd' function. */ | | /* Define to 1 if you have the `backtrace_symbols_fd' function. */ | |
| #define HAVE_BACKTRACE_SYMBOLS_FD 1 | | #define HAVE_BACKTRACE_SYMBOLS_FD 1 | |
| | | | |
|
| /* Define to 1 if you have the `bcmp' function. */ | | | |
| #define HAVE_BCMP 1 | | | |
| | | | |
| /* Define to 1 if you have the `bfill' function. */ | | /* Define to 1 if you have the `bfill' function. */ | |
| /* #undef HAVE_BFILL */ | | /* #undef HAVE_BFILL */ | |
| | | | |
| /* Define to 1 if you have the `bmove' function. */ | | /* Define to 1 if you have the `bmove' function. */ | |
| /* #undef HAVE_BMOVE */ | | /* #undef HAVE_BMOVE */ | |
| | | | |
| /* bool is not defined by all C++ compilators */ | | /* bool is not defined by all C++ compilators */ | |
| #define HAVE_BOOL 1 | | #define HAVE_BOOL 1 | |
| | | | |
| /* Define to 1 if isinf() uses 80-bit register for intermediate values */ | | /* Define to 1 if isinf() uses 80-bit register for intermediate values */ | |
| | | | |
| skipping to change at line 257 | | skipping to change at line 257 | |
| | | | |
| /* Define to 1 if you have the <curses.h> header file. */ | | /* Define to 1 if you have the <curses.h> header file. */ | |
| #define HAVE_CURSES_H 1 | | #define HAVE_CURSES_H 1 | |
| | | | |
| /* Define to 1 if you have the `cuserid' function. */ | | /* Define to 1 if you have the `cuserid' function. */ | |
| #define HAVE_CUSERID 1 | | #define HAVE_CUSERID 1 | |
| | | | |
| /* Define to 1 if you have the <cxxabi.h> header file. */ | | /* Define to 1 if you have the <cxxabi.h> header file. */ | |
| #define HAVE_CXXABI_H 1 | | #define HAVE_CXXABI_H 1 | |
| | | | |
|
| | | /* Define to 1 if you have the declaration of `bzero', and to 0 if you don' | |
| | | t. | |
| | | */ | |
| | | #define HAVE_DECL_BZERO 1 | |
| | | | |
| | | /* Define to 1 if you have the declaration of `fdatasync', and to 0 if you | |
| | | don't. */ | |
| | | #define HAVE_DECL_FDATASYNC 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `madvise', and to 0 if you | | /* Define to 1 if you have the declaration of `madvise', and to 0 if you | |
| don't. */ | | don't. */ | |
| #define HAVE_DECL_MADVISE 1 | | #define HAVE_DECL_MADVISE 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if yo
u | | /* Define to 1 if you have the declaration of `SHM_HUGETLB', and to 0 if yo
u | |
| don't. */ | | don't. */ | |
| #define HAVE_DECL_SHM_HUGETLB 1 | | #define HAVE_DECL_SHM_HUGETLB 1 | |
| | | | |
| /* Define to 1 if you have the declaration of `tgoto', and to 0 if you don'
t. | | /* Define to 1 if you have the declaration of `tgoto', and to 0 if you don'
t. | |
| */ | | */ | |
| | | | |
| skipping to change at line 311 | | skipping to change at line 319 | |
| | | | |
| /* Define to 1 if you have the <fcntl.h> header file. */ | | /* Define to 1 if you have the <fcntl.h> header file. */ | |
| #define HAVE_FCNTL_H 1 | | #define HAVE_FCNTL_H 1 | |
| | | | |
| /* Define to 1 if you have the `fconvert' function. */ | | /* Define to 1 if you have the `fconvert' function. */ | |
| /* #undef HAVE_FCONVERT */ | | /* #undef HAVE_FCONVERT */ | |
| | | | |
| /* Define to 1 if you have the `fdatasync' function. */ | | /* Define to 1 if you have the `fdatasync' function. */ | |
| #define HAVE_FDATASYNC 1 | | #define HAVE_FDATASYNC 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `fedisableexcept' function. */ | |
| | | #define HAVE_FEDISABLEEXCEPT 1 | |
| | | | |
| /* Define to 1 if you have the <fenv.h> header file. */ | | /* Define to 1 if you have the <fenv.h> header file. */ | |
| #define HAVE_FENV_H 1 | | #define HAVE_FENV_H 1 | |
| | | | |
| /* Define to 1 if you have the `fesetround' function. */ | | /* Define to 1 if you have the `fesetround' function. */ | |
| #define HAVE_FESETROUND 1 | | #define HAVE_FESETROUND 1 | |
| | | | |
| /* Define to 1 if you have the `fgetln' function. */ | | /* Define to 1 if you have the `fgetln' function. */ | |
| /* #undef HAVE_FGETLN */ | | /* #undef HAVE_FGETLN */ | |
| | | | |
| /* Define to 1 if you have the `finite' function. */ | | /* Define to 1 if you have the `finite' function. */ | |
| | | | |
| skipping to change at line 338 | | skipping to change at line 349 | |
| | | | |
| /* Define to 1 if you have the `flockfile' function. */ | | /* Define to 1 if you have the `flockfile' function. */ | |
| #define HAVE_FLOCKFILE 1 | | #define HAVE_FLOCKFILE 1 | |
| | | | |
| /* Define to 1 if you have the `fpresetsticky' function. */ | | /* Define to 1 if you have the `fpresetsticky' function. */ | |
| /* #undef HAVE_FPRESETSTICKY */ | | /* #undef HAVE_FPRESETSTICKY */ | |
| | | | |
| /* Define to 1 if you have the `fpsetmask' function. */ | | /* Define to 1 if you have the `fpsetmask' function. */ | |
| /* #undef HAVE_FPSETMASK */ | | /* #undef HAVE_FPSETMASK */ | |
| | | | |
|
| | | /* Define to 1 if you have the <fpu_control.h> header file. */ | |
| | | #define HAVE_FPU_CONTROL_H 1 | |
| | | | |
| /* Define to 1 if the system has the type `fp_except'. */ | | /* Define to 1 if the system has the type `fp_except'. */ | |
| /* #undef HAVE_FP_EXCEPT */ | | /* #undef HAVE_FP_EXCEPT */ | |
| | | | |
| /* Define to 1 if you have the `fsync' function. */ | | /* Define to 1 if you have the `fsync' function. */ | |
| #define HAVE_FSYNC 1 | | #define HAVE_FSYNC 1 | |
| | | | |
| /* Define to 1 if you have the `ftruncate' function. */ | | /* Define to 1 if you have the `ftruncate' function. */ | |
| #define HAVE_FTRUNCATE 1 | | #define HAVE_FTRUNCATE 1 | |
| | | | |
| /* Define to 1 if compiler provides atomic builtins. */ | | /* Define to 1 if compiler provides atomic builtins. */ | |
| #define HAVE_GCC_ATOMIC_BUILTINS 1 | | #define HAVE_GCC_ATOMIC_BUILTINS 1 | |
| | | | |
| /* Define to 1 if you have the `getcwd' function. */ | | /* Define to 1 if you have the `getcwd' function. */ | |
| #define HAVE_GETCWD 1 | | #define HAVE_GETCWD 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `getegid' function. */ | |
| | | #define HAVE_GETEGID 1 | |
| | | | |
| | | /* Define to 1 if you have the `geteuid' function. */ | |
| | | #define HAVE_GETEUID 1 | |
| | | | |
| | | /* Define to 1 if you have the `getgid' function. */ | |
| | | #define HAVE_GETGID 1 | |
| | | | |
| /* Define to 1 if you have the `gethostbyaddr_r' function. */ | | /* Define to 1 if you have the `gethostbyaddr_r' function. */ | |
| #define HAVE_GETHOSTBYADDR_R 1 | | #define HAVE_GETHOSTBYADDR_R 1 | |
| | | | |
| /* Define to 1 if you have the `gethostbyname_r' function. */ | | /* Define to 1 if you have the `gethostbyname_r' function. */ | |
| #define HAVE_GETHOSTBYNAME_R 1 | | #define HAVE_GETHOSTBYNAME_R 1 | |
| | | | |
| /* Solaris define gethostbyname_r with 5 arguments. glibc2 defines this wit
h 6 | | /* Solaris define gethostbyname_r with 5 arguments. glibc2 defines this wit
h 6 | |
| arguments */ | | arguments */ | |
| #define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 | | #define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1 | |
| | | | |
| | | | |
| skipping to change at line 396 | | skipping to change at line 419 | |
| | | | |
| /* getpwent() declaration present */ | | /* getpwent() declaration present */ | |
| /* #undef HAVE_GETPW_DECLS */ | | /* #undef HAVE_GETPW_DECLS */ | |
| | | | |
| /* Define to 1 if you have the `getrlimit' function. */ | | /* Define to 1 if you have the `getrlimit' function. */ | |
| #define HAVE_GETRLIMIT 1 | | #define HAVE_GETRLIMIT 1 | |
| | | | |
| /* Define to 1 if you have the `getrusage' function. */ | | /* Define to 1 if you have the `getrusage' function. */ | |
| #define HAVE_GETRUSAGE 1 | | #define HAVE_GETRUSAGE 1 | |
| | | | |
|
| | | /* Define to 1 if you have the `getuid' function. */ | |
| | | #define HAVE_GETUID 1 | |
| | | | |
| /* Define to 1 if you have the `getwd' function. */ | | /* Define to 1 if you have the `getwd' function. */ | |
| #define HAVE_GETWD 1 | | #define HAVE_GETWD 1 | |
| | | | |
| /* Define to 1 if you have the `gmtime_r' function. */ | | /* Define to 1 if you have the `gmtime_r' function. */ | |
| #define HAVE_GMTIME_R 1 | | #define HAVE_GMTIME_R 1 | |
| | | | |
| /* Define to 1 if you have the <grp.h> header file. */ | | /* Define to 1 if you have the <grp.h> header file. */ | |
| #define HAVE_GRP_H 1 | | #define HAVE_GRP_H 1 | |
| | | | |
| /* HIST_ENTRY is defined in the outer libeditreadline */ | | /* HIST_ENTRY is defined in the outer libeditreadline */ | |
| | | | |
| skipping to change at line 1026 | | skipping to change at line 1052 | |
| | | | |
| /* Define to 1 if you have the <utime.h> header file. */ | | /* Define to 1 if you have the <utime.h> header file. */ | |
| #define HAVE_UTIME_H 1 | | #define HAVE_UTIME_H 1 | |
| | | | |
| /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.
*/ | | /* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.
*/ | |
| #define HAVE_UTIME_NULL 1 | | #define HAVE_UTIME_NULL 1 | |
| | | | |
| /* Define to 1 if the system has the type `u_int32_t'. */ | | /* Define to 1 if the system has the type `u_int32_t'. */ | |
| #define HAVE_U_INT32_T 1 | | #define HAVE_U_INT32_T 1 | |
| | | | |
|
| | | /* Define for Valgrind support */ | |
| | | /* #undef HAVE_VALGRIND */ | |
| | | | |
| | | /* Define to 1 if you have the <valgrind/memcheck.h> header file. */ | |
| | | /* #undef HAVE_VALGRIND_MEMCHECK_H */ | |
| | | | |
| | | /* Define to 1 if you have the <valgrind/valgrind.h> header file. */ | |
| | | /* #undef HAVE_VALGRIND_VALGRIND_H */ | |
| | | | |
| /* Define to 1 if you have the <varargs.h> header file. */ | | /* Define to 1 if you have the <varargs.h> header file. */ | |
| /* #undef HAVE_VARARGS_H */ | | /* #undef HAVE_VARARGS_H */ | |
| | | | |
| /* Define to 1 if you have the `vidattr' function. */ | | /* Define to 1 if you have the `vidattr' function. */ | |
| /* #undef HAVE_VIDATTR */ | | /* #undef HAVE_VIDATTR */ | |
| | | | |
| /* Define to enable buffered read. This works only if syscalls read/recv | | /* Define to enable buffered read. This works only if syscalls read/recv | |
| return as soon as there is some data in the kernel buffer, no matter how | | return as soon as there is some data in the kernel buffer, no matter how | |
| big the given buffer is. */ | | big the given buffer is. */ | |
| #define HAVE_VIO_READ_BUFF 1 | | #define HAVE_VIO_READ_BUFF 1 | |
| | | | |
| skipping to change at line 1077 | | skipping to change at line 1112 | |
| /* Define if you have wcwidth */ | | /* Define if you have wcwidth */ | |
| #define HAVE_WCWIDTH /**/ | | #define HAVE_WCWIDTH /**/ | |
| | | | |
| /* Define to 1 if compiler supports weak symbol attribute. */ | | /* Define to 1 if compiler supports weak symbol attribute. */ | |
| #define HAVE_WEAK_SYMBOL 1 | | #define HAVE_WEAK_SYMBOL 1 | |
| | | | |
| /* systems should define this type here */ | | /* systems should define this type here */ | |
| #define HAVE_WINT_T 1 | | #define HAVE_WINT_T 1 | |
| | | | |
| /* Define to 1 if you have the <xfs/xfs.h> header file. */ | | /* Define to 1 if you have the <xfs/xfs.h> header file. */ | |
|
| /* #undef HAVE_XFS_XFS_H */ | | #define HAVE_XFS_XFS_H 1 | |
| | | | |
| /* Defined by configure. Using yaSSL for SSL. */ | | /* Defined by configure. Using yaSSL for SSL. */ | |
| /* #undef HAVE_YASSL */ | | /* #undef HAVE_YASSL */ | |
| | | | |
| /* Define if /proc/meminfo shows the huge page size (Linux only) */ | | /* Define if /proc/meminfo shows the huge page size (Linux only) */ | |
| #define HUGETLB_USE_PROC_MEMINFO 1 | | #define HUGETLB_USE_PROC_MEMINFO 1 | |
| | | | |
| /* Define if you have -lwrap */ | | /* Define if you have -lwrap */ | |
| /* #undef LIBWRAP */ | | /* #undef LIBWRAP */ | |
| | | | |
| | | | |
| skipping to change at line 1141 | | skipping to change at line 1176 | |
| /* Name of package */ | | /* Name of package */ | |
| #define PACKAGE "mysql" | | #define PACKAGE "mysql" | |
| | | | |
| /* Define to the address where bug reports for this package should be sent.
*/ | | /* Define to the address where bug reports for this package should be sent.
*/ | |
| #define PACKAGE_BUGREPORT "" | | #define PACKAGE_BUGREPORT "" | |
| | | | |
| /* Define to the full name of this package. */ | | /* Define to the full name of this package. */ | |
| #define PACKAGE_NAME "MySQL Server" | | #define PACKAGE_NAME "MySQL Server" | |
| | | | |
| /* Define to the full name and version of this package. */ | | /* Define to the full name and version of this package. */ | |
|
| #define PACKAGE_STRING "MySQL Server 5.1.47" | | #define PACKAGE_STRING "MySQL Server 5.1.67" | |
| | | | |
| /* Define to the one symbol short name of this package. */ | | /* Define to the one symbol short name of this package. */ | |
| #define PACKAGE_TARNAME "mysql" | | #define PACKAGE_TARNAME "mysql" | |
| | | | |
| /* Define to the version of this package. */ | | /* Define to the version of this package. */ | |
|
| #define PACKAGE_VERSION "5.1.47" | | #define PACKAGE_VERSION "5.1.67" | |
| | | | |
| /* mysql client protocol version */ | | /* mysql client protocol version */ | |
| #define PROTOCOL_VERSION 10 | | #define PROTOCOL_VERSION 10 | |
| | | | |
| /* qsort returns void */ | | /* qsort returns void */ | |
| #define QSORT_TYPE_IS_VOID 1 | | #define QSORT_TYPE_IS_VOID 1 | |
| | | | |
| /* The return type of qsort (int or void). */ | | /* The return type of qsort (int or void). */ | |
| #define RETQSORTTYPE void | | #define RETQSORTTYPE void | |
| | | | |
| | | | |
| skipping to change at line 1185 | | skipping to change at line 1220 | |
| | | | |
| /* The size of `off_t', as computed by sizeof. */ | | /* The size of `off_t', as computed by sizeof. */ | |
| #define SIZEOF_OFF_T 8 | | #define SIZEOF_OFF_T 8 | |
| | | | |
| /* The size of `pthread_t', as computed by sizeof. */ | | /* The size of `pthread_t', as computed by sizeof. */ | |
| #define SIZEOF_PTHREAD_T 4 | | #define SIZEOF_PTHREAD_T 4 | |
| | | | |
| /* The size of `short', as computed by sizeof. */ | | /* The size of `short', as computed by sizeof. */ | |
| #define SIZEOF_SHORT 2 | | #define SIZEOF_SHORT 2 | |
| | | | |
|
| | | /* The size of `time_t', as computed by sizeof. */ | |
| | | #define SIZEOF_TIME_T 4 | |
| | | | |
| /* The size of `void*', as computed by sizeof. */ | | /* The size of `void*', as computed by sizeof. */ | |
| #define SIZEOF_VOIDP 4 | | #define SIZEOF_VOIDP 4 | |
| | | | |
| /* The base type of the last arg to accept */ | | /* The base type of the last arg to accept */ | |
| #define SOCKET_SIZE_TYPE socklen_t | | #define SOCKET_SIZE_TYPE socklen_t | |
| | | | |
| /* Last argument to get/setsockopt */ | | /* Last argument to get/setsockopt */ | |
| /* #undef SOCKOPT_OPTLEN_TYPE */ | | /* #undef SOCKOPT_OPTLEN_TYPE */ | |
| | | | |
|
| /* Broken sprintf */ | | | |
| /* #undef SPRINTF_RETURNS_GARBAGE */ | | | |
| | | | |
| /* POSIX sprintf */ | | | |
| #define SPRINTF_RETURNS_INT 1 | | | |
| | | | |
| /* Broken sprintf */ | | | |
| /* #undef SPRINTF_RETURNS_PTR */ | | | |
| | | | |
| /* If using the C implementation of alloca, define if you know the | | /* If using the C implementation of alloca, define if you know the | |
| direction of stack growth for your system; otherwise it will be | | direction of stack growth for your system; otherwise it will be | |
| automatically deduced at runtime. | | automatically deduced at runtime. | |
| STACK_DIRECTION > 0 => grows toward higher addresses | | STACK_DIRECTION > 0 => grows toward higher addresses | |
| STACK_DIRECTION < 0 => grows toward lower addresses | | STACK_DIRECTION < 0 => grows toward lower addresses | |
| STACK_DIRECTION = 0 => direction of growth unknown */ | | STACK_DIRECTION = 0 => direction of growth unknown */ | |
| #define STACK_DIRECTION -1 | | #define STACK_DIRECTION -1 | |
| | | | |
| /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly.
*/ | | /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly.
*/ | |
| /* #undef STAT_MACROS_BROKEN */ | | /* #undef STAT_MACROS_BROKEN */ | |
| | | | |
| skipping to change at line 1268 | | skipping to change at line 1297 | |
| /* */ | | /* */ | |
| #define USE_MB_IDENT 1 | | #define USE_MB_IDENT 1 | |
| | | | |
| /* Needs to use mysys_new helpers */ | | /* Needs to use mysys_new helpers */ | |
| /* #undef USE_MYSYS_NEW */ | | /* #undef USE_MYSYS_NEW */ | |
| | | | |
| /* used new readline interface (are rl_completion_func_t and | | /* used new readline interface (are rl_completion_func_t and | |
| rl_compentry_func_t defined) */ | | rl_compentry_func_t defined) */ | |
| /* #undef USE_NEW_READLINE_INTERFACE */ | | /* #undef USE_NEW_READLINE_INTERFACE */ | |
| | | | |
|
| /* the pstack backtrace library */ | | | |
| /* #undef USE_PSTACK */ | | | |
| | | | |
| /* Version number of package */ | | /* Version number of package */ | |
|
| #define VERSION "5.1.47" | | #define VERSION "5.1.67" | |
| | | | |
| /* sighandler type is void (*signal ()) (); */ | | /* sighandler type is void (*signal ()) (); */ | |
| #define VOID_SIGHANDLER 1 | | #define VOID_SIGHANDLER 1 | |
| | | | |
| /* Include Archive Storage Engine into mysqld */ | | /* Include Archive Storage Engine into mysqld */ | |
| /* #undef WITH_ARCHIVE_STORAGE_ENGINE */ | | /* #undef WITH_ARCHIVE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Basic Write-only Read-never tables into mysqld */ | | /* Include Basic Write-only Read-never tables into mysqld */ | |
| /* #undef WITH_BLACKHOLE_STORAGE_ENGINE */ | | /* #undef WITH_BLACKHOLE_STORAGE_ENGINE */ | |
| | | | |
| | | | |
| skipping to change at line 1295 | | skipping to change at line 1321 | |
| | | | |
| /* Include Example for Storage Engines for developers into mysqld */ | | /* Include Example for Storage Engines for developers into mysqld */ | |
| /* #undef WITH_EXAMPLE_STORAGE_ENGINE */ | | /* #undef WITH_EXAMPLE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Connects to tables on remote MySQL servers into mysqld */ | | /* Include Connects to tables on remote MySQL servers into mysqld */ | |
| /* #undef WITH_FEDERATED_STORAGE_ENGINE */ | | /* #undef WITH_FEDERATED_STORAGE_ENGINE */ | |
| | | | |
| /* Include Volatile memory based tables into mysqld */ | | /* Include Volatile memory based tables into mysqld */ | |
| #define WITH_HEAP_STORAGE_ENGINE 1 | | #define WITH_HEAP_STORAGE_ENGINE 1 | |
| | | | |
|
| /* Include IBM DB2 for i Storage Engine into mysqld */ | | | |
| /* #undef WITH_IBMDB2I_STORAGE_ENGINE */ | | | |
| | | | |
| /* Include Transactional Tables using InnoDB into mysqld */ | | /* Include Transactional Tables using InnoDB into mysqld */ | |
| /* #undef WITH_INNOBASE_STORAGE_ENGINE */ | | /* #undef WITH_INNOBASE_STORAGE_ENGINE */ | |
| | | | |
| /* Include Transactional Tables using InnoDB into mysqld */ | | /* Include Transactional Tables using InnoDB into mysqld */ | |
| /* #undef WITH_INNODB_PLUGIN_STORAGE_ENGINE */ | | /* #undef WITH_INNODB_PLUGIN_STORAGE_ENGINE */ | |
| | | | |
| /* Include Merge multiple MySQL tables into one into mysqld */ | | /* Include Merge multiple MySQL tables into one into mysqld */ | |
| #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | | #define WITH_MYISAMMRG_STORAGE_ENGINE 1 | |
| | | | |
| /* Include Traditional non-transactional MySQL tables into mysqld */ | | /* Include Traditional non-transactional MySQL tables into mysqld */ | |
| | | | |
End of changes. 17 change blocks. |
| 24 lines changed or deleted | | 48 lines changed or added | |
|
| my_dbug.h | | my_dbug.h | |
|
| /* Copyright (C) 2000 MySQL AB | | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser
ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
|
| #ifndef _dbug_h | | #ifndef MY_DBUG_INCLUDED | |
| #define _dbug_h | | #define MY_DBUG_INCLUDED | |
| | | | |
| | | #ifndef __WIN__ | |
| | | #ifdef HAVE_SYS_TYPES_H | |
| | | #include <sys/types.h> | |
| | | #endif | |
| | | #ifdef HAVE_UNISTD_H | |
| | | #include <unistd.h> | |
| | | #endif | |
| | | #include <signal.h> | |
| | | #endif /* not __WIN__ */ | |
| | | | |
| #if defined(__cplusplus) && !defined(DBUG_OFF) | | #if defined(__cplusplus) && !defined(DBUG_OFF) | |
| class Dbug_violation_helper | | class Dbug_violation_helper | |
| { | | { | |
| public: | | public: | |
| inline Dbug_violation_helper() : | | inline Dbug_violation_helper() : | |
| _entered(TRUE) | | _entered(TRUE) | |
| { } | | { } | |
| | | | |
| inline ~Dbug_violation_helper() | | inline ~Dbug_violation_helper() | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 83 | |
| uint *_slevel_); | | uint *_slevel_); | |
| extern void _db_pargs_(uint _line_,const char *keyword); | | extern void _db_pargs_(uint _line_,const char *keyword); | |
| extern void _db_doprnt_ _VARARGS((const char *format,...)) | | extern void _db_doprnt_ _VARARGS((const char *format,...)) | |
| ATTRIBUTE_FORMAT(printf, 1, 2); | | ATTRIBUTE_FORMAT(printf, 1, 2); | |
| extern void _db_dump_(uint _line_,const char *keyword, | | extern void _db_dump_(uint _line_,const char *keyword, | |
| const unsigned char *memory, size_t length); | | const unsigned char *memory, size_t length); | |
| extern void _db_end_(void); | | extern void _db_end_(void); | |
| extern void _db_lock_file_(void); | | extern void _db_lock_file_(void); | |
| extern void _db_unlock_file_(void); | | extern void _db_unlock_file_(void); | |
| extern FILE *_db_fp_(void); | | extern FILE *_db_fp_(void); | |
|
| | | extern void _db_flush_(); | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| | | | |
| #define DBUG_ENTER(a) \ | | #define DBUG_ENTER(a) \ | |
| const char *_db_func_, *_db_file_; \ | | const char *_db_func_, *_db_file_; \ | |
| uint _db_level_; \ | | uint _db_level_; \ | |
| char **_db_framep_; \ | | char **_db_framep_; \ | |
| Dbug_violation_helper dbug_violation_helper; \ | | Dbug_violation_helper dbug_violation_helper; \ | |
| _db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \ | | _db_enter_ (a, __FILE__, __LINE__, &_db_func_, &_db_file_, \ | |
| &_db_level_, &_db_framep_) | | &_db_level_, &_db_framep_) | |
| | | | |
| skipping to change at line 127 | | skipping to change at line 139 | |
| #define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) | | #define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) | |
| #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) | | #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) | |
| #define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) | | #define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) | |
| #define DBUG_END() _db_end_ () | | #define DBUG_END() _db_end_ () | |
| #define DBUG_LOCK_FILE _db_lock_file_() | | #define DBUG_LOCK_FILE _db_lock_file_() | |
| #define DBUG_UNLOCK_FILE _db_unlock_file_() | | #define DBUG_UNLOCK_FILE _db_unlock_file_() | |
| #define DBUG_ASSERT(A) assert(A) | | #define DBUG_ASSERT(A) assert(A) | |
| #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) | | #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) | |
| #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) | | #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) | |
| #define IF_DBUG(A) A | | #define IF_DBUG(A) A | |
|
| | | #ifndef __WIN__ | |
| | | #define DBUG_ABORT() (_db_flush_(), abort()) | |
| | | #else | |
| | | /* | |
| | | Avoid popup with abort/retry/ignore buttons. When BUG#31745 is fixed we c | |
| | | an | |
| | | call abort() instead of _exit(3) (now it would cause a "test signal" popu | |
| | | p). | |
| | | */ | |
| | | #include <crtdbg.h> | |
| | | #define DBUG_ABORT() (_db_flush_(),\ | |
| | | (void)_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE) | |
| | | ,\ | |
| | | (void)_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDER | |
| | | R),\ | |
| | | _exit(3)) | |
| | | #endif | |
| | | | |
| | | /* | |
| | | Make the program fail, without creating a core file. | |
| | | abort() will send SIGABRT which (most likely) generates core. | |
| | | Use SIGKILL instead, which cannot be caught. | |
| | | We also pause the current thread, until the signal is actually delivered. | |
| | | An alternative would be to use _exit(EXIT_FAILURE), | |
| | | but then valgrind would report lots of memory leaks. | |
| | | */ | |
| | | #ifdef __WIN__ | |
| | | #define DBUG_SUICIDE() DBUG_ABORT() | |
| | | #else | |
| | | extern void _db_suicide_(); | |
| | | #define DBUG_SUICIDE() (_db_flush_(), _db_suicide_()) | |
| | | #endif | |
| | | | |
| #else /* No debugger */ | | #else /* No debugger */ | |
| | | | |
| #define DBUG_ENTER(a1) | | #define DBUG_ENTER(a1) | |
| #define DBUG_LEAVE | | #define DBUG_LEAVE | |
| #define DBUG_VIOLATION_HELPER_LEAVE | | #define DBUG_VIOLATION_HELPER_LEAVE | |
| #define DBUG_RETURN(a1) do { return(a1); } while(0) | | #define DBUG_RETURN(a1) do { return(a1); } while(0) | |
| #define DBUG_VOID_RETURN do { return; } while(0) | | #define DBUG_VOID_RETURN do { return; } while(0) | |
| #define DBUG_EXECUTE(keyword,a1) do { } while(0) | | #define DBUG_EXECUTE(keyword,a1) do { } while(0) | |
| #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) | | #define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) | |
| #define DBUG_EVALUATE(keyword,a1,a2) (a2) | | #define DBUG_EVALUATE(keyword,a1,a2) (a2) | |
| | | | |
| skipping to change at line 155 | | skipping to change at line 196 | |
| #define DBUG_LONGJMP(a1) longjmp(a1) | | #define DBUG_LONGJMP(a1) longjmp(a1) | |
| #define DBUG_DUMP(keyword,a1,a2) do { } while(0) | | #define DBUG_DUMP(keyword,a1,a2) do { } while(0) | |
| #define DBUG_END() | | #define DBUG_END() | |
| #define DBUG_ASSERT(A) do { } while(0) | | #define DBUG_ASSERT(A) do { } while(0) | |
| #define DBUG_LOCK_FILE | | #define DBUG_LOCK_FILE | |
| #define DBUG_FILE (stderr) | | #define DBUG_FILE (stderr) | |
| #define DBUG_UNLOCK_FILE | | #define DBUG_UNLOCK_FILE | |
| #define DBUG_EXPLAIN(buf,len) | | #define DBUG_EXPLAIN(buf,len) | |
| #define DBUG_EXPLAIN_INITIAL(buf,len) | | #define DBUG_EXPLAIN_INITIAL(buf,len) | |
| #define IF_DBUG(A) | | #define IF_DBUG(A) | |
|
| | | #define DBUG_ABORT() do { } while(0) | |
| | | #define DBUG_SUICIDE() do { } while(0) | |
| | | | |
| #endif | | #endif | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
|
| #endif | | | |
| | | #endif /* MY_DBUG_INCLUDED */ | |
| | | | |
End of changes. 7 change blocks. |
| 5 lines changed or deleted | | 53 lines changed or added | |
|
| my_getopt.h | | my_getopt.h | |
|
| /* Copyright (C) 2002-2004 MySQL AB | | /* | |
| | | Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| #ifndef _my_getopt_h | | #ifndef _my_getopt_h | |
| #define _my_getopt_h | | #define _my_getopt_h | |
| | | | |
| C_MODE_START | | C_MODE_START | |
| | | | |
| #define GET_NO_ARG 1 | | #define GET_NO_ARG 1 | |
| #define GET_BOOL 2 | | #define GET_BOOL 2 | |
| #define GET_INT 3 | | #define GET_INT 3 | |
| #define GET_UINT 4 | | #define GET_UINT 4 | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 50 | |
| | | | |
| enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; | | enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; | |
| | | | |
| struct st_typelib; | | struct st_typelib; | |
| | | | |
| struct my_option | | struct my_option | |
| { | | { | |
| const char *name; /* Name of the option */ | | const char *name; /* Name of the option */ | |
| int id; /* unique id or short option */ | | int id; /* unique id or short option */ | |
| const char *comment; /* option comment, for autom. --hel
p */ | | const char *comment; /* option comment, for autom. --hel
p */ | |
|
| uchar **value; /* The variable value */ | | void *value; /* The variable value */ | |
| uchar **u_max_value; /* The user def. max variable value | | void *u_max_value; /* The user def. max variable value | |
| */ | | */ | |
| struct st_typelib *typelib; /* Pointer to possible values */ | | struct st_typelib *typelib; /* Pointer to possible values */ | |
|
| ulong var_type; | | ulong var_type; /* Must match the variable type */ | |
| enum get_opt_arg_type arg_type; | | enum get_opt_arg_type arg_type; | |
| longlong def_value; /* Default value */ | | longlong def_value; /* Default value */ | |
| longlong min_value; /* Min allowed value */ | | longlong min_value; /* Min allowed value */ | |
|
| longlong max_value; /* Max allowed value */ | | ulonglong max_value; /* Max allowed value */ | |
| longlong sub_size; /* Subtract this from given value *
/ | | longlong sub_size; /* Subtract this from given value *
/ | |
| long block_size; /* Value should be a mult. of this
*/ | | long block_size; /* Value should be a mult. of this
*/ | |
| void *app_type; /* To be used by an application */ | | void *app_type; /* To be used by an application */ | |
| }; | | }; | |
| | | | |
|
| typedef my_bool (* my_get_one_option) (int, const struct my_option *, char | | typedef my_bool (*my_get_one_option)(int, const struct my_option *, char *) | |
| * ); | | ; | |
| typedef void (* my_error_reporter) (enum loglevel level, const char *format | | typedef void (*my_error_reporter)(enum loglevel level, const char *format, | |
| , ... ); | | ...) | |
| | | ATTRIBUTE_FORMAT_FPTR(printf, 2, 3); | |
| | | | |
| | | /** | |
| | | Used to retrieve a reference to the object (variable) that holds the valu | |
| | | e | |
| | | for the given option. For example, if var_type is GET_UINT, the function | |
| | | must return a pointer to a variable of type uint. A argument is stored in | |
| | | the location pointed to by the returned pointer. | |
| | | */ | |
| | | typedef void *(*my_getopt_value)(const char *, uint, const struct my_option | |
| | | *, | |
| | | int *); | |
| | | | |
| extern char *disabled_my_option; | | extern char *disabled_my_option; | |
| extern my_bool my_getopt_print_errors; | | extern my_bool my_getopt_print_errors; | |
| extern my_bool my_getopt_skip_unknown; | | extern my_bool my_getopt_skip_unknown; | |
| extern my_error_reporter my_getopt_error_reporter; | | extern my_error_reporter my_getopt_error_reporter; | |
| | | | |
| extern int handle_options (int *argc, char ***argv, | | extern int handle_options (int *argc, char ***argv, | |
| const struct my_option *longopts, my_get_one_opti
on); | | const struct my_option *longopts, my_get_one_opti
on); | |
| extern void my_cleanup_options(const struct my_option *options); | | extern void my_cleanup_options(const struct my_option *options); | |
| extern void my_print_help(const struct my_option *options); | | extern void my_print_help(const struct my_option *options); | |
| extern void my_print_variables(const struct my_option *options); | | extern void my_print_variables(const struct my_option *options); | |
|
| extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, | | extern void my_getopt_register_get_addr(my_getopt_value); | |
| uint, | | | |
| const struct my_option *, int *)); | | | |
| | | | |
| ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt
p, | | ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *opt
p, | |
| my_bool *fix); | | my_bool *fix); | |
| longlong getopt_ll_limit_value(longlong, const struct my_option *, | | longlong getopt_ll_limit_value(longlong, const struct my_option *, | |
| my_bool *fix); | | my_bool *fix); | |
| my_bool getopt_compare_strings(const char *s, const char *t, uint length); | | my_bool getopt_compare_strings(const char *s, const char *t, uint length); | |
| | | | |
| C_MODE_END | | C_MODE_END | |
| | | | |
| #endif /* _my_getopt_h */ | | #endif /* _my_getopt_h */ | |
| | | | |
End of changes. 7 change blocks. |
| 15 lines changed or deleted | | 28 lines changed or added | |
|
| my_global.h | | my_global.h | |
|
| /* Copyright (C) 2000-2003 MySQL AB | | /* | |
| | | Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| /* This is the include file that should be included 'first' in every C file
. */ | | /* This is the include file that should be included 'first' in every C file
. */ | |
| | | | |
| #ifndef _global_h | | #ifndef _global_h | |
| #define _global_h | | #define _global_h | |
| | | | |
| /* | | /* | |
| InnoDB depends on some MySQL internals which other plugins should not | | InnoDB depends on some MySQL internals which other plugins should not | |
| need. This is because of InnoDB's foreign key support, "safe" binlog | | need. This is because of InnoDB's foreign key support, "safe" binlog | |
| truncation, and other similar legacy features. | | truncation, and other similar legacy features. | |
| | | | |
| skipping to change at line 57 | | skipping to change at line 59 | |
| Must be defined before including | | Must be defined before including | |
| "sys/select.h" and "sys/time.h" | | "sys/select.h" and "sys/time.h" | |
| */ | | */ | |
| #endif | | #endif | |
| | | | |
| /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ | | /* to make command line shorter we'll define USE_PRAGMA_INTERFACE here */ | |
| #ifdef USE_PRAGMA_IMPLEMENTATION | | #ifdef USE_PRAGMA_IMPLEMENTATION | |
| #define USE_PRAGMA_INTERFACE | | #define USE_PRAGMA_INTERFACE | |
| #endif | | #endif | |
| | | | |
|
| | | #if defined(__OpenBSD__) && (OpenBSD >= 200411) | |
| | | #define HAVE_ERRNO_AS_DEFINE | |
| | | #endif | |
| | | | |
| #if defined(i386) && !defined(__i386__) | | #if defined(i386) && !defined(__i386__) | |
| #define __i386__ | | #define __i386__ | |
| #endif | | #endif | |
| | | | |
| /* Macros to make switching between C and C++ mode easier */ | | /* Macros to make switching between C and C++ mode easier */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| #define C_MODE_START extern "C" { | | #define C_MODE_START extern "C" { | |
| #define C_MODE_END } | | #define C_MODE_END } | |
| #else | | #else | |
| #define C_MODE_START | | #define C_MODE_START | |
| | | | |
| skipping to change at line 354 | | skipping to change at line 360 | |
| #endif /* THREAD */ | | #endif /* THREAD */ | |
| | | | |
| /* Go around some bugs in different OS and compilers */ | | /* Go around some bugs in different OS and compilers */ | |
| #ifdef _AIX /* By soren@t.dk */ | | #ifdef _AIX /* By soren@t.dk */ | |
| #define _H_STRINGS | | #define _H_STRINGS | |
| #define _SYS_STREAM_H | | #define _SYS_STREAM_H | |
| /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ | | /* #define _AIX32_CURSES */ /* XXX: this breaks AIX 4.3.3 (others?). */ | |
| #define ulonglong2double(A) my_ulonglong2double(A) | | #define ulonglong2double(A) my_ulonglong2double(A) | |
| #define my_off_t2double(A) my_ulonglong2double(A) | | #define my_off_t2double(A) my_ulonglong2double(A) | |
| C_MODE_START | | C_MODE_START | |
|
| double my_ulonglong2double(unsigned long long A); | | inline double my_ulonglong2double(unsigned long long A) { return (double) A
; } | |
| C_MODE_END | | C_MODE_END | |
| #endif /* _AIX */ | | #endif /* _AIX */ | |
| | | | |
| #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ | | #ifdef HAVE_BROKEN_SNPRINTF /* HPUX 10.20 don't have this defined */ | |
| #undef HAVE_SNPRINTF | | #undef HAVE_SNPRINTF | |
| #endif | | #endif | |
| #ifdef HAVE_BROKEN_PREAD | | #ifdef HAVE_BROKEN_PREAD | |
| /* | | /* | |
| pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without | | pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without | |
| installing the kernel patch PHKL_20349 or greater | | installing the kernel patch PHKL_20349 or greater | |
| | | | |
| skipping to change at line 535 | | skipping to change at line 541 | |
| #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ | | #define QUOTE_ARG(x) #x /* Quote argument (before cpp) */ | |
| #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ | | #define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */ | |
| | | | |
| /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ | | /* Paranoid settings. Define I_AM_PARANOID if you are paranoid */ | |
| #ifdef I_AM_PARANOID | | #ifdef I_AM_PARANOID | |
| #define DONT_ALLOW_USER_CHANGE 1 | | #define DONT_ALLOW_USER_CHANGE 1 | |
| #define DONT_USE_MYSQL_PWD 1 | | #define DONT_USE_MYSQL_PWD 1 | |
| #endif | | #endif | |
| | | | |
| /* Does the system remember a signal handler after a signal ? */ | | /* Does the system remember a signal handler after a signal ? */ | |
|
| #ifndef HAVE_BSD_SIGNALS | | #if !defined(HAVE_BSD_SIGNALS) && !defined(HAVE_SIGACTION) | |
| #define DONT_REMEMBER_SIGNAL | | #define SIGNAL_HANDLER_RESET_ON_DELIVERY | |
| #endif | | #endif | |
| | | | |
| /* Define void to stop lint from generating "null effekt" comments */ | | /* Define void to stop lint from generating "null effekt" comments */ | |
| #ifndef DONT_DEFINE_VOID | | #ifndef DONT_DEFINE_VOID | |
| #ifdef _lint | | #ifdef _lint | |
| int __void__; | | int __void__; | |
| #define VOID(X) (__void__ = (int) (X)) | | #define VOID(X) (__void__ = (int) (X)) | |
| #else | | #else | |
| #undef VOID | | #undef VOID | |
| #define VOID(X) (X) | | #define VOID(X) (X) | |
| #endif | | #endif | |
| #endif /* DONT_DEFINE_VOID */ | | #endif /* DONT_DEFINE_VOID */ | |
| | | | |
|
| #if defined(_lint) || defined(FORCE_INIT_OF_VARS) | | /* | |
| #define LINT_INIT(var) var=0 /* No uninitialize-warning * | | Deprecated workaround for false-positive uninitialized variables | |
| / | | warnings. Those should be silenced using tool-specific heuristics. | |
| | | | |
| | | Enabled by default for g++ due to the bug referenced below. | |
| | | */ | |
| | | #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ | |
| | | (defined(__GNUC__) && defined(__cplusplus)) | |
| | | #define LINT_INIT(var) var= 0 | |
| #else | | #else | |
| #define LINT_INIT(var) | | #define LINT_INIT(var) | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| Suppress uninitialized variable warning without generating code. | | Suppress uninitialized variable warning without generating code. | |
| | | | |
| The _cplusplus is a temporary workaround for C++ code pending a fix | | The _cplusplus is a temporary workaround for C++ code pending a fix | |
| for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). | | for a g++ bug (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34772). | |
| */ | | */ | |
|
| #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(__cplusplus) | | | #if defined(_lint) || defined(FORCE_INIT_OF_VARS) || \ | |
| | \ | | defined(__cplusplus) || !defined(__GNUC__) | |
| !defined(__GNUC__) | | | |
| #define UNINIT_VAR(x) x= 0 | | #define UNINIT_VAR(x) x= 0 | |
| #else | | #else | |
|
| | | /* GCC specific self-initialization which inhibits the warning. */ | |
| #define UNINIT_VAR(x) x= x | | #define UNINIT_VAR(x) x= x | |
| #endif | | #endif | |
| | | | |
| /* Define some useful general macros */ | | /* Define some useful general macros */ | |
| #if !defined(max) | | #if !defined(max) | |
| #define max(a, b) ((a) > (b) ? (a) : (b)) | | #define max(a, b) ((a) > (b) ? (a) : (b)) | |
| #define min(a, b) ((a) < (b) ? (a) : (b)) | | #define min(a, b) ((a) < (b) ? (a) : (b)) | |
| #endif | | #endif | |
| | | | |
| #if !defined(HAVE_UINT) | | #if !defined(HAVE_UINT) | |
| | | | |
| skipping to change at line 589 | | skipping to change at line 603 | |
| typedef unsigned short ushort; | | typedef unsigned short ushort; | |
| #endif | | #endif | |
| | | | |
| #define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) | | #define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1) | |
| #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) | | #define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0) | |
| #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } | | #define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; } | |
| #define test(a) ((a) ? 1 : 0) | | #define test(a) ((a) ? 1 : 0) | |
| #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) | | #define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0) | |
| #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) | | #define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0) | |
| #define test_all_bits(a,b) (((a) & (b)) == (b)) | | #define test_all_bits(a,b) (((a) & (b)) == (b)) | |
|
| #define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type)
0 : ((((type) 1) << (bit_count)) - (type) 1)) | | | |
| #define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) | | #define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0]))) | |
| | | | |
| /* Define some general constants */ | | /* Define some general constants */ | |
| #ifndef TRUE | | #ifndef TRUE | |
| #define TRUE (1) /* Logical true */ | | #define TRUE (1) /* Logical true */ | |
| #define FALSE (0) /* Logical false */ | | #define FALSE (0) /* Logical false */ | |
| #endif | | #endif | |
| | | | |
| #if defined(__GNUC__) | | #if defined(__GNUC__) | |
| #define function_volatile volatile | | #define function_volatile volatile | |
| #define my_reinterpret_cast(A) reinterpret_cast<A> | | #define my_reinterpret_cast(A) reinterpret_cast<A> | |
| #define my_const_cast(A) const_cast<A> | | #define my_const_cast(A) const_cast<A> | |
| # ifndef GCC_VERSION | | # ifndef GCC_VERSION | |
| # define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | | # define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) | |
| # endif | | # endif | |
| #elif !defined(my_reinterpret_cast) | | #elif !defined(my_reinterpret_cast) | |
| #define my_reinterpret_cast(A) (A) | | #define my_reinterpret_cast(A) (A) | |
| #define my_const_cast(A) (A) | | #define my_const_cast(A) (A) | |
| #endif | | #endif | |
| | | | |
|
| #include <my_attribute.h> | | #include <my_compiler.h> | |
| | | | |
| /* | | /* | |
| Wen using the embedded library, users might run into link problems, | | Wen using the embedded library, users might run into link problems, | |
| duplicate declaration of __cxa_pure_virtual, solved by declaring it a | | duplicate declaration of __cxa_pure_virtual, solved by declaring it a | |
| weak symbol. | | weak symbol. | |
| */ | | */ | |
| #if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) | | #if defined(USE_MYSYS_NEW) && ! defined(DONT_DECLARE_CXA_PURE_VIRTUAL) | |
| C_MODE_START | | C_MODE_START | |
| int __cxa_pure_virtual () __attribute__ ((weak)); | | int __cxa_pure_virtual () __attribute__ ((weak)); | |
| C_MODE_END | | C_MODE_END | |
| | | | |
| skipping to change at line 744 | | skipping to change at line 757 | |
| #define FN_HEADLEN 253 /* Max length of filepart of file name */ | | #define FN_HEADLEN 253 /* Max length of filepart of file name */ | |
| #define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN)
*/ | | #define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN)
*/ | |
| #define FN_REFLEN 512 /* Max length of full path-name */ | | #define FN_REFLEN 512 /* Max length of full path-name */ | |
| #define FN_EXTCHAR '.' | | #define FN_EXTCHAR '.' | |
| #define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ | | #define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */ | |
| #define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ | | #define FN_CURLIB '.' /* ./ is used as abbrev for current dir */ | |
| #define FN_PARENTDIR ".." /* Parent directory; Must be a string */ | | #define FN_PARENTDIR ".." /* Parent directory; Must be a string */ | |
| | | | |
| #ifndef FN_LIBCHAR | | #ifndef FN_LIBCHAR | |
| #define FN_LIBCHAR '/' | | #define FN_LIBCHAR '/' | |
|
| | | #define FN_DIRSEP "/" /* Valid directory separators */ | |
| #define FN_ROOTDIR "/" | | #define FN_ROOTDIR "/" | |
| #endif | | #endif | |
| #define MY_NFILE 64 /* This is only used to save filenames */ | | #define MY_NFILE 64 /* This is only used to save filenames */ | |
| #ifndef OS_FILE_LIMIT | | #ifndef OS_FILE_LIMIT | |
| #define OS_FILE_LIMIT UINT_MAX | | #define OS_FILE_LIMIT UINT_MAX | |
| #endif | | #endif | |
| | | | |
| /* #define EXT_IN_LIBNAME */ | | /* #define EXT_IN_LIBNAME */ | |
| /* #define FN_NO_CASE_SENCE */ | | /* #define FN_NO_CASE_SENCE */ | |
| /* #define FN_UPPER_CASE TRUE */ | | /* #define FN_UPPER_CASE TRUE */ | |
| | | | |
| skipping to change at line 926 | | skipping to change at line 940 | |
| | | | |
| #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) | | #define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1)) | |
| #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) | | #define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double)) | |
| /* Size to make adressable obj. */ | | /* Size to make adressable obj. */ | |
| #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) | | #define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t))) | |
| /* Offset of field f in structure t */ | | /* Offset of field f in structure t */ | |
| #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) | | #define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f) | |
| #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) | | #define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size) | |
| #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) | | #define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B)) | |
| | | | |
|
| #define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B)) | | | |
| #define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))] | | | |
| | | | |
| /* | | /* | |
| Custom version of standard offsetof() macro which can be used to get | | Custom version of standard offsetof() macro which can be used to get | |
| offsets of members in class for non-POD types (according to the current | | offsets of members in class for non-POD types (according to the current | |
| version of C++ standard offsetof() macro can't be used in such cases and | | version of C++ standard offsetof() macro can't be used in such cases and | |
| attempt to do so causes warnings to be emitted, OTOH in many cases it is | | attempt to do so causes warnings to be emitted, OTOH in many cases it is | |
| still OK to assume that all instances of the class has the same offsets | | still OK to assume that all instances of the class has the same offsets | |
| for the same members). | | for the same members). | |
| | | | |
| This is temporary solution which should be removed once File_parser class | | This is temporary solution which should be removed once File_parser class | |
| and related routines are refactored. | | and related routines are refactored. | |
| | | | |
| skipping to change at line 1450 | | skipping to change at line 1461 | |
| #endif | | #endif | |
| #ifndef doubleget | | #ifndef doubleget | |
| #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
)) | | #define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double
)) | |
| #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e)) | | #define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(doubl
e)) | |
| #endif /* doubleget */ | | #endif /* doubleget */ | |
| #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
long)) | | #define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulong
long)) | |
| #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong)) | | #define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulo
nglong)) | |
| | | | |
| #endif /* WORDS_BIGENDIAN */ | | #endif /* WORDS_BIGENDIAN */ | |
| | | | |
|
| /* sprintf does not always return the number of bytes :- */ | | | |
| #ifdef SPRINTF_RETURNS_INT | | | |
| #define my_sprintf(buff,args) sprintf args | | | |
| #else | | | |
| #ifdef SPRINTF_RETURNS_PTR | | | |
| #define my_sprintf(buff,args) ((int)(sprintf args - buff)) | | | |
| #else | | | |
| #define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff)) | | | |
| #endif | | | |
| #endif | | | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| #define thread_safe_increment(V,L) (V)++ | | #define thread_safe_increment(V,L) (V)++ | |
| #define thread_safe_decrement(V,L) (V)-- | | #define thread_safe_decrement(V,L) (V)-- | |
| #define thread_safe_add(V,C,L) (V)+=(C) | | #define thread_safe_add(V,C,L) (V)+=(C) | |
| #define thread_safe_sub(V,C,L) (V)-=(C) | | #define thread_safe_sub(V,C,L) (V)-=(C) | |
| #define statistic_increment(V,L) (V)++ | | #define statistic_increment(V,L) (V)++ | |
| #define statistic_decrement(V,L) (V)-- | | #define statistic_decrement(V,L) (V)-- | |
| #define statistic_add(V,C,L) (V)+=(C) | | #define statistic_add(V,C,L) (V)+=(C) | |
| #define statistic_sub(V,C,L) (V)-=(C) | | #define statistic_sub(V,C,L) (V)-=(C) | |
| #endif | | #endif | |
| | | | |
End of changes. 13 change blocks. |
| 28 lines changed or deleted | | 27 lines changed or added | |
|
| my_pthread.h | | my_pthread.h | |
|
| /* Copyright (C) 2000 MySQL AB | | /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reser
ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| | | | |
| skipping to change at line 127 | | skipping to change at line 127 | |
| int pthread_attr_init(pthread_attr_t *connect_att); | | int pthread_attr_init(pthread_attr_t *connect_att); | |
| int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); | | int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack); | |
| int pthread_attr_setprio(pthread_attr_t *connect_att,int priority); | | int pthread_attr_setprio(pthread_attr_t *connect_att,int priority); | |
| int pthread_attr_destroy(pthread_attr_t *connect_att); | | int pthread_attr_destroy(pthread_attr_t *connect_att); | |
| int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(vo
id)); | | int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(vo
id)); | |
| struct tm *localtime_r(const time_t *timep,struct tm *tmp); | | struct tm *localtime_r(const time_t *timep,struct tm *tmp); | |
| struct tm *gmtime_r(const time_t *timep,struct tm *tmp); | | struct tm *gmtime_r(const time_t *timep,struct tm *tmp); | |
| | | | |
| void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A
)*/ | | void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A
)*/ | |
| | | | |
|
| #define ETIMEDOUT 145 /* Win32 doesn't have this */ | | #ifndef ETIMEDOUT | |
| | | #define ETIMEDOUT 145 /* Win32 might not have this */ | |
| | | #endif | |
| #define getpid() GetCurrentThreadId() | | #define getpid() GetCurrentThreadId() | |
| #define HAVE_LOCALTIME_R 1 | | #define HAVE_LOCALTIME_R 1 | |
| #define _REENTRANT 1 | | #define _REENTRANT 1 | |
| #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 | | #define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 | |
| | | | |
| /* | | /* | |
| Windows has two ways to use thread local storage. The most efficient | | Windows has two ways to use thread local storage. The most efficient | |
| is using __declspec(thread), but that does not work properly when | | is using __declspec(thread), but that does not work properly when | |
| used in a .dll that is loaded at runtime, after program load. So for | | used in a .dll that is loaded at runtime, after program load. So for | |
| libmysql.dll and libmysqld.dll we define USE_TLS in order to use the | | libmysql.dll and libmysqld.dll we define USE_TLS in order to use the | |
| | | | |
| skipping to change at line 269 | | skipping to change at line 271 | |
| int sigwait(sigset_t *setp, int *sigp); /* Use our implement
ion */ | | int sigwait(sigset_t *setp, int *sigp); /* Use our implement
ion */ | |
| #endif | | #endif | |
| | | | |
| /* | | /* | |
| We define my_sigset() and use that instead of the system sigset() so that | | We define my_sigset() and use that instead of the system sigset() so that | |
| we can favor an implementation based on sigaction(). On some systems, suc
h | | we can favor an implementation based on sigaction(). On some systems, suc
h | |
| as Mac OS X, sigset() results in flags such as SA_RESTART being set, and | | as Mac OS X, sigset() results in flags such as SA_RESTART being set, and | |
| we want to make sure that no such flags are set. | | we want to make sure that no such flags are set. | |
| */ | | */ | |
| #if defined(HAVE_SIGACTION) && !defined(my_sigset) | | #if defined(HAVE_SIGACTION) && !defined(my_sigset) | |
|
| #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; int l_rc; | | #define my_sigset(A,B) do { struct sigaction l_s; sigset_t l_set; | |
| \ | | \ | |
| | | IF_DBUG(int l_rc); | |
| | | \ | |
| DBUG_ASSERT((A) != 0);
\ | | DBUG_ASSERT((A) != 0);
\ | |
| sigemptyset(&l_set);
\ | | sigemptyset(&l_set);
\ | |
| l_s.sa_handler = (B);
\ | | l_s.sa_handler = (B);
\ | |
| l_s.sa_mask = l_set;
\ | | l_s.sa_mask = l_set;
\ | |
| l_s.sa_flags = 0;
\ | | l_s.sa_flags = 0;
\ | |
|
| l_rc= sigaction((A), &l_s, (struct sigaction *)
NULL);\ | | IF_DBUG(l_rc=) sigaction((A), &l_s, NULL);
\ | |
| DBUG_ASSERT(l_rc == 0);
\ | | DBUG_ASSERT(l_rc == 0);
\ | |
| } while (0) | | } while (0) | |
| #elif defined(HAVE_SIGSET) && !defined(my_sigset) | | #elif defined(HAVE_SIGSET) && !defined(my_sigset) | |
| #define my_sigset(A,B) sigset((A),(B)) | | #define my_sigset(A,B) sigset((A),(B)) | |
| #elif !defined(my_sigset) | | #elif !defined(my_sigset) | |
| #define my_sigset(A,B) signal((A),(B)) | | #define my_sigset(A,B) signal((A),(B)) | |
| #endif | | #endif | |
| | | | |
| #ifndef my_pthread_setprio | | #ifndef my_pthread_setprio | |
| #if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */ | | #if defined(HAVE_PTHREAD_SETPRIO_NP) /* FSU threads */ | |
| | | | |
| skipping to change at line 491 | | skipping to change at line 494 | |
| #endif /* SAFE_MUTEX_DETECT_DESTROY */ | | #endif /* SAFE_MUTEX_DETECT_DESTROY */ | |
| | | | |
| int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, | | int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr, | |
| const char *file, uint line); | | const char *file, uint line); | |
| int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, u
int line); | | int safe_mutex_lock(safe_mutex_t *mp, my_bool try_lock, const char *file, u
int line); | |
| int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); | | int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line); | |
| int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); | | int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line); | |
| int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, | | int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file, | |
| uint line); | | uint line); | |
| int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, | | int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, | |
|
| struct timespec *abstime, const char *file, uint lin | | const struct timespec *abstime, | |
| e); | | const char *file, uint line); | |
| void safe_mutex_global_init(void); | | void safe_mutex_global_init(void); | |
| void safe_mutex_end(FILE *file); | | void safe_mutex_end(FILE *file); | |
| | | | |
| /* Wrappers if safe mutex is actually used */ | | /* Wrappers if safe mutex is actually used */ | |
| #ifdef SAFE_MUTEX | | #ifdef SAFE_MUTEX | |
| #undef pthread_mutex_init | | #undef pthread_mutex_init | |
| #undef pthread_mutex_lock | | #undef pthread_mutex_lock | |
| #undef pthread_mutex_unlock | | #undef pthread_mutex_unlock | |
| #undef pthread_mutex_destroy | | #undef pthread_mutex_destroy | |
| #undef pthread_mutex_wait | | #undef pthread_mutex_wait | |
| | | | |
| skipping to change at line 715 | | skipping to change at line 719 | |
| #define THD_LIB_NPTL 2 | | #define THD_LIB_NPTL 2 | |
| #define THD_LIB_LT 4 | | #define THD_LIB_LT 4 | |
| | | | |
| extern uint thd_lib_detected; | | extern uint thd_lib_detected; | |
| | | | |
| /* | | /* | |
| thread_safe_xxx functions are for critical statistic or counters. | | thread_safe_xxx functions are for critical statistic or counters. | |
| The implementation is guaranteed to be thread safe, on all platforms. | | The implementation is guaranteed to be thread safe, on all platforms. | |
| Note that the calling code should *not* assume the counter is protected | | Note that the calling code should *not* assume the counter is protected | |
| by the mutex given, as the implementation of these helpers may change | | by the mutex given, as the implementation of these helpers may change | |
|
| to use my_atomic operations instead. | | to use atomic operations instead. | |
| */ | | */ | |
| | | | |
| /* | | /* | |
| Warning: | | Warning: | |
| When compiling without threads, this file is not included. | | When compiling without threads, this file is not included. | |
| See the *other* declarations of thread_safe_xxx in include/my_global.h | | See the *other* declarations of thread_safe_xxx in include/my_global.h | |
| | | | |
| Second warning: | | Second warning: | |
| See include/config-win.h, for yet another implementation. | | See include/config-win.h, for yet another implementation. | |
| */ | | */ | |
| | | | |
End of changes. 6 change blocks. |
| 8 lines changed or deleted | | 12 lines changed or added | |
|
| my_sys.h | | my_sys.h | |
|
| /* Copyright (C) 2000-2003 MySQL AB | | /* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reser
ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| | | | |
| skipping to change at line 28 | | skipping to change at line 28 | |
| C_MODE_START | | C_MODE_START | |
| | | | |
| #ifdef HAVE_AIOWAIT | | #ifdef HAVE_AIOWAIT | |
| #include <sys/asynch.h> /* Used by record-cache */ | | #include <sys/asynch.h> /* Used by record-cache */ | |
| typedef struct my_aio_result { | | typedef struct my_aio_result { | |
| aio_result_t result; | | aio_result_t result; | |
| int pending; | | int pending; | |
| } my_aio_result; | | } my_aio_result; | |
| #endif | | #endif | |
| | | | |
|
| | | #ifdef HAVE_VALGRIND | |
| | | # include <valgrind/memcheck.h> | |
| | | # define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len) | |
| | | # define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) | |
| | | # define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,l | |
| | | en) | |
| | | # define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) | |
| | | #else /* HAVE_VALGRIND */ | |
| | | # define MEM_UNDEFINED(a,len) ((void) 0) | |
| | | # define MEM_NOACCESS(a,len) ((void) 0) | |
| | | # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) | |
| | | # define MEM_CHECK_DEFINED(a,len) ((void) 0) | |
| | | #endif /* HAVE_VALGRIND */ | |
| | | | |
| #ifndef THREAD | | #ifndef THREAD | |
| extern int NEAR my_errno; /* Last error in mysys */ | | extern int NEAR my_errno; /* Last error in mysys */ | |
| #else | | #else | |
| #include <my_pthread.h> | | #include <my_pthread.h> | |
| #endif | | #endif | |
| | | | |
| #include <m_ctype.h> /* for CHARSET_INFO */ | | #include <m_ctype.h> /* for CHARSET_INFO */ | |
| #include <stdarg.h> | | #include <stdarg.h> | |
| #include <typelib.h> | | #include <typelib.h> | |
| | | | |
| #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curs
es; mysys_uses_curses=1; } | | #define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curs
es; mysys_uses_curses=1; } | |
| #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_
no_curses; mysys_uses_curses=0;} | | #define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_
no_curses; mysys_uses_curses=0;} | |
|
| #define MY_INIT(name); { my_progname= name; my_init(); } | | #define MY_INIT(name) { my_progname= name; my_init(); } | |
| | | | |
| #define MY_FILE_ERROR ((size_t) -1) | | #define MY_FILE_ERROR ((size_t) -1) | |
| | | | |
| /* General bitmaps for my_func's */ | | /* General bitmaps for my_func's */ | |
| #define MY_FFNF 1 /* Fatal if file not found */ | | #define MY_FFNF 1 /* Fatal if file not found */ | |
| #define MY_FNABP 2 /* Fatal if not all bytes read/writen */ | | #define MY_FNABP 2 /* Fatal if not all bytes read/writen */ | |
| #define MY_NABP 4 /* Error if not all bytes read/write
n */ | | #define MY_NABP 4 /* Error if not all bytes read/write
n */ | |
| #define MY_FAE 8 /* Fatal if any error */ | | #define MY_FAE 8 /* Fatal if any error */ | |
| #define MY_WME 16 /* Write message on error */ | | #define MY_WME 16 /* Write message on error */ | |
| #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ | | #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ | |
| | | | |
| skipping to change at line 143 | | skipping to change at line 156 | |
| /* defines when allocating data */ | | /* defines when allocating data */ | |
| #ifdef SAFEMALLOC | | #ifdef SAFEMALLOC | |
| #define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG ) | | #define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG ) | |
| #define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG ) | | #define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG ) | |
| #define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__,
FLAG ) | | #define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__,
FLAG ) | |
| #define my_checkmalloc() _sanity( __FILE__, __LINE__ ) | | #define my_checkmalloc() _sanity( __FILE__, __LINE__ ) | |
| #define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG) | | #define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG) | |
| #define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C) | | #define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C) | |
| #define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C) | | #define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C) | |
| #define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) | | #define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C) | |
|
| #define TRASH(A,B) bfill(A, B, 0x8F) | | #define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0) | |
| #define QUICK_SAFEMALLOC sf_malloc_quick=1 | | #define QUICK_SAFEMALLOC sf_malloc_quick=1 | |
| #define NORMAL_SAFEMALLOC sf_malloc_quick=0 | | #define NORMAL_SAFEMALLOC sf_malloc_quick=0 | |
| extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; | | extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; | |
| extern ulonglong sf_malloc_mem_limit; | | extern ulonglong sf_malloc_mem_limit; | |
| | | | |
| #define CALLER_INFO_PROTO , const char *sFile, uint uLine | | #define CALLER_INFO_PROTO , const char *sFile, uint uLine | |
| #define CALLER_INFO , __FILE__, __LINE__ | | #define CALLER_INFO , __FILE__, __LINE__ | |
| #define ORIG_CALLER_INFO , sFile, uLine | | #define ORIG_CALLER_INFO , sFile, uLine | |
| #else | | #else | |
| #define my_checkmalloc() | | #define my_checkmalloc() | |
| | | | |
| skipping to change at line 171 | | skipping to change at line 184 | |
| extern void my_no_flags_free(void *ptr); | | extern void my_no_flags_free(void *ptr); | |
| extern void *my_memdup(const void *from,size_t length,myf MyFlags); | | extern void *my_memdup(const void *from,size_t length,myf MyFlags); | |
| extern char *my_strdup(const char *from,myf MyFlags); | | extern char *my_strdup(const char *from,myf MyFlags); | |
| extern char *my_strndup(const char *from, size_t length, | | extern char *my_strndup(const char *from, size_t length, | |
| myf MyFlags); | | myf MyFlags); | |
| /* we do use FG (as a no-op) in below so that a typo on FG is caught */ | | /* we do use FG (as a no-op) in below so that a typo on FG is caught */ | |
| #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) | | #define my_free(PTR,FG) ((void)FG,my_no_flags_free(PTR)) | |
| #define CALLER_INFO_PROTO /* nothing */ | | #define CALLER_INFO_PROTO /* nothing */ | |
| #define CALLER_INFO /* nothing */ | | #define CALLER_INFO /* nothing */ | |
| #define ORIG_CALLER_INFO /* nothing */ | | #define ORIG_CALLER_INFO /* nothing */ | |
|
| #define TRASH(A,B) /* nothing */ | | #define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while
(0) | |
| #endif | | #endif | |
| | | | |
| #if defined(ENABLED_DEBUG_SYNC) | | #if defined(ENABLED_DEBUG_SYNC) | |
| extern void (*debug_sync_C_callback_ptr)(const char *, size_t); | | extern void (*debug_sync_C_callback_ptr)(const char *, size_t); | |
| #define DEBUG_SYNC_C(_sync_point_name_) do { \ | | #define DEBUG_SYNC_C(_sync_point_name_) do { \ | |
| if (debug_sync_C_callback_ptr != NULL) \ | | if (debug_sync_C_callback_ptr != NULL) \ | |
| (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \ | | (*debug_sync_C_callback_ptr)(STRING_WITH_LEN(_sync_point_name_)); } \ | |
| while(0) | | while(0) | |
| #else | | #else | |
| #define DEBUG_SYNC_C(_sync_point_name_) | | #define DEBUG_SYNC_C(_sync_point_name_) | |
| | | | |
| skipping to change at line 651 | | skipping to change at line 664 | |
| #define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) | | #define my_delete_allow_opened(fname,flags) my_delete((fname),(flags)) | |
| #endif | | #endif | |
| | | | |
| #ifndef TERMINATE | | #ifndef TERMINATE | |
| extern void TERMINATE(FILE *file, uint flag); | | extern void TERMINATE(FILE *file, uint flag); | |
| #endif | | #endif | |
| extern void init_glob_errs(void); | | extern void init_glob_errs(void); | |
| extern void wait_for_free_space(const char *filename, int errors); | | extern void wait_for_free_space(const char *filename, int errors); | |
| extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | | extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags); | |
| extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | | extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags
); | |
|
| | | extern FILE *my_freopen(const char *path, const char *mode, FILE *stream); | |
| extern int my_fclose(FILE *fd,myf MyFlags); | | extern int my_fclose(FILE *fd,myf MyFlags); | |
| extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | | extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); | |
| extern int my_sync(File fd, myf my_flags); | | extern int my_sync(File fd, myf my_flags); | |
| extern int my_sync_dir(const char *dir_name, myf my_flags); | | extern int my_sync_dir(const char *dir_name, myf my_flags); | |
| extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | | extern int my_sync_dir_by_file(const char *file_name, myf my_flags); | |
| extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | | extern int my_error _VARARGS((int nr,myf MyFlags, ...)); | |
| extern int my_printf_error _VARARGS((uint my_err, const char *format, | | extern int my_printf_error _VARARGS((uint my_err, const char *format, | |
| myf MyFlags, ...)) | | myf MyFlags, ...)) | |
| ATTRIBUTE_FORMAT(printf, 2, 4); | | ATTRIBUTE_FORMAT(printf, 2, 4); | |
| extern int my_error_register(const char **errmsgs, int first, int last); | | extern int my_error_register(const char **errmsgs, int first, int last); | |
| | | | |
End of changes. 6 change blocks. |
| 4 lines changed or deleted | | 19 lines changed or added | |
|
| mysql.h | | mysql.h | |
|
| /* Copyright (C) 2000-2003 MySQL AB | | /* | |
| | | Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| /* | | /* | |
| This file defines the client API to MySQL and also the ABI of the | | This file defines the client API to MySQL and also the ABI of the | |
| dynamically linked libmysqlclient. | | dynamically linked libmysqlclient. | |
| | | | |
| The ABI should never be changed in a released product of MySQL | | The ABI should never be changed in a released product of MySQL | |
| thus you need to take great care when changing the file. In case | | thus you need to take great care when changing the file. In case | |
| the file is changed so the ABI is broken, you must also | | the file is changed so the ABI is broken, you must also | |
| update the SHAREDLIB_MAJOR_VERSION in configure.in . | | update the SHAREDLIB_MAJOR_VERSION in configure.in . | |
| | | | |
| | | | |
| skipping to change at line 47 | | skipping to change at line 49 | |
| #undef _WIN32 | | #undef _WIN32 | |
| #undef _WIN64 | | #undef _WIN64 | |
| #undef __WIN__ | | #undef __WIN__ | |
| #endif | | #endif | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| | | | |
| #ifndef _global_h /* If not standard header */ | | #ifndef _global_h /* If not standard header */ | |
|
| | | #ifndef MYSQL_ABI_CHECK | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| | | #endif | |
| #ifdef __LCC__ | | #ifdef __LCC__ | |
| #include <winsock2.h> /* For windows */ | | #include <winsock2.h> /* For windows */ | |
| #endif | | #endif | |
| typedef char my_bool; | | typedef char my_bool; | |
| #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) | | #if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__) | |
| #define __WIN__ | | #define __WIN__ | |
| #endif | | #endif | |
| #if !defined(__WIN__) | | #if !defined(__WIN__) | |
| #define STDCALL | | #define STDCALL | |
| #else | | #else | |
| | | | |
| skipping to change at line 224 | | skipping to change at line 228 | |
| int (*local_infile_init)(void **, const char *, void *); | | int (*local_infile_init)(void **, const char *, void *); | |
| int (*local_infile_read)(void *, char *, unsigned int); | | int (*local_infile_read)(void *, char *, unsigned int); | |
| void (*local_infile_end)(void *); | | void (*local_infile_end)(void *); | |
| int (*local_infile_error)(void *, char *, unsigned int); | | int (*local_infile_error)(void *, char *, unsigned int); | |
| void *local_infile_userdata; | | void *local_infile_userdata; | |
| void *extension; | | void *extension; | |
| }; | | }; | |
| | | | |
| enum mysql_status | | enum mysql_status | |
| { | | { | |
|
| MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT | | MYSQL_STATUS_READY, MYSQL_STATUS_GET_RESULT, MYSQL_STATUS_USE_RESULT, | |
| | | MYSQL_STATUS_STATEMENT_GET_RESULT | |
| }; | | }; | |
| | | | |
| enum mysql_protocol_type | | enum mysql_protocol_type | |
| { | | { | |
| MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, | | MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET, | |
| MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY | | MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY | |
| }; | | }; | |
| /* | | /* | |
| There are three types of queries - the ones that have to go to | | There are three types of queries - the ones that have to go to | |
| the master, the ones that go to a slave, and the adminstrative | | the master, the ones that go to a slave, and the adminstrative | |
| | | | |
End of changes. 5 change blocks. |
| 4 lines changed or deleted | | 10 lines changed or added | |
|
| readline.h | | readline.h | |
|
| /* $NetBSD: readline.h,v 1.24 2009/02/05 19:15:26 christos Exp $ */ | | /* $NetBSD: readline.h,v 1.32 2010/09/16 20:08:52 christos Exp $ */ | |
| | | | |
| /*- | | /*- | |
| * Copyright (c) 1997 The NetBSD Foundation, Inc. | | * Copyright (c) 1997 The NetBSD Foundation, Inc. | |
| * All rights reserved. | | * All rights reserved. | |
| * | | * | |
| * This code is derived from software contributed to The NetBSD Foundation | | * This code is derived from software contributed to The NetBSD Foundation | |
| * by Jaromir Dolecek. | | * by Jaromir Dolecek. | |
| * | | * | |
| * Redistribution and use in source and binary forms, with or without | | * Redistribution and use in source and binary forms, with or without | |
| * modification, are permitted provided that the following conditions | | * modification, are permitted provided that the following conditions | |
| | | | |
| skipping to change at line 35 | | skipping to change at line 35 | |
| * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
| * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
| * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
| * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T
HE | | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF T
HE | |
| * POSSIBILITY OF SUCH DAMAGE. | | * POSSIBILITY OF SUCH DAMAGE. | |
| */ | | */ | |
| #ifndef _READLINE_H_ | | #ifndef _READLINE_H_ | |
| #define _READLINE_H_ | | #define _READLINE_H_ | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
|
| | | #include <stdio.h> | |
| | | | |
| /* list of readline stuff supported by editline library's readline wrapper
*/ | | /* list of readline stuff supported by editline library's readline wrapper
*/ | |
| | | | |
| /* typedefs */ | | /* typedefs */ | |
| typedef int Function(const char *, int); | | typedef int Function(const char *, int); | |
| typedef void VFunction(void); | | typedef void VFunction(void); | |
| typedef void VCPFunction(char *); | | typedef void VCPFunction(char *); | |
| typedef char *CPFunction(const char *, int); | | typedef char *CPFunction(const char *, int); | |
| typedef char **CPPFunction(const char *, int, int); | | typedef char **CPPFunction(const char *, int, int); | |
| typedef char *rl_compentry_func_t(const char *, int); | | typedef char *rl_compentry_func_t(const char *, int); | |
|
| | | typedef int rl_command_func_t(int, int); | |
| | | | |
| | | /* only supports length */ | |
| | | typedef struct { | |
| | | int length; | |
| | | } HISTORY_STATE; | |
| | | | |
| | | typedef void *histdata_t; | |
| | | | |
| typedef struct _hist_entry { | | typedef struct _hist_entry { | |
| const char *line; | | const char *line; | |
|
| const char *data; | | histdata_t data; | |
| } HIST_ENTRY; | | } HIST_ENTRY; | |
| | | | |
| typedef struct _keymap_entry { | | typedef struct _keymap_entry { | |
| char type; | | char type; | |
| #define ISFUNC 0 | | #define ISFUNC 0 | |
| #define ISKMAP 1 | | #define ISKMAP 1 | |
| #define ISMACR 2 | | #define ISMACR 2 | |
| Function *function; | | Function *function; | |
| } KEYMAP_ENTRY; | | } KEYMAP_ENTRY; | |
| | | | |
| | | | |
| skipping to change at line 82 | | skipping to change at line 91 | |
| #ifndef CTRL | | #ifndef CTRL | |
| #define CTRL(c) ((c) & 037) | | #define CTRL(c) ((c) & 037) | |
| #endif | | #endif | |
| #endif | | #endif | |
| #ifndef UNCTRL | | #ifndef UNCTRL | |
| #define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit) | | #define UNCTRL(c) (((c) - 'a' + 'A')|control_character_bit) | |
| #endif | | #endif | |
| | | | |
| #define RUBOUT 0x7f | | #define RUBOUT 0x7f | |
| #define ABORT_CHAR CTRL('G') | | #define ABORT_CHAR CTRL('G') | |
|
| | | #define RL_READLINE_VERSION 0x0402 | |
| | | #define RL_PROMPT_START_IGNORE '\1' | |
| | | #define RL_PROMPT_END_IGNORE '\2' | |
| | | | |
| /* global variables used by readline enabled applications */ | | /* global variables used by readline enabled applications */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| extern const char *rl_library_version; | | extern const char *rl_library_version; | |
|
| | | extern int rl_readline_version; | |
| extern char *rl_readline_name; | | extern char *rl_readline_name; | |
| extern FILE *rl_instream; | | extern FILE *rl_instream; | |
| extern FILE *rl_outstream; | | extern FILE *rl_outstream; | |
| extern char *rl_line_buffer; | | extern char *rl_line_buffer; | |
| extern int rl_point, rl_end; | | extern int rl_point, rl_end; | |
| extern int history_base, history_length; | | extern int history_base, history_length; | |
| extern int max_input_history; | | extern int max_input_history; | |
| extern char *rl_basic_word_break_characters; | | extern char *rl_basic_word_break_characters; | |
| extern char *rl_completer_word_break_characters; | | extern char *rl_completer_word_break_characters; | |
| extern char *rl_completer_quote_characters; | | extern char *rl_completer_quote_characters; | |
| | | | |
| skipping to change at line 141 | | skipping to change at line 154 | |
| void using_history(void); | | void using_history(void); | |
| int add_history(const char *); | | int add_history(const char *); | |
| void clear_history(void); | | void clear_history(void); | |
| void stifle_history(int); | | void stifle_history(int); | |
| int unstifle_history(void); | | int unstifle_history(void); | |
| int history_is_stifled(void); | | int history_is_stifled(void); | |
| int where_history(void); | | int where_history(void); | |
| HIST_ENTRY *current_history(void); | | HIST_ENTRY *current_history(void); | |
| HIST_ENTRY *history_get(int); | | HIST_ENTRY *history_get(int); | |
| HIST_ENTRY *remove_history(int); | | HIST_ENTRY *remove_history(int); | |
|
| | | HIST_ENTRY *replace_history_entry(int, const char *, histdata_t); | |
| int history_total_bytes(void); | | int history_total_bytes(void); | |
| int history_set_pos(int); | | int history_set_pos(int); | |
| HIST_ENTRY *previous_history(void); | | HIST_ENTRY *previous_history(void); | |
| HIST_ENTRY *next_history(void); | | HIST_ENTRY *next_history(void); | |
| int history_search(const char *, int); | | int history_search(const char *, int); | |
| int history_search_prefix(const char *, int); | | int history_search_prefix(const char *, int); | |
| int history_search_pos(const char *, int, int); | | int history_search_pos(const char *, int, int); | |
| int read_history(const char *); | | int read_history(const char *); | |
| int write_history(const char *); | | int write_history(const char *); | |
|
| | | int history_truncate_file (const char *, int); | |
| int history_expand(char *, char **); | | int history_expand(char *, char **); | |
| char **history_tokenize(const char *); | | char **history_tokenize(const char *); | |
| const char *get_history_event(const char *, int *, int); | | const char *get_history_event(const char *, int *, int); | |
| char *history_arg_extract(int, int, const char *); | | char *history_arg_extract(int, int, const char *); | |
| | | | |
| char *tilde_expand(char *); | | char *tilde_expand(char *); | |
| char *filename_completion_function(const char *, int); | | char *filename_completion_function(const char *, int); | |
| char *username_completion_function(const char *, int); | | char *username_completion_function(const char *, int); | |
| int rl_complete(int, int); | | int rl_complete(int, int); | |
| int rl_read_key(void); | | int rl_read_key(void); | |
| char **completion_matches(const char *, CPFunction *); | | char **completion_matches(const char *, CPFunction *); | |
| void rl_display_match_list(char **, int, int); | | void rl_display_match_list(char **, int, int); | |
| | | | |
| int rl_insert(int, int); | | int rl_insert(int, int); | |
|
| | | int rl_insert_text(const char *); | |
| void rl_reset_terminal(const char *); | | void rl_reset_terminal(const char *); | |
|
| int rl_bind_key(int, int (*)(int, int)); | | int rl_bind_key(int, rl_command_func_t *); | |
| int rl_newline(int, int); | | int rl_newline(int, int); | |
| void rl_callback_read_char(void); | | void rl_callback_read_char(void); | |
| void rl_callback_handler_install(const char *, VCPFunction *); | | void rl_callback_handler_install(const char *, VCPFunction *); | |
| void rl_callback_handler_remove(void); | | void rl_callback_handler_remove(void); | |
| void rl_redisplay(void); | | void rl_redisplay(void); | |
| int rl_get_previous_history(int, int); | | int rl_get_previous_history(int, int); | |
| void rl_prep_terminal(int); | | void rl_prep_terminal(int); | |
| void rl_deprep_terminal(void); | | void rl_deprep_terminal(void); | |
| int rl_read_init_file(const char *); | | int rl_read_init_file(const char *); | |
| int rl_parse_and_bind(const char *); | | int rl_parse_and_bind(const char *); | |
| int rl_variable_bind(const char *, const char *); | | int rl_variable_bind(const char *, const char *); | |
| void rl_stuff_char(int); | | void rl_stuff_char(int); | |
| int rl_add_defun(const char *, Function *, int); | | int rl_add_defun(const char *, Function *, int); | |
|
| | | HISTORY_STATE *history_get_history_state(void); | |
| void rl_get_screen_size(int *, int *); | | void rl_get_screen_size(int *, int *); | |
| void rl_set_screen_size(int, int); | | void rl_set_screen_size(int, int); | |
| char *rl_filename_completion_function (const char *, int); | | char *rl_filename_completion_function (const char *, int); | |
| int _rl_abort_internal(void); | | int _rl_abort_internal(void); | |
| int _rl_qsort_string_compare(char **, char **); | | int _rl_qsort_string_compare(char **, char **); | |
| char **rl_completion_matches(const char *, rl_compentry_func_t *); | | char **rl_completion_matches(const char *, rl_compentry_func_t *); | |
| void rl_forced_update_display(void); | | void rl_forced_update_display(void); | |
| int rl_set_prompt(const char *); | | int rl_set_prompt(const char *); | |
|
| | | int rl_on_new_line(void); | |
| | | | |
| /* | | /* | |
| * The following are not implemented | | * The following are not implemented | |
| */ | | */ | |
| int rl_kill_text(int, int); | | int rl_kill_text(int, int); | |
| Keymap rl_get_keymap(void); | | Keymap rl_get_keymap(void); | |
| void rl_set_keymap(Keymap); | | void rl_set_keymap(Keymap); | |
| Keymap rl_make_bare_keymap(void); | | Keymap rl_make_bare_keymap(void); | |
| int rl_generic_bind(int, const char *, const char *, Keymap); | | int rl_generic_bind(int, const char *, const char *, Keymap); | |
|
| int rl_bind_key_in_map(int, Function *, Keymap); | | int rl_bind_key_in_map(int, rl_command_func_t *, Keymap); | |
| | | void rl_cleanup_after_signal(void); | |
| | | void rl_free_line_state(void); | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| | | | |
| #endif /* _READLINE_H_ */ | | #endif /* _READLINE_H_ */ | |
| | | | |
End of changes. 13 change blocks. |
| 4 lines changed or deleted | | 24 lines changed or added | |
|
| sslopt-longopts.h | | sslopt-longopts.h | |
|
| /* Copyright (C) 2000 MySQL AB | | /* | |
| | | Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reser | |
| | | ved. | |
| | | | |
| This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | | it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation; version 2 of the License. | | the Free Software Foundation; version 2 of the License. | |
| | | | |
| This program is distributed in the hope that it will be useful, | | This program is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of | | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| GNU General Public License for more details. | | GNU General Public License for more details. | |
| | | | |
| You should have received a copy of the GNU General Public License | | You should have received a copy of the GNU General Public License | |
| along with this program; if not, write to the Free Software | | along with this program; if not, write to the Free Software | |
|
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US | | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US | |
| A */ | | A | |
| | | */ | |
| | | | |
| #ifdef HAVE_OPENSSL | | #ifdef HAVE_OPENSSL | |
| | | | |
| {"ssl", OPT_SSL_SSL, | | {"ssl", OPT_SSL_SSL, | |
|
| "Enable SSL for connection (automatically enabled with other flags). Dis | | "Enable SSL for connection (automatically enabled with other flags)." | |
| able with --skip-ssl.", | | "Disable with --skip-ssl.", &opt_use_ssl, &opt_use_ssl, 0, GET_BOOL, | |
| (uchar **) &opt_use_ssl, (uchar **) &opt_use_ssl, 0, GET_BOOL, NO_ARG, 0, | | NO_ARG, 0, 0, 0, 0, 0, 0}, | |
| 0, 0, | | | |
| 0, 0, 0}, | | | |
| {"ssl-ca", OPT_SSL_CA, | | {"ssl-ca", OPT_SSL_CA, | |
| "CA file in PEM format (check OpenSSL docs, implies --ssl).", | | "CA file in PEM format (check OpenSSL docs, implies --ssl).", | |
|
| (uchar **) &opt_ssl_ca, (uchar **) &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG
, | | &opt_ssl_ca, &opt_ssl_ca, 0, GET_STR, REQUIRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-capath", OPT_SSL_CAPATH, | | {"ssl-capath", OPT_SSL_CAPATH, | |
| "CA directory (check OpenSSL docs, implies --ssl).", | | "CA directory (check OpenSSL docs, implies --ssl).", | |
|
| (uchar **) &opt_ssl_capath, (uchar **) &opt_ssl_capath, 0, GET_STR, REQU
IRED_ARG, | | &opt_ssl_capath, &opt_ssl_capath, 0, GET_STR, REQUIRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", | | {"ssl-cert", OPT_SSL_CERT, "X509 cert in PEM format (implies --ssl).", | |
|
| (uchar **) &opt_ssl_cert, (uchar **) &opt_ssl_cert, 0, GET_STR, REQUIRED
_ARG, | | &opt_ssl_cert, &opt_ssl_cert, 0, GET_STR, REQUIRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", | | {"ssl-cipher", OPT_SSL_CIPHER, "SSL cipher to use (implies --ssl).", | |
|
| (uchar **) &opt_ssl_cipher, (uchar **) &opt_ssl_cipher, 0, GET_STR, REQU
IRED_ARG, | | &opt_ssl_cipher, &opt_ssl_cipher, 0, GET_STR, REQUIRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", | | {"ssl-key", OPT_SSL_KEY, "X509 key in PEM format (implies --ssl).", | |
|
| (uchar **) &opt_ssl_key, (uchar **) &opt_ssl_key, 0, GET_STR, REQUIRED_A
RG, | | &opt_ssl_key, &opt_ssl_key, 0, GET_STR, REQUIRED_ARG, | |
| 0, 0, 0, 0, 0, 0}, | | 0, 0, 0, 0, 0, 0}, | |
| #ifdef MYSQL_CLIENT | | #ifdef MYSQL_CLIENT | |
| {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, | | {"ssl-verify-server-cert", OPT_SSL_VERIFY_SERVER_CERT, | |
|
| "Verify server's \"Common Name\" in its cert against hostname used when | | "Verify server's \"Common Name\" in its cert against hostname used " | |
| connecting. This option is disabled by default.", | | "when connecting. This option is disabled by default.", | |
| (uchar **) &opt_ssl_verify_server_cert, (uchar **) &opt_ssl_verify_serve | | &opt_ssl_verify_server_cert, &opt_ssl_verify_server_cert, | |
| r_cert, | | | |
| 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, | | 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, | |
| #endif | | #endif | |
| #endif /* HAVE_OPENSSL */ | | #endif /* HAVE_OPENSSL */ | |
| | | | |
End of changes. 9 change blocks. |
| 17 lines changed or deleted | | 17 lines changed or added | |
|