add missing defines, s/filename_len/filename_length/ (thanks steph) - now over to the windows box and debug this properly

This commit is contained in:
Greg Beaver 2008-01-12 02:13:52 +00:00
parent dc07ea8416
commit 67a15e332f
2 changed files with 16 additions and 2 deletions

View File

@ -8,6 +8,7 @@ PHP_ARG_WITH(phar-zip, for zip-based phar support,
[ --without-phar-zip PHAR: Disable zip-based phar archive support], no, no)
if test "$PHP_PHAR" != "no"; then
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared)
AC_MSG_CHECKING([for zip-based phar support])
if test "$PHP_PHAR_ZIP" != "yes"; then
AC_MSG_RESULT([yes])
@ -29,10 +30,10 @@ if test "$PHP_PHAR" != "no"; then
lib/zip_unchange_archive.c lib/zip_memdup.c lib/zip_stat_init.c lib/zip_add_dir.c \
lib/zip_error_clear.c lib/zip_file_error_clear.c"
AC_DEFINE(HAVE_PHAR_ZIP,1,[ ])
PHP_ADD_EXTENSION_DEP(phar, zip, false)
else
AC_MSG_RESULT([no])
fi
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c $PHP_PHAR_SOURCES, $ext_shared)
PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
PHP_SUBST(PHAR_SHARED_LIBADD)
PHP_ADD_EXTENSION_DEP(phar, zlib, true)

View File

@ -366,6 +366,19 @@ skip_phar:
return;
}
#ifndef S_ISDIR
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISREG
#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
#endif
#ifndef S_ISLNK
#define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
#endif
#define S_IXROOT ( S_IXUSR | S_IXGRP | S_IXOTH )
#define IS_LINK_OPERATION(__t) ((__t) == FS_TYPE || (__t) == FS_IS_LINK || (__t) == FS_LSTAT)
#define IS_EXISTS_CHECK(__t) ((__t) == FS_EXISTS || (__t) == FS_IS_W || (__t) == FS_IS_R || (__t) == FS_IS_X || (__t) == FS_IS_FILE || (__t) == FS_IS_DIR || (__t) == FS_IS_LINK)
#define IS_ABLE_CHECK(__t) ((__t) == FS_IS_R || (__t) == FS_IS_W || (__t) == FS_IS_X)
@ -554,7 +567,7 @@ PHPAPI void phar_file_stat(const char *filename, php_stat_len filename_length, i
RETURN_FALSE;
}
if (!IS_ABSOLUTE_PATH(filename, filename_len)) {
if (!IS_ABSOLUTE_PATH(filename, filename_length)) {
char *arch, *entry, *fname;
int arch_len, entry_len, fname_len;
fname = zend_get_executed_filename(TSRMLS_C);