-
Notifications
You must be signed in to change notification settings - Fork 9
/
milter_cap.h
96 lines (77 loc) · 2.17 KB
/
milter_cap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/***********************************************************************
*
* milter_cap.h
*
* Determine capabilities of libmilter we're building against.
*
* Copyright (C) 2006 by Roaring Penguin Software Inc.
*
* This program may be distributed under the terms of the GNU General
* Public License, Version 2.
*
***********************************************************************/
#ifndef MILTER_CAP_H
#define MILTER_CAP_H 1
#ifndef SMFI_VERSION
#error "You must include libmilter/mfapi.h before milter_cap.h"
#endif
#ifndef SM_LM_VRS_MAJOR
#define SM_LM_VRS_MAJOR(v) (((v) & 0x7f000000) >> 24)
#endif
#ifndef SM_LM_VRS_MINOR
#define SM_LM_VRS_MINOR(v) (((v) & 0x007fff00) >> 8)
#endif
#ifndef SM_LM_VRS_PLVL
#define SM_LM_VRS_PLVL(v) ((v) & 0x0000007f)
#endif
#ifdef SMFIF_QUARANTINE
#define MILTER_BUILDLIB_HAS_QUARANTINE 1
#endif
/* UGLY hack... it's almost impossible to distinguish between the Sendmail
8.12 and 8.13 mfapi.h header. The only way to know for sure is as
follows... */
#ifdef SMFIF_QUARANTINE
#ifndef _FFR_QUARANTINE
/* We have SMFIR_QUARANTINE without _FFR_QUARANTINE. Must be Sendmail 8.13
or higher */
#define SM813 1
#endif
#endif
#ifdef SM813
#define MILTER_BUILDLIB_HAS_OPENSOCKET 1
#define MILTER_BUILDLIB_HAS_SETMLREPLY 1
#define MILTER_BUILDLIB_HAS_PROGRESS 1
#define MILTER_BUILDLIB_HAS_INSHEADER 1
#else
#ifdef _FFR_SMFI_OPENSOCKET
#define MILTER_BUILDLIB_HAS_OPENSOCKET 1
#endif
#ifdef _FFR_MULTILINE
#define MILTER_BUILDLIB_HAS_SETMLREPLY 1
#endif
#ifdef _FFR_SMFI_PROGRESS
#define MILTER_BUILDLIB_HAS_PROGRESS 1
#endif
#endif /* SM813 */
#if SMFI_VERSION > 2
#define MILTER_BUILDLIB_HAS_VERSION 1
#define MILTER_BUILDLIB_HAS_NEGOTIATE 1
#define MILTER_BUILDLIB_HAS_UNKNOWN 1
#define MILTER_BUILDLIB_HAS_DATA 1
#define MILTER_BUILDLIB_HAS_CHGFROM 1
#endif
#if SMFI_VERSION > 1
#define MILTER_BUILDLIB_HAS_CHGHDRS 1
#endif
#ifdef SMFIF_CHGFROM
#define MILTER_BUILDLIB_HAS_CHGFROM 1
#endif
#ifdef SMFIF_ADDRCPT_PAR
#define MILTER_BUILDLIB_HAS_ADDRCPT_PAR 1
#endif
#ifdef SMFIF_SETSYMLIST
#define MILTER_BUILDLIB_HAS_SETSYMLIST 1
#endif
extern int milter_version_ok(void);
extern void dump_milter_buildlib_info(void);
#endif