Removed check for posix version so that missing O_CLOEXEC leads to compiler error. Removed extra function since it hat no real purpose anymore. Error behavior between Windows and Unix now equivalent.