Hi Stefan, On 07/13/17 17:40, Stefan Dösinger wrote:
+enum msvcp140_file_type { + msvcp140_file_type_not_found = -1, msvcp140_file_type_none, msvcp140_file_type_regular, + msvcp140_file_type_directory, msvcp140_file_type_symlink, msvcp140_file_type_block, + msvcp140_file_type_character, msvcp140_file_type_fifo, msvcp140_file_type_socket, msvcp140_file_type_unknown +}; Did you consider changing current structure instead of defining new one? I'm talking about something like: enum file_type { #if _MSVCP_VER < 140 status_unknown, file_not_found, #else file_not_found = -1, status_unknown, #endif regular_file, directory_file, ... } Thanks to it you will be able to use the same implementation of _Open_dir/_Read_dir in msvcp120 and msvcp140.
+ *permissions = (attr & FILE_ATTRIBUTE_READONLY)?0555:0777; You should also handle permission==NULL case.
Thanks, Piotr