summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 66de67c7c9d..6a70c715ea2 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -34,14 +34,6 @@
#include <string.h>
#endif
-/* need by my_vsnprintf */
-#include <stdarg.h>
-
-/* This is needed for the definitions of bzero... on solaris */
-#if defined(HAVE_STRINGS_H)
-#include <strings.h>
-#endif
-
/* This is needed for the definitions of memcpy... on solaris */
#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
#include <memory.h>
@@ -73,10 +65,12 @@ extern "C" {
#endif
/*
- my_str_malloc() and my_str_free() are assigned to implementations in
- strings/alloc.c, but can be overridden in the calling program.
+ my_str_malloc(), my_str_realloc() and my_str_free() are assigned to
+ implementations in strings/alloc.c, but can be overridden in
+ the calling program.
*/
extern void *(*my_str_malloc)(size_t);
+extern void *(*my_str_realloc)(void *, size_t);
extern void (*my_str_free)(void *);
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
@@ -168,7 +162,7 @@ size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
*/
-#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMAT)) \
+#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + MY_MAX(5, MAX_DECPT_FOR_F_FORMAT)) \
extern char *llstr(longlong value,char *buff);
extern char *ullstr(longlong value,char *buff);