win32 portability patch and win32/rrdlib.vcproj file for the source
[rrdtool.git] / src / rrd_restore.c
index 57eb82e..f803ab6 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.3.1  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  * This file:     Copyright 2008 Florian octo Forster
  * Distributed under the GPL
  *****************************************************************************
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
-#include <unistd.h>
+
+
+#ifndef WIN32
+#      include <unistd.h>     /* for off_t */
+#else
+#      define random() rand()
+#      define srandom(x) srand(x)
+#      define getpid() 0
+       typedef size_t ssize_t;
+       typedef long off_t;
+#endif 
+
 #include <fcntl.h>
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__CYGWIN32__)
 # include <io.h>