Commit 3be662a27054e740471c0c83fdf365483d56bb8f

Paul Sheppard 2012-06-28T18:35:32

Merge branch 'old_gcc'

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/miner.h b/miner.h
index f78482a..57dd636 100644
--- a/miner.h
+++ b/miner.h
@@ -159,6 +159,10 @@ void *alloca (size_t);
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 #endif
 
+#ifndef roundl
+#define roundl(x)   (long double)((long long)((x==0)?0.0:((x)+((x)>0)?0.5:-0.5)))
+#endif
+
 enum alive {
 	LIFE_WELL,
 	LIFE_SICK,