~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to include/m_string.h

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
# define bcopy(s, d, n)         memcpy((d), (s), (n))
68
68
# define bcmp(A,B,C)            memcmp((A),(B),(C))
69
69
# define bzero(A,B)             memset((A),0,(B))
70
 
# define bmove_align(A,B,C)    memcpy((A),(B),(C))
 
70
# define bmove_align(A,B,C)     memcpy((A),(B),(C))
71
71
#endif
72
72
 
73
73
#if defined(__cplusplus)
126
126
extern  size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
127
127
#undef bcmp
128
128
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
 
129
#define bzero_if_purify(A,B) bzero(A,B)
 
130
#else
 
131
#define bzero_if_purify(A,B)
 
132
#endif /* HAVE_purify */
 
133
 
 
134
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
 
135
#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */
 
136
#else
 
137
#define LINT_INIT_STRUCT(var)
129
138
#endif
130
139
 
131
140
#ifndef bmove512
244
253
                         long *val);
245
254
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
246
255
#if SIZEOF_LONG == SIZEOF_LONG_LONG
 
256
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
247
257
#define longlong2str(A,B,C) int2str((A),(B),(C),1)
248
258
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
249
259
#undef strtoll
257
267
#endif
258
268
#else
259
269
#ifdef HAVE_LONG_LONG
260
 
extern char *longlong2str(longlong val,char *dst,int radix);
 
270
extern char *ll2str(longlong val,char *dst,int radix, int upcase);
 
271
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
261
272
extern char *longlong10_to_str(longlong val,char *dst,int radix);
262
273
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
263
274
extern longlong strtoll(const char *str, char **ptr, int base);
295
306
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
296
307
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
297
308
 
 
309
/* A variant with const and unsigned */
 
310
struct st_mysql_const_unsigned_lex_string
 
311
{
 
312
  const uchar *str;
 
313
  size_t length;
 
314
};
 
315
typedef struct st_mysql_const_unsigned_lex_string LEX_CUSTRING;
 
316
 
298
317
/* SPACE_INT is a word that contains only spaces */
299
318
#if SIZEOF_INT == 4
300
319
#define SPACE_INT 0x20202020