comparison src/dnsbl.cpp @ 227:3fee608becbc stable-6-0-21

Fixes to compile on old systems without memrchr or string::clear(). Fix bug in spamassassin interface trying to clear a string with string::empty().
author Carl Byington <carl@five-ten-sg.com>
date Sat, 03 Jan 2009 15:16:47 -0800
parents 8e1cbf3d96fc
children ad38575e98ca
comparison
equal deleted inserted replaced
226:c3a4b03f371d 227:3fee608becbc
61 #include "includes.h" 61 #include "includes.h"
62 62
63 #ifndef HAVE_DAEMON 63 #ifndef HAVE_DAEMON
64 #include "daemon.h" 64 #include "daemon.h"
65 #include "daemon.c" 65 #include "daemon.c"
66 #endif
67
68 #ifndef HAVE_MEMRCHR
69 void *memrchr(const void *a, int c, size_t len);
70 void *memrchr(const void *a, int c, size_t len) {
71 const unsigned char *p = (const unsigned char *)a;
72 for (p += len-1; (const void *)p >= a; p--)
73 if (*p == c)
74 return (void *)p;
75 return (void *)0;
76 }
66 #endif 77 #endif
67 78
68 extern "C" { 79 extern "C" {
69 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr); 80 sfsistat mlfi_connect(SMFICTX *ctx, char *hostname, _SOCK_ADDR *hostaddr);
70 sfsistat mlfi_helo(SMFICTX * ctx, char *helohost); 81 sfsistat mlfi_helo(SMFICTX * ctx, char *helohost);