Browse Source

Fix header inclusion order, always include "config.h" before any system header

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2624 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 12 years ago
parent
commit
22e8b456a9
  1. 6
      src/array.c
  2. 7
      src/array.h
  3. 12
      src/base.h
  4. 6
      src/bitset.c
  5. 4
      src/buffer.c
  6. 6
      src/buffer.h
  7. 4
      src/chunk.c
  8. 6
      src/configfile-glue.c
  9. 21
      src/configfile.c
  10. 10
      src/configparser.y
  11. 20
      src/connections.c
  12. 6
      src/crc32.h
  13. 4
      src/data_array.c
  14. 4
      src/data_config.c
  15. 4
      src/data_count.c
  16. 6
      src/data_fastcgi.c
  17. 4
      src/data_integer.c
  18. 4
      src/data_string.c
  19. 14
      src/etag.c
  20. 4
      src/etag.h
  21. 7
      src/fdevent.c
  22. 3
      src/fdevent.h
  23. 9
      src/fdevent_freebsd_kqueue.c
  24. 8
      src/fdevent_linux_rtsig.c
  25. 7
      src/fdevent_linux_sysepoll.c
  26. 7
      src/fdevent_poll.c
  27. 7
      src/fdevent_select.c
  28. 7
      src/fdevent_solaris_devpoll.c
  29. 10
      src/http-header-glue.c
  30. 16
      src/http_auth.c
  31. 5
      src/http_auth_digest.c
  32. 2
      src/http_auth_digest.h
  33. 10
      src/http_chunk.c
  34. 9
      src/inet_ntop_cache.c
  35. 6
      src/joblist.c
  36. 6
      src/keyvalue.c
  37. 2
      src/keyvalue.h
  38. 15
      src/log.c
  39. 2
      src/md5.c
  40. 8
      src/mod_access.c
  41. 20
      src/mod_accesslog.c
  42. 10
      src/mod_alias.c
  43. 10
      src/mod_auth.c
  44. 35
      src/mod_cgi.c
  45. 18
      src/mod_cml.c
  46. 18
      src/mod_cml_funcs.c
  47. 2
      src/mod_cml_funcs.h
  48. 12
      src/mod_cml_lua.c
  49. 24
      src/mod_compress.c
  50. 20
      src/mod_dirlisting.c
  51. 8
      src/mod_evasive.c
  52. 8
      src/mod_evhost.c
  53. 10
      src/mod_expire.c
  54. 18
      src/mod_extforward.c
  55. 33
      src/mod_fastcgi.c
  56. 10
      src/mod_flv_streaming.c
  57. 11
      src/mod_indexfile.c
  58. 12
      src/mod_magnet.c
  59. 6
      src/mod_magnet_cache.c
  60. 20
      src/mod_proxy.c
  61. 10
      src/mod_redirect.c
  62. 10
      src/mod_rewrite.c
  63. 15
      src/mod_rrdtool.c
  64. 25
      src/mod_scgi.c
  65. 10
      src/mod_secure_download.c
  66. 6
      src/mod_setenv.c
  67. 12
      src/mod_simple_vhost.c
  68. 10
      src/mod_skeleton.c
  69. 26
      src/mod_ssi.c
  70. 6
      src/mod_ssi_expr.c
  71. 8
      src/mod_ssi_exprparser.y
  72. 10
      src/mod_staticfile.c
  73. 20
      src/mod_status.c
  74. 16
      src/mod_trigger_b4_dl.c
  75. 8
      src/mod_uploadprogress.c
  76. 12
      src/mod_userdir.c
  77. 8
      src/mod_usertrack.c
  78. 28
      src/mod_webdav.c
  79. 22
      src/network.c
  80. 3
      src/network_backends.h
  81. 10
      src/network_freebsd_sendfile.c
  82. 11
      src/network_linux_sendfile.c
  83. 11
      src/network_openssl.c
  84. 12
      src/network_solaris_sendfilev.c
  85. 20
      src/network_write.c
  86. 10
      src/network_writev.c
  87. 13
      src/plugin.c
  88. 11
      src/proc_open.c
  89. 8
      src/request.c
  90. 22
      src/response.c
  91. 4
      src/response.h
  92. 46
      src/server.c
  93. 2
      src/splaytree.c
  94. 14
      src/stat_cache.c
  95. 3
      src/status_counter.c
  96. 4
      src/status_counter.h
  97. 7
      src/stream.c
  98. 4
      src/version.h

