diff options
author | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
---|---|---|
committer | bbryant <bbryant@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-09 18:50:13 +0000 |
commit | 12ad49e444d6108b7312a46b389090d51b670a7f (patch) | |
tree | fe20338149990fed28e3936bbbd7162e69d1f938 /configure.ac | |
parent | f8d0dcac122feafe9ebd0aba502263f829c77667 (diff) |
Fixes an issue with dialplan pattern matching where the specificity for pattern ranges and pattern special characters was inconsistent.
(closes issue #16903)
Reported by: Nick_Lewis
Patches:
pbx.c-specificity.patch uploaded by Nick Lewis (license 657)
Tested by: Nick_Lewis
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@285710 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 160f3baa1..7465a36be 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ case "${host_os}" in ;; darwin*) AC_DEFINE([AST_POLL_COMPAT], 1, [Define to 1 if internal poll should be used.]) + AC_DEFINE([_DARWIN_UNLIMITED_SELECT], 1, [Define to 1 if running on Darwin.]) ;; *) AC_PREFIX_DEFAULT([/usr]) @@ -417,7 +418,7 @@ AC_FUNC_STRNLEN AC_FUNC_STRTOD AC_FUNC_UTIME_NULL AC_FUNC_VPRINTF -AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) +AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob ioperm inet_ntoa isascii localtime_r memchr memmove memset mkdir munmap ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl]) # BSD might not have exp2, and/or log2 AC_CHECK_LIB([m], [sqrt]) @@ -625,6 +626,48 @@ AC_RUN_IFELSE( AC_MSG_RESULT(unknown) ) +AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor) +AC_RUN_IFELSE( +AC_LANG_PROGRAM([ +#include <stdio.h> +#include <sys/select.h> +#include <sys/time.h> +#include <sys/resource.h> +#include <string.h> +#include <errno.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> +], [[ + struct rlimit rlim = { FD_SETSIZE * 2, FD_SETSIZE * 2 }; + int fd0, fd1; + struct timeval tv = { 0, }; + struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } }; + if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); } + if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); } + if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); } + FD_SET(fd0, (fd_set *) &fds); + FD_SET(fd1, (fd_set *) &fds); + if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); } + exit(0)]]), + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]), + AC_MSG_RESULT(no), + AC_MSG_RESULT(cross-compile) +) + +if test "${ac_cv_have_variable_fdset}x" = "0x"; then + AC_RUN_IFELSE( + AC_LANG_PROGRAM([ +#include <unistd.h> +#include <sys/types.h> +#include <stdlib.h> +], [if (getuid() != 0) { exit(1); }]), + AC_DEFINE([CONFIGURE_RAN_AS_ROOT], 1, [Some configure tests will unexpectedly fail if configure is run by a non-root user. These may be able to be tested at runtime.])) +fi + AST_GCC_ATTRIBUTE(pure) AST_GCC_ATTRIBUTE(malloc) AST_GCC_ATTRIBUTE(const) |