aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-14 21:18:06 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2003-11-14 21:18:06 +0000
commita789ca1cb5a013552fe5cacc2612d7197d562663 (patch)
tree58f255ccd1fb8a90e061a113733aa0c3e829c6f6 /capture.c
parente760089db29124256d76a7b640b0d90aad1a90d1 (diff)
When it comes to whether to use "select()" or not, even if you're
building in Cygwin's pretend-it's-UNIX environment, we need to treat the platform as Windows. Get rid of the BSD #define - just check for the platforms on which we mustn't use "select()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8967 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/capture.c b/capture.c
index 66450c96ed..3d4009a897 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.213 2003/11/01 02:30:14 guy Exp $
+ * $Id: capture.c,v 1.214 2003/11/14 21:18:06 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -106,28 +106,25 @@
#endif
/*
- * XXX - the various BSDs appear to define BSD in <sys/param.h>; we don't
- * want to include it if it's not present on this platform, however.
- */
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__)
-#ifndef BSD
-#define BSD
-#endif /* BSD */
-#endif /* defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__APPLE__) */
-
-/*
* We don't want to do a "select()" on the pcap_t's file descriptor on
* BSD (because "select()" doesn't work correctly on BPF devices on at
* least some releases of some flavors of BSD), and we don't want to do
* it on Windows (because "select()" is something for sockets, not for
- * arbitrary handles).
+ * arbitrary handles). (Note that "Windows" here includes Cygwin;
+ * even in its pretend-it's-UNIX environment, we're using WinPcap, not
+ * a UNIX libpcap.)
*
* We *do* want to do it on other platforms, as, on other platforms (with
* the possible exception of Ultrix and Digital UNIX), the read timeout
* doesn't expire if no packets have arrived, so a "pcap_dispatch()" call
* will block until packets arrive, causing the UI to hang.
+ *
+ * XXX - the various BSDs appear to define BSD in <sys/param.h>; we don't
+ * want to include it if it's not present on this platform, however.
*/
-#if !defined(BSD) && !defined(_WIN32)
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && defined(__OpenBSD__) && \
+ !defined(__bsdi__) && !defined(__APPLE__) && !defined(_WIN32) && \
+ !defined(__CYGWIN__)
# define MUST_DO_SELECT
#endif