Browse Source

Merge commit 'e195a31' into bfgminer

Conflicts:
	driver-icarus.c
Luke Dashjr 14 years ago
parent
commit
f668200735
1 changed files with 27 additions and 0 deletions
  1. 27 0
      miner.h

+ 27 - 0
miner.h

@@ -53,6 +53,33 @@ void *alloca (size_t);
  #endif
  #endif
 #endif
 #endif
 
 
+#ifdef WIN32
+  #ifndef timersub
+    #define timersub(a, b, result)                     \
+    do {                                               \
+      (result)->tv_sec = (a)->tv_sec - (b)->tv_sec;    \
+      (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
+      if ((result)->tv_usec < 0) {                     \
+        --(result)->tv_sec;                            \
+        (result)->tv_usec += 1000000;                  \
+      }                                                \
+    } while (0)
+  #endif
+ #ifndef timeradd
+ # define timeradd(a, b, result)			      \
+   do {							      \
+    (result)->tv_sec = (a)->tv_sec + (b)->tv_sec;	      \
+    (result)->tv_usec = (a)->tv_usec + (b)->tv_usec;	      \
+    if ((result)->tv_usec >= 1000000)			      \
+      {							      \
+	++(result)->tv_sec;				      \
+	(result)->tv_usec -= 1000000;			      \
+      }							      \
+   } while (0)
+ #endif
+#endif
+
+
 #ifdef HAVE_ADL
 #ifdef HAVE_ADL
  #include "ADL_SDK/adl_sdk.h"
  #include "ADL_SDK/adl_sdk.h"
 #endif
 #endif