From: Emden Gansner Date: Mon, 26 Nov 2012 18:29:18 +0000 (-0500) Subject: Use _strdup instead of strdup on Windows X-Git-Tag: LAST_LIBGRAPH~32^2~267 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b75e218cf0958307fba13bfaac479dcf4bf8c23e;p=graphviz Use _strdup instead of strdup on Windows --- diff --git a/cmd/tools/gv2gml.c b/cmd/tools/gv2gml.c index 2ada23f44..7f3e882aa 100644 --- a/cmd/tools/gv2gml.c +++ b/cmd/tools/gv2gml.c @@ -18,10 +18,8 @@ #pragma comment( lib, "cgraph.lib" ) #pragma comment( lib, "ingraphs.lib" ) #pragma comment( lib, "cdt.lib" ) - #endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -134,7 +132,11 @@ parseStyle (char* s) char* ip; char* sep = " \t,"; - s = strdup(s); +#ifdef WIN32 + s = _strdup(s); +#else + s = strdup(s); +#endif for (ip = strtok (s, sep); ip; ip = strtok (NULL, sep)) { if (streq(ip,"invis")) flags |= INVIS; else if (streq(ip,"filled")) flags |= FILL;