summaryrefslogtreecommitdiff
path: root/ext/mysql/libmysql/m_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mysql/libmysql/m_string.h')
-rw-r--r--ext/mysql/libmysql/m_string.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/ext/mysql/libmysql/m_string.h b/ext/mysql/libmysql/m_string.h
index 37207b6612..bc1fa06046 100644
--- a/ext/mysql/libmysql/m_string.h
+++ b/ext/mysql/libmysql/m_string.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
- For a more info consult the file COPYRIGHT distributed with this file */
+/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+This file is public domain and comes with NO WARRANTY of any kind */
/* There may be prolems include all of theese. Try to test in
configure with ones are needed? */
@@ -8,6 +8,9 @@
#ifndef _m_string_h
#define _m_string_h
+#ifndef __USE_GNU
+#define __USE_GNU /* We want to use stpcpy */
+#endif
#if defined(HAVE_STRINGS_H)
#include <strings.h>
#endif
@@ -52,6 +55,10 @@
# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */
#endif
+#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
+#define strmov(A,B) stpcpy((A),(B))
+#endif
+
/* Unixware 7 */
#if !defined(HAVE_BFILL)
# define bfill(A,B,C) memset((A),(C),(B))
@@ -78,6 +85,12 @@ extern char NEAR _dig_vec[]; /* Declared in int2str() */
#define strmake_overlapp(A,B,C) strmake(A,B,C)
#endif
+#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
+#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
+#else
+#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
+#endif
+
#ifdef MSDOS
#undef bmove_allign
#define bmove512(A,B,C) bmove_allign(A,B,C)
@@ -136,7 +149,6 @@ extern char *strmake_overlapp(char *dst,const char *src, uint length);
#ifndef strmov
extern char *strmov(char *dst,const char *src);
#endif
-extern uint strnlen(const char *s,uint n);
extern char *strnmov(char *dst,const char *src,uint n);
extern char *strsuff(const char *src,const char *suffix);
extern char *strcont(const char *src,const char *set);
@@ -159,6 +171,9 @@ extern int strcmp(const char *, const char *);
extern size_t strlen(const char *);
#endif
#endif
+#ifndef HAVE_STRNLEN
+extern uint strnlen(const char *s, uint n);
+#endif
#if !defined(__cplusplus)
#ifndef HAVE_STRPBRK
@@ -168,7 +183,6 @@ extern char *strpbrk(const char *, const char *);
extern char *strstr(const char *, const char *);
#endif
#endif
-extern qsort_cmp get_ptr_compare(uint);
extern int is_prefix(const char *, const char *);
/* Conversion rutins */
@@ -178,16 +192,19 @@ extern char *my_itoa(int val,char *dst,int radix);
extern char *my_ltoa(long val,char *dst,int radix);
#endif
+extern char *llstr(longlong value,char *buff);
#ifndef HAVE_STRTOUL
extern long strtol(const char *str, char **ptr, int base);
extern ulong strtoul(const char *str, char **ptr, int base);
#endif
extern char *int2str(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,
long *val);
#if SIZEOF_LONG == SIZEOF_LONG_LONG
#define longlong2str(A,B,C) int2str((A),(B),(C))
+#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
#define strtoll(A,B,C) strtol((A),(B),(C))
#define strtoull(A,B,C) strtoul((A),(B),(C))
#ifndef HAVE_STRTOULL
@@ -196,6 +213,7 @@ extern char *str2int(const char *src,int radix,long lower,long upper,
#else
#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)
extern longlong strtoll(const char *str, char **ptr, int base);
extern ulonglong strtoull(const char *str, char **ptr, int base);