public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: bootstrap/3162: libiberty's test for working strncmp fails on some systems
@ 2002-02-23 18:56 rodrigc
0 siblings, 0 replies; 2+ messages in thread
From: rodrigc @ 2002-02-23 18:56 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, john, nobody
Synopsis: libiberty's test for working strncmp fails on some systems
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sat Feb 23 18:55:40 2002
State-Changed-Why:
Information from this PR added to PR 3163:
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3163
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3162
^ permalink raw reply [flat|nested] 2+ messages in thread
* bootstrap/3162: libiberty's test for working strncmp fails on some systems
@ 2001-06-13 4:16 john
0 siblings, 0 replies; 2+ messages in thread
From: john @ 2001-06-13 4:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 3162
>Category: bootstrap
>Synopsis: libiberty's test for working strncmp fails on some systems
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 13 04:16:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: John Hughes
>Release: 3.0 20010611 (prerelease)
>Organization:
CalvaEDI S.A.
>Environment:
System: UnixWare oceanic 5 7.1.1 i386 x86at SCO UNIX_SVR5
host: i586-sco-sysv5uw7.1.1
build: i586-sco-sysv5uw7.1.1
target: i586-sco-sysv5uw7.1.1
configured with: ../gcc-3.0-20010611/configure --prefix=/u/local --with-local_prefix=/u/local
>Description:
libiberty/aclocal.m4 has a check to see if strncmp runs off the
end of the string. It incorrectly fails on systems where
MAP_ANON(YMOUS) must be used without an open fd, for example
UnixWare 7.1.1.
>How-To-Repeat:
Run configure
>Fix:
--- libiberty/aclocal.m4.orig Wed Nov 22 09:32:26 2000
+++ libiberty/aclocal.m4 Wed Jun 13 12:48:35 2001
@@ -21,8 +21,6 @@
#ifndef MAP_ANON
#ifdef MAP_ANONYMOUS
#define MAP_ANON MAP_ANONYMOUS
-#else
-#define MAP_ANON MAP_FILE
#endif
#endif
@@ -39,6 +37,10 @@
{
#if defined(HAVE_MMAP) || defined(HAVE_MMAP_ANYWHERE)
char *p;
+#ifdef MAP_ANON
+ p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0);
+#else
int dev_zero;
dev_zero = open ("/dev/zero", O_RDONLY);
@@ -46,7 +48,8 @@
exit (1);
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, dev_zero, 0);
+ MAP_FILE|MAP_PRIVATE, dev_zero, 0);
+#endif
if (p == (char *)-1)
exit (2);
else
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-24 2:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-23 18:56 bootstrap/3162: libiberty's test for working strncmp fails on some systems rodrigc
-- strict thread matches above, loose matches on Subject: below --
2001-06-13 4:16 john
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).