Make lib/zipf.c a stand-alone library
authorTomohiro Kusumi <tkusumi@tuxera.com>
Fri, 14 Apr 2017 21:06:23 +0000 (00:06 +0300)
committerJens Axboe <axboe@fb.com>
Wed, 26 Apr 2017 18:43:10 +0000 (12:43 -0600)
lib/zipf.c not having dependency on fio header (log.h) enables it
to be a stand-alone library, which is useful for debugging purpose.
In fact, most of the files under lib/ directory do things this way.

lib/zipf.c doesn't use log.h (log(3) is apparently from -lm).

This requires the previous commit.

--
 # cat ./test8.c
 #include <stdio.h>
 #include "lib/zipf.h"
 int main(void) {
         /* just to see if it compiles */
         zipf_init(NULL, 0, 0, 0);
         return 0;
 }
 # gcc -Wall -g -lm -DBITS_PER_LONG=64 ./test8.c ./lib/zipf.c ./lib/rand.c ./lib/pattern.c ./lib/strntol.c

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
lib/zipf.c

index 681df70069ac27419b4545dcbac0ee2de81fdbee..3d535c79d3b371ba1ee150567a307629b8d9d067 100644 (file)
@@ -6,7 +6,6 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include "ieee754.h"
-#include "../log.h"
 #include "zipf.h"
 #include "../minmax.h"
 #include "../hash.h"