summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-08-20 19:56:24 +0000
committerAndi Gutmans <andi@php.net>2000-08-20 19:56:24 +0000
commitc7999595688422de96ed208c995cceca4d165c0c (patch)
tree40eaf25ad6fec44c7fb250783158d617ea287e62
parent892e949196e17184f31b067c3db2feb83fa08ca1 (diff)
downloadphp-git-c7999595688422de96ed208c995cceca4d165c0c.tar.gz
- Change PHP_SEPARATOR to PHP_DIR_SEPARATOR
-rw-r--r--main/fopen_wrappers.c6
-rw-r--r--main/main.c2
-rw-r--r--main/php.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index 89a24308ff..406c295e0b 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -317,8 +317,8 @@ PHPAPI FILE *php_fopen_primary_script(void)
if (pw && pw->pw_dir) {
filename = emalloc(strlen(PG(user_dir)) + strlen(path_info) + strlen(pw->pw_dir) + 4);
if (filename) {
- sprintf(filename, "%s%c%s%c%s", pw->pw_dir, PHP_SEPARATOR,
- PG(user_dir), PHP_SEPARATOR, s+1); /* Safe */
+ sprintf(filename, "%s%c%s%c%s", pw->pw_dir, PHP_DIR_SEPARATOR,
+ PG(user_dir), PHP_DIR_SEPARATOR, s+1); /* Safe */
STR_FREE(SG(request_info).path_translated);
SG(request_info).path_translated = filename;
}
@@ -338,7 +338,7 @@ PHPAPI FILE *php_fopen_primary_script(void)
if (filename) {
memcpy(filename, PG(doc_root), length);
if (!IS_SLASH(filename[length - 1])) { /* length is never 0 */
- filename[length++] = PHP_SEPARATOR;
+ filename[length++] = PHP_DIR_SEPARATOR;
}
if (IS_SLASH(path_info[0])) {
length--;
diff --git a/main/main.c b/main/main.c
index c239fa1f72..93ff276093 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1148,7 +1148,7 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_
&& primary_file->filename) {
char *filename;
- filename = strrchr(primary_file->filename, PHP_SEPARATOR);
+ filename = strrchr(primary_file->filename, PHP_DIR_SEPARATOR);
if (filename) {
filename++;
diff --git a/main/php.h b/main/php.h
index 8d8b4c5034..670335d63c 100644
--- a/main/php.h
+++ b/main/php.h
@@ -65,11 +65,11 @@ extern unsigned char second_arg_allow_ref[];
# else
# define PHPAPI __declspec(dllimport)
# endif
-#define PHP_SEPARATOR '\\'
+#define PHP_DIR_SEPARATOR '\\'
#else
#define PHPAPI
#define THREAD_LS
-#define PHP_SEPARATOR '/'
+#define PHP_DIR_SEPARATOR '/'
#endif
#include "php_regex.h"