On at least some platforms, a #define of O_BINARY is needed even if
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 30 Jun 2004 06:58:59 +0000 (06:58 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 30 Jun 2004 06:58:59 +0000 (06:58 +0000)
<fcntl.h> is included, as <fcntl.h> doesn't define it.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11276 f5534014-38df-0310-8fa8-9805f1628bb7

capture.c
file.c
gtk/proto_draw.c
gtk/rtp_analysis.c
mergecap.c
ringbuffer.c
wiretap/file_access.c

index f1de16baad822e3a02fbc2ded31b4894f9ce81ee..d1f42929f22a0f0be3f830bde6452b10b10446ab 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
 /* capture.c
  * Routines for packet capture windows
  *
- * $Id: capture.c,v 1.253 2004/06/29 20:51:26 ulfl Exp $
+ * $Id: capture.c,v 1.254 2004/06/30 06:58:56 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -219,6 +219,10 @@ 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 7d2a402af82d2695942ee0826cd588898bd2a8ff..f48fc5c95fbf10c29fb02707ecc97344ac9888fe 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
 /* file.c
  * File I/O routines
  *
- * $Id: file.c,v 1.385 2004/06/29 20:51:26 ulfl Exp $
+ * $Id: file.c,v 1.386 2004/06/30 06:58:56 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #include "tap_dfilter_dlg.h"
 #include "packet-data.h"
 
+/* Win32 needs the O_BINARY flag for open() */
+#ifndef O_BINARY
+#define O_BINARY       0
+#endif
+
 #ifdef HAVE_LIBPCAP
 gboolean auto_scroll_live;
 #endif
index 0e1de84dd85d716e7838a7190342302090e4caf1..e2055289a5a775b2b2827917e107029ba74976ef 100644 (file)
@@ -1,7 +1,7 @@
 /* proto_draw.c
  * Routines for GTK+ packet display
  *
- * $Id: proto_draw.c,v 1.106 2004/06/29 20:46:28 ulfl Exp $
+ * $Id: proto_draw.c,v 1.107 2004/06/30 06:58:58 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #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
 
index 9654cf96f74e441dbbe4cd61d1196288896c6450..591bede7d8604de589cc2786d4e6cd741e9c2a91 100644 (file)
@@ -1,7 +1,7 @@
 /* rtp_analysis.c
  * RTP analysis addition for ethereal
  *
- * $Id: rtp_analysis.c,v 1.46 2004/06/29 20:46:28 ulfl Exp $
+ * $Id: rtp_analysis.c,v 1.47 2004/06/30 06:58:58 guy Exp $
  *
  * Copyright 2003, Alcatel Business Systems
  * By Lars Ruoff <lars.ruoff@gmx.net>
 #include <io.h> /* open/close on win32 */
 #endif
 
+/* Win32 needs the O_BINARY flag for open() */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
 /****************************************************************************/
 
 typedef struct column_arrows {
index 8038e70fb4d06284b4516a468c8e9e7f34c9c55a..aa31504dcdadfcea42e0e3f9a98e43be9d550cb9 100644 (file)
@@ -1,6 +1,6 @@
 /* Combine two dump files, either by appending or by merging by timestamp
  *
- * $Id: mergecap.c,v 1.22 2004/06/29 20:59:23 ulfl Exp $
+ * $Id: mergecap.c,v 1.23 2004/06/30 06:58:57 guy Exp $
  *
  * Written by Scott Renfro <scott@renfro.org> based on
  * editcap by Richard Sharpe and Guy Harris
 #include <fcntl.h>
 #endif
 
+/* Win32 needs the O_BINARY flag for open() */
+#ifndef O_BINARY
+#define O_BINARY       0
+#endif
 
 /*
  * Show the usage
index 85fb5e2e6596f5892c5c4273ca41411b4a0edf2e..93d42018480cf6055441d29e9df0651f6d9f5fe8 100644 (file)
@@ -1,7 +1,7 @@
 /* ringbuffer.c
  * Routines for packet capture windows
  *
- * $Id: ringbuffer.c,v 1.11 2004/06/29 20:51:26 ulfl Exp $
+ * $Id: ringbuffer.c,v 1.12 2004/06/30 06:58:57 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #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;
index 82ea2121a47eeddc00b9de57b8a6dae99ae9964a..55bdf7429aa0f62118c9566c008b9355d0034986 100644 (file)
@@ -1,6 +1,6 @@
 /* file_access.c
  *
- * $Id: file_access.c,v 1.13 2004/06/29 20:46:29 ulfl Exp $
+ * $Id: file_access.c,v 1.14 2004/06/30 06:58:59 guy Exp $
  *
  * Wiretap Library
  * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@@ -207,6 +207,11 @@ 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);