X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fmemchr.m4;h=3c2b313916841cd2a2e9efa8f60ab1b6d6dcf21c;hb=1a44d77d50f4fb37c0410eed04b82303624ea2ec;hp=b05a79a026ed4ccd8d1da71d3e203a7480face9e;hpb=dda6367c9eac71da8f2ab1c60b3df60f19ce4755;p=debian%2Ftar diff --git a/m4/memchr.m4 b/m4/memchr.m4 index b05a79a0..3c2b3139 100644 --- a/m4/memchr.m4 +++ b/m4/memchr.m4 @@ -1,5 +1,5 @@ -# memchr.m4 serial 9 -dnl Copyright (C) 2002-2004, 2009-2010 Free Software Foundation, Inc. +# memchr.m4 serial 10 +dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -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,14 +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) - return 3; + 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"])])