]> Pileus Git - ~andy/fetchmail/commitdiff
Remove support for EMX and BEOS.
authorMatthias Andree <matthias.andree@gmx.de>
Wed, 31 Mar 2010 23:01:55 +0000 (01:01 +0200)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 12 Dec 2010 00:27:46 +0000 (01:27 +0100)
14 files changed:
NEWS
configure.ac
daemon.c
driver.c
fetchmail.c
fetchmail.h
idle.c
interface.c
mxget.c
netrc.h
odmr.c
rcfile_y.y
smbencrypt.c
socket.c

diff --git a/NEWS b/NEWS
index 9df889de3834a5b2cc69b45a01ed68a7aedd4fb1..efc64557b49b2bb81dfe9d948f2e19116723c44e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -57,6 +57,7 @@ fetchmail-6.4.0 (not yet released):
 
 # REMOVED FEATURES
 * POP2 was long obsolete and removed
+* BeOS and EMX support was removed
 
 --------------------------------------------------------------------------------
 
index 21788cb9741a681565ccf21c163f93f1c3352d28..44756c4da5cadb021bfe85e91146983482ecbf0c 100644 (file)
@@ -9,7 +9,7 @@ dnl Process this file with autoconf to produce a configure script.
 dnl
 
 dnl XXX - if bumping version here, check fetchmail.man, too!
-AC_INIT([fetchmail],[6.3.19],[fetchmail-users@lists.berlios.de])
+AC_INIT([fetchmail],[6.4.0-alpha1],[fetchmail-devel@lists.berlios.de])
 AC_CONFIG_SRCDIR([fetchmail.h])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_LIBOBJ_DIR([.])
@@ -39,14 +39,6 @@ AC_PROG_RANLIB
 AM_PROG_CC_C_O
 AC_USE_SYSTEM_EXTENSIONS
 
