From 2285f3fe8e9b51c223ce6148d10421646d5e22e0 Mon Sep 17 00:00:00 2001 From: Emden Gansner Date: Mon, 18 Mar 2013 16:18:42 -0400 Subject: [PATCH] Use _strdup instead of bad strdup on Windows --- lib/gvc/gvplugin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/gvc/gvplugin.c b/lib/gvc/gvplugin.c index cb8e2856e..817055315 100644 --- a/lib/gvc/gvplugin.c +++ b/lib/gvc/gvplugin.c @@ -35,6 +35,10 @@ extern int strcasecmp(const char *s1, const char *s2); #endif +#ifdef WIN32 +#define strdup(x) _strdup(x) +#endif + /* * Define an apis array of name strings using an enumerated api_t as index. * The enumerated type is defined gvplugin.h. The apis array is @@ -372,11 +376,7 @@ char *gvplugin_list(GVC_t * gvc, api_t api, const char *str) } /* does str have a :path modifier? */ -#ifdef WIN32 - s = _strdup(str); -#else s = strdup(str); -#endif p = strchr(s, ':'); if (p) *p++ = '\0'; -- 2.40.0