Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define ulong when building for macOS 10.15.x (Catalina) #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ config.nice
config.status
config.sub
configure
configure.ac
configure.in
include
install-sh
Expand All @@ -32,4 +33,4 @@ tests/*.out
tests/*.php
tests/*.exp
tests/*.log
tests/*.sh
tests/*.sh
14 changes: 9 additions & 5 deletions php_postal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -45,22 +49,22 @@ 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;
char *global_string;
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.
*/
Expand Down