This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libiberty patch]: Change strncmp test in the way it uses mmap
- From: DJ Delorie <dj at redhat dot com>
- To: ira at apple dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Dec 2001 14:26:36 -0500
- Subject: Re: [libiberty patch]: Change strncmp test in the way it uses mmap
- References: <p05100302b852afa018aa@[198.144.204.47]>
Would it be possible to have the test try both mmap calls if possible,
and use whichever works?
> (b) I could argue that basing a failing mmap for the presence of
> strncmp is not the correct way to determine whether strncmp is
> indeed in a system.
The problem is that we must also test for broken strncmps and replace
those too. Without a working mmap, we can't verify that strncmp works
properly. The conservative approach is to use libiberty's strncmp if
we can't tell for sure.