6
src/array.c

@ -1,3 +1,6 @@
#include "array.h"
#include "buffer.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@ -6,9 +9,6 @@
#include <errno.h>
#include <assert.h>
#include "array.h"
#include "buffer.h"
array *array_init(void) {
array *a;

7
src/array.h

@ -1,15 +1,18 @@
#ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#ifdef HAVE_PCRE_H
# include <pcre.h>
#endif
#include "buffer.h"
#include <stdlib.h>
#define DATA_IS_STRING(x) (x->type == TYPE_STRING)
typedef enum { TYPE_UNSET, TYPE_STRING, TYPE_COUNT, TYPE_ARRAY, TYPE_INTEGER, TYPE_FASTCGI, TYPE_CONFIG } data_type_t;

12
src/base.h

@ -1,18 +1,20 @@
#ifndef _BASE_H_
#define _BASE_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <limits.h>
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
@ -79,8 +81,6 @@ typedef int socklen_t;
# define SHUT_WR 1
#endif
#include "settings.h"
typedef enum { T_CONFIG_UNSET,
T_CONFIG_STRING,
T_CONFIG_SHORT,

6
src/bitset.c

@ -1,12 +1,12 @@
#include "buffer.h"
#include "bitset.h"
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "bitset.h"
#include "buffer.h"
#define BITSET_BITS \
( CHAR_BIT * sizeof(size_t) )

4
src/buffer.c

@ -1,3 +1,5 @@
#include "buffer.h"
#include <stdlib.h>
#include <string.h>
@ -5,8 +7,6 @@
#include <assert.h>
#include <ctype.h>
#include "buffer.h"
static const char hex_chars[] = "0123456789abcdef";

6
src/buffer.h

@ -1,15 +1,15 @@
#ifndef _BUFFER_H_
#define _BUFFER_H_
#include <stdlib.h>
#include <sys/types.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "settings.h"
#include <stdlib.h>
#include <sys/types.h>
typedef struct {
char *ptr;

4
src/chunk.c

@ -4,6 +4,8 @@
*
*/
#include "chunk.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
@ -16,8 +18,6 @@
#include <errno.h>
#include <string.h>
#include "chunk.h"
chunkqueue *chunkqueue_init(void) {
chunkqueue *cq;

6
src/configfile-glue.c

@ -1,6 +1,3 @@
#include <string.h>
#include <stdlib.h>
#include "base.h"
#include "buffer.h"
#include "array.h"
@ -9,6 +6,9 @@
#include "configfile.h"
#include <string.h>
#include <stdlib.h>
/**
* like all glue code this file contains functions which
* are the external interface of lighttpd. The functions

21
src/configfile.c

@ -1,3 +1,12 @@
#include "server.h"
#include "log.h"
#include "stream.h"
#include "plugin.h"
#include "configparser.h"
#include "configfile.h"
#include "proc_open.h"
#include <sys/stat.h>
#include <stdlib.h>
@ -10,18 +19,6 @@
#include <limits.h>
#include <assert.h>
#include "server.h"
#include "log.h"
#include "stream.h"
#include "plugin.h"
#ifdef USE_LICENSE
#include "license.h"
#endif
#include "configparser.h"
#include "configfile.h"
#include "proc_open.h"
static int config_insert(server *srv) {
size_t i;

10
src/configparser.y

@ -3,16 +3,14 @@
%name configparser
%include {
#include <assert.h>
#include <stdio.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "configfile.h"
#include "buffer.h"
#include "array.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
static void configparser_push(config_t *ctx, data_config *dc, int isnew) {
if (isnew) {
dc->context_ndx = ctx->all_configs->used;

20
src/connections.c

@ -1,13 +1,3 @@
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <assert.h>
#include "buffer.h"
#include "server.h"
#include "log.h"
@ -25,6 +15,16 @@
#include "inet_ntop_cache.h"
#include <sys/stat.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <assert.h>
#ifdef USE_OPENSSL
# include <openssl/ssl.h>
# include <openssl/err.h>

6
src/crc32.h

@ -2,15 +2,15 @@
#define __crc32cr_table_h__
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#include <sys/types.h>
#if defined HAVE_STDINT_H
#include <stdint.h>
# include <stdint.h>
#elif defined HAVE_INTTYPES_H
#include <inttypes.h>
# include <inttypes.h>
#endif
uint32_t generate_crc32c(char *string, size_t length);

4
src/data_array.c

@ -1,9 +1,9 @@
#include "array.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "array.h"
static data_unset *data_array_copy(const data_unset *s) {
data_array *src = (data_array *)s;
data_array *ds = data_array_init();

4
src/data_config.c

@ -1,9 +1,9 @@
#include "array.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "array.h"
static data_unset *data_config_copy(const data_unset *s) {
data_config *src = (data_config *)s;
data_config *ds = data_config_init();

4
src/data_count.c

@ -1,9 +1,9 @@
#include "array.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "array.h"
static data_unset *data_count_copy(const data_unset *s) {
data_count *src = (data_count *)s;
data_count *ds = data_count_init();

6
src/data_fastcgi.c

@ -1,10 +1,10 @@
#include "array.h"
#include "fastcgi.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "array.h"
#include "fastcgi.h"
static data_unset *data_fastcgi_copy(const data_unset *s) {
data_fastcgi *src = (data_fastcgi *)s;
data_fastcgi *ds = data_fastcgi_init();

4
src/data_integer.c

@ -1,9 +1,9 @@
#include "array.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "array.h"
static data_unset *data_integer_copy(const data_unset *s) {
data_integer *src = (data_integer *)s;
data_integer *ds = data_integer_init();

4
src/data_string.c

@ -1,10 +1,10 @@
#include "array.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "array.h"
static data_unset *data_string_copy(const data_unset *s) {
data_string *src = (data_string *)s;
data_string *ds = data_string_init();

14
src/etag.c

@ -1,17 +1,13 @@
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "buffer.h"
#include "etag.h"
#if defined HAVE_STDINT_H
#include <stdint.h>
# include <stdint.h>
#elif defined HAVE_INTTYPES_H
#include <inttypes.h>
# include <inttypes.h>
#endif
#include "buffer.h"
#include "etag.h"
#include <string.h>
int etag_is_equal(buffer *etag, const char *matches) {
if (etag && !buffer_is_empty(etag) && 0 == strcmp(etag->ptr, matches)) return 1;

4
src/etag.h

@ -1,12 +1,12 @@
#ifndef ETAG_H
#define ETAG_H
#include "buffer.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "buffer.h"
typedef enum { ETAG_USE_INODE = 1, ETAG_USE_MTIME = 2, ETAG_USE_SIZE = 4 } etag_flags_t;
int etag_is_equal(buffer *etag, const char *matches);

7
src/fdevent.c

@ -1,6 +1,7 @@
#include <sys/types.h>
#include "fdevent.h"
#include "buffer.h"
#include "settings.h"
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
@ -9,8 +10,6 @@
#include <stdio.h>
#include <fcntl.h>
#include "fdevent.h"
#include "buffer.h"
fdevents *fdevent_init(size_t maxfds, fdevent_handler_t type) {
fdevents *ev;

3
src/fdevent.h

@ -2,8 +2,9 @@
#define _FDEVENT_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#include "settings.h"
#include "bitset.h"

9
src/fdevent_freebsd_kqueue.c

@ -1,3 +1,7 @@
#include "fdevent.h"
#include "buffer.h"
#include "server.h"
#include <sys/types.h>
#include <unistd.h>
@ -8,11 +12,6 @@
#include <signal.h>
#include <fcntl.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#include "server.h"
#ifdef USE_FREEBSD_KQUEUE
#include <sys/event.h>
#include <sys/time.h>

8
src/fdevent_linux_rtsig.c

@ -1,3 +1,6 @@
#include "fdevent.h"
#include "buffer.h"
#include <sys/types.h>
#include <unistd.h>
@ -8,13 +11,8 @@
#include <signal.h>
#include <limits.h>
#define __USE_GNU
#include <fcntl.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#ifdef USE_LINUX_SIGIO
static void fdevent_linux_rtsig_free(fdevents *ev) {
free(ev->pollfds);

7
src/fdevent_linux_sysepoll.c

@ -1,3 +1,6 @@
#include "fdevent.h"
#include "buffer.h"
#include <sys/types.h>
#include <unistd.h>
@ -8,10 +11,6 @@
#include <signal.h>
#include <fcntl.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#ifdef USE_LINUX_EPOLL
static void fdevent_linux_sysepoll_free(fdevents *ev) {
close(ev->epoll_fd);

7
src/fdevent_poll.c

@ -1,3 +1,6 @@
#include "fdevent.h"
#include "buffer.h"
#include <sys/types.h>
#include <unistd.h>
@ -8,10 +11,6 @@
#include <signal.h>
#include <fcntl.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#ifdef USE_POLL
static void fdevent_poll_free(fdevents *ev) {
free(ev->pollfds);

7
src/fdevent_select.c

@ -1,3 +1,6 @@
#include "fdevent.h"
#include "buffer.h"
#include <sys/time.h>
#include <sys/types.h>
@ -9,10 +12,6 @@
#include <fcntl.h>
#include <assert.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#ifdef USE_SELECT
static int fdevent_select_reset(fdevents *ev) {

7
src/fdevent_solaris_devpoll.c

@ -1,3 +1,6 @@
#include "fdevent.h"
#include "buffer.h"
#include <sys/types.h>
#include <unistd.h>
@ -8,10 +11,6 @@
#include <signal.h>
#include <fcntl.h>
#include "fdevent.h"
#include "settings.h"
#include "buffer.h"
#ifdef USE_SOLARIS_DEVPOLL
static void fdevent_solaris_devpoll_free(fdevents *ev) {

10
src/http-header-glue.c

@ -1,9 +1,3 @@
#define _GNU_SOURCE
#include <string.h>
#include <errno.h>
#include <time.h>
#include "base.h"
#include "array.h"
#include "buffer.h"
@ -11,6 +5,10 @@
#include "etag.h"
#include "response.h"
#include <string.h>
#include <errno.h>
#include <time.h>
/*
* This was 'borrowed' from tcpdump.
*

16
src/http_auth.c

@ -1,6 +1,9 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "server.h"
#include "log.h"
#include "http_auth.h"
#include "http_auth_digest.h"
#include "inet_ntop_cache.h"
#include "stream.h"
#ifdef HAVE_CRYPT_H
# include <crypt.h>
@ -25,13 +28,6 @@
#include <unistd.h>
#include <ctype.h>
#include "server.h"
#include "log.h"
#include "http_auth.h"
#include "http_auth_digest.h"
#include "inet_ntop_cache.h"
#include "stream.h"
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else

5
src/http_auth_digest.c

@ -1,7 +1,8 @@
#include <string.h>
#include "buffer.h"
#include "http_auth_digest.h"
#include "buffer.h"
#include <string.h>
#ifndef USE_OPENSSL
# include "md5.h"

2
src/http_auth_digest.h

@ -2,7 +2,7 @@
#define _DIGCALC_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#define HASHLEN 16

10
src/http_chunk.c

@ -4,6 +4,11 @@
*
*/
#include "server.h"
#include "chunk.h"
#include "http_chunk.h"
#include "log.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -15,11 +20,6 @@
#include <errno.h>
#include <string.h>
#include "server.h"
#include "chunk.h"
#include "http_chunk.h"
#include "log.h"
static int http_chunk_append_len(server *srv, connection *con, size_t len) {
size_t i, olen = len, j;
buffer *b;

9
src/inet_ntop_cache.c

@ -1,12 +1,11 @@
#include <sys/types.h>
#include <string.h>
#include "base.h"
#include "inet_ntop_cache.h"
#include "sys-socket.h"
#include <sys/types.h>
#include <string.h>
const char * inet_ntop_cache_get_ip(server *srv, sock_addr *addr) {
#ifdef HAVE_IPV6
size_t ndx = 0, i;

6
src/joblist.c

@ -1,10 +1,10 @@
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "joblist.h"
#include "log.h"
#include <stdlib.h>
#include <string.h>
int joblist_append(server *srv, connection *con) {
if (con->in_joblist) return 0;

6
src/keyvalue.c

@ -1,10 +1,10 @@
#include "server.h"
#include "keyvalue.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "server.h"
#include "keyvalue.h"
static keyvalue http_versions[] = {
{ HTTP_VERSION_1_1, "HTTP/1.1" },
{ HTTP_VERSION_1_0, "HTTP/1.0" },

2
src/keyvalue.h

@ -2,7 +2,7 @@
#define _KEY_VALUE_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#ifdef HAVE_PCRE_H

15
src/log.c

@ -1,4 +1,6 @@
#define _GNU_SOURCE
#include "base.h"
#include "log.h"
#include "array.h"
#include <sys/types.h>
@ -12,19 +14,12 @@
#include <stdarg.h>
#include <stdio.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
# include <syslog.h>
#endif
#include "log.h"
#include "array.h"
#ifdef HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
# include <valgrind/valgrind.h>
#endif
#ifndef O_LARGEFILE

2
src/md5.c

@ -24,7 +24,7 @@ documentation and/or software.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#ifndef USE_OPENSSL

8
src/mod_access.c

@ -1,13 +1,13 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
array *access_deny;
} plugin_config;

20
src/mod_accesslog.c

@ -1,4 +1,12 @@
#define _GNU_SOURCE
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include "inet_ntop_cache.h"
#include "sys-socket.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -13,16 +21,6 @@
#include <stdio.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include "inet_ntop_cache.h"
#include "sys-socket.h"
#ifdef HAVE_SYSLOG_H
# include <syslog.h>
#endif

10
src/mod_alias.c

@ -1,14 +1,14 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
/* plugin config for all request/connections */
typedef struct {
array *alias;

10
src/mod_auth.c

@ -1,3 +1,8 @@
#include "plugin.h"
#include "http_auth.h"
#include "log.h"
#include "response.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -7,11 +12,6 @@
#include <fcntl.h>
#include <unistd.h>
#include "plugin.h"
#include "http_auth.h"
#include "log.h"
#include "response.h"
handler_t auth_ldap_init(server *srv, mod_auth_plugin_config *s);

35
src/mod_cgi.c

@ -1,14 +1,23 @@
#include "server.h"
#include "stat_cache.h"
#include "keyvalue.h"
#include "log.h"
#include "connections.h"
#include "joblist.h"
#include "http_chunk.h"
#include "plugin.h"
#include <sys/types.h>
#ifdef __WIN32
#include <winsock2.h>
# include <winsock2.h>
#else
#include <sys/socket.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <netinet/in.h>
#include <arpa/inet.h>
# include <sys/socket.h>
# include <sys/wait.h>
# include <sys/mman.h>
# include <netinet/in.h>
# include <arpa/inet.h>
#endif
#include <unistd.h>
@ -23,16 +32,6 @@
#include <stdio.h>
#include <fcntl.h>
#include "server.h"
#include "stat_cache.h"
#include "keyvalue.h"
#include "log.h"
#include "connections.h"
#include "joblist.h"
#include "http_chunk.h"
#include "plugin.h"
#ifdef HAVE_SYS_FILIO_H
# include <sys/filio.h>
#endif

18
src/mod_cml.c

@ -1,12 +1,3 @@
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include "buffer.h"
#include "server.h"
#include "log.h"
@ -17,6 +8,15 @@
#include "mod_cml.h"
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
/* init the plugin data */
INIT_FUNC(mod_cml_init) {
plugin_data *p;

18
src/mod_cml_funcs.c

@ -1,3 +1,12 @@
#include "buffer.h"
#include "server.h"
#include "log.h"
#include "plugin.h"
#include "response.h"
#include "mod_cml.h"
#include "mod_cml_funcs.h"
#include <sys/stat.h>
#include <time.h>
@ -8,15 +17,6 @@
#include <dirent.h>
#include <stdio.h>
#include "buffer.h"
#include "server.h"
#include "log.h"
#include "plugin.h"
#include "response.h"
#include "mod_cml.h"
#include "mod_cml_funcs.h"
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else

2
src/mod_cml_funcs.h

@ -2,7 +2,7 @@
#define _MOD_CML_FUNCS_H_
#ifdef HAVE_CONFIG_H
#include "config.h"
# include "config.h"
#endif
#ifdef HAVE_LUA_H

12
src/mod_cml_lua.c

@ -1,9 +1,3 @@
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#include "mod_cml.h"
#include "mod_cml_funcs.h"
#include "log.h"
@ -11,6 +5,12 @@
#include "stat_cache.h"
#include <assert.h>
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include <string.h>
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else

24
src/mod_compress.c

@ -1,14 +1,3 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -20,6 +9,17 @@
#include "crc32.h"
#include "etag.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <time.h>
#if defined HAVE_ZLIB_H && defined HAVE_LIBZ
# define USE_ZLIB
# include <zlib.h>
@ -42,7 +42,7 @@
#define HTTP_ACCEPT_ENCODING_BZIP2 BV(4)
#ifdef __WIN32
#define mkdir(x,y) mkdir(x)
# define mkdir(x,y) mkdir(x)
#endif
typedef struct {

20
src/mod_dirlisting.c

@ -1,13 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -18,6 +8,16 @@
#include "stat_cache.h"
#include "stream.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
/**
* this is a dirlisting for a lighttpd plugin
*/

8
src/mod_evasive.c

@ -1,7 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -10,6 +6,10 @@
#include "inet_ntop_cache.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
/**
* mod_evasive
*

8
src/mod_evhost.c

@ -1,12 +1,12 @@
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include "plugin.h"
#include "log.h"
#include "response.h"
#include "stat_cache.h"
#include <string.h>
#include <errno.h>
#include <ctype.h>
typedef struct {
/* unparsed pieces */
buffer *path_pieces_raw;

10
src/mod_expire.c

@ -1,8 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -11,6 +6,11 @@
#include "plugin.h"
#include "stat_cache.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
/**
* this is a expire module for a lighttpd
*

18
src/mod_extforward.c

@ -1,3 +1,12 @@
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include "inet_ntop_cache.h"
#include "configfile.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@ -8,15 +17,6 @@
#include <stdio.h>
#include <netinet/in.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include "inet_ntop_cache.h"
#include "configfile.h"
/**
* mod_extforward.c for lighttpd, by comman.kang <at> gmail <dot> com
* extended, modified by Lionel Elie Mamane (LEM), lionel <at> mamane <dot> lu

33
src/mod_fastcgi.c

@ -1,13 +1,3 @@
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <signal.h>
#include "buffer.h"
#include "server.h"
#include "keyvalue.h"
@ -25,15 +15,26 @@
#include "stat_cache.h"
#include "status_counter.h"
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <signal.h>
#ifdef HAVE_FASTCGI_FASTCGI_H
#include <fastcgi/fastcgi.h>
#else
#ifdef HAVE_FASTCGI_H
#include <fastcgi.h>
# include <fastcgi/fastcgi.h>
#else
#include "fastcgi.h"
#endif
# ifdef HAVE_FASTCGI_H
# include <fastcgi.h>
# else
# include "fastcgi.h"
# endif
#endif /* HAVE_FASTCGI_FASTCGI_H */
#include <stdio.h>
#ifdef HAVE_SYS_FILIO_H

10
src/mod_flv_streaming.c

@ -1,7 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -11,9 +7,9 @@
#include "plugin.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
/* plugin config for all request/connections */

11
src/mod_indexfile.c

@ -1,9 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -12,6 +6,11 @@
#include "stat_cache.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
/* plugin config for all request/connections */
typedef struct {

12
src/mod_magnet.c

@ -1,9 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <setjmp.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -16,6 +10,12 @@
#include "status_counter.h"
#include "etag.h"
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <setjmp.h>
#ifdef HAVE_LUA_H
#include <lua.h>
#include <lauxlib.h>

6
src/mod_magnet_cache.c

@ -1,10 +1,10 @@
#include "mod_magnet_cache.h"
#include "stat_cache.h"
#include <stdlib.h>
#include <time.h>
#include <assert.h>
#include "mod_magnet_cache.h"
#include "stat_cache.h"
#ifdef HAVE_LUA_H
#include <lualib.h>
#include <lauxlib.h>

20
src/mod_proxy.c

@ -1,13 +1,3 @@
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include "buffer.h"
#include "server.h"
#include "keyvalue.h"
@ -24,6 +14,16 @@
#include "inet_ntop_cache.h"
#include "crc32.h"
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <stdio.h>
#ifdef HAVE_SYS_FILIO_H

10
src/mod_redirect.c

@ -1,7 +1,3 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
@ -9,9 +5,9 @@
#include "plugin.h"
#include "response.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
pcre_keyvalue_buffer *redirect;

10
src/mod_rewrite.c

@ -1,16 +1,12 @@
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
#ifdef HAVE_PCRE_H

15
src/mod_rrdtool.c

@ -1,4 +1,10 @@
#define _GNU_SOURCE
#include "server.h"
#include "connections.h"
#include "response.h"
#include "connections.h"
#include "log.h"
#include "plugin.h"
#include <sys/types.h>
#include <fcntl.h>
@ -9,13 +15,6 @@
#include <errno.h>
#include <time.h>
#include "server.h"
#include "connections.h"
#include "response.h"
#include "connections.h"
#include "log.h"
#include "plugin.h"
#ifdef HAVE_FORK
/* no need for waitpid if we don't have fork */
#include <sys/wait.h>

25
src/mod_scgi.c

@ -1,13 +1,3 @@
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <signal.h>
#include "buffer.h"
#include "server.h"
#include "keyvalue.h"
@ -23,6 +13,16 @@
#include &#