Browse Source

Move some rarely used includes from config.h

tags/0.7.0
Vsevolod Stakhov 10 years ago
parent
commit
a9fba6f528
7 changed files with 33 additions and 35 deletions
  1. 1
    0
      CMakeLists.txt
  2. 4
    35
      config.h.in
  3. 8
    0
      src/aio_event.c
  4. 3
    0
      src/buffer.c
  5. 6
    0
      src/client/rspamdclient.c
  6. 4
    0
      src/main.c
  7. 7
    0
      src/util.c

+ 1
- 0
CMakeLists.txt View File

@@ -729,6 +729,7 @@ CHECK_INCLUDE_FILES(linux/falloc.h HAVE_LINUX_FALLOC_H)
CHECK_INCLUDE_FILES(sys/eventfd.h HAVE_SYS_EVENTFD_H)
CHECK_INCLUDE_FILES(aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)

# Some dependencies
IF(HAVE_SYS_WAIT_H)

+ 4
- 35
config.h.in View File

@@ -328,6 +328,10 @@
#include <sys/timeb.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

/* sysexits */
#ifdef HAVE_SYSEXITS_H
#include <sysexits.h>
@@ -416,45 +420,10 @@
#include <search.h>
#endif

#ifdef HAVE_LOCALE_H
#include <locale.h>
#define HAVE_SETLOCALE 1
#endif

#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>
#endif

#ifdef HAVE_AIO_H
#include <aio.h>
#endif

#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif

#ifdef WITH_GPERF_TOOLS
#include <google/profiler.h>
#endif

#ifdef HAVE_FETCH_H
#include <fetch.h>
#elif defined(CURL_FOUND)
#include <curl/curl.h>
#endif

#ifdef HAVE_READPASSPHRASE_H
#include <readpassphrase.h>
#endif

#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif

#ifdef HAVE_PATHS_H
#include <paths.h>
#endif

#include <errno.h>
#include <signal.h>
#ifdef HAVE_SIGINFO_H

+ 8
- 0
src/aio_event.c View File

@@ -25,6 +25,14 @@
#include "aio_event.h"
#include "main.h"

#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>
#endif

#ifdef HAVE_AIO_H
#include <aio.h>
#endif

/* Linux syscall numbers */
#if defined(__i386__)
# define SYS_io_setup 245

+ 3
- 0
src/buffer.c View File

@@ -25,6 +25,9 @@
#include "config.h"
#include "buffer.h"
#include "main.h"
#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif

#define G_DISPATCHER_ERROR dispatcher_error_quark()
#define debug_ip(...) rspamd_conditional_debug(rspamd_main->logger, d->peer_addr, __FUNCTION__, __VA_ARGS__)

+ 6
- 0
src/client/rspamdclient.c View File

@@ -25,6 +25,12 @@
#include "util.h"
#include "http.h"

#ifdef HAVE_FETCH_H
#include <fetch.h>
#elif defined(CURL_FOUND)
#include <curl/curl.h>
#endif

struct rspamd_client_request;

/*

+ 4
- 0
src/main.c View File

@@ -42,6 +42,10 @@
#include <openssl/rsa.h>
#include <openssl/pem.h>
#endif
#ifdef HAVE_LOCALE_H
#include <locale.h>
#define HAVE_SETLOCALE 1
#endif

/* 2 seconds to fork new process in place of dead one */
#define SOFT_FORK_TIME 2

+ 7
- 0
src/util.c View File

@@ -36,6 +36,13 @@
#include <openssl/err.h>
#endif

#ifdef HAVE_TERMIOS_H
#include <termios.h>
#endif
#ifdef HAVE_READPASSPHRASE_H
#include <readpassphrase.h>
#endif

/* Check log messages intensity once per minute */
#define CHECK_TIME 60
/* More than 2 log messages per second */

Loading…
Cancel
Save