From fb8d9e5a065a29db0e43c5e5e0fc54f3767de768 Mon Sep 17 00:00:00 2001 From: ulfl Date: Tue, 29 Jun 2004 20:51:26 +0000 Subject: [PATCH] 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 --- capture.c | 7 +------ file.c | 6 +----- gtk/proto_draw.c | 7 +------ gtk/rtp_analysis.c | 14 +++++--------- gtk/rtp_stream.c | 10 +++++----- mkstemp.c | 11 ++++++++--- ringbuffer.c | 7 +------ wiretap/file_access.c | 7 +------ 8 files changed, 23 insertions(+), 46 deletions(-) diff --git a/capture.c b/capture.c index 2c52dc63a9..f1de16baad 100644 --- a/capture.c +++ b/capture.c @@ -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 @@ -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); diff --git a/file.c b/file.c index 91967ceb03..7d2a402af8 100644 --- a/file.c +++ b/file.c @@ -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 @@ -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 @@ -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 @@ -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 #endif -#ifdef HAVE_IO_H -#include /* open/close on win32 */ +#ifdef HAVE_FCNTL_H +#include #endif -#ifndef O_BINARY -#define O_BINARY 0 +#ifdef HAVE_IO_H +#include /* 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 @@ -41,16 +41,16 @@ #include "alert_box.h" #include "simple_dialog.h" +#ifdef HAVE_FCNTL_H +#include +#endif + #ifdef HAVE_SYS_TYPES_H # include #endif #include -#ifndef O_BINARY -#define O_BINARY 0 -#endif - /****************************************************************************/ /* the one and only global rtpstream_tapinfo_t structure */ diff --git a/mkstemp.c b/mkstemp.c index 07e1b0ef45..bc20510634 100644 --- a/mkstemp.c +++ b/mkstemp.c @@ -25,6 +25,10 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif + #ifdef HAVE_FCNTL_H #include #endif @@ -33,12 +37,13 @@ #include #endif +#ifdef _WIN32 +#include /* 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 @@ -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 @@ -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); -- 2.34.1