[core] include "fdevent.h" where needed

(instead of providing #include "fdevent.h" in base.h)
personal/stbuehler/mod-csrf
Glenn Strauss 6 years ago
parent 20ed025685
commit ba953cdf45

@ -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);

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

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

@ -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;
}

@ -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);

@ -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"

@ -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,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "array.h"

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

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

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

@ -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,6 +1,7 @@
#include "first.h"
#include "base.h"
#include "fdevent.h"
#include "log.h"
#include "buffer.h"

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

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

@ -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