]> granicus.if.org Git - php/commitdiff
add missing defines, s/filename_len/filename_length/ (thanks steph) - now over to...
authorGreg Beaver <cellog@php.net>
Sat, 12 Jan 2008 02:13:52 +0000 (02:13 +0000)
committerGreg Beaver <cellog@php.net>
Sat, 12 Jan 2008 02:13:52 +0000 (02:13 +0000)
ext/phar/config.m4
ext/phar/func_interceptors.c

index b60e121714b757c74d9efc62b4496b3feda82a4e..fb5c8ccc5739afc204a12ba4e86b6152a3578261 100644 (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)
index 1935da0085f6f7651213ec627d00b076fcbb4cfd..c6683d6b6d9902deb222b07b90e170de0d1fc389 100644 (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);