aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-08-04 11:23:59 -0700
committerA Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2022-08-05 08:33:49 +0000
commit74e0b506be5e6acc863fedb2cfed6132e98618e6 (patch)
treebc33f135ba630a08aeba3e86f7a5bac598eac0a4
parenta0d03745a9c8c3b00e7ae91506cd8bbe06f4b3a5 (diff)
Windows: Don't define or check for WIN32.
_WIN32 is defined by the compiler, and is arguably a more reliable test that WIN32. Switch to checking for _WIN32 in a couple of places in the code. Remove a WIN32 definition from config.h. It was added for the WinPcap developer pack but we no longer use that.
-rw-r--r--cmakeconfig.h.in5
-rw-r--r--speexdsp/stack_alloc.h2
-rw-r--r--ui/help_url.c4
3 files changed, 3 insertions, 8 deletions
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index f60f6fbb22..9fbedea831 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -316,11 +316,6 @@
#endif
#if defined(_WIN32)
- /* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */
-# ifndef WIN32
-# define WIN32 1
-# endif
-
/*
* Flex (v 2.5.35) uses this symbol to "exclude" unistd.h
*/
diff --git a/speexdsp/stack_alloc.h b/speexdsp/stack_alloc.h
index 6c56334f86..a446065825 100644
--- a/speexdsp/stack_alloc.h
+++ b/speexdsp/stack_alloc.h
@@ -36,7 +36,7 @@
#define STACK_ALLOC_H
#ifdef USE_ALLOCA
-# ifdef WIN32
+# ifdef _WIN32
# include <malloc.h>
# else
# ifdef HAVE_ALLOCA_H
diff --git a/ui/help_url.c b/ui/help_url.c
index ba3077908e..c0b0d059d6 100644
--- a/ui/help_url.c
+++ b/ui/help_url.c
@@ -31,7 +31,7 @@ gchar *
user_guide_url(const gchar *page) {
GString *url = g_string_new("");
-#if defined(WIN32)
+#if defined(_WIN32)
/*
* The User's Guide is in a directory named "Wireshark User's Guide" in
* the program directory.
@@ -48,7 +48,7 @@ user_guide_url(const gchar *page) {
/* try to open the HTML page from wireshark.org instead */
g_string_printf(url, "file://" DOC_DIR "/guides/wsug_html_chunked/%s", page);
}
-#endif /* WIN32 / DOC_DIR */
+#endif /* _WIN32 / DOC_DIR */
/* Fall back to wireshark.org. */