diff options
author | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-07-01 07:58:00 +0000 |
---|---|---|
committer | bjasspa <bjasspa@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2012-07-01 07:58:00 +0000 |
commit | 8f65647892debd04292454db3162a12b7806d65d (patch) | |
tree | 4a4f3d38ce93ed66f3cc2b5d9a053f99c7888a15 /navit/xmlconfig.c | |
parent | b87f98ff8b12319eddb55f714f962a10f6625996 (diff) | |
download | navit-8f65647892debd04292454db3162a12b7806d65d.tar.gz |
Simple fixes to get navit compiling with MSVC
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5165 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/xmlconfig.c')
-rw-r--r-- | navit/xmlconfig.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c index df50b984c..e355644f7 100644 --- a/navit/xmlconfig.c +++ b/navit/xmlconfig.c @@ -52,6 +52,11 @@ #include "config_.h" #include "xmlconfig.h" +#if (defined __MINGW32__) || (defined _MSC_VER) +/* This only works if a is a string constant, i.e. "name" */ +#define unsetenv(a) putenv(a "=") +#endif + #ifdef HAVE_GLIB #define ATTR_DISTANCE 1 const int xml_attr_distance=1; @@ -1123,19 +1128,11 @@ parse_file(struct xmldocument *document, xmlerror **error) if (xmldir) setenv("XMLDIR",xmldir,1); else -#ifndef __MINGW32__ unsetenv("XMLDIR"); -#else - putenv("XMLDIR="); -#endif /* __MINGW32__ */ if (xmlfile) setenv("XMLFILE",xmlfile,1); else -#ifndef __MINGW32__ unsetenv("XMLFILE"); -#else - putenv("XMLFILE="); -#endif /* __MINGW32__ */ g_free(newxmldir); g_free(newxmlfile); dbg(1,"return %d\n", result); |