This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-2.93.08 19990215 sparc-sun-solaris2.5 bootstrap fails (genrecog)



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]