File: randtest.patch

package info (click to toggle)
ent 1.1debian-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 212 kB
  • ctags: 134
  • sloc: ansic: 349; makefile: 35
file content (35 lines) | stat: -rw-r--r-- 924 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Desription: Remove private definition of log2() function
  use the function provided by the C library library instead
Bug-Debian: http://bugs/debian.org/552835
Author: Jakub Wilk <jwilk@debian.org>

--- ent-1.1debian.orig/randtest.c
+++ ent-1.1debian/randtest.c
@@ -7,26 +7,18 @@
 
 */
 
+#define _ISOC99_SOURCE
 #include <math.h>
 
 #define FALSE 0
 #define TRUE  1
 
-#define log2of10 3.32192809488736234787
-
 static int binary = FALSE;	   /* Treat input as a bitstream */
 
 static long ccount[256],	   /* Bins to count occurrences of values */
 	    totalc = 0; 	   /* Total bytes counted */
 static double prob[256];	   /* Probabilities per bin for entropy */
 
-/*  LOG2  --  Calculate log to the base 2  */
-
-static double log2(double x)
-{
-    return log2of10 * log10(x);
-}
-
 #define MONTEN	6		      /* Bytes used as Monte Carlo
 					 co-ordinates.	This should be no more
 					 bits than the mantissa of your