Re: [usbredir PATCH 6/6] usbredirfilter: fix filter parsing for windows (mingw)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

On Mon, May 07, 2012 at 04:30:22PM +0300, Uri Lublin wrote:
> On 05/03/2012 07:09 PM, Christophe Fergeau wrote:
> >On Thu, May 03, 2012 at 06:04:39PM +0300, Uri Lublin wrote:
> >>From: Arnon Gilboa<agilboa@xxxxxxxxxx>
> >>
> >>no strtok_r (reentrent) available, so use strtok instead.
> >Wouldn't it be safer to use strtok_s? Any application using threads and
> >strtok and libusbredirparser could get issues with this change no?
> >
> 
> It seems mingw32 does not support strtok_s

#include <string.h>

int main (int argc, char **argv)
{
    char *ctxt;
    char *token;
    token = strtok_s("foo", ":", &ctxt);

    return (token != NULL);
}

compiles and links fine on my f17 both with i686-w64-mingw32-gcc -Wall and
x86_64-w64-mingw32-gcc, so using strtok_s should be fine.

Christophe

Attachment: pgpubBmdk8kPq.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]