Allow compilation to succeed on OSX

Fix a few instances of unportable Code:

 - make the get_current_dir_name() call dependant on a configure check

 - make time logging code use casts to long uniformly

 - include some headers where needed

 - replace assignment of '\0' with NULL so modern clang doesn't complain
   about assigning null pointers via expressions evaluating to zero

Signed-off-by: Sebastian Hahn <sebastian@torproject.org>
Allow "make check" to succeed on OSX

Fix a few instances of unportable code by replacing uint with unsigned
int and changing function pointer casts for signal(). Fix up some header
includes.

Signed-off-by: Sebastian Hahn <sebastian@torproject.org>
Merge pull request #55 from shahn/osx

Fix compilation on OSX