packages: mailx/mailx-bsdcompat.patch (NEW) - set bsdcompat option if calle...
baggins
baggins at pld-linux.org
Wed Apr 14 12:29:40 CEST 2010
Author: baggins Date: Wed Apr 14 10:29:40 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- set bsdcompat option if called as mail or Mail
---- Files affected:
packages/mailx:
mailx-bsdcompat.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/mailx/mailx-bsdcompat.patch
diff -u /dev/null packages/mailx/mailx-bsdcompat.patch:1.1
--- /dev/null Wed Apr 14 12:29:40 2010
+++ packages/mailx/mailx-bsdcompat.patch Wed Apr 14 12:29:35 2010
@@ -0,0 +1,28 @@
+--- nail-11.22/main.c~ 2005-03-04 18:11:23.000000000 +0100
++++ nail-11.22/main.c 2005-06-13 23:32:16.796870880 +0200
+@@ -70,6 +70,7 @@
+ #ifdef HAVE_SETLOCALE
+ #include <locale.h>
+ #endif /* HAVE_SETLOCALE */
++#include <libgen.h>
+
+ /*
+ * Mail -- a mail program
+@@ -111,11 +112,12 @@
+ }
+
+ starting = 1;
+- progname = strrchr(argv[0], '/');
+- if (progname != NULL)
+- progname++;
+- else
+- progname = argv[0];
++ progname = basename(strdup(argv[0]));
++ if (strncmp(progname, "mail", 4) == 0)
++ assign("bsdcompat", "1");
++ else if (strncmp(progname, "Mail", 4) == 0)
++ assign("bsdcompat", "1");
++
+ /*
+ * Set up a reasonable environment.
+ * Figure out whether we are being run interactively,
================================================================
More information about the pld-cvs-commit
mailing list