prep for 1.2rc9 release
[rrdtool.git] / src / rrd_xport.c
index 95bf35b..2dbc99d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * RRDtool 1.0.37  Copyright Tobias Oetiker, 1997 - 2000
+ * RRDtool 1.2rc9  Copyright by Tobi Oetiker, 1997-2005
  ****************************************************************************
  * rrd_xport.c  export RRD data 
  ****************************************************************************/
@@ -10,7 +10,7 @@
 #include "rrd_graph.h"
 #include "rrd_xport.h"
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 #include <io.h>
 #include <fcntl.h>
 #endif
@@ -116,7 +116,8 @@ rrd_xport(int argc, char **argv, int *xsize,
     
     im.start = start_tmp;
     im.end = end_tmp;
-
+    im.step = max((long)im.step, (im.end-im.start)/im.xsize);
+    
     rrd_graph_script(argc,argv,&im,0);
     if (rrd_test_error()) {
        im_free(&im);