view lib/memchr2.valgrind @ 40236:e3496deebf30

isatty: Make it return true in Cygwin consoles on native Windows. * lib/isatty.c: Include <string.h>. (GetProcAddress): New macro. (GetNamedPipeClientProcessIdFuncType): New type. (GetNamedPipeClientProcessIdFunc): New variable. (QueryFullProcessImageNameFuncType): New type. (QueryFullProcessImageNameFunc): New variable. (initialized): New variable. (initialize): New function. (IsCygwinConsoleHandle): New function. (isatty): Invoke it. * doc/posix-functions/isatty.texi: Mention the issue.
author Bruno Haible <bruno@clisp.org>
date Thu, 14 Mar 2019 23:54:28 +0100
parents dfac57b1ec9f
children
line wrap: on
line source

# Suppress a valgrind message about use of uninitialized memory in memchr2().
# Like memchr, it is safe to overestimate the length when the terminator
# is guaranteed to be found.  In this case, we may end up reading a word
# that is partially uninitialized, but this use is OK for a speedup.
{
    memchr2-value4
    Memcheck:Value4
    fun:memchr2
}
{
    memchr2-value8
    Memcheck:Value8
    fun:memchr2
}