cvs: TSRM / tsrm_virtual_cwd.c
| From: | Andi Gutmans | Date: | Wed, 29 Oct 2003 21:14:17 +0000 |
| Subject: | cvs: TSRM / tsrm_virtual_cwd.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-1949@lists.php.net to get a copy of this message | ||
andi Wed Oct 29 16:14:17 2003 EDT
Modified files:
/TSRM tsrm_virtual_cwd.c
Log:
- Allow for case-insensitivity of include_once()/require_once() on
- Windows
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.51 TSRM/tsrm_virtual_cwd.c:1.52
--- TSRM/tsrm_virtual_cwd.c:1.51 Wed Jun 25 01:05:06 2003
+++ TSRM/tsrm_virtual_cwd.c Wed Oct 29 16:14:17 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c,v 1.51 2003/06/25 05:05:06 sebastian Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.52 2003/10/29 21:14:17 andi Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -330,6 +330,24 @@
path_length = strlen(path);
}
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);