summaryrefslogtreecommitdiff
path: root/mail/msmtp/patches
diff options
context:
space:
mode:
authorben <ben>2006-01-01 18:59:04 +0000
committerben <ben>2006-01-01 18:59:04 +0000
commit093067fe8bd6e6b16a6649f4c8f9a597277bb4a2 (patch)
tree3cd4b9688666955038486ef1c6853bb9b8899527 /mail/msmtp/patches
parent5e965df6c3b33f6e2fa19a7fc580d7d319830d1b (diff)
downloadpkgsrc-093067fe8bd6e6b16a6649f4c8f9a597277bb4a2.tar.gz
The msmtp manual states that it uses the same exit codes as sendmail.
Most of these exit codes are defined in gnulib/sysexit_.h EX_OK is defined as 0 in src/msmtp.c if it wasn't already defined. The variable error_code is assigned these exit values, and returned at the end of main(). On Interix, EX_OK is defined in unistd.h: #define EX_OK 0x8001 /* test for regular executable */ patch-ab changes the logic so that when error_code == EX_OK, the exit code is 0 instead of EX_OK. This should work everywhere.
Diffstat (limited to 'mail/msmtp/patches')
-rw-r--r--mail/msmtp/patches/patch-ab11
1 files changed, 11 insertions, 0 deletions
diff --git a/mail/msmtp/patches/patch-ab b/mail/msmtp/patches/patch-ab
new file mode 100644
index 00000000000..b59dcc9924b
--- /dev/null
+++ b/mail/msmtp/patches/patch-ab
@@ -0,0 +1,11 @@
+$NetBSD: patch-ab,v 1.1 2006/01/01 18:59:04 ben Exp $
+
+--- src/msmtp.c.orig Sun Aug 14 13:13:02 2005
++++ src/msmtp.c
+@@ -3382,5 +3382,5 @@ exit:
+ list_xfree(errmsg, free);
+ }
+
+- return error_code;
++ return (error_code == EX_OK) ? 0 : error_code;
+ }