Asssuming only __WIN32 (VC++) doesn't have strtok_r.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5839 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Lance 2006-04-01 06:02:43 +00:00
parent f2e352bb0f
commit 26864e6c9e
3 changed files with 10 additions and 6 deletions

View File

@ -137,8 +137,8 @@ char *trim(char *str, const char *delim)
return str; return str;
} }
#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R) #ifdef __WIN32
char *athena_strtok_r(char *s1, const char *s2, char **lasts) char *_strtok_r(char *s1, const char *s2, char **lasts)
{ {
char *ret; char *ret;

View File

@ -11,9 +11,9 @@ char* jstrescape (char* pt);
char* jstrescapecpy (char* pt,char* spt); char* jstrescapecpy (char* pt,char* spt);
int jmemescapecpy (char* pt,char* spt, int size); int jmemescapecpy (char* pt,char* spt, int size);
#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R) #ifdef __WIN32
#define strtok_r(s,delim,save_ptr) athena_strtok_r((s),(delim),(save_ptr)) #define strtok_r(s,delim,save_ptr) _strtok_r((s),(delim),(save_ptr))
char *athena_strtok_r(char *s1, const char *s2, char **lasts); char *_strtok_r(char *s1, const char *s2, char **lasts);
#endif #endif
// custom functions // custom functions

View File

@ -658,7 +658,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define SET_STACK_SIZE(X) /* Not needed on real machines */ #define SET_STACK_SIZE(X) /* Not needed on real machines */
#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R) #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 #endif
/* Remove some things that mit_thread break or doesn't support */ /* Remove some things that mit_thread break or doesn't support */