Skip to content

Commit 43e55dd

Browse files
committed
win32 use strtok_s for strtok_r
1 parent 1a4f998 commit 43e55dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/rtklib.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,11 @@ extern "C" {
562562
#define rtklib_unlock(f) LeaveCriticalSection(f)
563563
#define RTKLIB_FILEPATHSEP '\\'
564564
/* strtok_r not supported in Windows */
565+
#ifdef _MSC_VER
566+
#define strtok_r(str,delim,ptr) strtok_s(str,delim,ptr)
567+
#else
565568
#define strtok_r(str,delim,ptr) strtok(str,delim)
569+
#endif
566570
#else
567571
#define rtklib_thread_t pthread_t
568572
#define rtklib_lock_t pthread_mutex_t

0 commit comments

Comments
 (0)