From 212b2834e9fbcb9a48b9cb709713b6cb197607cc Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 29 Jun 2024 23:25:17 +0200 Subject: [PATCH] Autotools: Sync indentation style in build system files (#14725) --- Zend/Zend.m4 | 2 +- build/php.m4 | 8 +- ext/dba/config.m4 | 64 +++++++-------- ext/json/config.m4 | 10 +-- ext/opcache/config.m4 | 36 ++++----- ext/standard/config.m4 | 134 +++++++++++++++---------------- sapi/fpm/config.m4 | 14 ++-- sapi/phpdbg/config.m4 | 18 ++--- scripts/dev/check_parameters.php | 4 +- scripts/phpize.in | 8 +- 10 files changed, 149 insertions(+), 149 deletions(-) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index c9a85015b7a..4ec1b5518e7 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -173,7 +173,7 @@ if test "$ZEND_DEBUG" = "yes"; then AC_DEFINE(ZEND_DEBUG,1,[ ]) echo " $CFLAGS" | grep ' -g' >/dev/null || DEBUG_CFLAGS="-g" if test "$CFLAGS" = "-g -O2"; then - CFLAGS=-g + CFLAGS=-g fi else AC_DEFINE(ZEND_DEBUG,0,[ ]) diff --git a/build/php.m4 b/build/php.m4 index 5f1700e33de..fea49a7fefc 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -1022,10 +1022,10 @@ $3 int main(void) { - FILE *fp = fopen("conftestval", "w"); - if (!fp) return(1); - fprintf(fp, "%d\n", sizeof($1)); - return(0); + FILE *fp = fopen("conftestval", "w"); + if (!fp) return(1); + fprintf(fp, "%d\n", sizeof($1)); + return(0); } ]])], [ eval $php_cache_value=`cat conftestval` diff --git a/ext/dba/config.m4 b/ext/dba/config.m4 index 2fda2d589d2..920b8914052 100644 --- a/ext/dba/config.m4 +++ b/ext/dba/config.m4 @@ -233,25 +233,25 @@ dnl TCADB if test "$PHP_TCADB" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_TCADB /usr/local /usr; do - if test -f "$i/include/tcadb.h"; then - THIS_PREFIX=$i - PHP_ADD_INCLUDE($THIS_PREFIX/include) - THIS_INCLUDE=$i/include/tcadb.h - break - fi + if test -f "$i/include/tcadb.h"; then + THIS_PREFIX=$i + PHP_ADD_INCLUDE($THIS_PREFIX/include) + THIS_INCLUDE=$i/include/tcadb.h + break + fi done if test -n "$THIS_INCLUDE"; then - for LIB in tokyocabinet; do - PHP_CHECK_LIBRARY($LIB, tcadbopen, [ - AC_DEFINE_UNQUOTED(TCADB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_TCADB, 1, [ ]) - THIS_LIBS=$LIB - ], [], [-L$THIS_PREFIX/$PHP_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi - done + for LIB in tokyocabinet; do + PHP_CHECK_LIBRARY($LIB, tcadbopen, [ + AC_DEFINE_UNQUOTED(TCADB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) + AC_DEFINE(DBA_TCADB, 1, [ ]) + THIS_LIBS=$LIB + ], [], [-L$THIS_PREFIX/$PHP_LIBDIR]) + if test -n "$THIS_LIBS"; then + break + fi + done fi PHP_DBA_STD_ASSIGN @@ -264,25 +264,25 @@ dnl LMDB if test "$PHP_LMDB" != "no"; then PHP_DBA_STD_BEGIN for i in $PHP_LMDB /usr/local /usr; do - if test -f "$i/include/lmdb.h"; then - THIS_PREFIX=$i - PHP_ADD_INCLUDE($THIS_PREFIX/include) - THIS_INCLUDE=$i/include/lmdb.h - break - fi + if test -f "$i/include/lmdb.h"; then + THIS_PREFIX=$i + PHP_ADD_INCLUDE($THIS_PREFIX/include) + THIS_INCLUDE=$i/include/lmdb.h + break + fi done if test -n "$THIS_INCLUDE"; then - for LIB in lmdb; do - PHP_CHECK_LIBRARY($LIB, mdb_env_open, [ - AC_DEFINE_UNQUOTED(LMDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) - AC_DEFINE(DBA_LMDB, 1, [ ]) - THIS_LIBS=$LIB - ], [], [-L$THIS_PREFIX/$PHP_LIBDIR]) - if test -n "$THIS_LIBS"; then - break - fi - done + for LIB in lmdb; do + PHP_CHECK_LIBRARY($LIB, mdb_env_open, [ + AC_DEFINE_UNQUOTED(LMDB_INCLUDE_FILE, "$THIS_INCLUDE", [ ]) + AC_DEFINE(DBA_LMDB, 1, [ ]) + THIS_LIBS=$LIB + ], [], [-L$THIS_PREFIX/$PHP_LIBDIR]) + if test -n "$THIS_LIBS"; then + break + fi + done fi PHP_DBA_STD_ASSIGN diff --git a/ext/json/config.m4 b/ext/json/config.m4 index b270aefefa7..4cc381e5a38 100644 --- a/ext/json/config.m4 +++ b/ext/json/config.m4 @@ -1,8 +1,8 @@ PHP_NEW_EXTENSION(json, - json.c \ - json_encoder.c \ - json_parser.tab.c \ - json_scanner.c, - no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + json.c \ + json_encoder.c \ + json_parser.tab.c \ + json_scanner.c, + no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) PHP_INSTALL_HEADERS([ext/json], [php_json.h php_json_parser.h php_json_scanner.h]) PHP_ADD_MAKEFILE_FRAGMENT() diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index bef360e7c3a..abccea936ed 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -52,9 +52,9 @@ if test "$PHP_OPCACHE" != "no"; then AC_DEFINE(HAVE_JIT, 1, [Define to enable JIT]) AC_DEFINE(ZEND_JIT_IR, 1, [Use JIT IR framework]) ZEND_JIT_SRC="jit/zend_jit.c jit/zend_jit_vm_helpers.c jit/ir/ir.c jit/ir/ir_strtab.c \ - jit/ir/ir_cfg.c jit/ir/ir_sccp.c jit/ir/ir_gcm.c jit/ir/ir_ra.c jit/ir/ir_save.c \ - jit/ir/ir_dump.c jit/ir/ir_gdb.c jit/ir/ir_perf.c jit/ir/ir_check.c \ - jit/ir/ir_patch.c jit/ir/ir_emit.c" + jit/ir/ir_cfg.c jit/ir/ir_sccp.c jit/ir/ir_gcm.c jit/ir/ir_ra.c jit/ir/ir_save.c \ + jit/ir/ir_dump.c jit/ir/ir_gdb.c jit/ir/ir_perf.c jit/ir/ir_check.c \ + jit/ir/ir_patch.c jit/ir/ir_emit.c" dnl Find out which ABI we are using. case $host_alias in @@ -323,21 +323,21 @@ int main(void) { LIBS="$LIBS_save" PHP_NEW_EXTENSION(opcache, - ZendAccelerator.c \ - zend_accelerator_blacklist.c \ - zend_accelerator_debug.c \ - zend_accelerator_hash.c \ - zend_accelerator_module.c \ - zend_persist.c \ - zend_persist_calc.c \ - zend_file_cache.c \ - zend_shared_alloc.c \ - zend_accelerator_util_funcs.c \ - shared_alloc_shm.c \ - shared_alloc_mmap.c \ - shared_alloc_posix.c \ - $ZEND_JIT_SRC, - shared,,"-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes) + ZendAccelerator.c \ + zend_accelerator_blacklist.c \ + zend_accelerator_debug.c \ + zend_accelerator_hash.c \ + zend_accelerator_module.c \ + zend_persist.c \ + zend_persist_calc.c \ + zend_file_cache.c \ + zend_shared_alloc.c \ + zend_accelerator_util_funcs.c \ + shared_alloc_shm.c \ + shared_alloc_mmap.c \ + shared_alloc_posix.c \ + $ZEND_JIT_SRC, + shared,,"-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ${JIT_CFLAGS}",,yes) PHP_ADD_EXTENSION_DEP(opcache, pcre) diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index f0e008a6049..386b3939bc6 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -12,33 +12,33 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main(int argc, char **argv) { - char *filename = tmpnam(NULL); - char buffer[64]; - int result = 0; + char *filename = tmpnam(NULL); + char buffer[64]; + int result = 0; - FILE *fp = fopen(filename, "wb"); - if (NULL == fp) - return 0; - fputs("line 1\n", fp); - fputs("line 2\n", fp); - fclose(fp); + FILE *fp = fopen(filename, "wb"); + if (NULL == fp) + return 0; + fputs("line 1\n", fp); + fputs("line 2\n", fp); + fclose(fp); - fp = fopen(filename, "rb+"); - if (NULL == fp) - return 0; - fgets(buffer, sizeof(buffer), fp); - fputs("line 3\n", fp); - rewind(fp); - fgets(buffer, sizeof(buffer), fp); - if (0 != strcmp(buffer, "line 1\n")) - result = 1; - fgets(buffer, sizeof(buffer), fp); - if (0 != strcmp(buffer, "line 3\n")) - result = 1; - fclose(fp); - unlink(filename); + fp = fopen(filename, "rb+"); + if (NULL == fp) + return 0; + fgets(buffer, sizeof(buffer), fp); + fputs("line 3\n", fp); + rewind(fp); + fgets(buffer, sizeof(buffer), fp); + if (0 != strcmp(buffer, "line 1\n")) + result = 1; + fgets(buffer, sizeof(buffer), fp); + if (0 != strcmp(buffer, "line 3\n")) + result = 1; + fclose(fp); + unlink(filename); - exit(result); + exit(result); } ]])],[ ac_cv_flush_io=no @@ -81,10 +81,10 @@ if test "$PHP_EXTERNAL_LIBCRYPT" != "no"; then int main(void) { #ifdef HAVE_CRYPT - char *encrypted = crypt("rasmuslerdorf","rl"); - return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M"); + char *encrypted = crypt("rasmuslerdorf","rl"); + return !encrypted || strcmp(encrypted,"rl.3StKT.4T8M"); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_des=yes @@ -109,10 +109,10 @@ int main(void) { int main(void) { #ifdef HAVE_CRYPT - char *encrypted = crypt("rasmuslerdorf","_J9..rasm"); - return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc"); + char *encrypted = crypt("rasmuslerdorf","_J9..rasm"); + return !encrypted || strcmp(encrypted,"_J9..rasmBYk8r9AiWNc"); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_ext_des=yes @@ -137,20 +137,20 @@ int main(void) { int main(void) { #ifdef HAVE_CRYPT - char salt[15], answer[40]; - char *encrypted; + char salt[15], answer[40]; + char *encrypted; - salt[0]='$'; salt[1]='1'; salt[2]='$'; - salt[3]='r'; salt[4]='a'; salt[5]='s'; - salt[6]='m'; salt[7]='u'; salt[8]='s'; - salt[9]='l'; salt[10]='e'; salt[11]='$'; - salt[12]='\0'; - strcpy(answer,salt); - strcat(answer,"rISCgZzpwk3UhDidwXvin0"); - encrypted = crypt("rasmuslerdorf",salt); - return !encrypted || strcmp(encrypted,answer); + salt[0]='$'; salt[1]='1'; salt[2]='$'; + salt[3]='r'; salt[4]='a'; salt[5]='s'; + salt[6]='m'; salt[7]='u'; salt[8]='s'; + salt[9]='l'; salt[10]='e'; salt[11]='$'; + salt[12]='\0'; + strcpy(answer,salt); + strcat(answer,"rISCgZzpwk3UhDidwXvin0"); + encrypted = crypt("rasmuslerdorf",salt); + return !encrypted || strcmp(encrypted,answer); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_md5=yes @@ -175,17 +175,17 @@ int main(void) { int main(void) { #ifdef HAVE_CRYPT - char salt[30], answer[70]; - char *encrypted; + char salt[30], answer[70]; + char *encrypted; - salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0'; - strcat(salt,"rasmuslerd............"); - strcpy(answer,salt); - strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra"); - encrypted = crypt("rasmuslerdorf",salt); - return !encrypted || strcmp(encrypted,answer); + salt[0]='$'; salt[1]='2'; salt[2]='a'; salt[3]='$'; salt[4]='0'; salt[5]='7'; salt[6]='$'; salt[7]='\0'; + strcat(salt,"rasmuslerd............"); + strcpy(answer,salt); + strcpy(&answer[29],"nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra"); + encrypted = crypt("rasmuslerdorf",salt); + return !encrypted || strcmp(encrypted,answer); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_blowfish=yes @@ -210,16 +210,16 @@ int main(void) { int main(void) { #ifdef HAVE_CRYPT - char salt[21], answer[21+86]; - char *encrypted; + char salt[21], answer[21+86]; + char *encrypted; - strcpy(salt,"\$6\$rasmuslerdorf\$"); - strcpy(answer, salt); - strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/"); - encrypted = crypt("rasmuslerdorf",salt); - return !encrypted || strcmp(encrypted,answer); + strcpy(salt,"\$6\$rasmuslerdorf\$"); + strcpy(answer, salt); + strcat(answer, "EeHCRjm0bljalWuALHSTs1NB9ipEiLEXLhYeXdOpx22gmlmVejnVXFhd84cEKbYxCo.XuUTrW.RLraeEnsvWs/"); + encrypted = crypt("rasmuslerdorf",salt); + return !encrypted || strcmp(encrypted,answer); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_sha512=yes @@ -244,16 +244,16 @@ int main(void) { int main(void) { #ifdef HAVE_CRYPT - char salt[21], answer[21+43]; - char *encrypted; + char salt[21], answer[21+43]; + char *encrypted; - strcpy(salt,"\$5\$rasmuslerdorf\$"); - strcpy(answer, salt); - strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23"); - encrypted = crypt("rasmuslerdorf",salt); - return !encrypted || strcmp(encrypted,answer); + strcpy(salt,"\$5\$rasmuslerdorf\$"); + strcpy(answer, salt); + strcat(answer, "cFAm2puLCujQ9t.0CxiFIIvFi4JyQx5UncCt/xRIX23"); + encrypted = crypt("rasmuslerdorf",salt); + return !encrypted || strcmp(encrypted,answer); #else - return 1; + return 1; #endif }]])],[ ac_cv_crypt_sha256=yes diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index dda5cfb7abd..dfabf450ad4 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -600,7 +600,7 @@ if test "$PHP_FPM" != "no"; then fpm/fpm_conf.c \ fpm/fpm_env.c \ fpm/fpm_events.c \ - fpm/fpm_log.c \ + fpm/fpm_log.c \ fpm/fpm_main.c \ fpm/fpm_php.c \ fpm/fpm_php_trace.c \ @@ -615,12 +615,12 @@ if test "$PHP_FPM" != "no"; then fpm/fpm_unix.c \ fpm/fpm_worker_pool.c \ fpm/zlog.c \ - fpm/events/select.c \ - fpm/events/poll.c \ - fpm/events/epoll.c \ - fpm/events/kqueue.c \ - fpm/events/devpoll.c \ - fpm/events/port.c \ + fpm/events/select.c \ + fpm/events/poll.c \ + fpm/events/epoll.c \ + fpm/events/kqueue.c \ + fpm/events/devpoll.c \ + fpm/events/port.c \ " PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)') diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4 index f8b3315dc63..eb32afe13f3 100644 --- a/sapi/phpdbg/config.m4 +++ b/sapi/phpdbg/config.m4 @@ -33,11 +33,11 @@ if test "$PHP_PHPDBG" != "no"; then AC_MSG_CHECKING([for phpdbg and readline integration]) if test "$PHP_PHPDBG_READLINE" = "yes"; then if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then - AC_DEFINE(HAVE_PHPDBG_READLINE, 1, [ ]) - PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS" - AC_MSG_RESULT([ok]) - else - AC_MSG_RESULT([readline is not available]) + AC_DEFINE(HAVE_PHPDBG_READLINE, 1, [ ]) + PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS" + AC_MSG_RESULT([ok]) + else + AC_MSG_RESULT([readline is not available]) fi else AC_MSG_RESULT([disabled]) @@ -52,10 +52,10 @@ if test "$PHP_PHPDBG" != "no"; then AC_MSG_CHECKING([working pthreads]); if test "$pthreads_working" = "yes"; then - AC_MSG_RESULT([$ac_cv_pthreads_cflags -l$ac_cv_pthreads_lib]); - PHP_PHPDBG_CFLAGS="$PHP_PHPDBG_CFLAGS $ac_cv_pthreads_cflags" - PHPDBG_EXTRA_LIBS="$PHPDBG_EXTRA_LIBS -l$ac_cv_pthreads_lib" - AC_DEFINE(HAVE_USERFAULTFD_WRITEFAULT, 1, [Whether faulting on write-protected memory support can be compiled for userfaultfd]) + AC_MSG_RESULT([$ac_cv_pthreads_cflags -l$ac_cv_pthreads_lib]); + PHP_PHPDBG_CFLAGS="$PHP_PHPDBG_CFLAGS $ac_cv_pthreads_cflags" + PHPDBG_EXTRA_LIBS="$PHPDBG_EXTRA_LIBS -l$ac_cv_pthreads_lib" + AC_DEFINE(HAVE_USERFAULTFD_WRITEFAULT, 1, [Whether faulting on write-protected memory support can be compiled for userfaultfd]) else AC_MSG_WARN([pthreads not available]) fi diff --git a/scripts/dev/check_parameters.php b/scripts/dev/check_parameters.php index a68f5ebe5fd..357a99d381e 100755 --- a/scripts/dev/check_parameters.php +++ b/scripts/dev/check_parameters.php @@ -120,7 +120,7 @@ function get_vars($txt) } } -// if ($GLOBALS['current_function'] == 'for_debugging') { print_r($m);print_r($ret); } +// if ($GLOBALS['current_function'] == 'for_debugging') { print_r($m);print_r($ret); } return $ret; } @@ -180,7 +180,7 @@ function get_params($vars, $str) } } -// if ($GLOBALS['current_function'] == 'for_debugging') { var_dump($m); var_dump($ret); } +// if ($GLOBALS['current_function'] == 'for_debugging') { var_dump($m); var_dump($ret); } return $ret; } diff --git a/scripts/phpize.in b/scripts/phpize.in index 81605e06a59..2f117656f8d 100644 --- a/scripts/phpize.in +++ b/scripts/phpize.in @@ -13,10 +13,10 @@ FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attri config.guess config.sub ltmain.sh Makefile.global gen_stub.php" FILES="run-tests*.php" CLEAN_FILES="$FILES *.o *.lo *.la .libs/ build/ modules/ \ - config.nice configure configure.ac \ - config.h config.h.in conftest* libtool config.cache autom4te.cache/ \ - config.log config.status Makefile Makefile.fragments Makefile.objects confdefs.h \ - run-tests*.php tests/*.diff tests/*.exp tests/*.log tests/*.out tests/*.php" + config.nice configure configure.ac \ + config.h config.h.in conftest* libtool config.cache autom4te.cache/ \ + config.log config.status Makefile Makefile.fragments Makefile.objects confdefs.h \ + run-tests*.php tests/*.diff tests/*.exp tests/*.log tests/*.out tests/*.php" # function declaration phpize_usage()