Mercurial > sm-archive
comparison src/sm-archive.cpp @ 9:48880e61ce5e
better autoconf, changes for solaris portability
author | carl |
---|---|
date | Wed, 03 Jan 2007 22:28:27 -0800 |
parents | ed73e6361570 |
children | f9e8bbf33a2a |
comparison
equal
deleted
inserted
replaced
8:ed73e6361570 | 9:48880e61ce5e |
---|---|
21 #include <sys/stat.h> | 21 #include <sys/stat.h> |
22 #include <errno.h> | 22 #include <errno.h> |
23 #include <sysexits.h> | 23 #include <sysexits.h> |
24 #include <unistd.h> | 24 #include <unistd.h> |
25 | 25 |
26 // needed for socket io | |
27 #include <sys/ioctl.h> | |
28 #include <net/if.h> | |
29 #include <arpa/inet.h> | |
30 #include <netinet/in.h> | |
31 #include <netinet/tcp.h> | |
32 #include <netdb.h> | |
33 #include <sys/socket.h> | |
34 #include <sys/un.h> | |
35 | |
36 // needed for thread | 26 // needed for thread |
37 #include <pthread.h> | 27 #include <pthread.h> |
38 | 28 |
39 // needed for std c++ collections | 29 // needed for std c++ collections |
40 #include <set> | 30 #include <set> |
41 #include <map> | 31 #include <map> |
42 #include <list> | 32 #include <list> |
43 | |
44 // for the dns resolver | |
45 #include <netinet/in.h> | |
46 #include <arpa/nameser.h> | |
47 #include <resolv.h> | |
48 | 33 |
49 // misc stuff needed here | 34 // misc stuff needed here |
50 #include <ctype.h> | 35 #include <ctype.h> |
51 #include <syslog.h> | 36 #include <syslog.h> |
52 #include <pwd.h> | 37 #include <pwd.h> |
53 #include <sys/wait.h> /* header for waitpid() and various macros */ | 38 #include <sys/wait.h> /* header for waitpid() and various macros */ |
54 #include <signal.h> /* header for signal functions */ | 39 #include <signal.h> /* header for signal functions */ |
55 | 40 |
56 #include "includes.h" | 41 #include "includes.h" |
57 | 42 |
43 #ifndef HAVE_DAEMON | |
44 #include "daemon.h" | |
45 #include "daemon.c" | |
46 #endif | |
47 | |
58 static char* smarchive_version="$Id$"; | 48 static char* smarchive_version="$Id$"; |
59 | 49 |
60 | 50 |
61 extern "C" { | 51 extern "C" { |
62 #include "libmilter/mfapi.h" | 52 #include <libmilter/mfapi.h> |
63 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr); | 53 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr); |
64 sfsistat mlfi_envfrom(SMFICTX *ctx, char **argv); | 54 sfsistat mlfi_envfrom(SMFICTX *ctx, char **argv); |
65 sfsistat mlfi_envrcpt(SMFICTX *ctx, char **argv); | 55 sfsistat mlfi_envrcpt(SMFICTX *ctx, char **argv); |
66 sfsistat mlfi_eom(SMFICTX *ctx); | 56 sfsistat mlfi_eom(SMFICTX *ctx); |
67 sfsistat mlfi_abort(SMFICTX *ctx); | 57 sfsistat mlfi_abort(SMFICTX *ctx); |