Skip to content

Commit

Permalink
PHP 8.2: Include 'php.h' header through redirection, so I can turn of…
Browse files Browse the repository at this point in the history
…f -Wdeclaration-after-statement for it
  • Loading branch information
derickr committed Jul 13, 2022
1 parent c206b2a commit 011cb3a
Show file tree
Hide file tree
Showing 29 changed files with 83 additions and 60 deletions.
4 changes: 2 additions & 2 deletions php_xdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -25,7 +25,7 @@
#define XDEBUG_URL "https://xdebug.org"
#define XDEBUG_URL_FAQ "https://xdebug.org/docs/faq#api"

#include "php.h"
#include "lib/php-header.h"

#ifdef HAVE_CONFIG_H
# include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/base/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "TSRM.h"
#include "php_globals.h"
#include "zend_closures.h"
Expand Down
4 changes: 2 additions & 2 deletions src/base/filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -16,7 +16,7 @@
#ifndef XDEBUG_FILTER_H
#define XDEBUG_FILTER_H

#include "php.h"
#include "lib/php-header.h"
#include "php_xdebug.h"

int xdebug_is_stack_frame_filtered(int filter_type, function_stack_entry *fse);
Expand Down
4 changes: 2 additions & 2 deletions src/coverage/code_coverage_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -17,7 +17,7 @@
#ifndef __XDEBUG_CODE_COVERAGE_PRIVATE_H__
#define __XDEBUG_CODE_COVERAGE_PRIVATE_H__

#include "php.h"
#include "lib/php-header.h"

#include "branch_info.h"
#include "code_coverage.h"
Expand Down
2 changes: 1 addition & 1 deletion src/debugger/handler_dbgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <unistd.h>
#endif

#include "php.h"
#include "lib/php-header.h"
#include "SAPI.h"

#include "ext/standard/php_string.h"
Expand Down
4 changes: 2 additions & 2 deletions src/develop/develop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -13,7 +13,7 @@
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "lib/php-header.h"
#include "zend_exceptions.h"

#include "php_xdebug.h"
Expand Down
4 changes: 2 additions & 2 deletions src/develop/monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "php_xdebug.h"

#include "develop_private.h"
Expand Down
4 changes: 2 additions & 2 deletions src/develop/php_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "php_xdebug.h"

#include "develop_private.h"
Expand Down
3 changes: 2 additions & 1 deletion src/develop/superglobals.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,6 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "lib/php-header.h"
#include "SAPI.h"

#include "php_xdebug.h"
Expand Down
4 changes: 2 additions & 2 deletions src/develop/superglobals.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -17,7 +17,7 @@
#ifndef __HAVE_XDEBUG_SUPERGLOBALS_H__
#define __HAVE_XDEBUG_SUPERGLOBALS_H__

#include "php.h"
#include "lib/php-header.h"

#include "develop_private.h"

Expand Down
4 changes: 2 additions & 2 deletions src/gcstats/gc_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -13,7 +13,7 @@
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/
#include "php.h"
#include "lib/php-header.h"
#include "zend_builtin_functions.h"
#include "SAPI.h"
#include "Zend/zend_long.h"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans <[email protected]> |
| Copyright (c) 2002-2022 Derick Rethans <[email protected]> |
| (c) 1997-2004 Jim Winstead <[email protected]> |
| (c) 1998-2004 Andi Gutmans <[email protected]> and |
| Zeev Suraski <[email protected]> |
Expand Down Expand Up @@ -39,7 +39,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "main/php_version.h"
#include "compat.h"
#include "zend_extensions.h"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -17,7 +17,7 @@
#ifndef __HAVE_XDEBUG_COMPAT_H__
#define __HAVE_XDEBUG_COMPAT_H__

#include "php.h"
#include "lib/php-header.h"
#include "str.h"

#include "ext/standard/head.h"
Expand Down
20 changes: 20 additions & 0 deletions src/lib/php-header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| https://xdebug.org/license.php |
| If you did not receive a copy of the Xdebug license and are unable |
| to obtain it through the world-wide-web, please send a note to |
| [email protected] so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
*/

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
#include "php.h"
#pragma GCC diagnostic pop
4 changes: 2 additions & 2 deletions src/lib/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2020 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -20,7 +20,7 @@
#include <string.h>
#include <locale.h>

#include "php.h"
#include "lib/php-header.h"
#include "ext/standard/php_string.h"

#include "mm.h"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/str.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <stddef.h>

#include "php.h"
#include "lib/php-header.h"

#include "mm.h"

Expand Down
22 changes: 12 additions & 10 deletions src/lib/usefulstuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -16,18 +16,20 @@

#include <stdlib.h>
#include <string.h>

#ifndef WIN32
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/resource.h>
#include <sys/file.h>
# include <unistd.h>
# include <sys/types.h>
# include <sys/socket.h>
# include <sys/resource.h>
# include <sys/file.h>
#else
#define PATH_MAX MAX_PATH
#include <winsock2.h>
#include <io.h>
#include <process.h>
# define PATH_MAX MAX_PATH
# include <winsock2.h>
# include <io.h>
# include <process.h>
#endif

#include "php_xdebug.h"

#include "mm.h"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/var.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "ext/standard/php_string.h"
#include "ext/standard/url.h"
#include "zend.h"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/var.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "zend.h"
#include "lib/php-header.h"
#include "php_xdebug.h"

#include "lib/compat.h"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/var_export_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "ext/standard/php_string.h"
#include "Zend/zend_closures.h"
#if PHP_VERSION_ID >= 80100
Expand Down
4 changes: 2 additions & 2 deletions src/lib/var_export_text.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

#include "php.h"
#include "lib/php-header.h"
#include "ext/standard/php_string.h"
#include "Zend/zend_closures.h"
#if PHP_VERSION_ID >= 80100
Expand Down
4 changes: 2 additions & 2 deletions src/profiler/profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Xdebug |
+----------------------------------------------------------------------+
| Copyright (c) 2002-2021 Derick Rethans |
| Copyright (c) 2002-2022 Derick Rethans |
+----------------------------------------------------------------------+
| This source file is subject to version 1.01 of the Xdebug license, |
| that is bundled with this package in the file LICENSE, and is |
Expand All @@ -18,7 +18,7 @@
#include <process.h>
#endif

#include "php.h"
#include "lib/php-header.h"
#include "TSRM.h"
#include "php_globals.h"
#include "Zend/zend_alloc.h"
Expand Down
Loading

0 comments on commit 011cb3a

Please sign in to comment.