From a522ab7fad6de93b0cbed93889d6adfc20c7442c Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 30 Oct 2004 23:26:47 +0000 Subject: 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 --- capture.c | 63 ++++++--------------------------------------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) (limited to 'capture.c') 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 -#endif - -#ifdef HAVE_SYS_WAIT_H -# include -#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 -#endif - -#include - -#include #include -#include -#include #include #ifdef HAVE_FCNTL_H #include #endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef HAVE_SYS_IOCTL_H -#include +#ifdef HAVE_IO_H +# include #endif #include #include +#include + +#include + #include #include #include "file.h" -- cgit v1.2.3