VirtualBox

Changeset 2660 in kBuild


Ignore:
Timestamp:
Sep 10, 2012 9:58:26 PM (12 years ago)
Author:
bird
Message:

sed: three haiku hacks, two for gcc2 and one for broken mbrtowc.

Location:
trunk/src/sed
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sed/basicdefs.h

    r606 r2660  
    6060# define __bool_true_false_are_defined 1
    6161#else
    62 # if HAVE_STDBOOL_H
     62# if HAVE_STDBOOL_H || defined(__HAIKU__) /* haiku/gcc2 hack */
    6363#  include <stdbool.h>
    6464# endif
  • trunk/src/sed/lib/regex_internal.h

    r755 r2660  
    4040# include <wctype.h>
    4141#endif /* HAVE_WCTYPE_H || _LIBC */
    42 #if defined HAVE_STDBOOL_H || defined _LIBC
     42#if defined HAVE_STDBOOL_H || defined _LIBC || defined(__HAIKU__) /* haiku hack */
    4343# include <stdbool.h>
    4444#endif /* HAVE_STDBOOL_H || _LIBC */
  • trunk/src/sed/sed/sed.c

    r2453 r2660  
    407407  return return_code;
    408408}
     409
     410#ifdef __HAIKU__ /* mbrtowc is busted, just stub it and pray the input won't ever acutally be multibyte... */
     411size_t mbrtowc(wchar_t *pwc, const char *pch, size_t n, mbstate_t *ps)
     412{
     413    if (!n)
     414        return 0;
     415    if (pwc)
     416        *pwc = *pch;
     417    return 1;
     418}
     419#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette