Skip to content

Commit

Permalink
fixed #23 add -Wall compiler option
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed Feb 5, 2019
1 parent 21cb944 commit 3ce0c5c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PHP_ARG_WITH(

if test "$PHP_EXECDIR" != "no"; then
AC_DEFINE(HAVE_EXECDIR, 1, [ ])
CFLAGS="${CFLAGS} -Wall"

PHP_SUBST(LDFLAGS)
PHP_SUBST(CPPFLAGS)
Expand All @@ -35,5 +36,7 @@ if test "$PHP_EXECDIR" != "no"; then
AC_DEFINE([PHP_EXECDIR_COMPAT], [], [Support original system function with _orig suffix])
fi

PHP_NEW_EXTENSION(execdir, php_execdir.c execdirapi.c proc_open.c proc_open5.c proc_open53.c, $ext_shared)
sources="php_execdir.c execdirapi.c proc_open.c proc_open5.c proc_open53.c"

PHP_NEW_EXTENSION(execdir, $sources, $ext_shared,, \\$(CFALGS))
fi
6 changes: 4 additions & 2 deletions php_execdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "php_ini.h"
#include "SAPI.h"
#include "ext/standard/exec.h"
#include "ext/standard/info.h"

#include "php_execdir.h"

Expand Down Expand Up @@ -201,7 +202,6 @@ static int safe_hook_execdir (void) {
int entno = sizeof (execdir_list) / sizeof (char *);
int i, funclen;
char * func;
zend_function * zf;
TSRMLS_FETCH ();

for ( i=0; i<entno; i++ ) {
Expand Down Expand Up @@ -356,6 +356,8 @@ PHP_MINIT_FUNCTION (execdir)
// On cli mode, jailed_shell_cmd does nothing to do.
//if ( strcmp (sapi_module.name, "cli") != 0 )
safe_hook_execdir ();

return SUCCESS;
}
/* }}} */

Expand Down Expand Up @@ -434,9 +436,9 @@ PHP_FUNCTION (passthru_re)
PHP_FUNCTION (shell_exec_re)
{
FILE * in;
size_t total_readbytes;
char * command, * jcommand;
#if PHP_VERSION_ID < 60000
size_t total_readbytes;
int command_len;
char * ret;
#else
Expand Down

0 comments on commit 3ce0c5c

Please sign in to comment.