freebsd-ports/mail/mutt-devel/files/patch-05

82 lines
2.1 KiB
Plaintext
Raw Normal View History

--- acconfig.h.orig Tue Mar 11 17:04:02 1997
+++ acconfig.h Sat Mar 15 22:23:06 1997
@@ -18,6 +18,9 @@
#undef DOMAIN
@TOP@
+/* gethostname() can be used to obtain the domain name */
+#undef GETHOSTNAME_DOMAIN
+
/* use dotlocking to lock mailboxes? */
#undef USE_DOTLOCK
--- config.h.in.orig Wed Mar 12 17:46:39 1997
+++ config.h.in Sat Mar 15 22:27:01 1997
@@ -18,6 +18,9 @@
/* What is your domain name? */
#undef DOMAIN
+/* gethostname() can be used to obtain the domain name */
+/* #define GETHOSTNAME_DOMAIN 1 */
+
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
--- init.c.orig Tue Mar 11 17:29:14 1997
+++ init.c Sat Mar 15 22:26:44 1997
@@ -961,6 +961,19 @@
if (debuglevel > 0) start_debug();
#endif
+#ifdef GETHOSTNAME_DOMAIN
+ /* Get host and domain name */
+ gethostname (Hostname, sizeof (Hostname));
+ Hostname[sizeof (Hostname) - 1] = 0;
+ if ((p = strchr (Hostname, '.')) == NULL)
+ /* blech */
+ domain = "";
+ else
+ {
+ *p++ = 0;
+ domain = p;
+ }
+#else
/* And about the host... */
uname (&utsname);
strfcpy (Hostname, utsname.nodename, sizeof (Hostname));
@@ -971,6 +984,7 @@
*p++ = 0;
strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */
}
+#endif
#ifdef USE_DOMAIN
--- globals.h.orig Mon Mar 10 14:34:27 1997
+++ globals.h Sat Mar 15 22:29:01 1997
@@ -130,6 +130,13 @@
WHERE gid_t UserGid;
#endif /* USE_SETGID */
+/* if your gethostname() returns the domainname too */
+#ifdef GETHOSTNAME_DOMAIN
+WHERE char *domain;
+#undef DOMAIN
+#define DOMAIN domain
+#endif
+
#ifdef MAIN_C
const char *Weekdays[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
const char *Months[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "ERR" };
--- main.c.orig Fri Mar 7 18:57:24 1997
+++ main.c Sat Mar 15 22:28:14 1997
@@ -114,7 +114,7 @@
puts ("\n\nCompile time definitions:");
-#ifdef DOMAIN
+#if defined(DOMAIN) && !defined(GETHOSTNAME_DOMAIN)
printf ("DOMAIN=\"%s\"\n", DOMAIN);
#else
puts ("-DOMAIN");