mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
* Windows/dirent.c: For 64 bit compatibility, changed the handle member
of struct DIR from long to intptr_t, which is what _findfirst() returns and _findnext() and _findclose() accepts, and removed the brain-dead long casts in the code. This file is probably only used with M$VC, therefore this doesn't affect gcc/mingw compilations and previous binaries. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@236 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
c6a63edca2
commit
2e871b3f03
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue