Mercurial > dovecot > core-2.2
changeset 1989:a2b009c65e02 HEAD
Define PREAD_WRAPPERS if we're using GLIBC, not if we're using Linux.
Removed a few ANSI-C header checks. Added strings.h check and include it
automatically if it's found, for strcasecmp().
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 10 May 2004 03:40:42 +0300 |
parents | 739b469b99e2 |
children | 049502ef137e |
files | configure.in src/lib/lib.h |
diffstat | 2 files changed, 15 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Mon May 10 02:52:13 2004 +0300 +++ b/configure.in Mon May 10 03:40:42 2004 +0300 @@ -1,7 +1,7 @@ AC_INIT(src) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(dovecot, 1.0-test6) +AM_INIT_AUTOMAKE(dovecot, 1.0-test7) AM_MAINTAINER_MODE @@ -14,7 +14,7 @@ AM_PROG_LIBTOOL AM_ICONV -AC_CHECK_HEADERS(string.h stdlib.h stdint.h unistd.h dirent.h) +AC_CHECK_HEADERS(strings.h stdint.h unistd.h dirent.h) AC_CHECK_HEADERS(sys/uio.h sys/sysmacros.h sys/resource.h linux/mman.h) AC_CHECK_HEADERS(sys/select.h) @@ -262,14 +262,21 @@ AC_DEFINE(IOLOOP_NOTIFY_NONE,, No special notify support) ]) +dnl * GLIBC? +AC_TRY_COMPILE([ + #include <stdlib.h> + #ifdef __GLIBC__ + we have glibc + #endif +],,, [ + AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500) +]) + dnl * OS specific options case "$host_os" in hpux*) CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" ;; - linux*) - AC_DEFINE(PREAD_WRAPPERS,, Define if pread/pwrite needs _XOPEN_SOURCE 500) - ;; *) ;; esac
--- a/src/lib/lib.h Mon May 10 02:52:13 2004 +0300 +++ b/src/lib/lib.h Mon May 10 03:40:42 2004 +0300 @@ -8,6 +8,9 @@ /* default system includes - keep these at minimum.. */ #include <string.h> /* strcmp() etc. */ +#ifdef HAVE_STRINGS_H +# include <strings.h> /* strcasecmp() etc. */ +#endif #include <stdarg.h> /* va_list is used everywhere */ #include <limits.h> /* INT_MAX, etc. */ #include <errno.h> /* error checking is good */