From: markus schnalke Date: Tue, 27 Mar 2012 06:58:17 +0000 (+0200) Subject: Remove OS-specific defines. Remove GECOS ampersand-magic, along with it. X-Git-Tag: mmh-thesis-end~167 X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;h=1ec4ef34243a756d1f51718e7e15b094f4b36618;p=mmh Remove OS-specific defines. Remove GECOS ampersand-magic, along with it. Pulled in from nmh. Thanks to Ken Hornstein. --- diff --git a/configure.ac b/configure.ac index a1f287c..b3b517b 100644 --- a/configure.ac +++ b/configure.ac @@ -557,34 +557,6 @@ nmh_cv_path_signal_h=$SIGNAL_H SIGNAL_H=$nmh_cv_path_signal_h AC_SUBST(SIGNAL_H)dnl -dnl ---------------- -dnl OS SPECIFIC DEFINES -dnl ---------------- -AH_TEMPLATE(BSD42, [Defined for SunOS 4, FreeBSD, NetBSD, OpenBSD, BSD/OS, Mac OS X/Rhapsody -- does PicoBSD have uname?]) -AH_TEMPLATE(SCO_5_STDIO, [Defined for SCO5.]) - -case "$target_os" in - - sunos4*) - AC_DEFINE(BSD42) - ;; - freebsd*) - AC_DEFINE(BSD42) - ;; - netbsd*) - AC_DEFINE(BSD42) - ;; - openbsd*) - AC_DEFINE(BSD42) - ;; - bsd/os*) - AC_DEFINE(BSD42) - ;; - sco5*) - AC_DEFINE(SCO_5_STDIO) - ;; -esac - dnl ---------------- dnl OUTPUT MAKEFILES diff --git a/sbr/discard.c b/sbr/discard.c index e38e5b0..d3eabd0 100644 --- a/sbr/discard.c +++ b/sbr/discard.c @@ -7,16 +7,8 @@ */ #include - #include -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -#endif - void discard(FILE *io) diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index 2ebb44a..c7f4279 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -154,14 +154,6 @@ static int (*eom_action)(int) = NULL; # define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC #endif -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -# define DEFINED__FILBUF_TO_SOMETHING_SPECIFIC -#endif - #ifndef DEFINED__FILBUF_TO_SOMETHING_SPECIFIC extern int _filbuf(FILE*); #endif diff --git a/sbr/mts.c b/sbr/mts.c index 7c70e46..e7db876 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -112,29 +112,7 @@ getuserinfo(void) ** information in the GECOS field, like phone number. */ for (cp = tmp; *np != '\0' && *np != ',';) { -#ifndef BSD42 *cp++ = *np++; -#else /* BSD42 */ - /* - ** On BSD(-derived) systems, the system utilities that - ** deal with the GECOS field (finger, mail, sendmail, - ** etc.) translate any '&' character in it to the login name, - ** with the first letter capitalized. So, for instance, - ** fingering a user "bob" with the GECOS field "& Jones" - ** would reveal him to be "In real life: Bob Jones". - ** Surprisingly, though, the OS doesn't do the translation - ** for you, so we have to do it manually here. - */ - if (*np == '&') { /* blech! */ - strcpy(cp, pw->pw_name); - *cp = toupper(*cp); - while (*cp) - cp++; - np++; - } else { - *cp++ = *np++; - } -#endif /* BSD42 */ } *cp = '\0'; strncpy(username, pw->pw_name, sizeof(username)); diff --git a/uip/mhcachesbr.c b/uip/mhcachesbr.c index 975d2e1..2d6c596 100644 --- a/uip/mhcachesbr.c +++ b/uip/mhcachesbr.c @@ -309,12 +309,7 @@ find_cache_aux(int writing, char *directory, char *id, char *buffer, FILE *fp; static int partno, pid; static time_t clock = 0; - -#ifdef BSD42 - usemap = strchr(id, '/') ? 1 : 0; -#else usemap = 1; -#endif if (debugsw) fprintf(stderr, "find_cache_aux %s usemap=%d\n", diff --git a/uip/scansbr.c b/uip/scansbr.c index c566de2..865f2f7 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -18,13 +18,6 @@ # define _cnt _w /* Wretch */ #endif -#ifdef SCO_5_STDIO -# define _ptr __ptr -# define _cnt __cnt -# define _base __base -# define _filbuf(fp) ((fp)->__cnt = 0, __filbuf(fp)) -#endif - #define MAXSCANL 256 /* longest possible scan line */ /*