#include <stdbool.h>
#endif
-/* queue */
-#ifdef HAVE_COMPATIBLE_QUEUE_H
-#ifdef HAVE_SYS_QUEUE_H
-#include <sys/queue.h>
-#endif
-#else
-#include "queue.h"
-#endif
-
-/* sys/socket */
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-/* sys/file.h */
-#ifdef HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif
-
-/* sys/uio.h */
-#ifdef HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-
-/* sys/mman */
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-
-/* netinet issues */
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-
-/* unix sockets */
-#ifdef HAVE_SYS_UN_H
-#include <sys/un.h>
-#endif
-
-/* netdb */
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
/* stdlib */
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#include <time.h>
#endif
-/* timedb */
-#ifdef HAVE_SYS_TIMEB_H
-#include <sys/timeb.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* sysexits */
-#ifdef HAVE_SYSEXITS_H
-#include <sysexits.h>
-#endif
-
-/* unistd */
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
#endif
-
/* string */
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-/* strings */
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-/* fcntl */
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-/* Linux specific falloc.h */
-#ifdef HAVE_LINUX_FALLOC_H
-#include <linux/falloc.h>
-#endif
-
-/* poll */
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#endif
-
-/* sys/stat */
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-/* sys/wait */
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
-/* sys/resource.h */
-#ifdef HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-
-/* math */
-#ifdef HAVE_MATH_H
-#include <math.h>
-#endif
-
-/* libutil */
-#ifdef HAVE_LIBUTIL_H
-#include <libutil.h>
-#endif
-
-/* pwd and grp */
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-
-#ifdef HAVE_GRP_H
-#include <grp.h>
-#endif
-
-#ifdef HAVE_GLOB_H
-#include <glob.h>
-#endif
-
-/* syslog */
-#ifdef HAVE_SYSLOG_H
-#include <syslog.h>
-#endif
-
-#ifdef HAVE_LIBGEN_H
-#include <libgen.h>
-#define HAVE_DIRNAME 1
-#endif
-
-#ifdef HAVE_SEARCH_H
-#include <search.h>
-#endif
-
-#ifdef WITH_GPERF_TOOLS
-#include <google/profiler.h>
-#endif
-
-#ifdef HAVE_SCHED_YIELD
-#include <sched.h>
-#endif
-
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-
#include <errno.h>
-#include <signal.h>
-#ifdef HAVE_SIGINFO_H
-# include <siginfo.h>
-#endif
-#include <event.h>
-#if _EVENT_NUMERIC_VERSION > 0x02000000
-# include <event2/thread.h>
-#endif
+
#include <glib.h>
typedef off_t goffset;
#endif
-#ifndef BUILD_STATIC
-#include <gmodule.h>
-#endif
-
-#ifndef NO_GMIME
-#include <gmime/gmime.h>
-#endif
-
#ifndef ALIGN
#if defined(_MSC_VER)
# define ALIGN(x) __declspec(align(x))
*/
#include "_acism.h"
+#include "unix-std.h"
#define BACK ((SYMBOL)0)
#define ROOT ((STATE) 0)
#define TINYCDB_VERSION 0.77
#include "config.h"
+#include "unix-std.h"
+#include <event.h>
/*
* OpenBSD fix
plugins/chartable.c
plugins/fuzzy_check.c
plugins/spf.c
- plugins/dkim_check.c)
+ plugins/dkim_check.c libutil/unix-std.h)
SET(MODULES_LIST surbl regexp chartable fuzzy_check spf dkim)
SET(WORKERS_LIST normal controller smtp_proxy fuzzy lua http_proxy)
#include "http.h"
#include "rspamdclient.h"
#include "utlist.h"
+#include "unix-std.h"
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
#define DEFAULT_PORT 11333
#define DEFAULT_CONTROL_PORT 11334
event_base_loop (ev_base, 0);
g_hash_table_destroy (kwattrs);
- g_mime_shutdown ();
/* Wait for children processes */
cur = g_list_first (children);
#include "rspamdclient.h"
#include "util.h"
#include "http.h"
-#include "keypairs_cache.h"
+#include "unix-std.h"
#ifdef HAVE_FETCH_H
#include <fetch.h>
#include "config.h"
#include "ucl.h"
+#include <event.h>
struct rspamd_client_connection;
struct rspamd_http_message;
#include "libstat/stat_api.h"
#include "rspamd.h"
#include "libserver/worker_util.h"
-#include "utlist.h"
-
-#include "blake2.h"
#include "cryptobox.h"
#include "ottery.h"
#include "libutil/rrd.h"
+#include "unix-std.h"
+#include <math.h>
/* 60 seconds for worker's IO */
#define DEFAULT_WORKER_IO_TIMEOUT 60000
#include "libserver/worker_util.h"
#include "keypairs_cache.h"
#include "ottery.h"
+#include "unix-std.h"
/* Rotate keys each minute by default */
#define DEFAULT_ROTATION_TIME 60.0
#include "filter.h"
#include "rspamd.h"
#include "message.h"
-#include "cfg_file.h"
-#include "util.h"
-#include "expression.h"
-#include "libstat/stat_api.h"
-#include "utlist.h"
-
-#ifdef WITH_LUA
-# include "lua/lua_common.h"
-#endif
+#include "lua/lua_common.h"
+#include <math.h>
+
#define COMMON_PART_FACTOR 95
#define RSPAMD_MESSAGE_H
#include "config.h"
+#include <gmime/gmime.h>
struct rspamd_task;
struct controller_session;
#include "smtp.h"
#include "smtp_proto.h"
#include "smtp_utils.h"
+#include "unix-std.h"
gchar *
make_smtp_error (rspamd_mempool_t *pool,
#include "config.h"
#include "rspamd.h"
-#include "filter.h"
#include "smtp.h"
-#include "smtp_proto.h"
+#include "unix-std.h"
void
free_smtp_session (gpointer arg)
#include "config.h"
#include "buffer.h"
#include "rspamd.h"
+#include "unix-std.h"
#ifdef HAVE_SYS_SENDFILE_H
#include <sys/sendfile.h>
#endif
#include "expression.h"
#include "composites.h"
#include "libserver/worker_util.h"
+#include "unix-std.h"
+
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+#ifdef HAVE_GLOB_H
+#include <glob.h>
+#endif
struct rspamd_rcl_default_handler_data {
struct rspamd_rcl_struct_parser pd;
}
else if (g_ascii_strcasecmp (log_type, "syslog") == 0) {
/* Need to get facility */
+#ifdef HAVE_SYSLOG_H
cfg->log_facility = LOG_DAEMON;
cfg->log_type = RSPAMD_LOG_SYSLOG;
val = ucl_object_find_key (obj, "facility");
return FALSE;
}
}
+#endif
}
else if (g_ascii_strcasecmp (log_type,
"stderr") == 0 || g_ascii_strcasecmp (log_type, "console") == 0) {
#include "dynamic_cfg.h"
#include "utlist.h"
#include "stat_api.h"
+#include "unix-std.h"
+#include <math.h>
#define DEFAULT_SCORE 10.0
#include "map.h"
#include "filter.h"
#include "dynamic_cfg.h"
+#include "unix-std.h"
struct config_json_buf {
GString *buf;
#include "config.h"
#include "rspamd.h"
#include "fuzzy_backend.h"
+#include "unix-std.h"
#include <sqlite3.h>
#include "config.h"
#include "rspamd.h"
#include "proxy.h"
+#include "unix-std.h"
static void rspamd_proxy_backend_handler (gint fd, gshort what, gpointer data);
static void rspamd_proxy_client_handler (gint fd, gshort what, gpointer data);
#include "config.h"
#include "buffer.h"
+#include <event.h>
/**
* @file proxy.h
#include "config.h"
#include "rspamd.h"
#include "roll_history.h"
+#include "unix-std.h"
static const gchar rspamd_history_magic[] = {'r', 's', 'h', '1'};
#include "config.h"
#include "ref.h"
+#include "addr.h"
struct rspamd_task;
struct spf_resolved;
#include "symbols_cache.h"
#include "cfg_file.h"
#include "lua/lua_common.h"
+#include "unix-std.h"
+#include <math.h>
#define msg_err_cache(...) rspamd_default_log_function (G_LOG_LEVEL_CRITICAL, \
cache->static_pool->tag.tagname, cache->cfg->checksum, \
#include "config.h"
#include "ucl.h"
#include <lua.h>
-#define MAX_SYMBOL 128
+#include <event.h>
struct rspamd_task;
struct rspamd_config;
#include "lua/lua_common.h"
#include "composites.h"
#include "stat_api.h"
+#include "unix-std.h"
static GQuark
rspamd_task_quark (void)
#include "mem_pool.h"
#include "dns.h"
+#include <gmime/gmime.h>
+
enum rspamd_command {
CMD_CHECK,
CMD_SYMBOLS,
#include "message.h"
#include "lua/lua_common.h"
#include "worker_util.h"
+#include "unix-std.h"
+#ifdef WITH_GPERF_TOOLS
+#include <google/profiler.h>
+#endif
/**
* Return worker's control structure by its type
#include "config.h"
#include "stat_internal.h"
-#include "rspamd.h"
+#include "unix-std.h"
#define CHAIN_LENGTH 128
#include "libstat/stat_internal.h"
#include "libmime/message.h"
#include "lua/lua_common.h"
+#include "unix-std.h"
#define SQLITE3_BACKEND_TYPE "sqlite3"
#define SQLITE3_SCHEMA_VERSION "1"
#include "filter.h"
#include "cfg_file.h"
#include "stat_internal.h"
+#include "math.h"
static inline GQuark
bayes_error_quark (void)
#include "util.h"
#include "logger.h"
+#include "unix-std.h"
+/* pwd and grp */
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+
+
enum {
RSPAMD_IPV6_UNDEFINED = 0,
RSPAMD_IPV6_SUPPORTED,
#define ADDR_H_
#include "config.h"
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+/* unix sockets */
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
+
#include "mem_pool.h"
/**
*/
#include "config.h"
+#include <event.h>
#include "aio_event.h"
#include "rspamd.h"
+#include "unix-std.h"
#ifdef HAVE_SYS_EVENTFD_H
#include <sys/eventfd.h>
#include "ottery.h"
#include "keypair_private.h"
#include "cryptobox.h"
-#include <limits.h>
+#include "unix-std.h"
#define ENCRYPTED_VERSION " HTTP/1.0"
#include "rspamd.h"
#include "map.h"
#include "xxhash.h"
+#include "unix-std.h"
+
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
/* How much message should be repeated before it is count to be repeated one */
#define REPEATS_MIN 3
rspamd_log->enabled = TRUE;
return 0;
case RSPAMD_LOG_SYSLOG:
+#ifdef HAVE_SYSLOG_H
openlog ("rspamd", LOG_NDELAY | LOG_PID,
rspamd_log->cfg->log_facility);
rspamd_log->enabled = TRUE;
+#endif
return 0;
case RSPAMD_LOG_FILE:
rspamd_log->fd = open (rspamd_log->cfg->log_file,
/* Do nothing special */
break;
case RSPAMD_LOG_SYSLOG:
+#ifdef HAVE_SYSLOG_H
closelog ();
+#endif
break;
case RSPAMD_LOG_FILE:
if (rspamd_log->enabled) {
gpointer arg)
{
rspamd_logger_t *rspamd_log = arg;
-
+#ifdef HAVE_SYSLOG_H
struct {
GLogLevelFlags glib_level;
gint syslog_level;
module != NULL ? module : "",
function != NULL ? function : "",
message);
+#endif
}
/**
#include "util.h"
#include "mem_pool.h"
#include "blake2.h"
+#include "unix-std.h"
static const gchar *hash_fill = "1";
#define RSPAMD_MAP_H
#include "config.h"
+#include <event.h>
+
#include "mem_pool.h"
#include "radix.h"
#include "logger.h"
#include "utlist.h"
#include "ottery.h"
+#include "unix-std.h"
+
+#ifdef HAVE_SCHED_YIELD
+#include <sched.h>
+#endif
/* Sleep time for spin lock in nanoseconds */
#define MUTEX_SLEEP_TIME 10000000L
#include "printf.h"
#include "fstring.h"
-#include "rspamd.h"
+#include <math.h>
/**
* From FreeBSD libutil code
if (*fmt == '*') {
d = (gint)va_arg (args, gint);
if (G_UNLIKELY (d < 0)) {
- msg_err ("critical error: fraction width is less than 0");
return 0;
}
frac_width = (guint)d;
case '*':
d = (gint)va_arg (args, gint);
if (G_UNLIKELY (d < 0)) {
- msg_err ("critical error: size is less than 0");
return 0;
}
slen = (glong)d;
continue;
case 'N':
- c = LF;
+ c = '\n';
RSPAMD_PRINTF_APPEND (&c, 1);
continue;
#include "rrd.h"
#include "util.h"
#include "logger.h"
+#include "unix-std.h"
+#include <math.h>
#define msg_err_rrd(...) rspamd_default_log_function (G_LOG_LEVEL_CRITICAL, \
"rrd", file->id, \
#include "config.h"
#include "libutil/logger.h"
#include "libutil/sqlite_utils.h"
+#include "unix-std.h"
static GQuark
#include "config.h"
#include "util.h"
-#include "mem_pool.h"
#include "xxhash.h"
+#include <math.h>
static const guchar lc_map[256] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
--- /dev/null
+/*
+ * Copyright (c) 2015, Vsevolod Stakhov
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY AUTHOR ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AUTHOR BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef RSPAMD_UNIX_STD_H_H
+#define RSPAMD_UNIX_STD_H_H
+
+#include "config.h"
+
+/*
+ * Default unix system includes
+ */
+
+/* sys/file.h */
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
+/* sys/uio.h */
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+
+/* sys/mman */
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
+
+
+/* timedb */
+#ifdef HAVE_SYS_TIMEB_H
+#include <sys/timeb.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* sysexits */
+#ifdef HAVE_SYSEXITS_H
+#include <sysexits.h>
+#endif
+
+/* strings */
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+/* fcntl */
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#include <signal.h>
+
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
+#endif
#include "util.h"
#include "cfg_file.h"
#include "rspamd.h"
-#include "filter.h"
-#include "message.h"
+#include "unix-std.h"
#include "xxhash.h"
#include "ottery.h"
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
-
+/* libutil */
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
+#ifdef WITH_GPERF_TOOLS
+#include <google/profiler.h>
+#endif
+/* poll */
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+
+#ifdef HAVE_SIGINFO_H
+#include <siginfo.h>
+#endif
+/* sys/wait */
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+/* sys/resource.h */
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
#include "blake2.h"
#include "addr.h"
#include "str_util.h"
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
+#endif
+#include <event.h>
+
struct rspamd_config;
struct rspamd_main;
struct workq;
#include "lua_common.h"
#include "buffer.h"
+#include "unix-std.h"
+#include <math.h>
/* Public prototypes */
struct rspamd_io_dispatcher_s * lua_check_io_dispatcher (lua_State * L);
*/
#include "lua_common.h"
-#include "symbols_cache.h"
#include "expression.h"
-#include "filter.h"
#include "composites.h"
+#include "unix-std.h"
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
#endif
#include "dns.h"
#include "http.h"
#include "utlist.h"
+#include "unix-std.h"
/***
* @module rspamd_http
*/
#include "lua_common.h"
+#include "unix-std.h"
#ifdef HAVE_OPENSSL
#include <openssl/err.h>
#include "buffer.h"
#include "dns.h"
#include "utlist.h"
+#include "unix-std.h"
static void lua_tcp_handler (int fd, short what, gpointer ud);
/***
#include "html.h"
#include "cfg_rcl.h"
#include "tokenizers/tokenizers.h"
+#include <math.h>
/***
* @module rspamd_util
#include "message.h"
#include "map.h"
#include "dns.h"
+#include "unix-std.h"
#include "lua/lua_common.h"
#include "libserver/worker_util.h"
#include "fuzzy_storage.h"
#include "utlist.h"
-#include "rspamd.h"
#include "blake2.h"
#include "ottery.h"
-#include "cryptobox.h"
-#include "keypairs_cache.h"
#include "keypair_private.h"
-#include "http.h"
+#include "unix-std.h"
+#include <math.h>
#define DEFAULT_SYMBOL "R_FUZZY_HASH"
#define DEFAULT_UPSTREAM_ERROR_TIME 10
#include "mime_expressions.h"
#include "libutil/map.h"
#include "lua/lua_common.h"
-#include "rspamd.h"
struct regexp_module_item {
struct rspamd_expression *expr;
#include "libutil/hash.h"
#include "libutil/map.h"
#include "rspamd.h"
+#include "addr.h"
#define DEFAULT_SYMBOL_FAIL "R_SPF_FAIL"
#define DEFAULT_SYMBOL_SOFTFAIL "R_SPF_SOFTFAIL"
#include "config.h"
#include "libmime/message.h"
-#include "libutil/hash.h"
#include "libutil/map.h"
#include "rspamd.h"
#include "surbl.h"
-#include "regexp.h"
-#include "acism.h"
-
#include "utlist.h"
+#include "unix-std.h"
static struct surbl_ctx *surbl_module_ctx = NULL;
#include "config.h"
#include "acism.h"
-#include "rspamd.h"
#define DEFAULT_REDIRECTOR_PORT 8080
#define DEFAULT_SURBL_WEIGHT 10
#include "cryptobox.h"
#include "rspamd.h"
#include "rspamadm.h"
+#include "unix-std.h"
static void rspamadm_pw (gint argc, gchar **argv);
static const char *rspamadm_pw_help (gboolean full_help);
#include "rspamadm.h"
#include "rspamd.h"
#include "ottery.h"
+#include "unix-std.h"
+
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
static gboolean verbose = FALSE;
static gboolean list_commands = FALSE;
#include "rspamd.h"
#include "libutil/map.h"
#include "fuzzy_storage.h"
-#include "libserver/symbols_cache.h"
#include "lua/lua_common.h"
#include "libserver/worker_util.h"
#include "ottery.h"
#include "xxhash.h"
#include "utlist.h"
-#include "libstat/stat_api.h"
-#include "cryptobox.h"
-#include "regexp.h"
+#include "unix-std.h"
+/* sysexits */
+#ifdef HAVE_SYSEXITS_H
+#include <sysexits.h>
+#endif
+/* pwd and grp */
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_GRP_H
+#include <grp.h>
+#endif
+
+#include <signal.h>
+#ifdef HAVE_SIGINFO_H
+#include <siginfo.h>
+#endif
+/* sys/resource.h */
+#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/resource.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_LIBUTIL_H
+#include <libutil.h>
+#endif
+#ifdef WITH_GPERF_TOOLS
+#include <google/profiler.h>
+#endif
+
#ifdef HAVE_OPENSSL
#include <openssl/rand.h>
#include <openssl/err.h>
#include "rspamd.h"
#include "smtp.h"
#include "libserver/worker_util.h"
+#include "unix-std.h"
/*
* SMTP proxy is a simple smtp proxy worker for dns resolving and
*/
#include "config.h"
-#include "tests.h"
#include "rspamd.h"
#include "aio_event.h"
-#include "mem_pool.h"
-
+#include "unix-std.h"
extern struct event_base *base;
#include "fstring.h"
#include "ottery.h"
#include "cryptobox.h"
+#include "unix-std.h"
static const int mapping_size = 64 * 8192 + 1;
static const int max_seg = 32;
#include "tests.h"
#include "ottery.h"
#include "cryptobox.h"
+#include "unix-std.h"
+#include <math.h>
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
static const int file_blocks = 1;
static const int pconns = 100;
#include "rspamd.h"
#include "util.h"
#include "lua/lua_common.h"
+#include "unix-std.h"
+
+#ifdef HAVE_GLOB_H
+#include <glob.h>
+#endif
static const char *lua_src = BUILDROOT "/test/lua/tests.lua";
#include "config.h"
#include "mem_pool.h"
#include "tests.h"
+#include "unix-std.h"
+#include <math.h>
+
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
#define TEST_BUF "test bufffer"
#define TEST2_BUF "test bufffertest bufffer"
#include "config.h"
#include "rspamd.h"
#include "shingles.h"
-#include "fstring.h"
#include "ottery.h"
+#include <math.h>
static void
generate_random_string (char *begin, size_t len)
#include "config.h"
#include "rspamd.h"
-#include "cfg_file.h"
-#include "regexp.h"
#include "libstat/stat_api.h"
#include "tests.h"
#include "config.h"
#include "rspamd.h"
-#include "upstream.h"
#include "ottery.h"
+#include <math.h>
const char *test_upstream_list = "microsoft.com:443:1,google.com:80:2,kernel.org:443:3";
const char *new_upstream_list = "freebsd.org:80";