[core] reduce exposure of unistd.h, other includes

reduce exposure of unistd.h, and some other include cleanup
personal/stbuehler/mod-csrf
Glenn Strauss 2017-06-21 21:41:59 -04:00
parent 6691eb377e
commit 9e75b81982
12 changed files with 12 additions and 10 deletions

View File

@ -3,6 +3,8 @@
#include "buffer.h"
#include "etag.h"
#include <sys/stat.h>
#if defined HAVE_STDINT_H
# include <stdint.h>
#elif defined HAVE_INTTYPES_H

View File

@ -5,8 +5,7 @@
#include "buffer.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
struct stat; /* declaration */
typedef enum { ETAG_USE_INODE = 1, ETAG_USE_MTIME = 2, ETAG_USE_SIZE = 4 } etag_flags_t;

View File

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

View File

@ -18,6 +18,7 @@
#include "sys-strings.h"
#include "sys-socket.h"
#include <unistd.h>
#ifndef _WIN32
#include <netdb.h>
#endif

View File

@ -2,7 +2,6 @@
#include "base.h"
#include "joblist.h"
#include "log.h"
#include <stdlib.h>
#include <string.h>

View File

@ -8,6 +8,7 @@
#include <time.h>
#include <string.h>
#include <stdarg.h>
#include <unistd.h>
#ifdef HAVE_SYSLOG_H
# include <syslog.h>

View File

@ -1,8 +1,12 @@
#ifndef _LOG_H_
#define _LOG_H_
#include "first.h"
#include <sys/types.h>
#include "server.h"
#include "buffer.h"
struct server; /* declaration */
typedef struct server server;
struct timespec; /* declaration */
int log_clock_gettime_realtime (struct timespec *ts);

View File

@ -36,6 +36,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
typedef struct {
buffer *auth_gssapi_keytab;

View File

@ -14,7 +14,6 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
/* init the plugin data */
INIT_FUNC(mod_cml_init) {

View File

@ -6,7 +6,6 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <dirent.h>
#include <lauxlib.h>

View File

@ -14,7 +14,6 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <stdio.h>

View File

@ -19,9 +19,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "sys-socket.h"
int http_response_write_header(server *srv, connection *con) {
buffer *b;