Skip to content

Commit

Permalink
PHP 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorromeo committed Nov 26, 2020
1 parent 7e314b1 commit 635dbe9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 8 additions & 0 deletions php_proctitle.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
#ifndef PHP_PROCTITLE_H
#define PHP_PROCTITLE_H

#if PHP_MAJOR_VERSION >= 8
#define TSRMLS_CC
#define TSRMLS_C
#define TSRMLS_DC
#define TSRMLS_D
#define TSRMLS_FETCH()
#endif

#define PHP_PROCTITLE_VERSION "@PACKAGE_VERSION@"

extern zend_module_entry proctitle_module_entry;
Expand Down
5 changes: 1 addition & 4 deletions proctitle.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#endif

#include <php.h>
#include "ext/standard/info.h"
#include <SAPI.h>
#include <dlfcn.h>
#include <string.h>
Expand Down Expand Up @@ -134,9 +135,7 @@ PHP_MINFO_FUNCTION(proctitle)
/* {{{ proctitle_module_entry
*/
zend_module_entry proctitle_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
"proctitle",
proctitle_functions,
#ifndef PHP_SYSTEM_PROVIDES_SETPROCTITLE
Expand All @@ -148,9 +147,7 @@ zend_module_entry proctitle_module_entry = {
NULL,
NULL,
PHP_MINFO(proctitle),
#if ZEND_MODULE_API_NO >= 20010901
PHP_PROCTITLE_VERSION,
#endif
STANDARD_MODULE_PROPERTIES
};
/* }}} */
Expand Down

0 comments on commit 635dbe9

Please sign in to comment.