From: Loren Merritt Date: Tue, 17 Jul 2007 11:24:26 +0000 (+0000) Subject: mingw doesn't have strtok_r X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=0ea7d1b2ecb6d744c0af674e7b3b8f85eabf3aaa;p=x264.git mingw doesn't have strtok_r git-svn-id: svn://svn.videolan.org/x264/trunk@667 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/common/osdep.h b/common/osdep.h index 7edfa5cb..74a570c3 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -50,8 +50,11 @@ #if defined(_MSC_VER) || defined(SYS_SunOS) || defined(SYS_MACOSX) #define sqrtf sqrt #endif -#ifdef __WIN32__ // POSIX says that rename() removes the destination, but win32 doesn't. -#define rename(src,dst) (unlink(dst), rename(src,dst)) +#ifdef __WIN32__ +#define rename(src,dst) (unlink(dst), rename(src,dst)) // POSIX says that rename() removes the destination, but win32 doesn't. +#ifndef strtok_r +#define strtok_r(str,delim,save) strtok(str,delim) +#endif #endif #ifdef _MSC_VER