summaryrefslogtreecommitdiff
path: root/m4/memchr.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-12-07 21:43:04 +0100
committerLudovic Courtès <ludo@gnu.org>2010-12-07 23:13:19 +0100
commit0f00f2c33a85842a9611ed63f07e915ea9fd60de (patch)
treea02ec2b230021798eb854693c6c9270c6a1f87e6 /m4/memchr.m4
parentcb26e97a88e90d04e6d4efe3de0de92dea53d1e5 (diff)
downloadguile-0f00f2c33a85842a9611ed63f07e915ea9fd60de.tar.gz
Use Gnulib's `nproc'.
This updates Gnulib to v0.0-4496-g6491120. * m4/gnulib-cache.m4: Add `nproc'.
Diffstat (limited to 'm4/memchr.m4')
-rw-r--r--m4/memchr.m411
1 files changed, 7 insertions, 4 deletions
diff --git a/m4/memchr.m4 b/m4/memchr.m4
index ab773b812..46db9fb65 100644
--- a/m4/memchr.m4
+++ b/m4/memchr.m4
@@ -1,4 +1,4 @@
-# memchr.m4 serial 8
+# memchr.m4 serial 10
dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,6 +35,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
# endif
#endif
]], [[
+ int result = 0;
char *fence = NULL;
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
# if HAVE_MAP_ANONYMOUS
@@ -58,12 +59,14 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
if (fence)
{
if (memchr (fence, 0, 0))
- return 1;
+ result |= 1;
strcpy (fence - 9, "12345678");
if (memchr (fence - 9, 0, 79) != fence - 1)
- return 2;
+ result |= 2;
+ if (memchr (fence - 1, 0, 3) != fence - 1)
+ result |= 4;
}
- return 0;
+ return result;
]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
[dnl Be pessimistic for now.
gl_cv_func_memchr_works="guessing no"])])