This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-2.93.08 19990215 sparc-sun-solaris2.5 bootstrap fails (genrecog)
- To: Zack Weinberg <zack at rabi dot columbia dot edu>
- Subject: Re: egcs-2.93.08 19990215 sparc-sun-solaris2.5 bootstrap fails (genrecog)
- From: Jeffrey A Law <law at upchuck dot cygnus dot com>
- Date: Fri, 19 Feb 1999 00:42:43 -0700
- cc: baron at sgi dot com (Baron Roberts), ghazi at caip dot rutgers dot edu, egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199902190514.AAA06420@blastula.phys.columbia.edu>you write:
> On Thu, 18 Feb 1999 20:56:44 -0800 (PST), Baron Roberts wrote:
> >
> >Ah the joys of multi-platform development. So as far as the wmem*
> >functions go, sure enough I did this fix on a Linux box. It appears
> >that the only place that uses wmem functions is straits.h:
> >
> > static int compare (const char_type* s1, const char_type* s2, size_t n)
> > { return wmemcmp (s1, s2, n); }
> > static char_type* copy (char_type* s1, const char_type* s2, size_t n)
> > { return wmemcpy (s1, s2, n); }
> > static char_type* set (char_type* s1, const char_type& c, size_t n)
> > { return wmemset (s1, c, n); }
> >
> >One naive suggestion is to try and replace the wmem functions with
> >calls to the appropriate wcs* functions:
> >
> > static int compare (const char_type* s1, const char_type* s2, size_t n)
> > { return wcsncmp (s1, s2, n); }
> > static char_type* copy (char_type* s1, const char_type* s2, size_t n)
> > { return wcsncpy (s1, s2, n); }
> > static char_type* set (char_type* s1, const char_type& c, size_t n)
> > { while (n--) *s1 = c; return n; }
> >
> >I know that these functions are available on Linux and IRIX. Someone
> >with a Sun should confirm the availability. Unfortunately, I could not
> >find an analog for wmemset so I just punted with the loop.
>
> You meant
> { char_type* s = s1; while (n--) *s++ = c; return s1; }
> didn't you?
Hmmm, a light just went on. Why not shove the necessary support
functions into libiberty? libiberty is autoconf'd so we could make them
included if and only if they didn't exist in the target's libraries.
jeff