From: Heiko H. <hei...@so...> - 2012-02-16 17:31:08
|
Use of TARGET_WIN32 breaks MSVC builds as it is only defined for mingw builds done with the autotools buildsystem. Signed-off-by: Heiko Hund <hei...@so...> --- misc.c | 6 +++--- misc.h | 6 +++--- openvpn.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/misc.c b/misc.c index 58096fa..a07780f 100644 --- a/misc.c +++ b/misc.c @@ -356,7 +356,7 @@ int openvpn_chdir (const char* dir) { #ifdef HAVE_CHDIR -#ifdef TARGET_WIN32 +#ifdef WIN32 int res; struct gc_arena gc = gc_new (); res = _wchdir (wide_string (dir, &gc)); @@ -598,7 +598,7 @@ openvpn_system (const char *command, const struct env_set *es, unsigned int flag /* * execute the command */ -#ifdef TARGET_WIN32 +#ifdef WIN32 gc = gc_new (); ret = _wsystem (wide_string (command, &gc)); gc_free (&gc); @@ -627,7 +627,7 @@ openvpn_system (const char *command, const struct env_set *es, unsigned int flag int openvpn_access (const char *path, int mode) { -#ifdef TARGET_WIN32 +#ifdef WIN32 struct gc_arena gc = gc_new (); int ret = _waccess (wide_string (path, &gc), mode); gc_free (&gc); diff --git a/misc.h b/misc.h index 2413f53..8c0bae1 100644 --- a/misc.h +++ b/misc.h @@ -147,7 +147,7 @@ openvpn_run_script (const struct argv *a, const struct env_set *es, const unsign return openvpn_execve_check(a, es, flags | S_SCRIPT, msg); }; -#ifdef TARGET_WIN32 +#ifdef WIN32 FILE * openvpn_fopen (const char *path, const char *mode); #else static inline FILE * @@ -157,7 +157,7 @@ openvpn_fopen (const char *path, const char *mode) } #endif -#ifdef TARGET_WIN32 +#ifdef WIN32 int openvpn_open (const char *path, int flags, mode_t mode); #else static inline int @@ -167,7 +167,7 @@ openvpn_open (const char *path, int flags, mode_t mode) } #endif -#ifdef TARGET_WIN32 +#ifdef WIN32 int openvpn_stat (const char *path, struct stat *buf); #else static inline int diff --git a/openvpn.c b/openvpn.c index 84289d2..b2175a1 100644 --- a/openvpn.c +++ b/openvpn.c @@ -131,7 +131,7 @@ main (int argc, char *argv[]) return 1; #endif -#ifdef TARGET_WIN32 +#ifdef WIN32 SetConsoleOutputCP (CP_UTF8); #endif -- 1.7.5.4 |