diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
commit | 65ca700def99289cc31a7040537f5aa6e12bf485 (patch) | |
tree | 97b3a07299b626c519da0e80c122b5b79b933914 /include/m_string.h | |
parent | 2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff) | |
parent | 6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff) | |
download | mariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz |
merge.
checkpoint.
does not compile.
Diffstat (limited to 'include/m_string.h')
-rw-r--r-- | include/m_string.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/include/m_string.h b/include/m_string.h index 2ec4eb64c8e..c8200ba33ed 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -59,10 +59,14 @@ /* Unixware 7 */ #if !defined(HAVE_BFILL) # define bfill(A,B,C) memset((A),(C),(B)) +# define bmove_align(A,B,C) memcpy((A),(B),(C)) #endif -#if !defined(bzero) && !defined(HAVE_BZERO) -# define bzero(A,B) memset((A),0,(B)) +#if !defined(HAVE_BCMP) +# 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)) #endif #if defined(__cplusplus) @@ -78,21 +82,15 @@ extern void (*my_str_free)(void *); #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 */ -#endif #endif /* Declared in int2str() */ -extern char _dig_vec_upper[]; -extern char _dig_vec_lower[]; +extern const char _dig_vec_upper[]; +extern const char _dig_vec_lower[]; -#ifndef strmov -#define strmov_overlapp(A,B) strmov(A,B) -#define strmake_overlapp(A,B,C) strmake(A,B,C) -#endif +extern char *strmov_overlapp(char *dest, const char *src); - /* Prototypes for string functions */ +/* Prototypes for string functions */ #if !defined(bfill) && !defined(HAVE_BFILL) extern void bfill(uchar *dst,size_t len,pchar fill); @@ -113,8 +111,6 @@ 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, size_t n); extern char *strcont(const char *src, const char *set); @@ -230,6 +226,14 @@ struct st_mysql_const_lex_string }; typedef struct st_mysql_const_lex_string LEX_CSTRING; +/* A variant with const and unsigned */ +struct st_mysql_const_unsigned_lex_string +{ + const uchar *str; + size_t length; +}; +typedef struct st_mysql_const_unsigned_lex_string LEX_CUSTRING; + /* SPACE_INT is a word that contains only spaces */ #if SIZEOF_INT == 4 #define SPACE_INT 0x20202020 |