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

CHECK_INCLUDE_FILES(sys/eventfd.h HAVE_SYS_EVENTFD_H) CHECK_INCLUDE_FILES(sys/eventfd.h HAVE_SYS_EVENTFD_H)
CHECK_INCLUDE_FILES(aio.h HAVE_AIO_H) CHECK_INCLUDE_FILES(aio.h HAVE_AIO_H)
CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)


# Some dependencies # Some dependencies
IF(HAVE_SYS_WAIT_H) IF(HAVE_SYS_WAIT_H)

+ 4
- 35
config.h.in View File

#include <sys/timeb.h> #include <sys/timeb.h>
#endif #endif


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

/* sysexits */ /* sysexits */
#ifdef HAVE_SYSEXITS_H #ifdef HAVE_SYSEXITS_H
#include <sysexits.h> #include <sysexits.h>
#include <search.h> #include <search.h>
#endif #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 #ifdef WITH_GPERF_TOOLS
#include <google/profiler.h> #include <google/profiler.h>
#endif #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 <errno.h>
#include <signal.h> #include <signal.h>
#ifdef HAVE_SIGINFO_H #ifdef HAVE_SIGINFO_H

+ 8
- 0
src/aio_event.c View File

#include "aio_event.h" #include "aio_event.h"
#include "main.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 */ /* Linux syscall numbers */
#if defined(__i386__) #if defined(__i386__)
# define SYS_io_setup 245 # define SYS_io_setup 245

+ 3
- 0
src/buffer.c View File

#include "config.h" #include "config.h"
#include "buffer.h" #include "buffer.h"
#include "main.h" #include "main.h"
#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif


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

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

#include "util.h" #include "util.h"
#include "http.h" #include "http.h"


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

struct rspamd_client_request; struct rspamd_client_request;


/* /*

+ 4
- 0
src/main.c View File

#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <openssl/pem.h> #include <openssl/pem.h>
#endif #endif
#ifdef HAVE_LOCALE_H
#include <locale.h>
#define HAVE_SETLOCALE 1
#endif


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

+ 7
- 0
src/util.c View File

#include <openssl/err.h> #include <openssl/err.h>
#endif #endif


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

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

Loading…
Cancel
Save