SOURCES: nail-bsdcompat.patch (NEW) - if called as mail or Mail se...
baggins
baggins at pld-linux.org
Tue Jun 14 09:49:22 CEST 2005
Author: baggins Date: Tue Jun 14 07:49:22 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- if called as mail or Mail set bsdcompat option
---- Files affected:
SOURCES:
nail-bsdcompat.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/nail-bsdcompat.patch
diff -u /dev/null SOURCES/nail-bsdcompat.patch:1.1
--- /dev/null Tue Jun 14 09:49:22 2005
+++ SOURCES/nail-bsdcompat.patch Tue Jun 14 09:49:17 2005
@@ -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