I've got a feeling the Apache Portable Runtime might help with what you're looking for. Apache HTTPD used this library internally to abstract its platform-specific code so that the server code focuses on the logic and calls the methods in the APR and these translate to underlying operating system functions.
Of course, it might have more tools in it than you strictly need...