diff --git a/Windows/dirent.c b/Windows/dirent.c index 08ea8007..bf6e7fff 100644 --- a/Windows/dirent.c +++ b/Windows/dirent.c @@ -21,7 +21,7 @@ extern "C" struct DIR { - long handle; /* -1 for failed rewind */ + intptr_t handle; /* -1 for failed rewind */ struct _finddata_t info; struct dirent result; /* d_name null iff first time */ char *name; /* null-terminated char string */ @@ -42,7 +42,7 @@ DIR *opendir(const char *name) { strcat(strcpy(dir->name, name), all); - if((dir->handle = (long) _findfirst(dir->name, &dir->info)) != -1) + if((dir->handle = _findfirst(dir->name, &dir->info)) != -1) { dir->result.d_name = 0; } @@ -116,7 +116,7 @@ void rewinddir(DIR *dir) if(dir && dir->handle != -1) { _findclose(dir->handle); - dir->handle = (long) _findfirst(dir->name, &dir->info); + dir->handle = _findfirst(dir->name, &dir->info); dir->result.d_name = 0; } else