fixes to compile cleanly under Solaris 2.7

This commit is contained in:
Michael Elkins 2000-12-21 06:51:14 +00:00
parent b6089a2dcb
commit 0addaad032
4 changed files with 23 additions and 7 deletions

View File

@ -1,5 +1,5 @@
bin_PROGRAMS=isync 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 man_MANS=isync.1
EXTRA_DIST=sample.isyncrc $(man_MANS) EXTRA_DIST=sample.isyncrc $(man_MANS)

16
README
View File

@ -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 IMAP-disconnected mode. Multiple copies of the remote IMAP4 mailbox can be
maintained, and all flags are synchronized. 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 * INSTALLING

View File

@ -5,6 +5,8 @@ if test $CC = gcc; then
CFLAGS="$CFLAGS -pipe" CFLAGS="$CFLAGS -pipe"
fi fi
AC_CHECK_FUNCS(getopt_long) 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(crypto,ERR_error_string)
AC_CHECK_LIB(ssl,SSL_library_init) AC_CHECK_LIB(ssl,SSL_library_init)
CFLAGS="$CFLAGS -W -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations" CFLAGS="$CFLAGS -W -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations"

10
main.c
View File

@ -159,9 +159,9 @@ load_config (char *where)
if (buf[0] == '#') if (buf[0] == '#')
continue; continue;
p = buf; p = buf;
while (*p && !isspace (*p)) while (*p && !isspace ((unsigned char)*p))
p++; p++;
while (isspace (*p)) while (isspace ((unsigned char)*p))
p++; p++;
if (!strncasecmp ("mailbox", buf, 7)) if (!strncasecmp ("mailbox", buf, 7))
{ {
@ -173,6 +173,7 @@ load_config (char *where)
} }
else if (!strncasecmp ("host", buf, 4)) else if (!strncasecmp ("host", buf, 4))
{ {
#if HAVE_LIBSSL
if (!strncasecmp ("imaps:", p, 6)) if (!strncasecmp ("imaps:", p, 6))
{ {
p += 6; p += 6;
@ -187,6 +188,7 @@ load_config (char *where)
global.port = 993; global.port = 993;
} }
} }
#endif
if (*cur) if (*cur)
(*cur)->host = strdup (p); (*cur)->host = strdup (p);
else else
@ -267,7 +269,7 @@ next_arg (char **s)
return 0; return 0;
if (!*s) if (!*s)
return 0; return 0;
while (isspace (**s)) while (isspace ((unsigned char)**s))
(*s)++; (*s)++;
if (!**s) if (!**s)
{ {
@ -275,7 +277,7 @@ next_arg (char **s)
return 0; return 0;
} }
ret = *s; ret = *s;
while (**s && !isspace (**s)) while (**s && !isspace ((unsigned char)**s))
(*s)++; (*s)++;
if (**s) if (**s)
*(*s)++ = 0; *(*s)++ = 0;