summaryrefslogtreecommitdiff
path: root/dumpcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-09-02 14:35:37 -0700
committerGuy Harris <guy@alum.mit.edu>2015-09-02 22:59:10 +0000
commit32e785f81320342058bbee95f84095cd55449c09 (patch)
treeb6d746dcb9da83c97e03889fd97b293ddbd7e2e6 /dumpcap.c
parentc4538def97942c6e93c4d0965761fc012c5228d7 (diff)
downloadwireshark-32e785f81320342058bbee95f84095cd55449c09.tar.gz
The official #define for 32-bit and 64-bit Windows is _WIN32.
It's _WIN32, with a leading underscore, not WIN32. See, for example: https://sourceforge.net/p/predef/wiki/OperatingSystems/ and https://msdn.microsoft.com/en-us/library/b0084kay.aspx *Some* environments may also define WIN32, but we shouldn't depend on that. Replace all-caps "WIN32" referring to Windows in comments and other text with "Windows" or "Win32". (The two are pretty much equivalent, these days; nobody much cares about Win16, not that we ever ran on it, and 64-bit Windows is just a 64-bitified Win32.) Change-Id: Id327bcd4b1e9baa4f27055eff08c2d9e594d6f70 Reviewed-on: https://code.wireshark.org/review/10367 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dumpcap.c b/dumpcap.c
index de683346e6..06b76c41ca 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -2666,7 +2666,7 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld,
/* XXX - opening Winsock on tshark? */
- /* Initialize Windows Socket if we are in a WIN32 OS
+ /* Initialize Windows Socket if we are in a Win32 OS
This needs to be done before querying the interface for network/netmask */
#ifdef _WIN32
/* XXX - do we really require 1.1 or earlier?
@@ -3574,7 +3574,7 @@ pcap_read_handler(void* arg)
static gboolean
capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct pcap_stat *stats)
{
-#ifdef WIN32
+#ifdef _WIN32
DWORD upd_time, cur_time; /* GetTickCount() returns a "DWORD" (which is 'unsigned long') */
#else
struct timeval upd_time, cur_time;
@@ -3710,7 +3710,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
}
/* init the time values */
-#ifdef WIN32
+#ifdef _WIN32
upd_time = GetTickCount();
#else
gettimeofday(&upd_time, NULL);
@@ -3812,7 +3812,7 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
*/
#define DUMPCAP_UPD_TIME 500
-#ifdef WIN32
+#ifdef _WIN32
cur_time = GetTickCount(); /* Note: wraps to 0 if sys runs for 49.7 days */
if ((cur_time - upd_time) > DUMPCAP_UPD_TIME) { /* wrap just causes an extra update */
#else