aboutsummaryrefslogtreecommitdiff
path: root/src/openvpn/sig.c
diff options
context:
space:
mode:
authorGert Doering2016-11-13 20:52:28 +0100
committerGert Doering2016-11-15 09:38:06 +0100
commit445b192a7c31187c7b5c66c8250a1886b04a2b2c (patch)
tree5e90a7012404d771324d26a79a5c02c414c39ac6 /src/openvpn/sig.c
parent1ce0638627eb35631af9bfaa569468573568ec65 (diff)
downloadopenvpn-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/sig.c')
-rw-r--r--src/openvpn/sig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/openvpn/sig.c b/src/openvpn/sig.c
index 718b786..0ff1437 100644
--- a/src/openvpn/sig.c
+++ b/src/openvpn/sig.c
@@ -221,7 +221,7 @@ static int signal_mode; /* GLOBAL */
void
pre_init_signal_catch (void)
{
-#ifndef WIN32
+#ifndef _WIN32
#ifdef HAVE_SIGNAL_H
signal_mode = SM_PRE_INIT;
signal (SIGINT, signal_handler);
@@ -231,13 +231,13 @@ pre_init_signal_catch (void)
signal (SIGUSR2, SIG_IGN);
signal (SIGPIPE, SIG_IGN);
#endif /* HAVE_SIGNAL_H */
-#endif /* WIN32 */
+#endif /* _WIN32 */
}
void
post_init_signal_catch (void)
{
-#ifndef WIN32
+#ifndef _WIN32
#ifdef HAVE_SIGNAL_H
signal_mode = SM_POST_INIT;
signal (SIGINT, signal_handler);
@@ -291,7 +291,7 @@ print_status (const struct context *c, struct status_output *so)
status_printf (so, "Pre-encrypt truncations," counter_format, c->c2.n_trunc_pre_encrypt);
status_printf (so, "Post-decrypt truncations," counter_format, c->c2.n_trunc_post_decrypt);
#endif
-#ifdef WIN32
+#ifdef _WIN32
if (tuntap_defined (c->c1.tuntap))
status_printf (so, "TAP-WIN32 driver status,\"%s\"",
tap_win_getinfo (c->c1.tuntap, &gc));