Bläddra i källkod

fixes to compile cleanly under Solaris 2.7

Michael Elkins 24 år sedan
förälder
incheckning
0addaad032
4 ändrade filer med 23 tillägg och 7 borttagningar
  1. 1 1
      Makefile.am
  2. 14 2
      README
  3. 2 0
      configure.in
  4. 6 4
      main.c

+ 1 - 1
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)
 

+ 14 - 2
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
 

+ 2 - 0
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"

+ 6 - 4
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;