[Imap-uw] MS Visual Studio 2003 compilation problems

Pavel Zakharov pavel at otc.net
Fri Apr 6 11:48:24 PDT 2007


Hi,

 

Whenever you try to build latest version of IMAP library using MS Visual
Studio 2003 you get problems with latest changes. 'strtok' changed to
'strtok_r' which doesn't exist in VS 2003. in VS 2005 strtok_s appeared,
which is the same as strtok_r. Do IMAP still support VS 2003? On win32 if
multithreaded version of C library used it is thread safe and usage of
strtok should be enough. I changed in 

Osdep.h and os_nt.h:

 

#define strtok_r strtok_s            /* for some reason they called it this
*/

 

To 

 

#define strtok_r(a,b,c) strtok(a,b) 

 

And it seems it works. I mean, I understand that on some platforms they
store state just in static variables which is bad for multithreaded access
to this function, but on win32 it is ok.

 

Pavel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman1.u.washington.edu/pipermail/imap-uw/attachments/20070406/271e9db3/attachment.htm


More information about the Imap-uw mailing list