aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--capture.c7
-rw-r--r--file.c6
-rw-r--r--gtk/proto_draw.c7
-rw-r--r--gtk/rtp_analysis.c14
-rw-r--r--gtk/rtp_stream.c10
-rw-r--r--mkstemp.c11
-rw-r--r--ringbuffer.c7
-rw-r--r--wiretap/file_access.c7
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 <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);
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 <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 */
diff --git a/mkstemp.c b/mkstemp.c
index 07e1b0ef45..bc20510634 100644
--- a/mkstemp.c
+++ b/mkstemp.c
@@ -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);