From 0addaad0321ac1faedea60a2b8ff8f6c2ea01816 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Thu, 21 Dec 2000 06:51:14 +0000 Subject: [PATCH] fixes to compile cleanly under Solaris 2.7 --- Makefile.am | 2 +- README | 16 ++++++++++++++-- configure.in | 2 ++ main.c | 10 ++++++---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index cb7b24e..5608ccf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS=isync -isync_SOURCES=main.c imap.c sync.c maildir.c +isync_SOURCES=main.c imap.c sync.c maildir.c isync.h man_MANS=isync.1 EXTRA_DIST=sample.isyncrc $(man_MANS) diff --git a/README b/README index ba2ab6b..9d5c94c 100644 --- a/README +++ b/README @@ -14,9 +14,21 @@ maildir-style mailbox with a remote IMAP4 mailbox, suitable for use in IMAP-disconnected mode. Multiple copies of the remote IMAP4 mailbox can be maintained, and all flags are synchronized. -``isync'' has been tested with the following IMAP servers: +* Features: - Microsoft Exchange 2000 IMAP4rev1 server version 6.0.4417.0 + * Supports imaps: (port 993) TLS/SSL connections + * Supports STARTTLS + * Fast mode for fetching new mail only + +* Compatibility + + ``isync'' has been tested with the following IMAP servers: + + * Microsoft Exchange 2000 IMAP4rev1 server version 6.0.4417.0 + +* Requirements + + OpenSSL for TLS/SSL support (optional) * INSTALLING diff --git a/configure.in b/configure.in index 50cbc58..309820b 100644 --- a/configure.in +++ b/configure.in @@ -5,6 +5,8 @@ if test $CC = gcc; then CFLAGS="$CFLAGS -pipe" fi AC_CHECK_FUNCS(getopt_long) +AC_CHECK_LIB(socket,socket) +AC_CHECK_LIB(nsl,inet_ntoa) AC_CHECK_LIB(crypto,ERR_error_string) AC_CHECK_LIB(ssl,SSL_library_init) CFLAGS="$CFLAGS -W -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations" diff --git a/main.c b/main.c index aa5cb9a..061ee97 100644 --- a/main.c +++ b/main.c @@ -159,9 +159,9 @@ load_config (char *where) if (buf[0] == '#') continue; p = buf; - while (*p && !isspace (*p)) + while (*p && !isspace ((unsigned char)*p)) p++; - while (isspace (*p)) + while (isspace ((unsigned char)*p)) p++; if (!strncasecmp ("mailbox", buf, 7)) { @@ -173,6 +173,7 @@ load_config (char *where) } else if (!strncasecmp ("host", buf, 4)) { +#if HAVE_LIBSSL if (!strncasecmp ("imaps:", p, 6)) { p += 6; @@ -187,6 +188,7 @@ load_config (char *where) global.port = 993; } } +#endif if (*cur) (*cur)->host = strdup (p); else @@ -267,7 +269,7 @@ next_arg (char **s) return 0; if (!*s) return 0; - while (isspace (**s)) + while (isspace ((unsigned char)**s)) (*s)++; if (!**s) { @@ -275,7 +277,7 @@ next_arg (char **s) return 0; } ret = *s; - while (**s && !isspace (**s)) + while (**s && !isspace ((unsigned char)**s)) (*s)++; if (**s) *(*s)++ = 0;