diff options
author | Gert Doering | 2016-11-13 20:52:28 +0100 |
---|---|---|
committer | Gert Doering | 2016-11-15 09:38:06 +0100 |
commit | 445b192a7c31187c7b5c66c8250a1886b04a2b2c (patch) | |
tree | 5e90a7012404d771324d26a79a5c02c414c39ac6 /src/openvpn/fdmisc.h | |
parent | 1ce0638627eb35631af9bfaa569468573568ec65 (diff) | |
download | openvpn-445b192a7c31187c7b5c66c8250a1886b04a2b2c.zip openvpn-445b192a7c31187c7b5c66c8250a1886b04a2b2c.tar.gz |
Replace WIN32 by _WIN32
With c99, "WIN32" is no longer automatically defined when (cross-)building
for Windows, and proper compilation relies on including <windefs.h>,
before checking the macro. "_WIN32" is the official define that is
guaranteed to be defined by the compiler itself, no includes are needed.
So, mechanically change all occurrances of "WIN32" to "_WIN32".
While at it, get rid of unused WIN32_0_1 #define in syshead.h
See also:
http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefi
ned_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW
Trac #746
v2: rebased to master, merge the console[_builtin].c changes
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <20161113195228.74090-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13035.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/fdmisc.h')
-rw-r--r-- | src/openvpn/fdmisc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/fdmisc.h b/src/openvpn/fdmisc.h index 13d6552..d34db9b 100644 --- a/src/openvpn/fdmisc.h +++ b/src/openvpn/fdmisc.h @@ -37,7 +37,7 @@ void set_cloexec (int fd); static inline void openvpn_fd_set(int fd, fd_set *setp) { -#ifndef WIN32 /* The Windows FD_SET() implementation does not overflow */ +#ifndef _WIN32 /* The Windows FD_SET() implementation does not overflow */ ASSERT (fd >= 0 && fd < FD_SETSIZE); #endif FD_SET (fd, setp); |