diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-10-30 23:26:47 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-10-30 23:26:47 +0000 |
commit | a522ab7fad6de93b0cbed93889d6adfc20c7442c (patch) | |
tree | b21a1f73924eef552bf42715b764a5e93417164a /capture_sync.c | |
parent | caa9fca4317ca32c7bbb2b8c44073e107bf3d6b2 (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_sync.c')
-rw-r--r-- | capture_sync.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/capture_sync.c b/capture_sync.c index 11d8007177..e1affe02ac 100644 --- a/capture_sync.c +++ b/capture_sync.c @@ -32,11 +32,51 @@ #ifdef HAVE_LIBPCAP +#include <pcap.h> #include <glib.h> #include <stdio.h> +#include <ctype.h> #include <string.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#include <signal.h> + +#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 */ + #include <epan/packet.h> #include <epan/prefs.h> |