I would like to implement a very simple Virtual Filesystem (VFS) which supports some basic file system operation like fwrite, fopen, fput, etc. The VFS is an abstraction lay
I don't think you can compile a module for different OSes, the way you want.
// Make the distinction at compile time,
FILE VFS_File_Open( const unsigned char strFile, int flags )
{
#ifdef _WINDOWS
//implement here the system calls required to open a file on a WIN OS
#endif
#ifdef _LINUX
//implement here the system calls required to open a file on a Linux OS
#endif
etc
}