From: Ken Hornstein Date: Mon, 9 Jan 2012 18:38:02 +0000 (-0500) Subject: Finally able to get rid of acconfig.h! Since we're doing slightly better X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=19f0a0fb37951be3155401e02425cb25365ff601;p=mmh Finally able to get rid of acconfig.h! Since we're doing slightly better in the autoconf universe, rename configure.in to configure.ac, the "more correct" name for the configure script template. --- diff --git a/Makefile.in b/Makefile.in index 6b7b1d6..8bb2b40 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,7 +75,7 @@ INSTALL_DATA = @INSTALL_DATA@ # all files in this directory included in the distribution DIST = ChangeLog COPYRIGHT DATE INSTALL MACHINES README VERSION \ ChangeLog install-sh mkinstalldirs Makefile.in aclocal.m4 \ - acconfig.h config.h.in configure.in configure stamp-h.in \ + config.h.in configure.ac configure stamp-h.in \ config.sub config.guess # subdirectories in distribution @@ -145,7 +145,7 @@ Makefile: Makefile.in config.status config.status: configure VERSION ./config.status --recheck -configure: configure.in aclocal.m4 +configure: configure.ac aclocal.m4 cd $(srcdir) && autoconf config.h: stamp-h @@ -153,7 +153,7 @@ stamp-h: config.h.in config.status ./config.status config.h stamp config.h.in: stamp-h.in -stamp-h.in: configure.in acconfig.h aclocal.m4 +stamp-h.in: configure.ac aclocal.m4 cd $(srcdir) && autoheader date > $@ diff --git a/acconfig.h b/acconfig.h deleted file mode 100644 index a99e544..0000000 --- a/acconfig.h +++ /dev/null @@ -1,29 +0,0 @@ - -/****** BEGIN USER CONFIGURATION SECTION *****/ - -/* - * IMPORTANT: You should no longer need to edit this file to handle - * your operating system. That should be handled and set correctly by - * configure now. - * - * These are slowly being phased out, but currently - * not everyone is auto-configured. Then decide if you - * wish to change the features that are compiled into nmh. - */ - -/* - * Directs nmh not to try and rewrite addresses - * to their official form. You probably don't - * want to change this without good reason. - */ -#define DUMB 1 - -/* - * Define this if you do not want nmh to attach the local hostname - * to local addresses. You must also define DUMB. You probably - * don't need this unless you are behind a firewall. - */ -/* #define REALLYDUMB 1 */ - -/***** END USER CONFIGURATION SECTION *****/ -@TOP@ diff --git a/configure.in b/configure.ac similarity index 100% rename from configure.in rename to configure.ac diff --git a/sbr/addrsbr.c b/sbr/addrsbr.c index 227b40b..649e06f 100644 --- a/sbr/addrsbr.c +++ b/sbr/addrsbr.c @@ -17,6 +17,9 @@ addresses. The routines in sbr/addrsbr.c associate semantics with those addresses. + The comments below are left in for historical purposes; DUMB and + REALLYDUMB are now the default in the code. + If #ifdef DUMB is in effect, a full 822-style parser is called for syntax recongition. This breaks each address into its components. Note however that no semantics are assumed about the parts or their @@ -113,9 +116,6 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) { char *pp; struct mailname *mp; -#ifndef DUMB - char *dp; -#endif /* not DUMB */ if (err[0]) { if (eresult) @@ -188,13 +188,11 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) else { mp->m_nohost = 1; mp->m_mbox = getcpy (mbox); -#ifdef DUMB if (route == NULL && dftype == LOCALHOST) { mp->m_host = NULL; mp->m_type = dftype; } else -#endif /* DUMB */ { mp->m_host = route ? NULL : getcpy (dfhost); mp->m_type = route ? NETHOST : dftype; @@ -206,27 +204,8 @@ getm (char *str, char *dfhost, int dftype, int wanthost, char *eresult) if (wanthost == AD_NHST) mp->m_type = !mh_strcasecmp (LocalName (), mp->m_host) ? LOCALHOST : NETHOST; -#ifdef DUMB else mp->m_type = mh_strcasecmp (LocalName(), mp->m_host) ? NETHOST : LOCALHOST; -#else /* not DUMB */ - else - if (pp = OfficialName (mp->m_host)) { - got_real_host: ; - free (mp->m_host); - mp->m_host = getcpy (pp); - mp->m_type = mh_strcasecmp (LocalName(), mp->m_host) ? NETHOST : LOCALHOST; - } - else { - if (dp = strchr(mp->m_host, '.')) { - *dp = NULL; - if (pp = OfficialName (mp->m_host)) - goto got_real_host; - *dp = '.'; - } - mp->m_type = BADHOST; - } -#endif /* not DUMB */ got_host: ; if (route) @@ -274,11 +253,9 @@ auxformat (struct mailname *mp, int extras) static char addr[BUFSIZ]; static char buffer[BUFSIZ]; -#ifdef DUMB if (mp->m_nohost) strncpy (addr, mp->m_mbox ? mp->m_mbox : "", sizeof(addr)); else -#endif /* DUMB */ if (mp->m_type != UUCPHOST) snprintf (addr, sizeof(addr), mp->m_host ? "%s%s@%s" : "%s%s", @@ -345,9 +322,7 @@ adrsprintf (char *username, char *domain) } } -#ifdef REALLYDUMB return username; -#endif if (domain == NULL) domain = LocalName();