diff options
author | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-29 20:51:26 +0000 |
---|---|---|
committer | ulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-06-29 20:51:26 +0000 |
commit | fb8d9e5a065a29db0e43c5e5e0fc54f3767de768 (patch) | |
tree | 9b79f904d1c0d7c0b3db3e0274db9fd72ff440c0 | |
parent | bba9576f8040b08ddeadf10595ef5944e8b6e791 (diff) |
define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11272 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | capture.c | 7 | ||||
-rw-r--r-- | file.c | 6 | ||||
-rw-r--r-- | gtk/proto_draw.c | 7 | ||||
-rw-r--r-- | gtk/rtp_analysis.c | 14 | ||||
-rw-r--r-- | gtk/rtp_stream.c | 10 | ||||
-rw-r--r-- | mkstemp.c | 11 | ||||
-rw-r--r-- | ringbuffer.c | 7 | ||||
-rw-r--r-- | wiretap/file_access.c | 7 |
8 files changed, 23 insertions, 46 deletions
@@ -1,7 +1,7 @@ /* capture.c * Routines for packet capture windows * - * $Id: capture.c,v 1.252 2004/06/20 13:39:43 ulfl Exp $ + * $Id: capture.c,v 1.253 2004/06/29 20:51:26 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -219,11 +219,6 @@ typedef struct _loop_data { #endif } loop_data; -/* Win32 needs the O_BINARY flag for open() */ -#ifndef O_BINARY -#define O_BINARY 0 -#endif - static gboolean sync_pipe_do_capture(gboolean is_tempfile); static gboolean sync_pipe_input_cb(gint source, gpointer user_data); @@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.384 2004/05/27 21:48:10 ulfl Exp $ + * $Id: file.c,v 1.385 2004/06/29 20:51:26 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -378,10 +378,6 @@ cf_read(capture_file *cf) bump that value by this amount. */ progbar_quantum = cf->f_len/N_PROGBAR_UPDATES; -#ifndef O_BINARY -#define O_BINARY 0 -#endif - packet_list_freeze(); stop_flag = FALSE; diff --git a/gtk/proto_draw.c b/gtk/proto_draw.c index 5a628d747b..0e1de84dd8 100644 --- a/gtk/proto_draw.c +++ b/gtk/proto_draw.c @@ -1,7 +1,7 @@ /* proto_draw.c * Routines for GTK+ packet display * - * $Id: proto_draw.c,v 1.105 2004/06/17 16:35:25 ulfl Exp $ + * $Id: proto_draw.c,v 1.106 2004/06/29 20:46:28 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -71,11 +71,6 @@ #include "font_utils.h" -/* Win32 needs the O_BINARY flag for open() */ -#ifndef O_BINARY -#define O_BINARY 0 -#endif - #define BYTE_VIEW_WIDTH 16 #define BYTE_VIEW_SEP 8 diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 959abe66b8..9654cf96f7 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -1,7 +1,7 @@ /* rtp_analysis.c * RTP analysis addition for ethereal * - * $Id: rtp_analysis.c,v 1.45 2004/06/01 17:33:37 ulfl Exp $ + * $Id: rtp_analysis.c,v 1.46 2004/06/29 20:46:28 ulfl Exp $ * * Copyright 2003, Alcatel Business Systems * By Lars Ruoff <lars.ruoff@gmx.net> @@ -54,10 +54,6 @@ #include "g711.h" #include "rtp_pt.h" -#ifdef NEED_MKSTEMP -#include "mkstemp.h" -#endif - /* in /gtk ... */ #include "dlg_utils.h" #include "ui_util.h" @@ -79,12 +75,12 @@ #include <unistd.h> #endif -#ifdef HAVE_IO_H -#include <io.h> /* open/close on win32 */ +#ifdef HAVE_FCNTL_H +#include <fcntl.h> #endif -#ifndef O_BINARY -#define O_BINARY 0 +#ifdef HAVE_IO_H +#include <io.h> /* open/close on win32 */ #endif /****************************************************************************/ diff --git a/gtk/rtp_stream.c b/gtk/rtp_stream.c index d02ea5a481..647a01934a 100644 --- a/gtk/rtp_stream.c +++ b/gtk/rtp_stream.c @@ -1,7 +1,7 @@ /* rtp_stream.c * RTP streams summary addition for ethereal * - * $Id: rtp_stream.c,v 1.14 2004/02/12 22:24:28 guy Exp $ + * $Id: rtp_stream.c,v 1.15 2004/06/29 20:46:29 ulfl Exp $ * * Copyright 2003, Alcatel Business Systems * By Lars Ruoff <lars.ruoff@gmx.net> @@ -41,16 +41,16 @@ #include "alert_box.h" #include "simple_dialog.h" +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif #include <string.h> -#ifndef O_BINARY -#define O_BINARY 0 -#endif - /****************************************************************************/ /* the one and only global rtpstream_tapinfo_t structure */ @@ -25,6 +25,10 @@ #include <errno.h> #include <stdio.h> +#ifdef HAVE_IO_H +#include <io.h> +#endif + #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif @@ -33,12 +37,13 @@ #include <unistd.h> #endif +#ifdef _WIN32 +#include <process.h> /* For spawning child process */ +#endif + #ifndef __set_errno #define __set_errno(x) errno=(x) #endif -#ifndef O_BINARY -#define O_BINARY 0 -#endif /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; diff --git a/ringbuffer.c b/ringbuffer.c index 0828449461..85fb5e2e65 100644 --- a/ringbuffer.c +++ b/ringbuffer.c @@ -1,7 +1,7 @@ /* ringbuffer.c * Routines for packet capture windows * - * $Id: ringbuffer.c,v 1.10 2004/06/02 18:49:40 guy Exp $ + * $Id: ringbuffer.c,v 1.11 2004/06/29 20:51:26 ulfl Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -76,11 +76,6 @@ #include "wiretap/wtap.h" #include "ringbuffer.h" -/* Win32 needs the O_BINARY flag for open() */ -#ifndef O_BINARY -#define O_BINARY 0 -#endif - /* Ringbuffer file structure */ typedef struct _rb_file { gchar *name; diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 23ecfd372d..82ea2121a4 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -1,6 +1,6 @@ /* file_access.c * - * $Id: file_access.c,v 1.12 2004/04/28 05:47:33 guy Exp $ + * $Id: file_access.c,v 1.13 2004/06/29 20:46:29 ulfl Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -207,11 +207,6 @@ wtap* wtap_open_offline(const char *filename, int *err, char **err_info, return NULL; } -/* Win32 needs the O_BINARY flag for open() */ -#ifndef O_BINARY -#define O_BINARY 0 -#endif - /* Open the file */ errno = WTAP_ERR_CANT_OPEN; wth->fd = open(filename, O_RDONLY|O_BINARY); |