mirror of
https://github.com/rspamd/rspamd.git
synced 2024-08-23 05:54:56 +02:00
![Vsevolod Stakhov](/assets/img/avatar_default.png)
* Add support for sendfile in io dispatcher * Fix issues with compatibility of worker_task and smtp proxy * Proxy DATA command
338 lines
5.5 KiB
C
338 lines
5.5 KiB
C
#ifndef RSPAMD_CONFIG_H_IN
|
|
#define RSPAMD_CONFIG_H_IN
|
|
|
|
#cmakedefine HAVE_SYS_TYPES_H 1
|
|
|
|
#cmakedefine HAVE_SYS_TIME_H 1
|
|
|
|
#cmakedefine HAVE_SYS_UIO_H 1
|
|
|
|
#cmakedefine HAVE_FCNTL_H 1
|
|
|
|
#cmakedefine HAVE_MATH_H 1
|
|
|
|
#cmakedefine HAVE_STDIO_H 1
|
|
|
|
#cmakedefine HAVE_STDLIB_H 1
|
|
|
|
#cmakedefine HAVE_STRING_H 1
|
|
|
|
#cmakedefine HAVE_STRINGS_H 1
|
|
|
|
#cmakedefine HAVE_TIME_H 1
|
|
|
|
#cmakedefine HAVE_UNISTD_H 1
|
|
|
|
#cmakedefine HAVE_SYSEXITS_H 1
|
|
|
|
#cmakedefine HAVE_STDINT_H 1
|
|
|
|
#cmakedefine HAVE_INTTYPES_H 1
|
|
|
|
#cmakedefine HAVE_STDBOOL_H 1
|
|
|
|
#cmakedefine HAVE_ARPA_INET_H 1
|
|
#cmakedefine HAVE_NETINET_IN_H 1
|
|
|
|
#cmakedefine HAVE_NETDB_H 1
|
|
|
|
#cmakedefine HAVE_POLL_H 1
|
|
|
|
#cmakedefine HAVE_SYSLOG_H 1
|
|
|
|
#cmakedefine HAVE_LIBUTIL_H 1
|
|
|
|
#cmakedefine HAVE_LIBGEN_H 1
|
|
|
|
#cmakedefine HAVE_LOCALE_H 1
|
|
|
|
#cmakedefine HAVE_GRP_H 1
|
|
#cmakedefine HAVE_PWD_H 1
|
|
|
|
#cmakedefine HAVE_GLOB_H 1
|
|
|
|
#cmakedefine HAVE_ENDIAN_H 1
|
|
#cmakedefine HAVE_SYS_ENDIAN_H 1
|
|
#cmakedefine HAVE_MACHINE_ENDIAN_H 1
|
|
#cmakedefine HAVE_SYS_CDEFS_H 1
|
|
|
|
#cmakedefine HAVE_SYS_QUEUE_H 1
|
|
#cmakedefine HAVE_SYS_MMAN_H 1
|
|
#cmakedefine HAVE_SYS_SOCKET_H 1
|
|
#cmakedefine HAVE_SYS_UN_H 1
|
|
#cmakedefine HAVE_SYS_STAT_H 1
|
|
#cmakedefine HAVE_SYS_WAIT_H 1
|
|
#cmakedefine HAVE_SYS_PARAM_H 1
|
|
#cmakedefine HAVE_SYS_FILE_H 1
|
|
#cmakedefine HAVE_SYS_RESOURCE_H 1
|
|
|
|
#cmakedefine HAVE_PIDFILE 1
|
|
|
|
#cmakedefine HAVE_SETPROCTITLE 1
|
|
|
|
#cmakedefine HAVE_GETPAGESIZE 1
|
|
|
|
#cmakedefine HAVE_NANOSLEEP 1
|
|
|
|
#cmakedefine HAVE_PATH_MAX 1
|
|
|
|
#cmakedefine HAVE_MAXPATHLEN 1
|
|
|
|
#cmakedefine HAVE_MMAP_SHARED 1
|
|
|
|
#cmakedefine HAVE_MMAP_ANON 1
|
|
|
|
#cmakedefine HAVE_MMAP_NOCORE 1
|
|
|
|
#cmakedefine HAVE_COMPATIBLE_QUEUE_H 1
|
|
|
|
#cmakedefine HAVE_SC_NPROCESSORS_ONLN 1
|
|
|
|
#cmakedefine HAVE_VFORK 1
|
|
|
|
#cmakedefine HAVE_WAIT4 1
|
|
|
|
#cmakedefine HAVE_WAITPID 1
|
|
|
|
#cmakedefine HAVE_FLOCK 1
|
|
|
|
#cmakedefine HAVE_TANHL 1
|
|
|
|
#cmakedefine HAVE_SA_SIGINFO 1
|
|
|
|
#cmakedefine DEBUG_MODE 1
|
|
|
|
#cmakedefine GMIME24 1
|
|
|
|
#cmakedefine HAVE_CLOCK_VIRTUAL 1
|
|
#cmakedefine HAVE_CLOCK_PROCESS_CPUTIME_ID 1
|
|
|
|
#cmakedefine WITHOUT_PERL 1
|
|
|
|
#cmakedefine WITH_LUA 1
|
|
|
|
#cmakedefine WITH_PROFILER 1
|
|
|
|
#cmakedefine WITH_JUDY 1
|
|
|
|
#cmakedefine WITH_GPERF_TOOLS 1
|
|
|
|
#cmakedefine HAVE_ASM_PAUSE 1
|
|
|
|
#cmakedefine BUILD_STATIC 1
|
|
|
|
#cmakedefine HAVE_SENDFILE 1
|
|
#cmakedefine HAVE_SYS_SENDFILE_H 1
|
|
|
|
#define RVERSION "${RSPAMD_VERSION}"
|
|
#define RSPAMD_MASTER_SITE_URL "${RSPAMD_MASTER_SITE_URL}"
|
|
|
|
#define MODULES_NUM ${RSPAMD_MODULES_NUM}
|
|
|
|
/* sys/types */
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
/* cdefs */
|
|
#ifdef HAVE_SYS_CDEFS_H
|
|
#include <sys/cdefs.h>
|
|
#endif
|
|
|
|
/* sys/param */
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
#include <sys/param.h>
|
|
#endif
|
|
|
|
/* stdint */
|
|
#ifdef HAVE_STDINT_H
|
|
#include <stdint.h>
|
|
#elif defined(HAVE_INTTYPES_H)
|
|
#include <inttypes.h>
|
|
#endif
|
|
|
|
/* stdbool */
|
|
#ifdef HAVE_STDBOOL_H
|
|
#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>
|
|
#endif
|
|
|
|
/* stdio */
|
|
#ifdef HAVE_STDIO_H
|
|
#include <stdio.h>
|
|
#endif
|
|
|
|
/* time */
|
|
#ifdef HAVE_TIME_H
|
|
#include <time.h>
|
|
#endif
|
|
|
|
/* sysexits */
|
|
#ifdef HAVE_SYSEXITS_H
|
|
#include <sysexits.h>
|
|
#endif
|
|
|
|
/* unistd */
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
|
|
/* string */
|
|
#ifdef HAVE_STDIO_H
|
|
#include <string.h>
|
|
#endif
|
|
|
|
/* fcntl */
|
|
#ifdef HAVE_FCNTL_H
|
|
#include <fcntl.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_LOCALE_H
|
|
#include <locale.h>
|
|
#define HAVE_SETLOCALE 1
|
|
#endif
|
|
|
|
#ifdef HAVE_SYS_SENDFILE_H
|
|
#include <sys/sendfile.h>
|
|
#endif
|
|
|
|
#ifdef WITH_GPERF_TOOLS
|
|
#include <google/profiler.h>
|
|
#endif
|
|
|
|
#include <errno.h>
|
|
#include <signal.h>
|
|
#include <event.h>
|
|
#include <glib.h>
|
|
|
|
#ifndef BUILD_STATIC
|
|
#include <gmodule.h>
|
|
#endif
|
|
|
|
#ifndef NO_GMIME
|
|
#include <gmime/gmime.h>
|
|
#endif
|
|
|
|
#define CMAKE_PREFIX "${CMAKE_INSTALL_PREFIX}"
|
|
#define ETC_PREFIX "${ETC_PREFIX}"
|
|
|
|
/* Forwarded declaration */
|
|
struct module_ctx;
|
|
struct config_file;
|
|
|
|
typedef struct module_s {
|
|
const char *name;
|
|
int (*module_init_func)(struct config_file *cfg, struct module_ctx **ctx);
|
|
int (*module_config_func)(struct config_file *cfg);
|
|
int (*module_reconfig_func)(struct config_file *cfg);
|
|
} module_t;
|
|
|
|
extern module_t modules[];
|
|
|
|
#endif
|