diff options
| author | jvoisin | 2019-02-23 19:36:24 +0100 |
|---|---|---|
| committer | jvoisin | 2019-02-23 19:36:24 +0100 |
| commit | 809920b8cb130e105847a9956c51a6ecb08e2938 (patch) | |
| tree | 254fa43e3206f6d7df3896503473cdd038d372a8 | |
| parent | d03c3c8d01f6f507bf844fec07477f30e3db61d9 (diff) | |
Try to unify the includes
| -rw-r--r-- | src/php_snuffleupagus.h | 20 | ||||
| -rw-r--r-- | src/snuffleupagus.c | 1 | ||||
| -rw-r--r-- | src/sp_config.c | 3 | ||||
| -rw-r--r-- | src/sp_config_keywords.c | 1 | ||||
| -rw-r--r-- | src/sp_cookie_encryption.c | 2 | ||||
| -rw-r--r-- | src/sp_crypt.c | 2 | ||||
| -rw-r--r-- | src/sp_disabled_functions.c | 2 | ||||
| -rw-r--r-- | src/sp_execute.c | 3 | ||||
| -rw-r--r-- | src/sp_list.c | 3 | ||||
| -rw-r--r-- | src/sp_network_utils.c | 4 | ||||
| -rw-r--r-- | src/sp_pcre_compat.c | 2 | ||||
| -rw-r--r-- | src/sp_session.c | 1 | ||||
| -rw-r--r-- | src/sp_sloppy.c | 1 | ||||
| -rw-r--r-- | src/sp_upload_validation.c | 1 | ||||
| -rw-r--r-- | src/sp_utils.c | 6 | ||||
| -rw-r--r-- | src/sp_wrapper.c | 1 |
16 files changed, 18 insertions, 35 deletions
diff --git a/src/php_snuffleupagus.h b/src/php_snuffleupagus.h index e7b5dc1..9da93ce 100644 --- a/src/php_snuffleupagus.h +++ b/src/php_snuffleupagus.h | |||
| @@ -7,23 +7,39 @@ | |||
| 7 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/nbs-system/snuffleupagus" | 7 | #define PHP_SNUFFLEUPAGUS_URL "https://github.com/nbs-system/snuffleupagus" |
| 8 | #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" | 8 | #define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2" |
| 9 | 9 | ||
| 10 | #include <errno.h> | ||
| 11 | #include <fcntl.h> | ||
| 12 | #include <inttypes.h> | ||
| 13 | #include <pcre.h> | ||
| 10 | #include <stdbool.h> | 14 | #include <stdbool.h> |
| 11 | #include <stdio.h> | 15 | #include <stdio.h> |
| 16 | #include <stdlib.h> | ||
| 17 | #include <string.h> | ||
| 18 | #include <unistd.h> | ||
| 12 | 19 | ||
| 13 | #include <pcre.h> | 20 | #include <arpa/inet.h> |
| 21 | #include <netinet/in.h> | ||
| 22 | #include <sys/socket.h> | ||
| 14 | #include <sys/types.h> | 23 | #include <sys/types.h> |
| 15 | #include <sys/wait.h> | 24 | #include <sys/wait.h> |
| 16 | 25 | ||
| 17 | #include "SAPI.h" | 26 | #include "SAPI.h" |
| 27 | #include "ext/session/php_session.h" | ||
| 28 | #include "ext/standard/head.h" | ||
| 18 | #include "ext/standard/info.h" | 29 | #include "ext/standard/info.h" |
| 30 | #include "ext/standard/url.h" | ||
| 19 | #include "ext/standard/php_var.h" | 31 | #include "ext/standard/php_var.h" |
| 20 | #include "ext/pcre/php_pcre.h" | 32 | #include "ext/pcre/php_pcre.h" |
| 21 | #include "ext/session/php_session.h" | 33 | #include "ext/session/php_session.h" |
| 22 | #include "php.h" | 34 | #include "php.h" |
| 23 | #include "php_ini.h" | 35 | #include "php_ini.h" |
| 36 | #include "rfc1867.h" | ||
| 37 | #include "zend_execute.h" | ||
| 38 | #include "zend_extensions.h" | ||
| 24 | #include "zend_hash.h" | 39 | #include "zend_hash.h" |
| 25 | #include "zend_string.h" | 40 | #include "zend_string.h" |
| 26 | #include "zend_extensions.h" | 41 | #include "zend_types.h" |
| 42 | #include "zend_vm.h" | ||
| 27 | 43 | ||
| 28 | /* Compatibility */ | 44 | /* Compatibility */ |
| 29 | #if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) | 45 | #if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE ) |
diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 2b30502..ff2d2b6 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | #include "php_snuffleupagus.h" | 11 | #include "php_snuffleupagus.h" |
| 12 | #include "sp_config.h" | ||
| 13 | 12 | ||
| 14 | #ifndef ZEND_EXT_API | 13 | #ifndef ZEND_EXT_API |
| 15 | #define ZEND_EXT_API ZEND_DLEXPORT | 14 | #define ZEND_EXT_API ZEND_DLEXPORT |
diff --git a/src/sp_config.c b/src/sp_config.c index debf749..915c8a1 100644 --- a/src/sp_config.c +++ b/src/sp_config.c | |||
| @@ -1,9 +1,6 @@ | |||
| 1 | #include <errno.h> | ||
| 2 | #if defined(__FreeBSD__) | 1 | #if defined(__FreeBSD__) |
| 3 | #define _WITH_GETLINE | 2 | #define _WITH_GETLINE |
| 4 | #endif | 3 | #endif |
| 5 | #include <stdio.h> | ||
| 6 | #include <string.h> | ||
| 7 | 4 | ||
| 8 | #include "php_snuffleupagus.h" | 5 | #include "php_snuffleupagus.h" |
| 9 | 6 | ||
diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index a9c71d4..a13aed2 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "zend_types.h" | ||
| 3 | 2 | ||
| 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 5 | 4 | ||
diff --git a/src/sp_cookie_encryption.c b/src/sp_cookie_encryption.c index 4e5242d..9c034da 100644 --- a/src/sp_cookie_encryption.c +++ b/src/sp_cookie_encryption.c | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | #include "ext/standard/url.h" | ||
| 4 | #include "ext/standard/head.h" | ||
| 5 | 3 | ||
| 6 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 7 | 5 | ||
diff --git a/src/sp_crypt.c b/src/sp_crypt.c index bfb622a..da0e2fe 100644 --- a/src/sp_crypt.c +++ b/src/sp_crypt.c | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | #include "ext/standard/url.h" | ||
| 4 | |||
| 5 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 6 | 4 | ||
| 7 | void generate_key(unsigned char *key) { | 5 | void generate_key(unsigned char *key) { |
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 0f42f8f..030fbd8 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | #include "zend_execute.h" | ||
| 4 | #include "zend_hash.h" | ||
| 5 | 3 | ||
| 6 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 7 | 5 | ||
diff --git a/src/sp_execute.c b/src/sp_execute.c index 544d8c2..b4f2595 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -1,7 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "zend_vm.h" | ||
| 3 | #include <errno.h> | ||
| 4 | #include <string.h> | ||
| 5 | 2 | ||
| 6 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 7 | 4 | ||
diff --git a/src/sp_list.c b/src/sp_list.c index 8879d89..c798d6d 100644 --- a/src/sp_list.c +++ b/src/sp_list.c | |||
| @@ -1,6 +1,3 @@ | |||
| 1 | #include "sp_list.h" | ||
| 2 | #include <stdio.h> | ||
| 3 | #include <stdlib.h> | ||
| 4 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 5 | 2 | ||
| 6 | void sp_list_free(sp_list_node *node) { | 3 | void sp_list_free(sp_list_node *node) { |
diff --git a/src/sp_network_utils.c b/src/sp_network_utils.c index 51911a8..c444c1e 100644 --- a/src/sp_network_utils.c +++ b/src/sp_network_utils.c | |||
| @@ -1,7 +1,3 @@ | |||
| 1 | #include <arpa/inet.h> | ||
| 2 | #include <netinet/in.h> | ||
| 3 | #include <sys/socket.h> | ||
| 4 | |||
| 5 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 6 | 2 | ||
| 7 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
diff --git a/src/sp_pcre_compat.c b/src/sp_pcre_compat.c index 233ddc0..3f8ff1e 100644 --- a/src/sp_pcre_compat.c +++ b/src/sp_pcre_compat.c | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | #include "sp_pcre_compat.h" | ||
| 4 | |||
| 5 | sp_pcre* sp_pcre_compile(const char* const pattern) { | 3 | sp_pcre* sp_pcre_compile(const char* const pattern) { |
| 6 | sp_pcre* ret = NULL; | 4 | sp_pcre* ret = NULL; |
| 7 | #ifdef SP_HAS_PCRE2 | 5 | #ifdef SP_HAS_PCRE2 |
diff --git a/src/sp_session.c b/src/sp_session.c index 0f45f9b..596eae9 100644 --- a/src/sp_session.c +++ b/src/sp_session.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "ext/session/php_session.h" | ||
| 3 | 2 | ||
| 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 5 | 4 | ||
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 8c36822..d3678db 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "sp_sloppy.h" | ||
| 3 | 2 | ||
| 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 5 | 4 | ||
diff --git a/src/sp_upload_validation.c b/src/sp_upload_validation.c index 8dcc485..fe16a46 100644 --- a/src/sp_upload_validation.c +++ b/src/sp_upload_validation.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "rfc1867.h" | ||
| 3 | 2 | ||
| 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 5 | 4 | ||
diff --git a/src/sp_utils.c b/src/sp_utils.c index 1231bee..ea6afaf 100644 --- a/src/sp_utils.c +++ b/src/sp_utils.c | |||
| @@ -1,11 +1,5 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | 2 | ||
| 3 | #include <fcntl.h> | ||
| 4 | #include <inttypes.h> | ||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include <string.h> | ||
| 8 | #include <unistd.h> | ||
| 9 | 3 | ||
| 10 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 11 | 5 | ||
diff --git a/src/sp_wrapper.c b/src/sp_wrapper.c index fd47dd6..1618a4f 100644 --- a/src/sp_wrapper.c +++ b/src/sp_wrapper.c | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | #include "php_snuffleupagus.h" | 1 | #include "php_snuffleupagus.h" |
| 2 | #include "sp_config.h" | ||
| 3 | 2 | ||
| 4 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) | 3 | ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus) |
| 5 | 4 | ||
