From Gisle Vanem: MingW declares "rint()" in <math.h> and defines it in
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 18 Aug 2003 18:41:25 +0000 (18:41 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 18 Aug 2003 18:41:25 +0000 (18:41 +0000)
a library, and declares "mode_t" in <sys/types.h>.

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

gtk/tcp_graph.c
util.c

index df9396411f03524edadbc6cdbde2a420f8eaba3d..7ad8bf668c13f90506375bfff208e99c88bb64c5 100644 (file)
@@ -3,7 +3,7 @@
  * By Pavel Mores <pvl@uh.cz>
  * Win32 port:  rwh@unifiedtech.com
  *
- * $Id: tcp_graph.c,v 1.32 2003/03/02 22:31:25 guy Exp $
+ * $Id: tcp_graph.c,v 1.33 2003/08/18 18:41:25 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -504,7 +504,7 @@ static void rtt_put_unack_on_list (struct unack ** , struct unack * );
 static void rtt_delete_unack_from_list (struct unack ** , struct unack * );
 static void rtt_make_elmtlist (struct graph * );
 static void rtt_toggle_seq_origin (struct graph * );
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 static int rint (double );     /* compiler template for Windows */
 #endif
 
@@ -3915,7 +3915,7 @@ static void rtt_toggle_seq_origin (struct graph *g)
                g->x_axis->min = 0;
 }
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__MINGW32__)
 /* replacement of Unix rint() for Windows */
 static int rint (double x)
 {
diff --git a/util.c b/util.c
index fe142d8aadd21b5ad7ef8d97bd3b0a746da7514c..b5789fe07a4a4f042349403df5c784bcfe644c74 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1,7 +1,7 @@
 /* util.c
  * Utility routines
  *
- * $Id: util.c,v 1.67 2003/07/11 06:45:59 guy Exp $
+ * $Id: util.c,v 1.68 2003/08/18 18:41:24 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 
 #ifdef HAVE_IO_H
 #include <io.h>
+#ifndef __MINGW32__
 typedef int mode_t;    /* for win32 */
-#endif
+#endif /* __MINGW32__ */
+#endif /* HAVE_IO_H */
 
 #ifdef HAVE_LIBZ
 #include <zlib.h>      /* to get the libz version number */