diff options
| -rw-r--r-- | cgi/cgi.c | 8 | ||||
| -rw-r--r-- | imap/configure.ac | 4 | ||||
| -rw-r--r-- | imap/mailboxlist.c | 8 | ||||
| -rw-r--r-- | ldapaddressbook/configure.ac | 4 | ||||
| -rw-r--r-- | liblock/locktest.c | 7 | ||||
| -rw-r--r-- | maildir/configure.ac | 2 | ||||
| -rw-r--r-- | rfc1035/configure.ac | 26 | ||||
| -rw-r--r-- | rfc1035/rfc1035str.c | 18 | ||||
| -rw-r--r-- | rfc2045/configure.ac | 2 | ||||
| -rw-r--r-- | rfc822/configure.ac | 4 | ||||
| -rw-r--r-- | rfc822/imapsubj.c | 15 | ||||
| -rw-r--r-- | sqwebmail/configure.ac | 4 | ||||
| -rw-r--r-- | sqwebmail/sqwebmail.h | 8 | ||||
| -rw-r--r-- | tcpd/configure.ac | 12 | ||||
| -rw-r--r-- | threadlib/configure.ac | 11 | ||||
| -rw-r--r-- | waitlib/confwait.c | 1 |
16 files changed, 58 insertions, 76 deletions
@@ -50,12 +50,12 @@ #include <sys/stat.h> #include "rfc2045/rfc2045.h" -static void cgi_formdata(unsigned long); - -#ifndef HAVE_STRNCASECMP -extern int strncasecmp(const char *, const char *, size_t); +#if HAVE_STRINGS_H +#include <strings.h> #endif +static void cgi_formdata(unsigned long); + static int cgiformfd; static char hascgiformfd=0; static struct rfc2045 *rfc2045p=0; 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] ); diff --git a/ldapaddressbook/configure.ac b/ldapaddressbook/configure.ac index aac462f..b0cea5b 100644 --- a/ldapaddressbook/configure.ac +++ b/ldapaddressbook/configure.ac @@ -57,9 +57,7 @@ then #include <ldap.h> ], [ - LDAP *p=NULL; - - ldap_search(p, "", 0, NULL, NULL, 0); + (void)ldap_err2string(0); ], [ : diff --git a/liblock/locktest.c b/liblock/locktest.c index eb5cc4a..f9ee6fc 100644 --- a/liblock/locktest.c +++ b/liblock/locktest.c @@ -13,6 +13,13 @@ #if USE_LOCKF #include "locklockf.c" #endif +#if HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <sys/types.h> +#if HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif #include <signal.h> #include <stdlib.h> #include <string.h> diff --git a/maildir/configure.ac b/maildir/configure.ac index fdbf576..230f35f 100644 --- a/maildir/configure.ac +++ b/maildir/configure.ac @@ -74,7 +74,7 @@ AX_COURIER_UNICODE_CXXFLAGS AC_SUBST(COURIER_UNICODE_CXXFLAGS) dnl Checks for library functions. -AC_CHECK_FUNCS(symlink readlink strcasecmp utime utimes) +AC_CHECK_FUNCS(symlink readlink utime utimes) AC_CHECK_FUNCS(inotify_init inotify_init1) diff --git a/rfc1035/configure.ac b/rfc1035/configure.ac index 5748f05..ca692c9 100644 --- a/rfc1035/configure.ac +++ b/rfc1035/configure.ac @@ -32,7 +32,7 @@ then fi dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(sys/types.h sys/time.h unistd.h arpa/inet.h netinet/in.h) +AC_CHECK_HEADERS(sys/types.h sys/time.h unistd.h arpa/inet.h netinet/in.h strings.h) USENSL=no saveLIBS="$LIBS" @@ -89,7 +89,7 @@ AC_ARG_WITH(int32, #include <sys/types.h> #endif ],[ - uint32_t i=0; + (void)(uint32_t)0; ], [ AC_MSG_RESULT(yes) ; int32="uint32_t"], [ AC_MSG_RESULT(no) @@ -100,7 +100,7 @@ AC_ARG_WITH(int32, #include <sys/types.h> #endif ],[ - u_int32_t i=0; + (void)(u_int32_t)0; ], [AC_MSG_RESULT(yes); int32="u_int32_t"],[ AC_MSG_RESULT(no) @@ -140,7 +140,7 @@ AC_ARG_WITH(int16, #include <sys/types.h> #endif ],[ - uint16_t i=0; + (void)(uint16_t)0; ], [ AC_MSG_RESULT(yes) ; int16="uint16_t"], [ AC_MSG_RESULT(no) @@ -151,7 +151,7 @@ AC_ARG_WITH(int16, #include <sys/types.h> #endif ],[ - u_int16_t i=0; + (void)(u_int16_t)0; ], [AC_MSG_RESULT(yes); int16="u_int16_t"],[ AC_MSG_RESULT(no) @@ -206,8 +206,6 @@ fi dnl Checks for library functions. -AC_CHECK_FUNCS(strcasecmp) - dnl Other checks if test "$GCC" = "yes" @@ -229,10 +227,10 @@ AC_TRY_COMPILE( [ #include <arpa/inet.h> ], [ -struct in6_addr in6a; -struct sockaddr_in6 sain6; -struct sockaddr_storage soas; -int x=PF_INET6; + (void)(sizeof(struct in6_addr)+ + sizeof(struct sockaddr_in6)+ + sizeof(struct sockaddr_storage)+ + PF_INET6); ], rfc1035_cv_hasipv6structs=yes, rfc1035_cv_hasipv6structs=no ) @@ -346,17 +344,17 @@ then fi AC_CACHE_CHECK([for alloca], - rfc1035_cv_alloca, + [rfc1035_cv_alloca], AC_TRY_COMPILE( [ #include <stdio.h> #include <stdlib.h> ], [ -char *p=(char *)alloca(10); +(void)(char *)alloca(10); ], rfc1035_cv_alloca=yes, - rfc1035_cv_alloca,=no ) + rfc1035_cv_alloca=no ) ) ipv6=0 diff --git a/rfc1035/rfc1035str.c b/rfc1035/rfc1035str.c index 4335369..a010250 100644 --- a/rfc1035/rfc1035str.c +++ b/rfc1035/rfc1035str.c @@ -52,12 +52,6 @@ static struct { const char *name; int num; } typetab[]={ {"UNIMPLEMENTED", 4}, {"REFUSED", 5}}; -#if HAVE_STRCASECMP -#define COMPARE(a,b) strcasecmp((a), (b)) -#else -#define COMPARE(a,b) stricmp((a), (b)) -#endif - void rfc1035_type_itostr(int n, void (*func)(const char *, void *), void *arg) { unsigned i; @@ -82,7 +76,7 @@ int rfc1035_type_strtoi(const char *n) unsigned i; for (i=0; i<sizeof(typetab)/sizeof(typetab[0]); i++) - if (COMPARE(typetab[i].name, n) == 0) return (typetab[i].num); + if (strcasecmp(typetab[i].name, n) == 0) return (typetab[i].num); return (-1); } @@ -100,7 +94,7 @@ int rfc1035_class_strtoi(const char *n) unsigned i; for (i=0; i<sizeof(classtab)/sizeof(classtab[0]); i++) - if (COMPARE(classtab[i].name, n) == 0) return (classtab[i].num); + if (strcasecmp(classtab[i].name, n) == 0) return (classtab[i].num); return (-1); } @@ -118,8 +112,8 @@ int rfc1035_opcode_strtoi(const char *n) unsigned i; for (i=0; i<sizeof(opcodetab)/sizeof(opcodetab[0]); i++) - if (COMPARE(opcodetab[i].name, n) == 0) - return (opcodetab[i].num); + if (strcasecmp(opcodetab[i].name, n) == 0) + return (opcodetab[i].num); return (-1); } @@ -137,7 +131,7 @@ int rfc1035_rcode_strtoi(const char *n) unsigned i; for (i=0; i<sizeof(rcodetab)/sizeof(rcodetab[0]); i++) - if (COMPARE(rcodetab[i].name, n) == 0) - return (rcodetab[i].num); + if (strcasecmp(rcodetab[i].name, n) == 0) + return (rcodetab[i].num); return (-1); } diff --git a/rfc2045/configure.ac b/rfc2045/configure.ac index 27c5deb..74a06f2 100644 --- a/rfc2045/configure.ac +++ b/rfc2045/configure.ac @@ -60,8 +60,6 @@ AC_SUBST(COURIER_UNICODE_CXXFLAGS) dnl Checks for library functions. AC_CHECK_FUNCS(setlocale) -AC_CHECK_FUNC(strncasecmp,,CFLAGS="$CFLAGS -Dstrncasecmp=strnicmp") -AC_CHECK_FUNC(strcasecmp,,CFLAGS="$CFLAGS -Dstrcasecmp=stricmp") AC_ARG_WITH(package, [], package="$withval", [ diff --git a/rfc822/configure.ac b/rfc822/configure.ac index 03fdb4b..82dbdfa 100644 --- a/rfc822/configure.ac +++ b/rfc822/configure.ac @@ -29,7 +29,7 @@ dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(locale.h) +AC_CHECK_HEADERS(locale.h strings.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -58,7 +58,7 @@ fi AC_MSG_CHECKING([if Libidn should be used]) AC_MSG_RESULT($libidn) -AC_CHECK_FUNCS(strcasecmp strncasecmp setlocale) +AC_CHECK_FUNCS(setlocale) AC_CACHE_CHECK([how to calculate alternate timezone],librfc822_cv_SYS_TIMEZONE, diff --git a/rfc822/imapsubj.c b/rfc822/imapsubj.c index 2f6adfd..97da19c 100644 --- a/rfc822/imapsubj.c +++ b/rfc822/imapsubj.c @@ -10,19 +10,10 @@ #include <ctype.h> #include <stdlib.h> #include <string.h> -#include "rfc822.h" - -#if HAVE_STRCASECMP - -#else -#define strcasecmp stricmp -#endif - -#if HAVE_STRNCASECMP - -#else -#define strncasecmp strnicmp +#if HAVE_STRINGS_H +#include <strings.h> #endif +#include "rfc822.h" /* Skip over blobs */ diff --git a/sqwebmail/configure.ac b/sqwebmail/configure.ac index 58f282c..05dc3d7 100644 --- a/sqwebmail/configure.ac +++ b/sqwebmail/configure.ac @@ -175,7 +175,7 @@ AC_SUBST(piddir) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h sys/wait.h sys/select.h sys/uio.h sys/stat.h sys/time.h utime.h unistd.h locale.h crypt.h wchar.h) +AC_CHECK_HEADERS(fcntl.h sys/wait.h sys/select.h sys/uio.h sys/stat.h sys/time.h utime.h unistd.h locale.h crypt.h wchar.h strings.h) AC_HEADER_SYS_WAIT AC_HEADER_TIME @@ -217,7 +217,7 @@ FILE *fp=fopen("conftestval", "w"); dnl Checks for library functions. AC_FUNC_STRFTIME AC_CHECK_FUNCS(crypt utime utimes setreuid setlocale) -AC_REPLACE_FUNCS(strdup strcasecmp strncasecmp) +AC_REPLACE_FUNCS(strdup) AC_CACHE_CHECK([for crypt() prototype],sqwebmail_cv_NEED_CRYPT_PROTOTYPE, diff --git a/sqwebmail/sqwebmail.h b/sqwebmail/sqwebmail.h index ff2545f..777fe60 100644 --- a/sqwebmail/sqwebmail.h +++ b/sqwebmail/sqwebmail.h @@ -79,14 +79,6 @@ extern void error3(const char *, int, const char *, const char *, int); extern char *strdup(const char *); #endif -#ifndef HAVE_STRCASECMP -extern int strcasecmp(const char *, const char *); -#endif - -#ifndef HAVE_STRNCASECMP -extern int strncasecmp(const char *, const char *, size_t); -#endif - extern void cleanup(); extern void http_redirect_argu(const char *, unsigned long); diff --git a/tcpd/configure.ac b/tcpd/configure.ac index c3bb9cb..3bc0e64 100644 --- a/tcpd/configure.ac +++ b/tcpd/configure.ac @@ -208,9 +208,8 @@ AC_TRY_COMPILE( [ #include <stropts.h> #include <fcntl.h> ],[ { - struct strfdinsert ins; - queue_t *pointer; - int i=I_FDINSERT; + (void)(sizeof(struct strfdinsert) + + sizeof(queue_t) + I_FDINSERT) } ], tcpd_cv_svr3=yes, tcpd_cv_svr3=no)) @@ -223,6 +222,7 @@ changequote(<<,>>) #include <stdio.h> #include <unistd.h> +#include <stdlib.h> int main(int argc, char **argv) { @@ -328,7 +328,7 @@ then AC_MSG_CHECKING(whether OpenSSL requires Kerberos) AC_TRY_COMPILE( [ #include <openssl/ssl.h> -], [ int x=1; ], :, +], [ ], :, [ KRBFLAGS=`$KRB5CONFIG --cflags` CFLAGS="$CFLAGS $KRBFLAGS" @@ -336,7 +336,7 @@ then AC_TRY_COMPILE( [ #include <openssl/ssl.h> -], [ int x=1; ], [ KRBLIBS="`$KRB5CONFIG --libs`" ], +], [ ], [ KRBLIBS="`$KRB5CONFIG --libs`" ], AC_MSG_ERROR(OpenSSL test build failed) ) ] ) @@ -544,7 +544,7 @@ RAND_pseudo_bytes(dummy, 1); #include <openssl/rand.h> ], [ -char dummy[1]; +unsigned char dummy[1]; unsigned char a[1], b[1]; EVP_CIPHER_CTX *ctx=EVP_CIPHER_CTX_new(); diff --git a/threadlib/configure.ac b/threadlib/configure.ac index d125374..408c07c 100644 --- a/threadlib/configure.ac +++ b/threadlib/configure.ac @@ -76,7 +76,16 @@ AM_CONDITIONAL(HAVE_PTHREADS, test "$have_pthreads" != "no") AC_SUBST(THREADLIB) -AC_CHECK_LIB(m, sqrt) +AC_TRY_COMPILE([ +#include <math.h> + +double x() +{ + return sqrt(0); +}],[ +], [ + LIBS='-lm' +]) if test "$GCC" = "yes" then diff --git a/waitlib/confwait.c b/waitlib/confwait.c index 4ee8b60..7bd4d2d 100644 --- a/waitlib/confwait.c +++ b/waitlib/confwait.c @@ -14,6 +14,7 @@ #endif #include <stdio.h> #include <signal.h> +#include <stdlib.h> #if HAVE_UNISTD_H #include <unistd.h> |
