diff options
-rw-r--r-- | src/common/strlib.c | 4 | ||||
-rw-r--r-- | src/common/strlib.h | 6 | ||||
-rw-r--r-- | src/mysql/my_global.h | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/common/strlib.c b/src/common/strlib.c index c2c2ae1ac..94f815839 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -137,8 +137,8 @@ char *trim(char *str, const char *delim) return str;
}
-#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
-char *athena_strtok_r(char *s1, const char *s2, char **lasts)
+#ifdef __WIN32
+char *_strtok_r(char *s1, const char *s2, char **lasts)
{
char *ret;
diff --git a/src/common/strlib.h b/src/common/strlib.h index 7eb167057..09eac0048 100644 --- a/src/common/strlib.h +++ b/src/common/strlib.h @@ -11,9 +11,9 @@ char* jstrescape (char* pt); char* jstrescapecpy (char* pt,char* spt);
int jmemescapecpy (char* pt,char* spt, int size);
-#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
-#define strtok_r(s,delim,save_ptr) athena_strtok_r((s),(delim),(save_ptr))
-char *athena_strtok_r(char *s1, const char *s2, char **lasts);
+#ifdef __WIN32
+#define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
+char *_strtok_r(char *s1, const char *s2, char **lasts);
#endif
// custom functions
diff --git a/src/mysql/my_global.h b/src/mysql/my_global.h index 6c3937467..0fbb96f59 100644 --- a/src/mysql/my_global.h +++ b/src/mysql/my_global.h @@ -658,7 +658,11 @@ typedef SOCKET_SIZE_TYPE size_socket; #define SET_STACK_SIZE(X) /* Not needed on real machines */
#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
-#include "../common/strlib.h"
+ #ifdef __WIN32
+ #include "../common/strlib.h"
+ #else
+ #define strtok_r(A,B,C) strtok((A),(B))
+ #endif
#endif
/* Remove some things that mit_thread break or doesn't support */
|