diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | REFLECTION | 111 | ||||
-rw-r--r-- | php-smbclient.spec | 16 | ||||
-rw-r--r-- | smbclient-stub.patch | 881 |
4 files changed, 964 insertions, 46 deletions
@@ -1,5 +1,5 @@ clog -libsmbclient-php-phpunit.xml +smbclient-phpunit.xml package-*.xml *.tgz *.tar.bz2 @@ -38,11 +38,13 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { - Parameters [0] { } + - Return [ string ] } Function [ <internal:smbclient> function smbclient_library_version ] { - Parameters [0] { } + - Return [ string ] } Function [ <internal:smbclient> function smbclient_state_new ] { @@ -53,35 +55,38 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { - Parameters [4] { Parameter #0 [ <required> $state ] - Parameter #1 [ <optional> $workgroup = <default> ] - Parameter #2 [ <optional> $user = <default> ] - Parameter #3 [ <optional> $password = <default> ] + Parameter #1 [ <optional> string $workgroup = null ] + Parameter #2 [ <optional> string $user = null ] + Parameter #3 [ <optional> string $password = null ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_state_errno ] { - Parameters [1] { Parameter #0 [ <required> $state ] } + - Return [ int ] } Function [ <internal:smbclient> function smbclient_state_free ] { - Parameters [1] { Parameter #0 [ <required> $state ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_option_get ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $option ] + Parameter #1 [ <required> int $option ] } } Function [ <internal:smbclient> function smbclient_option_set ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $option ] + Parameter #1 [ <required> int $option ] Parameter #2 [ <required> $value ] } } @@ -89,15 +94,16 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <optional> $minproto = <default> ] - Parameter #2 [ <optional> $maxproto = <default> ] + Parameter #1 [ <optional> string $minproto = null ] + Parameter #2 [ <optional> string $maxproto = null ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_opendir ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } } Function [ <internal:smbclient> function smbclient_readdir ] { @@ -106,6 +112,7 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $dir ] } + - Return [ array|false ] } Function [ <internal:smbclient> function smbclient_closedir ] { @@ -113,13 +120,15 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $dir ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_stat ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } + - Return [ array|false ] } Function [ <internal:smbclient> function smbclient_fstat ] { @@ -127,22 +136,23 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] } + - Return [ array|false ] } Function [ <internal:smbclient> function smbclient_open ] { - Parameters [4] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <required> $flags ] - Parameter #3 [ <optional> $mode = <default> ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <required> string $flags ] + Parameter #3 [ <optional> int $mode = 0666 ] } } Function [ <internal:smbclient> function smbclient_creat ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <optional> $mode = <default> ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <optional> int $mode = 0666 ] } } Function [ <internal:smbclient> function smbclient_read ] { @@ -150,8 +160,9 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { - Parameters [3] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] - Parameter #2 [ <required> $count ] + Parameter #2 [ <required> int $count ] } + - Return [ string|false ] } Function [ <internal:smbclient> function smbclient_close ] { @@ -159,120 +170,135 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_mkdir ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <optional> $mode = <default> ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <optional> int $mode = 0666 ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_rmdir ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_rename ] { - Parameters [4] { Parameter #0 [ <required> $oldstate ] - Parameter #1 [ <required> $oldpath ] - Parameter #2 [ <required> $oldstate ] - Parameter #3 [ <required> $oldpath ] + Parameter #1 [ <required> string $oldpath ] + Parameter #2 [ <required> $newstate ] + Parameter #3 [ <required> string $newpath ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_write ] { - Parameters [4] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] - Parameter #2 [ <required> $buffer ] - Parameter #3 [ <optional> $count = <default> ] + Parameter #2 [ <required> string $buffer ] + Parameter #3 [ <optional> int $count = 0 ] } + - Return [ int|false ] } Function [ <internal:smbclient> function smbclient_unlink ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_lseek ] { - Parameters [4] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] - Parameter #2 [ <required> $offset ] - Parameter #3 [ <required> $whence ] + Parameter #2 [ <required> int $offset ] + Parameter #3 [ <required> int $whence ] } + - Return [ int|false ] } Function [ <internal:smbclient> function smbclient_ftruncate ] { - Parameters [3] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] - Parameter #2 [ <required> $offset ] + Parameter #2 [ <required> int $offset ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_chmod ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <optional> $mode = <default> ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <required> int $mode ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_utimes ] { - Parameters [4] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <required> $mtime ] - Parameter #3 [ <required> $atime ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <optional> int $mtime = -1 ] + Parameter #3 [ <optional> int $atime = -1 ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_listxattr ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } + - Return [ array|false ] } Function [ <internal:smbclient> function smbclient_getxattr ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <required> $name ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <required> string $name ] } + - Return [ string|false ] } Function [ <internal:smbclient> function smbclient_setxattr ] { - Parameters [5] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <required> $name ] - Parameter #3 [ <required> $value ] - Parameter #4 [ <optional> $flags = <default> ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <required> string $name ] + Parameter #3 [ <required> string $value ] + Parameter #4 [ <optional> int $flags = 0 ] } + - Return [ string|false ] } Function [ <internal:smbclient> function smbclient_removexattr ] { - Parameters [3] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] - Parameter #2 [ <required> $name ] + Parameter #1 [ <required> string $path ] + Parameter #2 [ <required> string $name ] } + - Return [ bool ] } Function [ <internal:smbclient> function smbclient_statvfs ] { - Parameters [2] { Parameter #0 [ <required> $state ] - Parameter #1 [ <required> $path ] + Parameter #1 [ <required> string $path ] } + - Return [ array|false ] } Function [ <internal:smbclient> function smbclient_fstatvfs ] { @@ -280,6 +306,7 @@ Extension [ <persistent> extension #120 smbclient version 1.0.6 ] { Parameter #0 [ <required> $state ] Parameter #1 [ <required> $file ] } + - Return [ array|false ] } } } diff --git a/php-smbclient.spec b/php-smbclient.spec index 4008a72..6a7fcde 100644 --- a/php-smbclient.spec +++ b/php-smbclient.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-smbclient # -# Copyright (c) 2015-2020 Remi Collet +# Copyright (c) 2015-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -39,7 +39,7 @@ Version: 1.0.6 %if 0%{?gh_date} Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif Summary: PHP wrapper for libsmbclient @@ -52,9 +52,11 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif %if %{with_tests} -Source2: %{gh_project}-phpunit.xml +Source2: %{pecl_name}-phpunit.xml %endif +Patch0: %{pecl_name}-stub.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear @@ -101,6 +103,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} <= %{version} +%endif %endif @@ -127,6 +132,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 + # Check extension version ver=$(sed -n '/define PHP_SMBCLIENT_VERSION/{s/.* "//;s/".*$//;p}' php_smbclient.h) if test "$ver" != "%{version}%{?prever}%{?gh_date:-dev}"; then @@ -244,6 +251,9 @@ fi %changelog +* Mon Feb 7 2022 Remi Collet <remi@remirepo.net> - 1.0.6-6 +- add fix from https://github.com/eduardok/libsmbclient-php/pull/94 + * Mon Mar 1 2021 Remi Collet <remi@remirepo.net> - 1.0.6-1 - update to 1.0.6 diff --git a/smbclient-stub.patch b/smbclient-stub.patch new file mode 100644 index 0000000..571ad1f --- /dev/null +++ b/smbclient-stub.patch @@ -0,0 +1,881 @@ +From 4b17fed6363c109ef34baebce1e367acd97a3c13 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 7 Feb 2022 16:43:42 +0100 +Subject: [PATCH] generate arginfo from stub - fix smbclient_rename parameters + name - fix smbclient_chmod, mode is required - fix smbclient_utimes: mtime + and atime are optional + +--- + package.xml | 3 + + smbclient.c | 164 +----------------------- + smbclient.stub.php | 189 ++++++++++++++++++++++++++++ + smbclient_arginfo.h | 249 +++++++++++++++++++++++++++++++++++++ + smbclient_legacy_arginfo.h | 226 +++++++++++++++++++++++++++++++++ + 5 files changed, 671 insertions(+), 160 deletions(-) + create mode 100644 smbclient.stub.php + create mode 100644 smbclient_arginfo.h + create mode 100644 smbclient_legacy_arginfo.h + +diff --git a/smbclient.c b/smbclient.c +index a63bad4..6b98693 100644 +--- a/smbclient.c ++++ b/smbclient.c +@@ -147,172 +147,16 @@ hide_password (char *url, int len) + astfill(second_colon + 1, at_sign - 1); + } + +-/* {{{ arginfo */ +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_void, 0) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_state_init, 0, 0, 1) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, workgroup) +- ZEND_ARG_INFO(0, user) +- ZEND_ARG_INFO(0, password) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_state, 0) +- ZEND_ARG_INFO(0, state) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_option_get, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, option) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_option_set, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, option) +- ZEND_ARG_INFO(0, value) +-ZEND_END_ARG_INFO() +- +-#if HAVE_SMBC_SETOPTIONPROTOCOLS +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_client_protocols, 0, 0, 1) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, minproto) +- ZEND_ARG_INFO(0, maxproto) +-ZEND_END_ARG_INFO() +-#endif +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_path, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_rename, 0) +- ZEND_ARG_INFO(0, oldstate) +- ZEND_ARG_INFO(0, oldpath) +- ZEND_ARG_INFO(0, oldstate) +- ZEND_ARG_INFO(0, oldpath) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_dir, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, dir) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_file, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, file) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_read, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, file) +- ZEND_ARG_INFO(0, count) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_open, 0, 0, 3) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +- ZEND_ARG_INFO(0, flags) +- ZEND_ARG_INFO(0, mode) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_creat, 0, 0, 2) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +- ZEND_ARG_INFO(0, mode) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_write, 0, 0, 3) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, file) +- ZEND_ARG_INFO(0, buffer) +- ZEND_ARG_INFO(0, count) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_lseek, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, file) +- ZEND_ARG_INFO(0, offset) +- ZEND_ARG_INFO(0, whence) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_ftruncate, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, file) +- ZEND_ARG_INFO(0, offset) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_utimes, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +- ZEND_ARG_INFO(0, mtime) +- ZEND_ARG_INFO(0, atime) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO(arginfo_smbclient_getxattr, 0) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +- ZEND_ARG_INFO(0, name) +-ZEND_END_ARG_INFO() +- +-ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_setxattr, 0, 0, 4) +- ZEND_ARG_INFO(0, state) +- ZEND_ARG_INFO(0, path) +- ZEND_ARG_INFO(0, name) +- ZEND_ARG_INFO(0, value) +- ZEND_ARG_INFO(0, flags) +-ZEND_END_ARG_INFO() +- +-/* }}} */ +- +-static zend_function_entry smbclient_functions[] = +-{ +- PHP_FE(smbclient_version, arginfo_smbclient_void) +- PHP_FE(smbclient_library_version, arginfo_smbclient_void) +- PHP_FE(smbclient_state_new, arginfo_smbclient_void) +- PHP_FE(smbclient_state_init, arginfo_smbclient_state_init) +- PHP_FE(smbclient_state_errno, arginfo_smbclient_state) +- PHP_FE(smbclient_state_free, arginfo_smbclient_state) +- PHP_FE(smbclient_option_get, arginfo_smbclient_option_get) +- PHP_FE(smbclient_option_set, arginfo_smbclient_option_set) +-#if HAVE_SMBC_SETOPTIONPROTOCOLS +- PHP_FE(smbclient_client_protocols, arginfo_smbclient_client_protocols) +-#endif +- PHP_FE(smbclient_opendir, arginfo_smbclient_path) +- PHP_FE(smbclient_readdir, arginfo_smbclient_dir) +- PHP_FE(smbclient_closedir, arginfo_smbclient_dir) +- PHP_FE(smbclient_stat, arginfo_smbclient_path) +- PHP_FE(smbclient_fstat, arginfo_smbclient_file) +- PHP_FE(smbclient_open, arginfo_smbclient_open) +- PHP_FE(smbclient_creat, arginfo_smbclient_creat) +- PHP_FE(smbclient_read, arginfo_smbclient_read) +- PHP_FE(smbclient_close, arginfo_smbclient_file) +- PHP_FE(smbclient_mkdir, arginfo_smbclient_creat) +- PHP_FE(smbclient_rmdir, arginfo_smbclient_path) +- PHP_FE(smbclient_rename, arginfo_smbclient_rename) +- PHP_FE(smbclient_write, arginfo_smbclient_write) +- PHP_FE(smbclient_unlink, arginfo_smbclient_path) +- PHP_FE(smbclient_lseek, arginfo_smbclient_lseek) +- PHP_FE(smbclient_ftruncate, arginfo_smbclient_ftruncate) +- PHP_FE(smbclient_chmod, arginfo_smbclient_creat) +- PHP_FE(smbclient_utimes, arginfo_smbclient_utimes) +- PHP_FE(smbclient_listxattr, arginfo_smbclient_path) +- PHP_FE(smbclient_getxattr, arginfo_smbclient_getxattr) +- PHP_FE(smbclient_setxattr, arginfo_smbclient_setxattr) +- PHP_FE(smbclient_removexattr, arginfo_smbclient_getxattr) +- PHP_FE(smbclient_statvfs, arginfo_smbclient_path) +- PHP_FE(smbclient_fstatvfs, arginfo_smbclient_file) +-#ifdef PHP_FE_END +- PHP_FE_END ++#if PHP_VERSION_ID < 80000 ++#include "smbclient_legacy_arginfo.h" + #else +- {NULL, NULL, NULL} ++#include "smbclient_arginfo.h" + #endif +-}; + + zend_module_entry smbclient_module_entry = + { STANDARD_MODULE_HEADER + , "smbclient" /* name */ +- , smbclient_functions /* functions */ ++ , ext_functions /* functions */ + , PHP_MINIT(smbclient) /* module_startup_func */ + , PHP_MSHUTDOWN(smbclient) /* module_shutdown_func */ + , PHP_RINIT(smbclient) /* request_startup_func */ +diff --git a/smbclient.stub.php b/smbclient.stub.php +new file mode 100644 +index 0000000..65f5fad +--- /dev/null ++++ b/smbclient.stub.php +@@ -0,0 +1,189 @@ ++<?php ++ ++/** ++ * @generate-function-entries ++ * @generate-legacy-arginfo ++ */ ++ ++function smbclient_version(): string {} ++ ++function smbclient_library_version(): string {} ++ ++/** ++ * @return false|resource ++ */ ++function smbclient_state_new() {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_state_init($state, string $workgroup=null, string $user=null, string $password=null): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_state_errno($state): int {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_state_free($state): bool {} ++ ++/** ++ * @param resource $state ++ * @return mixed ++ */ ++function smbclient_option_get($state, int $option) {} ++ ++/** ++ * @param resource $state ++ * @param mixed $value ++ * @return mixed ++ */ ++function smbclient_option_set($state, int $option, $value) {} ++ ++ ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++/** ++ * @param resource $state ++ * @param mixed $value ++ * @return mixed ++ */ ++function smbclient_client_protocols($state, string $minproto=null, string $maxproto=null): bool {} ++#endif ++ ++/** ++ * @param resource $state ++ * @return false|resource ++ */ ++function smbclient_opendir($state, string $path) {} ++ ++/** ++ * @param resource $state ++ * @param resource $dir ++ */ ++function smbclient_readdir($state, $dir): false|array {} ++ ++/** ++ * @param resource $state ++ * @param resource $dir ++ */ ++function smbclient_closedir($state, $dir): bool {} ++ ++/** ++ * @param resource $state ++ * @return false|resource ++ */ ++function smbclient_stat($state, string $path): false|array {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_fstat($state, $file): false|array {} ++ ++/** ++ * @param resource $state ++ * @return false|resource ++ */ ++function smbclient_open($state, string $path, string $flags, int $mode=0666) {} ++ ++/** ++ * @param resource $state ++ * @return false|resource ++ */ ++function smbclient_creat($state, string $path, int $mode=0666) {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_read($state, $file, int $count): false|string {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_close($state, $file): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_mkdir($state, string $path, int $mode=0666): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_rmdir($state, string $path): bool {} ++ ++/** ++ * @param resource $oldstate ++ * @param resource $newstate ++ */ ++function smbclient_rename($oldstate, string $oldpath, $newstate, string $newpath): bool {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_write($state, $file, string $buffer, int $count=0): false|int {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_unlink($state, string $path): bool {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_lseek($state, $file, int $offset, int $whence): false|int {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_ftruncate($state, $file, int $offset): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_chmod($state, string $path, int $mode): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_utimes($state, string $path, int $mtime=-1, int $atime=-1): bool {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_listxattr($state, string $path): false|array {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_getxattr($state, string $path, string $name): false|string {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_setxattr($state, string $path, string $name, string $value, int $flags=0): false|string {} ++ ++/** ++ * @param resource $state ++ */ ++function smbclient_removexattr($state, string $path, string $name): bool {} ++ ++/** ++ * @param resource $state ++ * @return false|resource ++ */ ++function smbclient_statvfs($state, string $path): false|array {} ++ ++/** ++ * @param resource $state ++ * @param resource $file ++ */ ++function smbclient_fstatvfs($state, $file): false|array {} ++ +diff --git a/smbclient_arginfo.h b/smbclient_arginfo.h +new file mode 100644 +index 0000000..c5f091a +--- /dev/null ++++ b/smbclient_arginfo.h +@@ -0,0 +1,249 @@ ++/* This is a generated file, edit the .stub.php file instead. ++ * Stub hash: 6abe27ac2cfb259cc835af1bafe32bb639c422b1 */ ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_version, 0, 0, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_library_version arginfo_smbclient_version ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_state_new, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_state_init, 0, 1, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, workgroup, IS_STRING, 0, "null") ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, user, IS_STRING, 0, "null") ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, password, IS_STRING, 0, "null") ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_state_errno, 0, 1, IS_LONG, 0) ++ ZEND_ARG_INFO(0, state) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_state_free, 0, 1, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_option_get, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_option_set, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, option, IS_LONG, 0) ++ ZEND_ARG_INFO(0, value) ++ZEND_END_ARG_INFO() ++ ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_client_protocols, 0, 1, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, minproto, IS_STRING, 0, "null") ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, maxproto, IS_STRING, 0, "null") ++ZEND_END_ARG_INFO() ++#endif ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_opendir, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_readdir, 0, 2, MAY_BE_FALSE|MAY_BE_ARRAY) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, dir) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_closedir, 0, 2, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, dir) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_stat, 0, 2, MAY_BE_FALSE|MAY_BE_ARRAY) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_fstat, 0, 2, MAY_BE_FALSE|MAY_BE_ARRAY) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_open, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, flags, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0666") ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_creat, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0666") ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_read, 0, 3, MAY_BE_FALSE|MAY_BE_STRING) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_TYPE_INFO(0, count, IS_LONG, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_close, 0, 2, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_mkdir, 0, 2, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mode, IS_LONG, 0, "0666") ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_rmdir, 0, 2, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_rename, 0, 4, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, oldstate) ++ ZEND_ARG_TYPE_INFO(0, oldpath, IS_STRING, 0) ++ ZEND_ARG_INFO(0, newstate) ++ ZEND_ARG_TYPE_INFO(0, newpath, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_write, 0, 3, MAY_BE_FALSE|MAY_BE_LONG) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, count, IS_LONG, 0, "0") ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_unlink arginfo_smbclient_rmdir ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_lseek, 0, 4, MAY_BE_FALSE|MAY_BE_LONG) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ++ ZEND_ARG_TYPE_INFO(0, whence, IS_LONG, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_ftruncate, 0, 3, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_TYPE_INFO(0, offset, IS_LONG, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_chmod, 0, 3, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_utimes, 0, 2, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mtime, IS_LONG, 0, "-1") ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, atime, IS_LONG, 0, "-1") ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_listxattr arginfo_smbclient_stat ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_getxattr, 0, 3, MAY_BE_FALSE|MAY_BE_STRING) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_smbclient_setxattr, 0, 4, MAY_BE_FALSE|MAY_BE_STRING) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_smbclient_removexattr, 0, 3, _IS_BOOL, 0) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_TYPE_INFO(0, path, IS_STRING, 0) ++ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_statvfs arginfo_smbclient_stat ++ ++#define arginfo_smbclient_fstatvfs arginfo_smbclient_fstat ++ ++ ++ZEND_FUNCTION(smbclient_version); ++ZEND_FUNCTION(smbclient_library_version); ++ZEND_FUNCTION(smbclient_state_new); ++ZEND_FUNCTION(smbclient_state_init); ++ZEND_FUNCTION(smbclient_state_errno); ++ZEND_FUNCTION(smbclient_state_free); ++ZEND_FUNCTION(smbclient_option_get); ++ZEND_FUNCTION(smbclient_option_set); ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ZEND_FUNCTION(smbclient_client_protocols); ++#endif ++ZEND_FUNCTION(smbclient_opendir); ++ZEND_FUNCTION(smbclient_readdir); ++ZEND_FUNCTION(smbclient_closedir); ++ZEND_FUNCTION(smbclient_stat); ++ZEND_FUNCTION(smbclient_fstat); ++ZEND_FUNCTION(smbclient_open); ++ZEND_FUNCTION(smbclient_creat); ++ZEND_FUNCTION(smbclient_read); ++ZEND_FUNCTION(smbclient_close); ++ZEND_FUNCTION(smbclient_mkdir); ++ZEND_FUNCTION(smbclient_rmdir); ++ZEND_FUNCTION(smbclient_rename); ++ZEND_FUNCTION(smbclient_write); ++ZEND_FUNCTION(smbclient_unlink); ++ZEND_FUNCTION(smbclient_lseek); ++ZEND_FUNCTION(smbclient_ftruncate); ++ZEND_FUNCTION(smbclient_chmod); ++ZEND_FUNCTION(smbclient_utimes); ++ZEND_FUNCTION(smbclient_listxattr); ++ZEND_FUNCTION(smbclient_getxattr); ++ZEND_FUNCTION(smbclient_setxattr); ++ZEND_FUNCTION(smbclient_removexattr); ++ZEND_FUNCTION(smbclient_statvfs); ++ZEND_FUNCTION(smbclient_fstatvfs); ++ ++ ++static const zend_function_entry ext_functions[] = { ++ ZEND_FE(smbclient_version, arginfo_smbclient_version) ++ ZEND_FE(smbclient_library_version, arginfo_smbclient_library_version) ++ ZEND_FE(smbclient_state_new, arginfo_smbclient_state_new) ++ ZEND_FE(smbclient_state_init, arginfo_smbclient_state_init) ++ ZEND_FE(smbclient_state_errno, arginfo_smbclient_state_errno) ++ ZEND_FE(smbclient_state_free, arginfo_smbclient_state_free) ++ ZEND_FE(smbclient_option_get, arginfo_smbclient_option_get) ++ ZEND_FE(smbclient_option_set, arginfo_smbclient_option_set) ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ ZEND_FE(smbclient_client_protocols, arginfo_smbclient_client_protocols) ++#endif ++ ZEND_FE(smbclient_opendir, arginfo_smbclient_opendir) ++ ZEND_FE(smbclient_readdir, arginfo_smbclient_readdir) ++ ZEND_FE(smbclient_closedir, arginfo_smbclient_closedir) ++ ZEND_FE(smbclient_stat, arginfo_smbclient_stat) ++ ZEND_FE(smbclient_fstat, arginfo_smbclient_fstat) ++ ZEND_FE(smbclient_open, arginfo_smbclient_open) ++ ZEND_FE(smbclient_creat, arginfo_smbclient_creat) ++ ZEND_FE(smbclient_read, arginfo_smbclient_read) ++ ZEND_FE(smbclient_close, arginfo_smbclient_close) ++ ZEND_FE(smbclient_mkdir, arginfo_smbclient_mkdir) ++ ZEND_FE(smbclient_rmdir, arginfo_smbclient_rmdir) ++ ZEND_FE(smbclient_rename, arginfo_smbclient_rename) ++ ZEND_FE(smbclient_write, arginfo_smbclient_write) ++ ZEND_FE(smbclient_unlink, arginfo_smbclient_unlink) ++ ZEND_FE(smbclient_lseek, arginfo_smbclient_lseek) ++ ZEND_FE(smbclient_ftruncate, arginfo_smbclient_ftruncate) ++ ZEND_FE(smbclient_chmod, arginfo_smbclient_chmod) ++ ZEND_FE(smbclient_utimes, arginfo_smbclient_utimes) ++ ZEND_FE(smbclient_listxattr, arginfo_smbclient_listxattr) ++ ZEND_FE(smbclient_getxattr, arginfo_smbclient_getxattr) ++ ZEND_FE(smbclient_setxattr, arginfo_smbclient_setxattr) ++ ZEND_FE(smbclient_removexattr, arginfo_smbclient_removexattr) ++ ZEND_FE(smbclient_statvfs, arginfo_smbclient_statvfs) ++ ZEND_FE(smbclient_fstatvfs, arginfo_smbclient_fstatvfs) ++ ZEND_FE_END ++}; +diff --git a/smbclient_legacy_arginfo.h b/smbclient_legacy_arginfo.h +new file mode 100644 +index 0000000..dd58e7a +--- /dev/null ++++ b/smbclient_legacy_arginfo.h +@@ -0,0 +1,226 @@ ++/* This is a generated file, edit the .stub.php file instead. ++ * Stub hash: 6abe27ac2cfb259cc835af1bafe32bb639c422b1 */ ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_version, 0, 0, 0) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_library_version arginfo_smbclient_version ++ ++#define arginfo_smbclient_state_new arginfo_smbclient_version ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_state_init, 0, 0, 1) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, workgroup) ++ ZEND_ARG_INFO(0, user) ++ ZEND_ARG_INFO(0, password) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_state_errno, 0, 0, 1) ++ ZEND_ARG_INFO(0, state) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_state_free arginfo_smbclient_state_errno ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_option_get, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, option) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_option_set, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, option) ++ ZEND_ARG_INFO(0, value) ++ZEND_END_ARG_INFO() ++ ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_client_protocols, 0, 0, 1) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, minproto) ++ ZEND_ARG_INFO(0, maxproto) ++ZEND_END_ARG_INFO() ++#endif ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_opendir, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_readdir, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, dir) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_closedir arginfo_smbclient_readdir ++ ++#define arginfo_smbclient_stat arginfo_smbclient_opendir ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_fstat, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_open, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, flags) ++ ZEND_ARG_INFO(0, mode) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_creat, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, mode) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_read, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_INFO(0, count) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_close arginfo_smbclient_fstat ++ ++#define arginfo_smbclient_mkdir arginfo_smbclient_creat ++ ++#define arginfo_smbclient_rmdir arginfo_smbclient_opendir ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_rename, 0, 0, 4) ++ ZEND_ARG_INFO(0, oldstate) ++ ZEND_ARG_INFO(0, oldpath) ++ ZEND_ARG_INFO(0, newstate) ++ ZEND_ARG_INFO(0, newpath) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_write, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_INFO(0, buffer) ++ ZEND_ARG_INFO(0, count) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_unlink arginfo_smbclient_opendir ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_lseek, 0, 0, 4) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_INFO(0, offset) ++ ZEND_ARG_INFO(0, whence) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_ftruncate, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, file) ++ ZEND_ARG_INFO(0, offset) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_chmod, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, mode) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_utimes, 0, 0, 2) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, mtime) ++ ZEND_ARG_INFO(0, atime) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_listxattr arginfo_smbclient_opendir ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_getxattr, 0, 0, 3) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, name) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO_EX(arginfo_smbclient_setxattr, 0, 0, 4) ++ ZEND_ARG_INFO(0, state) ++ ZEND_ARG_INFO(0, path) ++ ZEND_ARG_INFO(0, name) ++ ZEND_ARG_INFO(0, value) ++ ZEND_ARG_INFO(0, flags) ++ZEND_END_ARG_INFO() ++ ++#define arginfo_smbclient_removexattr arginfo_smbclient_getxattr ++ ++#define arginfo_smbclient_statvfs arginfo_smbclient_opendir ++ ++#define arginfo_smbclient_fstatvfs arginfo_smbclient_fstat ++ ++ ++ZEND_FUNCTION(smbclient_version); ++ZEND_FUNCTION(smbclient_library_version); ++ZEND_FUNCTION(smbclient_state_new); ++ZEND_FUNCTION(smbclient_state_init); ++ZEND_FUNCTION(smbclient_state_errno); ++ZEND_FUNCTION(smbclient_state_free); ++ZEND_FUNCTION(smbclient_option_get); ++ZEND_FUNCTION(smbclient_option_set); ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ZEND_FUNCTION(smbclient_client_protocols); ++#endif ++ZEND_FUNCTION(smbclient_opendir); ++ZEND_FUNCTION(smbclient_readdir); ++ZEND_FUNCTION(smbclient_closedir); ++ZEND_FUNCTION(smbclient_stat); ++ZEND_FUNCTION(smbclient_fstat); ++ZEND_FUNCTION(smbclient_open); ++ZEND_FUNCTION(smbclient_creat); ++ZEND_FUNCTION(smbclient_read); ++ZEND_FUNCTION(smbclient_close); ++ZEND_FUNCTION(smbclient_mkdir); ++ZEND_FUNCTION(smbclient_rmdir); ++ZEND_FUNCTION(smbclient_rename); ++ZEND_FUNCTION(smbclient_write); ++ZEND_FUNCTION(smbclient_unlink); ++ZEND_FUNCTION(smbclient_lseek); ++ZEND_FUNCTION(smbclient_ftruncate); ++ZEND_FUNCTION(smbclient_chmod); ++ZEND_FUNCTION(smbclient_utimes); ++ZEND_FUNCTION(smbclient_listxattr); ++ZEND_FUNCTION(smbclient_getxattr); ++ZEND_FUNCTION(smbclient_setxattr); ++ZEND_FUNCTION(smbclient_removexattr); ++ZEND_FUNCTION(smbclient_statvfs); ++ZEND_FUNCTION(smbclient_fstatvfs); ++ ++ ++static const zend_function_entry ext_functions[] = { ++ ZEND_FE(smbclient_version, arginfo_smbclient_version) ++ ZEND_FE(smbclient_library_version, arginfo_smbclient_library_version) ++ ZEND_FE(smbclient_state_new, arginfo_smbclient_state_new) ++ ZEND_FE(smbclient_state_init, arginfo_smbclient_state_init) ++ ZEND_FE(smbclient_state_errno, arginfo_smbclient_state_errno) ++ ZEND_FE(smbclient_state_free, arginfo_smbclient_state_free) ++ ZEND_FE(smbclient_option_get, arginfo_smbclient_option_get) ++ ZEND_FE(smbclient_option_set, arginfo_smbclient_option_set) ++#if HAVE_SMBC_SETOPTIONPROTOCOLS ++ ZEND_FE(smbclient_client_protocols, arginfo_smbclient_client_protocols) ++#endif ++ ZEND_FE(smbclient_opendir, arginfo_smbclient_opendir) ++ ZEND_FE(smbclient_readdir, arginfo_smbclient_readdir) ++ ZEND_FE(smbclient_closedir, arginfo_smbclient_closedir) ++ ZEND_FE(smbclient_stat, arginfo_smbclient_stat) ++ ZEND_FE(smbclient_fstat, arginfo_smbclient_fstat) ++ ZEND_FE(smbclient_open, arginfo_smbclient_open) ++ ZEND_FE(smbclient_creat, arginfo_smbclient_creat) ++ ZEND_FE(smbclient_read, arginfo_smbclient_read) ++ ZEND_FE(smbclient_close, arginfo_smbclient_close) ++ ZEND_FE(smbclient_mkdir, arginfo_smbclient_mkdir) ++ ZEND_FE(smbclient_rmdir, arginfo_smbclient_rmdir) ++ ZEND_FE(smbclient_rename, arginfo_smbclient_rename) ++ ZEND_FE(smbclient_write, arginfo_smbclient_write) ++ ZEND_FE(smbclient_unlink, arginfo_smbclient_unlink) ++ ZEND_FE(smbclient_lseek, arginfo_smbclient_lseek) ++ ZEND_FE(smbclient_ftruncate, arginfo_smbclient_ftruncate) ++ ZEND_FE(smbclient_chmod, arginfo_smbclient_chmod) ++ ZEND_FE(smbclient_utimes, arginfo_smbclient_utimes) ++ ZEND_FE(smbclient_listxattr, arginfo_smbclient_listxattr) ++ ZEND_FE(smbclient_getxattr, arginfo_smbclient_getxattr) ++ ZEND_FE(smbclient_setxattr, arginfo_smbclient_setxattr) ++ ZEND_FE(smbclient_removexattr, arginfo_smbclient_removexattr) ++ ZEND_FE(smbclient_statvfs, arginfo_smbclient_statvfs) ++ ZEND_FE(smbclient_fstatvfs, arginfo_smbclient_fstatvfs) ++ ZEND_FE_END ++}; |