ifdefs and linux (posix) version (not tested)