Make documentation location configurable

This is an ongoing effort to allow different file system layouts (#5)
Make sysconfig directory configurable
Swap detection order of sysv-redhat and sysv-lsb

/lib/lsb/init-functions exists on Redhat system, but
/etc/init.d/functions does not on Debian-based systems, so
this should work better out-of-the-box.

Fixes #7
Use PERMISSIONS keyword instead of FILE_PERMISSIONS

Fixes #6
add status check to LSB init script
Merge pull request #15 from rvrangel/master

add status check to LSB init script
Close the listen sockets in child processes

By keeping the listen sockets open, the children were preventing the
daemon from being restarted cleanly. Once the child has forked these
listen sockets are no longer needed by that process, so can be closed.
Ignore EINTR errors from main poll() loop

When trying to connect the strace tool to the daemon's main process, the
daemon would die because strace interrupted the poll() causing it to
return EINTR.

It should be safe to ignore EINTR errors from poll in this case. Either
the received signal will be otherwise ignored by the process, or it will
cause it to terminate.
Merge pull request #16 from crispygoth/master

A couple of small fixes: closing listen sockets in child and ignoring EINTR errors from main poll
Load timezone info before chroot

Fixes #13
Add preliminary Mac OS X support
Update README
Fix pointer conversion warnings
Check for headers which may or may not be available
Whitespace fix
Workaround for Solaris libc

The Solaris libc has some issues with alternating input and output
on sockets passed to fdopen(). Apparently there is a shared buffer
which has to be emptied, either by fseek() or fflush(), whenever
the direction of the data flow changes.
Flush before waiting for new input, not after
Bind IPv4 ports by default
Initial systemd support
Rename postsrsd.default