Allow timeformat for log to be specified
[pazpar2-moved-to-github.git] / src / relevance.c
index 9766a5b..b08d217 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of Pazpar2.
-   Copyright (C) 2006-2012 Index Data
+   Copyright (C) 2006-2013 Index Data
 
 Pazpar2 is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
@@ -28,6 +28,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "relevance.h"
 #include "session.h"
 
+#ifdef WIN32
+#define log2(x) (log(x)/log(2))
+#endif
+
 struct relevance
 {
     int *doc_frequency_vec;