- Allow for case-insensitivity of include_once()/require_once() on

- Windows
This commit is contained in:
Andi Gutmans 2003-10-29 21:14:17 +00:00
parent 73be3af983
commit 1428850762

View File

@ -331,6 +331,24 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
}
free(tmp);
}
#endif
#ifdef TSRM_WIN32
{
char *dummy;
char *new_path;
int new_path_length;
new_path_length = GetFullPathName(path, 0, 0, &dummy) + 1;
new_path = (char *) malloc(new_path_length);
if (!new_path) {
return 1;
}
GetFullPathName(path, new_path_length, new_path, &dummy);
free(path);
path = new_path;
path_length = new_path_length;
}
#endif
free_path = path_copy = tsrm_strndup(path, path_length);