53
53
# endif
54
54
#endif
55
55
56
- #ifdef NETWARE
57
- #include <fsio.h>
58
- #endif
59
-
60
56
#ifndef HAVE_REALPATH
61
57
#define realpath (x ,y ) strcpy(y,x)
62
58
#endif
65
61
66
62
#include "TSRM.h"
67
63
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 )
70
66
MUTEX_T cwd_mutex ;
71
67
#endif
72
68
@@ -407,23 +403,12 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
407
403
char cwd [MAXPATHLEN ];
408
404
char * result ;
409
405
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
+
422
407
#ifdef ZEND_WIN32
423
408
ZeroMemory (& cwd , sizeof (cwd ));
424
409
#endif
425
410
result = getcwd (cwd , sizeof (cwd ));
426
- #endif
411
+
427
412
if (!result ) {
428
413
cwd [0 ] = '\0' ;
429
414
}
@@ -442,7 +427,7 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
442
427
cwd_globals_ctor (& cwd_globals );
443
428
#endif
444
429
445
- #if (defined(ZEND_WIN32 ) || defined( NETWARE ) ) && defined(ZTS )
430
+ #if (defined(ZEND_WIN32 )) && defined(ZTS )
446
431
cwd_mutex = tsrm_mutex_alloc ();
447
432
#endif
448
433
}
@@ -453,7 +438,7 @@ CWD_API void virtual_cwd_shutdown(void) /* {{{ */
453
438
#ifndef ZTS
454
439
cwd_globals_dtor (& cwd_globals );
455
440
#endif
456
- #if (defined(ZEND_WIN32 ) || defined( NETWARE ) ) && defined(ZTS )
441
+ #if (defined(ZEND_WIN32 )) && defined(ZTS )
457
442
tsrm_mutex_free (cwd_mutex );
458
443
#endif
459
444
@@ -1054,11 +1039,6 @@ static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, i
1054
1039
return -1 ;
1055
1040
}
1056
1041
}
1057
-
1058
- #elif defined(NETWARE)
1059
- save = 0 ;
1060
- tmp = do_alloca (len + 1 , use_heap );
1061
- memcpy (tmp , path , len + 1 );
1062
1042
#else
1063
1043
if (save && php_sys_lstat (path , & st ) < 0 ) {
1064
1044
if (use_realpath == CWD_REALPATH ) {
@@ -1296,18 +1276,6 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
1296
1276
resolved_path [2 ] = DEFAULT_SLASH ;
1297
1277
start = 3 ;
1298
1278
}
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
- }
1311
1279
#endif
1312
1280
1313
1281
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) /* {{{ */
1595
1563
}
1596
1564
/* }}} */
1597
1565
1598
- #if !defined(ZEND_WIN32 ) && !defined( NETWARE )
1566
+ #if !defined(ZEND_WIN32 )
1599
1567
CWD_API int virtual_chown (const char * filename , uid_t owner , gid_t group , int link ) /* {{{ */
1600
1568
{
1601
1569
cwd_state new_state ;
@@ -1842,36 +1810,6 @@ CWD_API FILE *virtual_popen(const char *command, const char *type) /* {{{ */
1842
1810
return popen_ex (command , type , CWDG (cwd ).cwd , NULL );
1843
1811
}
1844
1812
/* }}} */
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
- /* }}} */
1875
1813
#else /* Unix */
1876
1814
CWD_API FILE * virtual_popen (const char * command , const char * type ) /* {{{ */
1877
1815
{
0 commit comments