Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Try to unify the includes
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Feb 23, 2019
1 parent d03c3c8 commit 809920b
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 35 deletions.
20 changes: 18 additions & 2 deletions src/php_snuffleupagus.h
Expand Up @@ -7,23 +7,39 @@
#define PHP_SNUFFLEUPAGUS_URL "https://github.com/nbs-system/snuffleupagus"
#define PHP_SNUFFLEUPAGUS_COPYRIGHT "LGPLv2"

#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <pcre.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include <pcre.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>

#include "SAPI.h"
#include "ext/session/php_session.h"
#include "ext/standard/head.h"
#include "ext/standard/info.h"
#include "ext/standard/url.h"
#include "ext/standard/php_var.h"
#include "ext/pcre/php_pcre.h"
#include "ext/session/php_session.h"
#include "php.h"
#include "php_ini.h"
#include "rfc1867.h"
#include "zend_execute.h"
#include "zend_extensions.h"
#include "zend_hash.h"
#include "zend_string.h"
#include "zend_extensions.h"
#include "zend_types.h"
#include "zend_vm.h"

/* Compatibility */
#if ( !HAVE_PCRE && !HAVE_BUNDLED_PCRE )
Expand Down
1 change: 0 additions & 1 deletion src/snuffleupagus.c
Expand Up @@ -9,7 +9,6 @@
#endif

#include "php_snuffleupagus.h"
#include "sp_config.h"

#ifndef ZEND_EXT_API
#define ZEND_EXT_API ZEND_DLEXPORT
Expand Down
3 changes: 0 additions & 3 deletions src/sp_config.c
@@ -1,9 +1,6 @@
#include <errno.h>
#if defined(__FreeBSD__)
#define _WITH_GETLINE
#endif
#include <stdio.h>
#include <string.h>

#include "php_snuffleupagus.h"

Expand Down
1 change: 0 additions & 1 deletion src/sp_config_keywords.c
@@ -1,5 +1,4 @@
#include "php_snuffleupagus.h"
#include "zend_types.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
2 changes: 0 additions & 2 deletions src/sp_cookie_encryption.c
@@ -1,7 +1,5 @@
#include "php_snuffleupagus.h"

#include "ext/standard/url.h"
#include "ext/standard/head.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
2 changes: 0 additions & 2 deletions src/sp_crypt.c
@@ -1,7 +1,5 @@
#include "php_snuffleupagus.h"

#include "ext/standard/url.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

void generate_key(unsigned char *key) {
Expand Down
2 changes: 0 additions & 2 deletions src/sp_disabled_functions.c
@@ -1,7 +1,5 @@
#include "php_snuffleupagus.h"

#include "zend_execute.h"
#include "zend_hash.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
3 changes: 0 additions & 3 deletions src/sp_execute.c
@@ -1,7 +1,4 @@
#include "php_snuffleupagus.h"
#include "zend_vm.h"
#include <errno.h>
#include <string.h>

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
3 changes: 0 additions & 3 deletions src/sp_list.c
@@ -1,6 +1,3 @@
#include "sp_list.h"
#include <stdio.h>
#include <stdlib.h>
#include "php_snuffleupagus.h"

void sp_list_free(sp_list_node *node) {
Expand Down
4 changes: 0 additions & 4 deletions src/sp_network_utils.c
@@ -1,7 +1,3 @@
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>

#include "php_snuffleupagus.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)
Expand Down
2 changes: 0 additions & 2 deletions src/sp_pcre_compat.c
@@ -1,7 +1,5 @@
#include "php_snuffleupagus.h"

#include "sp_pcre_compat.h"

sp_pcre* sp_pcre_compile(const char* const pattern) {
sp_pcre* ret = NULL;
#ifdef SP_HAS_PCRE2
Expand Down
1 change: 0 additions & 1 deletion src/sp_session.c
@@ -1,5 +1,4 @@
#include "php_snuffleupagus.h"
#include "ext/session/php_session.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
1 change: 0 additions & 1 deletion src/sp_sloppy.c
@@ -1,5 +1,4 @@
#include "php_snuffleupagus.h"
#include "sp_sloppy.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
1 change: 0 additions & 1 deletion src/sp_upload_validation.c
@@ -1,5 +1,4 @@
#include "php_snuffleupagus.h"
#include "rfc1867.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
6 changes: 0 additions & 6 deletions src/sp_utils.c
@@ -1,11 +1,5 @@
#include "php_snuffleupagus.h"

#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down
1 change: 0 additions & 1 deletion src/sp_wrapper.c
@@ -1,5 +1,4 @@
#include "php_snuffleupagus.h"
#include "sp_config.h"

ZEND_DECLARE_MODULE_GLOBALS(snuffleupagus)

Expand Down

0 comments on commit 809920b

Please sign in to comment.