util: added strtok_r implementation for old compilers
Visual studios older than 2005 don't have strtok_s() and according to MSDN vs2005 has NOT thread-safe strtok().
This commit is contained in:
13
src/sasl.c
13
src/sasl.c
@@ -24,10 +24,17 @@
|
||||
#include "sha1.h"
|
||||
#include "scram.h"
|
||||
#include "rand.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#define strtok_r strtok_s
|
||||
#endif
|
||||
/* strtok_s() has appeared in visual studio 2005.
|
||||
Use own implementation for older versions. */
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER >= 1400)
|
||||
# define strtok_r strtok_s
|
||||
# else
|
||||
# define strtok_r xmpp_strtok_r
|
||||
# endif
|
||||
#endif /* _MSC_VER */
|
||||
|
||||
|
||||
/** generate authentication string for the SASL PLAIN mechanism */
|
||||
|
||||
Reference in New Issue
Block a user