com php-src: remove dead code: Zend/zend_virtual_cwd.c
| From: | Anatol Belski | Date: | Wed, 26 Oct 2016 16:06:16 +0000 |
| Subject: | com php-src: remove dead code: Zend/zend_virtual_cwd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95295@lists.php.net to get a copy of this message | ||
Commit: 71f73d7f58ab8620b47780bfc659831966496a7f
Author: Anatol Belski <ab@php.net> Mon, 24 Oct 2016 20:07:15 +0200
Parents: 6679df147a21090d381554375b52917578303f76
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=71f73d7f58ab8620b47780bfc659831966496a7f
Log:
remove dead code
Changed paths:
M Zend/zend_virtual_cwd.c
Diff:
diff --git a/Zend/zend_virtual_cwd.c b/Zend/zend_virtual_cwd.c
index bee1d48..c623bf8 100644
--- a/Zend/zend_virtual_cwd.c
+++ b/Zend/zend_virtual_cwd.c
@@ -32,7 +32,6 @@
#include "zend.h"
#include "zend_virtual_cwd.h"
-#include "tsrm_strtok_r.h"
#ifdef ZEND_WIN32
#include <io.h>
@@ -85,56 +84,6 @@ cwd_state main_cwd_state; /* True global */
#include <direct.h>
#endif
-#ifdef ZEND_WIN32
-#include <tchar.h>
-#define tsrm_strtok_r(a,b,c) _tcstok((a),(b))
-#define TOKENIZER_STRING "/\\"
-
-static int php_check_dots(const char *element, int n)
-{
- while (n-- > 0) if (element[n] != '.') break;
-
- return (n != -1);
-}
-
-#define IS_DIRECTORY_UP(element, len) \
- (len >= 2 && !php_check_dots(element, len))
-
-#define IS_DIRECTORY_CURRENT(element, len) \
- (len == 1 && element[0] == '.')
-
-#elif defined(NETWARE)
-/* NetWare has strtok() (in LibC) and allows both slashes in paths, like Windows --
- but rest of the stuff is like Unix */
-/* strtok() call in LibC is abending when used in a different address space -- hence using
- PHP's version itself for now */
-/*#define tsrm_strtok_r(a,b,c) strtok((a),(b))*/
-#define TOKENIZER_STRING "/\\"
-
-#else
-#define TOKENIZER_STRING "/"
-#endif
-
-/* default macros */
-
-#ifndef IS_DIRECTORY_UP
-#define IS_DIRECTORY_UP(element, len) \
- (len == 2 && element[0] == '.' && element[1] == '.')
-#endif
-
-#ifndef IS_DIRECTORY_CURRENT
-#define IS_DIRECTORY_CURRENT(element, len) \
- (len == 1 && element[0] == '.')
-#endif
-
-/* define this to check semantics */
-#define IS_DIR_OK(s) (1)
-
-#ifndef IS_DIR_OK
-#define IS_DIR_OK(state) (php_is_dir_ok(state) == 0)
-#endif
-
-
#define CWD_STATE_COPY(d, s) \
(d)->cwd_length = (s)->cwd_length; \
(d)->cwd = (char *) emalloc((s)->cwd_length+1); \