]> granicus.if.org Git - graphviz/commitdiff
Fix various uses of setmode in Windows to turn off the conversion
authorerg <devnull@localhost>
Mon, 27 Aug 2007 22:31:59 +0000 (22:31 +0000)
committererg <devnull@localhost>
Mon, 27 Aug 2007 22:31:59 +0000 (22:31 +0000)
of LR to CR-LF. Note that for this idiom to work, the file must:

  #include <config.h>  /* for HAVE_SETMODE */
  #include <fcntl.h>   /* for O_BINARY */
  #include <io.h>      /* for declaration of setmode() */
The latter two can be wrapped in #ifdef WIN32 if desired.

lib/common/diagen.c
plugin/core/gvrender_core.c
plugin/devil/gvformatter_devil.c
plugin/gd/gvformatter_gd.c
plugin/gdk_pixbuf/gvformatter_gdk_pixbuf.c
plugin/pango/gvrender_pango.c

index 3382b9deb53d1a335f70bc704f7cc95aa003f798..1b9d54302970b42dda980f4c186f97bc0e55c6c1 100644 (file)
@@ -14,7 +14,9 @@
 *              AT&T Research, Florham Park NJ             *
 **********************************************************/
 
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include "render.h"
 
@@ -25,6 +27,7 @@
 #ifdef HAVE_LIBZ
 #include <zlib.h>
 #ifdef WIN32
+#include <fcntl.h>
 #include <io.h>
 #endif
 #endif
index a73565558fda001c14af49a8b3cb32c24bff962d..5a7ee512b88bab124f4c925c10edff3320f14d7e 100644 (file)
@@ -32,6 +32,7 @@
 
 #ifdef WIN32
 #include <io.h>
+#include <fcntl.h>
 #include "compat.h"
 #endif
 
index 9779272099d82f77a8f63f4c5f5c5cdc3fb5d364..ede17027384c700a411b711707d962d8e7ee6fb0 100644 (file)
 #include "config.h"
 #endif
 
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
 #include "gvplugin_formatter.h"
 #include <IL/il.h>
 #include <IL/ilu.h>
index cdc500bcf3686a472e9e6ea4affe0e6d0ad10233..88838c3155a403fef4d58487a77e74df765d48e9 100644 (file)
 #include "config.h"
 #endif
 
+#ifdef WIN32
+#include <fcntl.h>
+#include <io.h>
+#endif
 #include <stdlib.h>
 #include "gvplugin_formatter.h"
 
index d652d915af0fc1d0731f0f852c1581a53a8b4adc..ad3903021ae4d0b30795d680bea625c1dfd8340e 100644 (file)
 #include "config.h"
 #endif
 
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
 #include "gvplugin_formatter.h"
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
index 1bcdc38d5affe502808566e641fe8bfe026b20d9..77e74976c2dd5d2a41d77f4d6de2c16dfee38957 100644 (file)
@@ -25,6 +25,9 @@
 #include <string.h>
 #endif
 #include <fcntl.h>
+#ifdef WIN32
+#include <io.h>
+#endif
 
 #if defined(HAVE_FENV_H) && defined(HAVE_FESETENV) && defined(HAVE_FEGETENV) && defined(HAVE_FEENABLEEXCEPT)