5353# endif
5454#endif
5555
56- #ifdef NETWARE
57- #include <fsio.h>
58- #endif
59-
6056#ifndef HAVE_REALPATH
6157#define realpath (x ,y ) strcpy(y,x)
6258#endif
6561
6662#include "TSRM.h"
6763
68- /* Only need mutex for popen() in Windows and NetWare because it doesn't chdir() on UNIX */
69- #if ( defined(ZEND_WIN32 ) || defined( NETWARE ) ) && defined(ZTS )
64+ /* Only need mutex for popen() in Windows because it doesn't chdir() on UNIX */
65+ #if defined(ZEND_WIN32 ) && defined(ZTS )
7066MUTEX_T cwd_mutex ;
7167#endif
7268
@@ -407,23 +403,12 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
407403 char cwd [MAXPATHLEN ];
408404 char * result ;
409405
410- #ifdef NETWARE
411- result = getcwdpath (cwd , NULL , 1 );
412- if (result )
413- {
414- char * c = cwd ;
415- while (c = strchr (c , '\\' ))
416- {
417- * c = '/' ;
418- ++ c ;
419- }
420- }
421- #else
406+
422407#ifdef ZEND_WIN32
423408 ZeroMemory (& cwd , sizeof (cwd ));
424409#endif
425410 result = getcwd (cwd , sizeof (cwd ));
426- #endif
411+
427412 if (!result ) {
428413 cwd [0 ] = '\0' ;
429414 }
@@ -442,7 +427,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
442427 cwd_globals_ctor (& cwd_globals );
443428#endif
444429
445- #if (defined(ZEND_WIN32 ) || defined( NETWARE ) ) && defined(ZTS )
430+ #if (defined(ZEND_WIN32 )) && defined(ZTS )
446431 cwd_mutex = tsrm_mutex_alloc ();
447432#endif
448433}
@@ -453,7 +438,7 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
453438#ifndef ZTS
454439 cwd_globals_dtor (& cwd_globals );
455440#endif
456- #if (defined(ZEND_WIN32 ) || defined( NETWARE ) ) && defined(ZTS )
441+ #if (defined(ZEND_WIN32 )) && defined(ZTS )
457442 tsrm_mutex_free (cwd_mutex );
458443#endif
459444
@@ -1054,11 +1039,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
10541039 return -1 ;
10551040 }
10561041 }
1057-
1058- #elif defined(NETWARE)
1059- save = 0 ;
1060- tmp = do_alloca (len + 1 , use_heap );
1061- memcpy (tmp , path , len + 1 );
10621042#else
10631043 if (save && php_sys_lstat (path , & st ) < 0 ) {
10641044 if (use_realpath == CWD_REALPATH ) {
@@ -1296,18 +1276,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
12961276 resolved_path [2 ] = DEFAULT_SLASH ;
12971277 start = 3 ;
12981278 }
1299- #elif defined(NETWARE )
1300- if (IS_ABSOLUTE_PATH (resolved_path , path_length )) {
1301- /* skip VOLUME name */
1302- start = 0 ;
1303- while (start != ':' ) {
1304- if (resolved_path [start ] == 0 ) return -1 ;
1305- start ++ ;
1306- }
1307- start ++ ;
1308- if (!IS_SLASH (resolved_path [start ])) return -1 ;
1309- resolved_path [start ++ ] = DEFAULT_SLASH ;
1310- }
13111279#endif
13121280
13131281 add_slash = (use_realpath != CWD_REALPATH ) && path_length > 0 && IS_SLASH (resolved_path [path_length - 1 ]);
@@ -1595,7 +1563,7 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode) /* {{{ */
15951563}
15961564/* }}} */
15971565
1598- #if !defined(ZEND_WIN32 ) && !defined( NETWARE )
1566+ #if !defined(ZEND_WIN32 )
15991567CWD_API int virtual_chown (const char * filename , uid_t owner , gid_t group , int link ) /* {{{ */
16001568{
16011569 cwd_state new_state ;
@@ -1842,36 +1810,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
18421810 return popen_ex (command , type , CWDG (cwd ).cwd , NULL );
18431811}
18441812/* }}} */
1845- #elif defined(NETWARE )
1846- /* On NetWare, the trick of prepending "cd cwd; " doesn't work so we need to perform
1847- a VCWD_CHDIR() and mutex it
1848- */
1849- CWD_API FILE * virtual_popen (const char * command , const char * type ) /* {{{ */
1850- {
1851- char prev_cwd [MAXPATHLEN ];
1852- char * getcwd_result ;
1853- FILE * retval ;
1854-
1855- getcwd_result = VCWD_GETCWD (prev_cwd , MAXPATHLEN );
1856- if (!getcwd_result ) {
1857- return NULL ;
1858- }
1859-
1860- #ifdef ZTS
1861- tsrm_mutex_lock (cwd_mutex );
1862- #endif
1863-
1864- VCWD_CHDIR (CWDG (cwd ).cwd );
1865- retval = popen (command , type );
1866- VCWD_CHDIR (prev_cwd );
1867-
1868- #ifdef ZTS
1869- tsrm_mutex_unlock (cwd_mutex );
1870- #endif
1871-
1872- return retval ;
1873- }
1874- /* }}} */
18751813#else /* Unix */
18761814CWD_API FILE * virtual_popen (const char * command , const char * type ) /* {{{ */
18771815{
0 commit comments