aboutsummaryrefslogtreecommitdiffstats
path: root/capture.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-10-30 23:26:47 +0000
committerGuy Harris <guy@alum.mit.edu>2004-10-30 23:26:47 +0000
commita522ab7fad6de93b0cbed93889d6adfc20c7442c (patch)
treeb21a1f73924eef552bf42715b764a5e93417164a /capture.c
parentcaa9fca4317ca32c7bbb2b8c44073e107bf3d6b2 (diff)
Move some #defines and #includes around, and add some other #includes,
to make it compile on UN*X. Get rid of some #includes that don't appear to be needed, at least on OS X 10.3 (they might be needed on other platforms). svn path=/trunk/; revision=12453
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c63
1 files changed, 6 insertions, 57 deletions
diff --git a/capture.c b/capture.c
index 91b2af0e5e..0ecf9bda58 100644
--- a/capture.c
+++ b/capture.c
@@ -32,75 +32,24 @@
#ifdef HAVE_LIBPCAP
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#ifdef HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-
-#ifndef _WIN32
-/*
- * Define various POSIX macros (and, in the case of WCOREDUMP, non-POSIX
- * macros) on UNIX systems that don't have them.
- */
-#ifndef WIFEXITED
-# define WIFEXITED(status) (((status) & 0177) == 0)
-#endif
-#ifndef WIFSTOPPED
-# define WIFSTOPPED(status) (((status) & 0177) == 0177)
-#endif
-#ifndef WIFSIGNALED
-# define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
-#endif
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(status) ((status) >> 8)
-#endif
-#ifndef WTERMSIG
-# define WTERMSIG(status) ((status) & 0177)
-#endif
-#ifndef WCOREDUMP
-# define WCOREDUMP(status) ((status) & 0200)
-#endif
-#ifndef WSTOPSIG
-# define WSTOPSIG(status) ((status) >> 8)
-#endif
-#endif /* _WIN32 */
-
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif
-
-#include <pcap.h>
-
-#include <glib.h>
#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
#include <string.h>
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#include <time.h>
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
+#ifdef HAVE_IO_H
+# include <io.h>
#endif
#include <signal.h>
#include <errno.h>
+#include <pcap.h>
+
+#include <glib.h>
+
#include <epan/packet.h>
#include <epan/dfilter/dfilter.h>
#include "file.h"