[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
configure fails to determine working strncmp
From: |
Dmitry G. Baksheyev |
Subject: |
configure fails to determine working strncmp |
Date: |
Fri, 18 Jan 2002 13:00:05 +0600 (NST) |
Dear Sir,
I am building binutils on Solaris 5.8:
% gzip -dc binutils-2.11.2.tar.gz | tar -xvpf -
% md b-build
% cd b-build
% ../binutils-2.11.2/configure --program-prefix=g --enable-shared --without-gcc
--verbose
Configuring for a sparc-sun-solaris2.8 host.
...
checking for working mmap... yes
...
Configuring libiberty...
loading cache ../config.cache
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
...
checking for working mmap... (cached) yes
checking for working strncmp... no <=== cannot agree!!
====
The problem seems to come from incorrectly called mmap in
binutils-2.11.2/libiberty/aclocal.m4. My man mmap says:
When MAP_ANON is set in flags, and fd is set to -1, mmap()
provides a direct path to return anonymous pages to the
caller. This operation is equivalent to passing mmap() an
open file descriptor on /dev/zero with MAP_ANON *elided* from
the flags argument.
...
errno is set to EINVAL when
MAP_ANON was specified, but the file descriptor was
not -1.
And look at the code from aclocal.m4:
#ifndef MAP_ANON /* MAP_ANON is defined */
#ifdef MAP_ANONYMOUS
#define MAP_ANON MAP_ANONYMOUS
#else
#define MAP_ANON MAP_FILE
#endif
#endif
/*...*/
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, dev_zero, 0);
if (p == (char *)-1)
exit (2); /* conftest exits here without checking strncmp */
/*...*/
Best wishes.
Dmitrii Baksheyev.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- configure fails to determine working strncmp,
Dmitry G. Baksheyev <=