mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10375] Updated MySQL client libs to 5.1.49
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
80cef02190
commit
ce46397940
44 changed files with 3265 additions and 2105 deletions
|
|
@ -33,25 +33,12 @@
|
|||
/* need by my_vsnprintf */
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Correct some things for UNIXWARE7 */
|
||||
#ifdef HAVE_UNIXWARE7_THREADS
|
||||
#undef HAVE_STRINGS_H
|
||||
#undef HAVE_MEMORY_H
|
||||
#define HAVE_MEMCPY
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#define HAVE_MEMMOVE
|
||||
#endif
|
||||
#undef HAVE_BCMP
|
||||
#undef bcopy
|
||||
#undef bcmp
|
||||
#undef bzero
|
||||
#endif /* HAVE_UNIXWARE7_THREADS */
|
||||
#ifdef _AIX
|
||||
#undef HAVE_BCMP
|
||||
#endif
|
||||
|
||||
/* This is needed for the definitions of bzero... on solaris */
|
||||
#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -80,10 +67,10 @@
|
|||
# define bcopy(s, d, n) memcpy((d), (s), (n))
|
||||
# define bcmp(A,B,C) memcmp((A),(B),(C))
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
# define bmove_align(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(OS2)
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
|
@ -94,7 +81,7 @@ extern "C" {
|
|||
extern void *(*my_str_malloc)(size_t);
|
||||
extern void (*my_str_free)(void *);
|
||||
|
||||
#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
|
||||
#if defined(HAVE_STPCPY)
|
||||
#define strmov(A,B) stpcpy((A),(B))
|
||||
#ifndef stpcpy
|
||||
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
||||
|
|
@ -108,9 +95,7 @@ extern char NEAR _dig_vec_lower[];
|
|||
/* Defined in strtod.c */
|
||||
extern const double log_10[309];
|
||||
|
||||
#ifdef BAD_STRING_COMPILER
|
||||
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
|
||||
#else
|
||||
#ifndef strmov
|
||||
#define strmov_overlapp(A,B) strmov(A,B)
|
||||
#define strmake_overlapp(A,B,C) strmake(A,B,C)
|
||||
#endif
|
||||
|
|
@ -121,12 +106,6 @@ extern const double log_10[309];
|
|||
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
#undef bmove_align
|
||||
#define bmove512(A,B,C) bmove_align(A,B,C)
|
||||
extern void bmove_align(gptr dst,const gptr src,uint len);
|
||||
#endif
|
||||
|
||||
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
|
||||
#define bmove512(A,B,C) memcpy(A,B,C)
|
||||
#endif
|
||||
|
|
@ -134,59 +113,58 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
|
|||
/* Prototypes for string functions */
|
||||
|
||||
#if !defined(bfill) && !defined(HAVE_BFILL)
|
||||
extern void bfill(gptr dst,uint len,pchar fill);
|
||||
extern void bfill(uchar *dst,size_t len,pchar fill);
|
||||
#endif
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
extern void bzero(gptr dst,uint len);
|
||||
extern void bzero(uchar * dst,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(bcmp) && !defined(HAVE_BCMP)
|
||||
extern int bcmp(const char *s1,const char *s2,uint len);
|
||||
extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#endif
|
||||
#ifdef HAVE_purify
|
||||
extern int my_bcmp(const char *s1,const char *s2,uint len);
|
||||
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))
|
||||
#endif
|
||||
#endif /* HAVE_purify */
|
||||
|
||||
#ifndef bmove512
|
||||
extern void bmove512(gptr dst,const gptr src,uint len);
|
||||
extern void bmove512(uchar *dst,const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_BMOVE) && !defined(bmove)
|
||||
extern void bmove(char *dst, const char *src,uint len);
|
||||
extern void bmove(uuchar *dst, const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
extern void bmove_upp(char *dst,const char *src,uint len);
|
||||
extern void bchange(char *dst,uint old_len,const char *src,
|
||||
uint new_len,uint tot_len);
|
||||
extern void strappend(char *s,uint len,pchar fill);
|
||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
size_t new_len,size_t tot_len);
|
||||
extern void strappend(char *s,size_t len,pchar fill);
|
||||
extern char *strend(const char *s);
|
||||
extern char *strcend(const char *, pchar);
|
||||
extern char *strfield(char *src,int fields,int chars,int blanks,
|
||||
int tabch);
|
||||
extern char *strfill(my_string s,uint len,pchar fill);
|
||||
extern uint strinstr(const char *str,const char *search);
|
||||
extern uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
|
||||
extern char *strfill(char * s,size_t len,pchar fill);
|
||||
extern size_t strinstr(const char *str,const char *search);
|
||||
extern size_t r_strinstr(const char *str, size_t from, const char *search);
|
||||
extern char *strkey(char *dst,char *head,char *tail,char *flags);
|
||||
extern char *strmake(char *dst,const char *src,uint length);
|
||||
#ifndef strmake_overlapp
|
||||
extern char *strmake_overlapp(char *dst,const char *src, uint length);
|
||||
#endif
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
|
||||
#ifndef strmov
|
||||
extern char *strmov(char *dst,const char *src);
|
||||
#else
|
||||
extern char *strmov_overlapp(char *dst,const char *src);
|
||||
#endif
|
||||
extern char *strnmov(char *dst,const char *src,uint n);
|
||||
extern char *strnmov(char *dst,const char *src,size_t n);
|
||||
extern char *strsuff(const char *src,const char *suffix);
|
||||
extern char *strcont(const char *src,const char *set);
|
||||
extern char *strxcat _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxmov _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxcpy _VARARGS((char *dst,const char *src, ...));
|
||||
extern char *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...));
|
||||
extern char *strxncat _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxnmov _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
extern char *strxncpy _VARARGS((char *dst,size_t len, const char *src, ...));
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
|
||||
|
|
@ -201,7 +179,7 @@ extern size_t strlen(const char *);
|
|||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern uint strnlen(const char *s, uint n);
|
||||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
|
|
@ -246,7 +224,7 @@ longlong my_strtoll10(const char *nptr, char **endptr, int *error);
|
|||
#ifdef HAVE_LONG_LONG
|
||||
extern char *longlong2str(longlong val,char *dst,int radix);
|
||||
extern char *longlong10_to_str(longlong val,char *dst,int radix);
|
||||
#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO)
|
||||
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
|
||||
extern longlong strtoll(const char *str, char **ptr, int base);
|
||||
extern ulonglong strtoull(const char *str, char **ptr, int base);
|
||||
#endif
|
||||
|
|
@ -255,12 +233,31 @@ extern ulonglong strtoull(const char *str, char **ptr, int base);
|
|||
|
||||
/* my_vsnprintf.c */
|
||||
|
||||
extern int my_vsnprintf( char *str, size_t n,
|
||||
const char *format, va_list ap );
|
||||
extern int my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
extern size_t my_vsnprintf(char *str, size_t n,
|
||||
const char *format, va_list ap);
|
||||
extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
#if defined(__cplusplus) && !defined(OS2)
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
LEX_STRING -- a pair of a C-string and its length.
|
||||
*/
|
||||
|
||||
#ifndef _my_plugin_h
|
||||
/* This definition must match the one given in mysql/plugin.h */
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
size_t length;
|
||||
};
|
||||
#endif
|
||||
typedef struct st_mysql_lex_string LEX_STRING;
|
||||
|
||||
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
|
||||
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
|
||||
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue