impl->fd = sopen(impl->path,flags, _SH_DENYWR, _S_IREAD | _S_IWRITE);
impl->fd = sopen(impl->path,flags | O_BINARY, _SH_DENYWR, _S_IREAD | _S_IWRITE);
icalfileset* icalfileset_new_open(const char* path, int flags, mode_t mode){    struct icalfileset_impl *impl = icalfileset_new_impl();     struct icaltimetype tt;    off_t cluster_file_size;    memset(&tt,0,sizeof(struct icaltimetype));    icalerror_clear_errno();    icalerror_check_arg_rz( (path!=0), "path");    if (impl == 0){	return 0;    }    impl->path = strdup(path);     cluster_file_size = icalfileset_filesize(impl);            if(cluster_file_size < 0){	icalfileset_free(impl);	return 0;    } #ifndef WIN32    impl->fd = open(impl->path,flags, mode);#else	impl->fd = sopen(impl->path,flags, _SH_DENYWR, _S_IREAD | _S_IWRITE);#endif        if (impl->fd < 0){	icalerror_set_errno(ICAL_FILE_ERROR);	icalfileset_free(impl);	return 0;    }#ifndef WIN32    icalfileset_lock(impl);#endif        if(cluster_file_size > 0 ){	icalerrorenum error;	if((error = icalfileset_read_file(impl,mode))!= ICAL_NO_ERROR){	    icalfileset_free(impl);	    return 0;	}    }     if(impl->cluster == 0){	impl->cluster = icalcomponent_new(ICAL_XROOT_COMPONENT);    }              return impl;}