From e4f8b4a4f2dfb439a12c7e931c8255ba770c54e3 Mon Sep 17 00:00:00 2001 From: vicchi Date: Tue, 24 Dec 2019 11:59:54 +0000 Subject: [PATCH 1/2] Add configure.ac to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 91318b6..06f8a94 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ config.nice config.status config.sub configure +configure.ac configure.in include install-sh @@ -32,4 +33,4 @@ tests/*.out tests/*.php tests/*.exp tests/*.log -tests/*.sh \ No newline at end of file +tests/*.sh From e42746e40f85081e05edc3c626a4d5f3d6fad9d6 Mon Sep 17 00:00:00 2001 From: vicchi Date: Tue, 24 Dec 2019 12:01:21 +0000 Subject: [PATCH 2/2] Ensure ulong is defined when building on macOS --- php_postal.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/php_postal.h b/php_postal.h index 5d5eec5..790f6e2 100644 --- a/php_postal.h +++ b/php_postal.h @@ -21,6 +21,10 @@ #ifndef PHP_POSTAL_H #define PHP_POSTAL_H +#ifdef __APPLE__ +typedef unsigned long ulong; +#endif + extern zend_module_entry postal_module_entry; #define phpext_postal_ptr &postal_module_entry @@ -45,9 +49,9 @@ PHP_MINFO_FUNCTION(postal); PHP_METHOD(Expand, expand_address); PHP_METHOD(Parser, parse_address); -/* +/* Declare any global variables you may need between the BEGIN - and END macros here: + and END macros here: ZEND_BEGIN_MODULE_GLOBALS(postal) long global_value; @@ -55,12 +59,12 @@ ZEND_BEGIN_MODULE_GLOBALS(postal) ZEND_END_MODULE_GLOBALS(postal) */ -/* In every utility function you add that needs to use variables - in php_postal_globals, call TSRMLS_FETCH(); after declaring other +/* In every utility function you add that needs to use variables + in php_postal_globals, call TSRMLS_FETCH(); after declaring other variables used by that function, or better yet, pass in TSRMLS_CC after the last function argument and declare your utility function with TSRMLS_DC after the last declared argument. Always refer to - the globals in your function as POSTAL_G(variable). You are + the globals in your function as POSTAL_G(variable). You are encouraged to rename these macros something shorter, see examples in any other php module directory. */