Added u64_max and a definition necessary to make uint64_t work.

Signed-off-by: Marcin Zalewski <marcin.zalewski@gmail.com>
Modified bfs to work with distances.

This is an initial version.

Signed-off-by: Marcin Zalewski <marcin.zalewski@gmail.com>
Merged.

Signed-off-by: Marcin Zalewski <marcin.zalewski@gmail.com>