]> Git Repo - qemu.git/commit - util/envlist.c
utils: drop strtok_r from envlist_parse
authorOlga Krishtal <[email protected]>
Fri, 6 Feb 2015 17:59:53 +0000 (20:59 +0300)
committerMichael Roth <[email protected]>
Mon, 16 Feb 2015 22:20:02 +0000 (16:20 -0600)
commit459db780be10f7adac723a5d3a4ffeac8ae6e768
tree346611ce5e2480d5efa40c7e43c7a8fead9adeef
parent215a2771a7b6b29037ee8deba484815d816b6fdd
utils: drop strtok_r from envlist_parse

The problem is that mingw 4.9.1 fails to compile the code with the
following warning:

/mingw/include/string.h:88:9: note: previous declaration of 'strtok_r'
was here
   char *strtok_r(char * __restrict__ _Str,
                  const char * __restrict__ _Delim,
                  char ** __restrict__ __last);
/include/sysemu/os-win32.h:83:7: warning: redundant redeclaration of
   'strtok_r' [-Wredundant-decls]
   char *strtok_r(char *str, const char *delim, char **saveptr);

The problem is that compiles just fine on previous versions of mingw.
Compiler version check here is not a good idea. Though fortunately
strtok_r is used only once in the code and we could simply rewrite
the code without it.

Signed-off-by: Olga Krishtal <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Eric Blake <[email protected]>
CC: Michael Roth <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
include/sysemu/os-win32.h
util/envlist.c
This page took 0.027699 seconds and 4 git commands to generate.