Browse Source

[core] include "fdevent.h" where needed

(instead of providing #include "fdevent.h" in base.h)
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
ba953cdf45
  1. 7
      src/base.h
  2. 1
      src/chunk.c
  3. 1
      src/configfile.c
  4. 4
      src/fdevent.c
  5. 2
      src/fdevent.h
  6. 1
      src/http-header-glue.c
  7. 1
      src/http_chunk.c
  8. 1
      src/log.c
  9. 1
      src/mod_accesslog.c
  10. 1
      src/mod_deflate.c
  11. 1
      src/mod_mysql_vhost.c
  12. 3
      src/mod_status.c
  13. 1
      src/mod_trigger_b4_dl.c
  14. 1
      src/mod_vhostdb_dbi.c
  15. 1
      src/mod_vhostdb_mysql.c
  16. 1
      src/test_configfile.c

7
src/base.h

@ -22,11 +22,12 @@
#include "array.h"
#include "chunk.h"
#include "keyvalue.h"
#include "fdevent.h"
#include "sys-socket.h"
#include "splaytree.h"
#include "etag.h"
struct fdevents; /* declaration */
#ifdef HAVE_FAM_H
# include <fam.h>
#endif
@ -548,7 +549,7 @@ typedef struct server {
enum { ERRORLOG_FILE, ERRORLOG_FD, ERRORLOG_SYSLOG, ERRORLOG_PIPE } errorlog_mode;
buffer *errorlog_buf;
fdevents *ev, *ev_ins;
struct fdevents *ev;
buffer_plugin plugins;
void *plugin_slots;
@ -627,7 +628,7 @@ typedef struct server {
*/
array *status;
fdevent_handler_t event_handler;
int event_handler;
int (* network_backend_write)(struct server *srv, connection *con, int fd, chunkqueue *cq, off_t max_bytes);
handler_t (* request_env)(struct server *srv, connection *con);

1
src/chunk.c

@ -8,6 +8,7 @@
#include "chunk.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include <sys/types.h>

1
src/configfile.c

@ -1,6 +1,7 @@
#include "first.h"
#include "server.h"
#include "fdevent.h"
#include "log.h"
#include "stream.h"
#include "plugin.h"

4
src/fdevent.c

@ -1,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include <sys/types.h>
@ -12,7 +13,7 @@
#include <fcntl.h>
fdevents *fdevent_init(server *srv, size_t maxfds, fdevent_handler_t type) {
fdevents *fdevent_init(server *srv, size_t maxfds, int type) {
fdevents *ev;
ev = calloc(1, sizeof(*ev));
@ -79,6 +80,7 @@ fdevents *fdevent_init(server *srv, size_t maxfds, fdevent_handler_t type) {
}
return ev;
case FDEVENT_HANDLER_UNSET:
default:
break;
}

2
src/fdevent.h

@ -182,7 +182,7 @@ typedef struct fdevents {
int (*fcntl_set)(struct fdevents *ev, int fd);
} fdevents;
fdevents *fdevent_init(struct server *srv, size_t maxfds, fdevent_handler_t type);
fdevents *fdevent_init(struct server *srv, size_t maxfds, int type);
int fdevent_reset(fdevents *ev); /* "init" after fork() */
void fdevent_free(fdevents *ev);

1
src/http-header-glue.c

@ -3,6 +3,7 @@
#include "base.h"
#include "array.h"
#include "buffer.h"
#include "fdevent.h"
#include "log.h"
#include "etag.h"
#include "http_chunk.h"

1
src/http_chunk.c

@ -10,6 +10,7 @@
#include "chunk.h"
#include "http_chunk.h"
#include "stat_cache.h"
#include "fdevent.h"
#include "log.h"
#include <sys/types.h>

1
src/log.c

@ -1,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "array.h"

1
src/mod_accesslog.c

@ -1,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "buffer.h"

1
src/mod_deflate.c

@ -109,6 +109,7 @@
#include <time.h>
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "buffer.h"
#include "etag.h"

1
src/mod_mysql_vhost.c

@ -7,6 +7,7 @@
#include <mysql.h>
#include "plugin.h"
#include "fdevent.h"
#include "log.h"
#include "stat_cache.h"

3
src/mod_status.c

@ -4,6 +4,7 @@
#include "connections.h"
#include "response.h"
#include "connections.h"
#include "fdevent.h"
#include "log.h"
#include "plugin.h"
@ -803,7 +804,7 @@ static handler_t mod_status_handle_server_config(server *srv, connection *con, v
buffer *m = p->module_list;
size_t i;
struct ev_map { fdevent_handler_t et; const char *name; } event_handlers[] =
struct ev_map { int et; const char *name; } event_handlers[] =
{
/* - epoll is most reliable
* - select works everywhere

1
src/mod_trigger_b4_dl.c

@ -1,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "buffer.h"

1
src/mod_vhostdb_dbi.c

@ -7,6 +7,7 @@
#include "base.h"
#include "http_vhostdb.h"
#include "fdevent.h"
#include "log.h"
#include "plugin.h"

1
src/mod_vhostdb_mysql.c

@ -7,6 +7,7 @@
#include "base.h"
#include "http_vhostdb.h"
#include "fdevent.h"
#include "log.h"
#include "plugin.h"

1
src/test_configfile.c

@ -87,4 +87,5 @@ int main (void) {
/*
* stub functions (for linking)
*/
void fd_close_on_exec(int fd);
void fd_close_on_exec(int fd) { UNUSED(fd); }

Loading…
Cancel
Save