This one makes another function use const.
-- russ...@coker.com.au http://etbe.coker.com.au/ My Main Blog http://doc.coker.com.au/ My Documents Blog
diff -ru sendmail-8.14.3/include/libmilter/mfapi.h sendmail-8.14.3/include/libmilter/mfapi.h --- sendmail-8.14.3/include/libmilter/mfapi.h 2009-04-08 06:45:28.000000000 +1000 +++ sendmail-8.14.3/include/libmilter/mfapi.h 2009-04-08 06:47:56.000000000 +1000 @@ -101,7 +101,7 @@ struct smfiDesc { - char *xxfi_name; /* filter name */ + const char *xxfi_name; /* filter name */ int xxfi_version; /* version code -- do not change */ unsigned long xxfi_flags; /* flags */ @@ -393,7 +393,7 @@ */ /* Return the value of a symbol. */ -LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, char *)); +LIBMILTER_API char * smfi_getsymval __P((SMFICTX *, const char *)); /* ** Return the value of a symbol. @@ -407,7 +407,7 @@ ** the MTA for use in SMTP replies may call smfi_setreply before returning. */ -LIBMILTER_API int smfi_setreply __P((SMFICTX *, char *, char *, char *)); +LIBMILTER_API int smfi_setreply __P((SMFICTX *, const char *, const char *, const char *)); /* ** Alternatively, smfi_setmlreply can be called if a multi-line SMTP reply @@ -435,7 +435,7 @@ ** routine other than xxfi_eom. */ -LIBMILTER_API int smfi_addheader __P((SMFICTX *, char *, char *)); +LIBMILTER_API int smfi_addheader __P((SMFICTX *, const char *, const char *)); /* ** Add a header to the message. It is not checked for standards @@ -447,7 +447,7 @@ ** char *headerv; Header field value */ -LIBMILTER_API int smfi_chgheader __P((SMFICTX *, char *, int, char *)); +LIBMILTER_API int smfi_chgheader __P((SMFICTX *, const char *, int, const char *)); /* ** Change/delete a header in the message. It is not checked for standards diff -ru sendmail-8.14.3/libmilter/smfi.c sendmail-8.14.3/libmilter/smfi.c --- sendmail-8.14.3/libmilter/smfi.c 2009-04-08 06:45:28.000000000 +1000 +++ sendmail-8.14.3/libmilter/smfi.c 2009-04-08 06:47:48.000000000 +1000 @@ -13,7 +13,7 @@ #include <sm/varargs.h> #include "libmilter.h" -static int smfi_header __P((SMFICTX *, int, int, char *, char *)); +static int smfi_header __P((SMFICTX *, int, int, const char *, const char *)); static int myisenhsc __P((const char *, int)); /* for smfi_set{ml}reply, let's be generous. 256/16 should be sufficient */ @@ -39,8 +39,8 @@ SMFICTX *ctx; int cmd; int hdridx; - char *headerf; - char *headerv; + const char *headerf; + const char *headerv; { size_t len, l1, l2, offset; int r; @@ -89,8 +89,8 @@ int smfi_addheader(ctx, headerf, headerv) SMFICTX *ctx; - char *headerf; - char *headerv; + const char *headerf; + const char *headerv; { if (!mi_sendok(ctx, SMFIF_ADDHDRS)) return MI_FAILURE; @@ -140,9 +140,9 @@ int smfi_chgheader(ctx, headerf, hdridx, headerv) SMFICTX *ctx; - char *headerf; + const char *headerf; mi_int32 hdridx; - char *headerv; + const char *headerv; { if (!mi_sendok(ctx, SMFIF_CHGHDRS) || hdridx < 0) return MI_FAILURE; @@ -563,9 +563,9 @@ int smfi_setreply(ctx, rcode, xcode, message) SMFICTX *ctx; - char *rcode; - char *xcode; - char *message; + const char *rcode; + const char *xcode; + const char *message; { size_t len; char *buf; @@ -787,7 +787,7 @@ char * smfi_getsymval(ctx, symname) SMFICTX *ctx; - char *symname; + const char *symname; { int i; char **s;