]> source.dussan.org Git - rspamd.git/commitdiff
Move some rarely used includes from config.h
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Apr 2014 22:48:08 +0000 (15:48 -0700)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Apr 2014 22:48:08 +0000 (15:48 -0700)
CMakeLists.txt
config.h.in
src/aio_event.c
src/buffer.c
src/client/rspamdclient.c
src/main.c
src/util.c

index 4a5eb0f9ad0921be7568cac2f0cc882803b9889e..1cc4b009e4d57cc538f0f755c878047b23f8f2f3 100644 (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)
index 1598f51e1d18d7d8d0035ae18198aa45e81c2ebb..654d6347652d19eb5480144a887a7573c0e40088 100644 (file)
 #include <sys/timeb.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 /* sysexits */
 #ifdef HAVE_SYSEXITS_H
 #include <sysexits.h>
 #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
index 60cd95295db087aae337dcf172bef934191260b3..ccda37083c6ed649a297419481b8cec839844db6 100644 (file)
 #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
index 73bb6e654b00d8a2352dea1d47a16957c3337613..33efa86ed1a3bfb2738fac2725700c096be2ea22 100644 (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__)
index 293c49214e208fd426f40c68313bc62ce5fd2a82..59dc77b7692068a473b185e35dbad361847762a9 100644 (file)
 #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;
 
 /*
index 1c5260428d1907e9a57009a7396b36bb569adf29..e5c444a5b47d51d04427125c702ad5c6e32b6e2c 100644 (file)
 #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
index 2acf58845fcacb38096100b6590bba653366864b..3db6a3fe1d11d8bac451439854a339be15f98333 100644 (file)
 #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 */