diff options
| author | Sam Varshavchik | 2021-05-17 22:48:17 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2021-05-19 08:03:46 -0400 |
| commit | 34b6dbb743654fdb6edccf101c4da7e671b7a92d (patch) | |
| tree | 9328e2bd91c4fb8bf5f5103e97ca3456b1c09943 /imap | |
| parent | f47a71576c377269f5c5ca6156b2f319256e2738 (diff) | |
| download | courier-libs-34b6dbb743654fdb6edccf101c4da7e671b7a92d.tar.bz2 | |
Tolerate -Wall and -Werror
Fixes to configure scripts and code so that it compiles (hopefully
correctly) with -Wall and -Werror.
Remove support for ancient BSD stricmp and strnicmp functions.
AC_CHECK_FUNC does not work for strcasecmp and strncasecmp under
-Wall, it's simpler to remove it.
Diffstat (limited to 'imap')
| -rw-r--r-- | imap/configure.ac | 4 | ||||
| -rw-r--r-- | imap/mailboxlist.c | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/imap/configure.ac b/imap/configure.ac index 909c433..24531e9 100644 --- a/imap/configure.ac +++ b/imap/configure.ac @@ -113,7 +113,7 @@ AC_SUBST(piddir) dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(locale.h unistd.h sys/stat.h sys/wait.h time.h sys/time.h sys/utsname.h utime.h) +AC_CHECK_HEADERS(locale.h unistd.h sys/stat.h sys/wait.h time.h sys/time.h sys/utsname.h utime.h strings.h) AC_HEADER_TIME AC_HEADER_DIRENT AC_HEADER_SYS_WAIT @@ -152,7 +152,7 @@ fi dnl Checks for library functions. -AC_CHECK_FUNCS(strerror utime utimes strcasecmp strncasecmp setlocale poll getaddrinfo) +AC_CHECK_FUNCS(strerror utime utimes setlocale poll getaddrinfo) AC_DEFINE_UNQUOTED(SOCKET_TIMEOUT,60, [ Read/write timeout ]) diff --git a/imap/mailboxlist.c b/imap/mailboxlist.c index 02f36b4..41c873e 100644 --- a/imap/mailboxlist.c +++ b/imap/mailboxlist.c @@ -1006,13 +1006,7 @@ static void match_mailbox_prep(char *name) /* First component, INBOX, is case insensitive */ - if ( -#if HAVE_STRNCASECMP - strncasecmp(name, INBOX, sizeof(INBOX)-1) == 0 -#else - strnicmp(name, INBOX, sizeof(INBOX)-1) == 0 -#endif - ) + if (strncasecmp(name, INBOX, sizeof(INBOX)-1) == 0) for (i=0; name[i] && name[i] != HIERCH; i++) name[i]=toupper( (int)(unsigned char)name[i] ); |