-AC_ISC_POSIX
-dnl AC_ISC_POSIX: - XXX FIXME: remove in fetchmail 6.4.
-dnl This macro adds `-lcposix' to output variable `LIBS' if necessary
-dnl for Posix facilities.  Sun dropped support for the obsolete
-dnl INTERACTIVE Systems Corporation Unix on 2006-07-23.  New programs
-dnl need not use this macro.  It is implemented as
-dnl `AC_SEARCH_LIBS([strerror], [cposix])'
-
 dnl check for b0rked Solaris (and other shells) and find one that works
 AC_MSG_CHECKING(for a working shell...)
 for i in /usr/xpg6/bin/sh /usr/xpg4/bin/sh /usr/ccs/bin/sh /bin/sh /usr/bin/sh /bin/ksh /bin/bash /usr/local/bin/bash ; do
index 5ae73ed69565c6bd0d299b85e503494d0d448100..e96abb4b5649e490617f9e980cf55c4d8c6c7242 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -178,9 +178,7 @@ daemonize (const char *logfile)
   }
 #elif  defined(SIGTSTP)                /* BSD */
   /* change process group */
-#ifndef __EMX__
   setpgrp(0, getpid());
-#endif
   /* lose controlling tty */
   if ((fd = open("/dev/tty", O_RDWR)) >= 0) {
     ioctl(fd, TIOCNOTTY, (char *) 0);
@@ -188,9 +186,7 @@ daemonize (const char *logfile)
   }
 #else                                  /* SVR3 and older */
   /* change process group */
-#ifndef __EMX__
   setpgrp();
-#endif
   
   /* lose controlling tty */
   set_signal_handler(SIGHUP, SIG_IGN);
index cfd997ee04424b62bcec42db0ea7d820a11b4dc2..2e4169cb787843837f0b59ede8d78cde073a6027 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -98,7 +98,6 @@ void resetidletimeout(void)
 void set_timeout(int timeleft)
 /* reset the nonresponse-timeout */
 {
-#if !defined(__EMX__) && !defined(__BEOS__)
     struct itimerval ntimeout;
 
     if (timeleft == 0)
@@ -108,7 +107,6 @@ void set_timeout(int timeleft)
     ntimeout.it_value.tv_sec  = timeleft;
     ntimeout.it_value.tv_usec = 0;
     setitimer(ITIMER_REAL, &ntimeout, (struct itimerval *)NULL);
-#endif
 }
 
 static RETSIGTYPE timeout_handler (int signal)
index c70230944b9054637e516d623ce2c0eba31b9c07..2523f2bc48b1c7e103470da1414f39b6ed053dcf 100644 (file)
@@ -313,12 +313,7 @@ int main(int argc, char **argv)
     /* logging should be set up early in case we were restarted from exec */
     if (run.use_syslog)
     {
-#if defined(LOG_MAIL)
        openlog(program_name, LOG_PID, LOG_MAIL);
-#else
-       /* Assume BSD4.2 openlog with two arguments */
-       openlog(program_name, LOG_PID);
-#endif
        report_init(-1);
     }
     else
index d902e2ef585b1d3867900498f1bea166110b1ef6..7f41050e1e70e05af712ec1c8ba2f4c1ae789f81 100644 (file)
@@ -695,19 +695,6 @@ char *rfc2047e(const char*, const char *);
 void yyerror(const char *);
 int yylex(void);
 
-#ifdef __EMX__
-void itimerthread(void*);
-/* Have to include these first to avoid errors from redefining getcwd
-   and chdir.  They're re-include protected in EMX, so it's okay, I
-   guess.  */
-#include <stdlib.h>
-#include <unistd.h>
-/* Redefine getcwd and chdir to get drive-letter support so we can
-   find all of our lock files and stuff. */
-#define getcwd _getcwd2
-#define chdir _chdir2
-#endif /* _EMX_ */
-
 #ifdef HAVE_STRERROR
 #  if !defined(strerror) && !defined(HAVE_DECL_STRERROR)       /* On some systems, strerror is a macro */
 char *strerror (int);
diff --git a/idle.c b/idle.c
index 4ea21a3c4b4bfc74d712166b4fa900a2b4e3bf9c..8b4cc0025b30e45a47d0afa78a6d3f5fa7521583 100644 (file)
--- a/idle.c
+++ b/idle.c
@@ -50,29 +50,11 @@ RETSIGTYPE gotsigalrm(int sig)
 }
 #endif /* SLEEP_WITH_ALARM */
 
-#ifdef __EMX__
-/* Various EMX-specific definitions */
-static int itimerflag;
-
-void itimerthread(void* dummy)
-{
-    if (outlevel >= O_VERBOSE)
-       report(stderr, 
-              GT_("fetchmail: thread sleeping for %d sec.\n"), poll_interval);
-    while(1)
-    {
-       _sleep2(poll_interval*1000);
-       kill((getpid()), SIGALRM);
-    }
-}
-#endif
-
 int interruptible_idle(int seconds)
 /* time for a pause in the action; return TRUE if awakened by signal */
 {
     int awoken = FALSE;
 
-#ifndef __EMX__
 #ifdef SLEEP_WITH_ALARM                /* not normally on */
     /*
      * We can't use sleep(3) here because we need an alarm(3)
@@ -144,15 +126,6 @@ int interruptible_idle(int seconds)
     } while (lastsig == SIGCHLD);
     }
 #endif
-#else /* EMX */
-    alarm_latch = FALSE;
-    set_signal_handler(SIGALRM, gotsigalrm);
-    _beginthread(itimerthread, NULL, 32768, NULL);
-    /* see similar code above */
-    if (!alarm_latch)
-       pause();
-    set_signal_handler(SIGALRM, SIG_IGN);
-#endif /* ! EMX */
     if (lastsig == SIGUSR1 || ((seconds && getuid() == ROOT_UID)
        && lastsig == SIGHUP))
        awoken = TRUE;
index 7bdd2de66aa72ca2dd8ee004680b59d97b6ecada..8c36bc8c765278f272000f61aa7b96ce89d59acc 100644 (file)
 #include <net/if.h>
 #if defined(__FreeBSD__)
 #if defined __FreeBSD_USE_KVM
-#if __FreeBSD_version >= 300001
 #include <net/if_var.h>
-#endif
 #include <kvm.h>
 #include <nlist.h>
 #include <sys/fcntl.h>
-#else
+#else /* !defined __FreeBSD_USE_KVM */
 #include <sys/sysctl.h>
 #include <net/route.h>
 #include <net/if_dl.h>
-#endif
-#endif
+#endif /* defined __FreeBSD_USE_KVM */
+#endif /* defined __FreeBSD__ */
 #include "socket.h"
 #include "i18n.h"
 #include "tunable.h"
diff --git a/mxget.c b/mxget.c
index 4529c223bea99e1abc838837d7dc88f8907df295..f685756074f0ccd78687154795fd8996f56a6c8a 100644 (file)
--- a/mxget.c
+++ b/mxget.c
 #include <sys/types.h>
 #include <netinet/in.h>
 
-#ifdef __BEOS__
-#include "beos/beos_nameser.h"
-#endif
-
 #ifdef HAVE_ARPA_NAMESER_H
 #include <arpa/nameser.h>
 #endif
diff --git a/netrc.h b/netrc.h
index c69316a89b6c40e3801e058e07181cfe3a01a1d4..0758db232d78fae558810af9dd96aa00d9329ad8 100644 (file)
--- a/netrc.h
+++ b/netrc.h
 # define __END_DECLS /* empty */
 #endif
 
-#undef __P
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus)
-# define __P(protos) protos
-#else
-# define __P(protos) ()
-#endif
-
 /* The structure used to return account information from the .netrc. */
 typedef struct _netrc_entry {
   /* The exact host name given in the .netrc, NULL if default. */
@@ -41,14 +34,14 @@ __BEGIN_DECLS
 /* Parse FILE as a .netrc file (as described in ftp(1)), and return a
    list of entries.  NULL is returned if the file could not be
    parsed. */
-netrc_entry *parse_netrc __P((char *file));
+netrc_entry *parse_netrc (char *file);
 
 /* Return the netrc entry from LIST corresponding to HOST.  NULL is
    returned if no such entry exists. */
-netrc_entry *search_netrc __P((netrc_entry *list, char *host, char *account));
+netrc_entry *search_netrc (netrc_entry *list, char *host, char *account);
 
 /* Free the netrc list structure */
-void free_netrc __P((netrc_entry *list));
+void free_netrc (netrc_entry *list);
 __END_DECLS
 
 #endif /* _NETRC_H_ */
diff --git a/odmr.c b/odmr.c
index d495e9cd0223713270710c20acb0a601c75f4178..3ee43389ca50c08cc662432532b4a8d84e0a4f63 100644 (file)
--- a/odmr.c
+++ b/odmr.c
@@ -12,9 +12,6 @@
 #ifdef HAVE_STRING_H /* strcat() */
 #include <string.h>
 #endif
-#ifdef HAVE_NET_SOCKET_H /* BeOS needs this */
-#include <net/socket.h>
-#endif
 #include  <sys/types.h>
 #ifdef HAVE_NET_SELECT_H /* AIX needs this */
 #include <net/select.h>
index b32a6b0cfa9143024eb3287edb280afc2a561986..c06a0fd46e6c444e82b901885b70a9b00f2cc26b 100644 (file)
@@ -396,7 +396,6 @@ void yyerror (const char *s)
 int prc_filecheck(const char *pathname,
                  const flag securecheck /** shortcuts permission, filetype and uid tests if false */)
 {
-#ifndef __EMX__
     struct stat statbuf;
 
     errno = 0;
@@ -430,7 +429,6 @@ int prc_filecheck(const char *pathname,
        return(PS_IOERR);
     }
 
-#ifndef __BEOS__
 #ifdef __CYGWIN__
     if (cygwin_internal(CW_CHECK_NTSEC, pathname))
 #endif /* __CYGWIN__ */
@@ -440,7 +438,6 @@ int prc_filecheck(const char *pathname,
                pathname);
        return(PS_IOERR);
     }
-#endif /* __BEOS__ */
 
 #ifdef HAVE_GETEUID
     if (statbuf.st_uid != geteuid())
@@ -451,7 +448,6 @@ int prc_filecheck(const char *pathname,
        fprintf(stderr, GT_("File %s must be owned by you.\n"), pathname);
        return(PS_IOERR);
     }
-#endif
     return(PS_SUCCESS);
 }
 
index ad14707ff7bd4cc30384eec5e5507f86cff95f8a..0656863c718576abe82acd6889f8441701a5f141 100644 (file)
@@ -33,10 +33,6 @@ extern int DEBUGLEVEL;
 #include "smbencrypt.h"
 #include "smbmd4.h"
 
-#ifndef _AIX
-typedef unsigned char uchar;
-typedef signed short int16;
-#endif
 typedef int BOOL;
 #define False 0
 #define True  1
@@ -89,7 +85,7 @@ while (*s)
   }
 }
 
-extern void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]);
+extern void SMBOWFencrypt(unsigned char passwd[16], unsigned char *c8, unsigned char p24[24]);
 
 /*
  This implements the X/Open SMB password encryption
@@ -97,9 +93,9 @@ extern void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24]);
  encrypted password into p24 
  */
 
-void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void SMBencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24)
   {
-  uchar p14[15], p21[21];
+  unsigned char p14[15], p21[21];
   
   memset(p21,'\0',21);
   memset(p14,'\0',14);
@@ -119,7 +115,7 @@ void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
   }
 
 /* Routines for Windows NT MD4 Hash functions. */
-static int _my_wcslen(int16 *str)
+static int _my_wcslen(int16_t *str)
 {
        int len = 0;
        while(*str++ != 0)
@@ -134,10 +130,10 @@ static int _my_wcslen(int16 *str)
  * format.
  */
  
-static int _my_mbstowcs(int16 *dst, uchar *src, int len)
+static int _my_mbstowcs(int16_t *dst, unsigned char *src, int len)
 {
        int i;
-       int16 val;
+       int16_t val;
  
        for(i = 0; i < len; i++) {
                val = *src;
@@ -157,7 +153,7 @@ static int _my_mbstowcs(int16 *dst, uchar *src, int len)
 static void E_md4hash(uchar *passwd, uchar *p16)
 {
        int len;
-       int16 wpwd[129];
+       int16_t wpwd[129];
        
        /* Password cannot be longer than 128 characters */
        len = strlen((char *)passwd);
@@ -167,15 +163,15 @@ static void E_md4hash(uchar *passwd, uchar *p16)
        _my_mbstowcs(wpwd, passwd, len);
        wpwd[len] = 0; /* Ensure string is null terminated */
        /* Calculate length in bytes */
-       len = _my_wcslen(wpwd) * sizeof(int16);
+       len = _my_wcslen(wpwd) * sizeof(int16_t);
 
        mdfour(p16, (unsigned char *)wpwd, len);
 }
 
 /* Does the des encryption from the NT or LM MD4 hash. */
-void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24])
+void SMBOWFencrypt(unsigned char passwd[16], unsigned char *c8, unsigned char p24[24])
 {
-       uchar p21[21];
+       unsigned char p21[21];
  
        memset(p21,'\0',21);
  
@@ -185,9 +181,9 @@ void SMBOWFencrypt(uchar passwd[16], uchar *c8, uchar p24[24])
 
 /* Does the NT MD4 hash then des encryption. */
  
-void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
+void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24)
 {
-       uchar p21[21];
+       unsigned char p21[21];
  
        memset(p21,'\0',21);
  
@@ -204,7 +200,7 @@ void SMBNTencrypt(uchar *passwd, uchar *c8, uchar *p24)
 
 #if 0
 
-BOOL make_oem_passwd_hash(char data[516], const char *passwd, uchar old_pw_hash[16], BOOL unicode)
+BOOL make_oem_passwd_hash(char data[516], const char *passwd, unsigned char old_pw_hash[16], BOOL unicode)
 {
        int new_pw_len = strlen(passwd) * (unicode ? 2 : 1);
 
index 64b53b5e54ecae0fc9beda9c03ab7254f36c16a4..f974602a660bb56c806d5c5adaadd94b61d445a3 100644 (file)
--- a/socket.c
+++ b/socket.c
 #include "i18n.h"
 #include "sdump.h"
 
-/* Defines to allow BeOS and Cygwin to play nice... */
-#ifdef __BEOS__
-static char peeked;
-#define fm_close(a)  closesocket(a)
-#define fm_write(a,b,c)  send(a,b,c,0)
-#define fm_peek(a,b,c)   recv(a,b,c,0)
-#define fm_read(a,b,c)   recv(a,b,c,0)
-#else
-#define fm_close(a)  close(a)
+/* Defines to allow Cygwin to play nice... */
+#define fm_close(a)     close(a)
 #define fm_write(a,b,c)  write(a,b,c)
 #define fm_peek(a,b,c)   recv(a,b,c, MSG_PEEK)
+
 #ifdef __CYGWIN__
 #define fm_read(a,b,c)   cygwin_read(a,b,c)
 static ssize_t cygwin_read(int sock, void *buf, size_t count);
 #else /* ! __CYGWIN__ */
 #define fm_read(a,b,c)   read(a,b,c)
 #endif /* __CYGWIN__ */
-#endif
 
 /* We need to define h_errno only if it is not already */
 #ifndef h_errno
@@ -431,14 +424,6 @@ int SockRead(int sock, char *buf, int len)
 
     if (--len < 1)
        return(-1);
-#ifdef __BEOS__
-    if (peeked != 0){
-        (*bp) = peeked;
-        bp++;
-        len--;
-        peeked = 0;
-    }
-#endif        
     do {
        /* 
         * The reason for these gymnastics is that we want two things:
@@ -501,18 +486,12 @@ int SockRead(int sock, char *buf, int len)
 #endif /* SSL_ENABLE */
        {
 
-#ifdef __BEOS__
-           if ((n = fm_read(sock, bp, 1)) <= 0)
-#else
            if ((n = fm_peek(sock, bp, len)) <= 0)
-#endif
                return (-1);
            if ((newline = (char *)memchr(bp, '\n', n)) != NULL)
                n = newline - bp + 1;
-#ifndef __BEOS__
            if ((n = fm_read(sock, bp, n)) == -1)
                return(-1);
-#endif /* __BEOS__ */
        }
        bp += n;
        len -= n;
@@ -567,9 +546,6 @@ int SockPeek(int sock)
        if (n == -1)
                return -1;
 
-#ifdef __BEOS__
-    peeked = ch;
-#endif
     return(ch);
 }