diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-11-21 09:37:33 +0100 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2016-11-21 09:37:33 +0100 |
commit | 20c8675ba46bda97330a4117c459a59a9f1c465e (patch) | |
tree | d888c714fb61947dd79dc44b64a4aaae2f70bfb7 /src/openvpn/platform.c | |
parent | ffca24bed7a03d95585ad02278667abe75d8b272 (diff) |
New upstream version 2.4~beta1upstream/2.4_beta1
Diffstat (limited to 'src/openvpn/platform.c')
-rw-r--r-- | src/openvpn/platform.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index 16d4dac..6343647 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -158,7 +158,7 @@ platform_nice (int niceval) unsigned int platform_getpid () { -#ifdef WIN32 +#ifdef _WIN32 return (unsigned int) GetCurrentProcessId (); #else #ifdef HAVE_GETPID @@ -190,7 +190,7 @@ int platform_chdir (const char* dir) { #ifdef HAVE_CHDIR -#ifdef WIN32 +#ifdef _WIN32 int res; struct gc_arena gc = gc_new (); res = _wchdir (wide_string (dir, &gc)); @@ -210,7 +210,7 @@ platform_chdir (const char* dir) bool platform_system_ok (int stat) { -#ifdef WIN32 +#ifdef _WIN32 return stat == 0; #else return stat != -1 && WIFEXITED (stat) && WEXITSTATUS (stat) == 0; @@ -220,7 +220,7 @@ platform_system_ok (int stat) int platform_access (const char *path, int mode) { -#ifdef WIN32 +#ifdef _WIN32 struct gc_arena gc = gc_new (); int ret = _waccess (wide_string (path, &gc), mode & ~X_OK); gc_free (&gc); @@ -236,7 +236,7 @@ platform_access (const char *path, int mode) void platform_sleep_milliseconds (unsigned int n) { -#ifdef WIN32 +#ifdef _WIN32 Sleep (n); #else struct timeval tv; @@ -252,7 +252,7 @@ platform_sleep_milliseconds (unsigned int n) void platform_sleep_until_signal (void) { -#ifdef WIN32 +#ifdef _WIN32 ASSERT (0); #else select (0, NULL, NULL, NULL, NULL); @@ -263,7 +263,7 @@ platform_sleep_until_signal (void) bool platform_unlink (const char *filename) { -#if defined(WIN32) +#if defined(_WIN32) struct gc_arena gc = gc_new (); BOOL ret = DeleteFileW (wide_string (filename, &gc)); gc_free (&gc); @@ -278,7 +278,7 @@ platform_unlink (const char *filename) FILE * platform_fopen (const char *path, const char *mode) { -#ifdef WIN32 +#ifdef _WIN32 struct gc_arena gc = gc_new (); FILE *f = _wfopen (wide_string (path, &gc), wide_string (mode, &gc)); gc_free (&gc); @@ -291,7 +291,7 @@ platform_fopen (const char *path, const char *mode) int platform_open (const char *path, int flags, int mode) { -#ifdef WIN32 +#ifdef _WIN32 struct gc_arena gc = gc_new (); int fd = _wopen (wide_string (path, &gc), flags, mode); gc_free (&gc); @@ -304,7 +304,7 @@ platform_open (const char *path, int flags, int mode) int platform_stat (const char *path, platform_stat_t *buf) { -#ifdef WIN32 +#ifdef _WIN32 struct gc_arena gc = gc_new (); int res = _wstat (wide_string (path, &gc), buf); gc_free (&gc); |