fios.h
changeset 5167 2b9d61386688
parent 4344 5d0e40cd67b9
child 5444 3209bb62403e
equal deleted inserted replaced
5166:c40f2b19eca9 5167:2b9d61386688
    55 #if defined(WIN32)
    55 #if defined(WIN32)
    56 #include <windows.h>
    56 #include <windows.h>
    57 typedef struct DIR DIR;
    57 typedef struct DIR DIR;
    58 
    58 
    59 typedef struct dirent { // XXX - only d_name implemented
    59 typedef struct dirent { // XXX - only d_name implemented
    60 	char *d_name; /* name of found file */
    60 	wchar_t *d_name; /* name of found file */
    61 	/* little hack which will point to parent DIR struct which will
    61 	/* little hack which will point to parent DIR struct which will
    62 	 * save us a call to GetFileAttributes if we want information
    62 	 * save us a call to GetFileAttributes if we want information
    63 	 * about the file (for example in function fio_bla */
    63 	 * about the file (for example in function fio_bla */
    64 	DIR *dir;
    64 	DIR *dir;
    65 } dirent;
    65 } dirent;
    68 	HANDLE hFind;
    68 	HANDLE hFind;
    69 	/* the dirent returned by readdir.
    69 	/* the dirent returned by readdir.
    70 	 * note: having only one global instance is not possible because
    70 	 * note: having only one global instance is not possible because
    71 	 * multiple independent opendir/readdir sequences must be supported. */
    71 	 * multiple independent opendir/readdir sequences must be supported. */
    72 	dirent ent;
    72 	dirent ent;
    73 	WIN32_FIND_DATA fd;
    73 	WIN32_FIND_DATAW fd;
    74 	/* since opendir calls FindFirstFile, we need a means of telling the
    74 	/* since opendir calls FindFirstFile, we need a means of telling the
    75 	 * first call to readdir that we already have a file.
    75 	 * first call to readdir that we already have a file.
    76 	 * that's the case iff this is true */
    76 	 * that's the case iff this is true */
    77 	bool at_first_entry;
    77 	bool at_first_entry;
    78 };
    78 };