diff options
author | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-01-06 04:52:00 +0000 |
---|---|---|
committer | Claudio Fontana <sick_soul@users.sourceforge.net> | 2006-01-06 04:52:00 +0000 |
commit | b5b7b0baf551299e058432d58d5ab2e21d16c312 (patch) | |
tree | f0535089c67a6d6fdd746532953007253dd08cdb /m4/regex.m4 | |
parent | a15c29c1a101a6bedc1a0ee5f6efd694a1ff4cad (diff) | |
download | idutils-b5b7b0baf551299e058432d58d5ab2e21d16c312.tar.gz idutils-b5b7b0baf551299e058432d58d5ab2e21d16c312.tar.bz2 idutils-b5b7b0baf551299e058432d58d5ab2e21d16c312.zip |
* s/id-utils/idutils/g;
* other small changes
Diffstat (limited to 'm4/regex.m4')
-rw-r--r-- | m4/regex.m4 | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4 index d7e2210..8ea4fe9 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -#serial 30 +#serial 31 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free # Software Foundation, Inc. @@ -15,8 +15,29 @@ AC_PREREQ([2.50]) AC_DEFUN([gl_REGEX], [ AC_REQUIRE([AC_SYS_LARGEFILE]) dnl for a sufficently-wide off_t - AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, - [Define if you want regoff_t to be at least as wide POSIX requires.]) + + AC_CACHE_CHECK([whether off_t can be used in a switch statement], + [gl_cv_type_off_t_switch], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[off_t o = -1; + switch (o) + { + case -2: + return 1; + case -1: + return 2; + default: + return 0; + } + ]])], + [gl_cv_type_off_t_switch=yes], + [gl_cv_type_off_t_switch=no])]) + if test $gl_cv_type_off_t_switch = yes; then + AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, + [Define if you want regoff_t to be at least as wide POSIX requires.]) + fi AC_LIBSOURCES( [regcomp.c, regex.c, regex.h, |