Browse Source

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

reduce exposure of unistd.h, and some other include cleanup
personal/stbuehler/mod-csrf
Glenn Strauss 4 years ago
parent
commit
9e75b81982
  1. 2
      src/etag.c
  2. 3
      src/etag.h
  3. 1
      src/fdevent.c
  4. 1
      src/http-header-glue.c
  5. 1
      src/joblist.c
  6. 1
      src/log.c
  7. 6
      src/log.h
  8. 1
      src/mod_authn_gssapi.c
  9. 1
      src/mod_cml.c
  10. 1
      src/mod_cml_funcs.c
  11. 1
      src/mod_status.c
  12. 3
      src/response.c

2
src/etag.c

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

3
src/etag.h

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

1
src/fdevent.c

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

1
src/http-header-glue.c

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

1
src/joblist.c

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

1
src/log.c

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

6
src/log.h

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

1
src/mod_authn_gssapi.c

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

1
src/mod_cml.c

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

1
src/mod_cml_funcs.c

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

1
src/mod_status.c

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

3
src/response.c

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

Loading…
Cancel
Save