[Forensics-changes] [yara] 378/407: Implement log2 function for VC++
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.3.0
in repository yara.
commit d0a9aeffecf3dda9211040c025424395b63d91fe
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Thu Feb 5 12:35:05 2015 +0100
Implement log2 function for VC++
---
libyara/modules/math.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libyara/modules/math.c b/libyara/modules/math.c
index 36f5278..660b981 100644
--- a/libyara/modules/math.c
+++ b/libyara/modules/math.c
@@ -23,6 +23,15 @@ limitations under the License.
#define PI 3.141592653589793
+// log2 is not defined by math.h in VC++
+
+#ifdef _MSC_VER
+double log2(double n)
+{
+ return log(n) / log(2);
+}
+#endif
+
define_function(string_entropy)
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list