[patch] fix strfuncs-related breakage of cygserver
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Feb 4 12:10:00 GMT 2008
On Feb 3 19:37, Brian Dessent wrote:
>
> The recent addition of the sys_{wcstombs,mbstowcs}_alloc() functions to
> strfuncs.cc causes cygserver to no longer build. The problem is simply
> that we can't call ccalloc() from within cygserver, but cygserver needs
> __small_vsprintf() which in turn calls sys_wcstombs_alloc(), which in
> turn wants to call ccalloc(). To get around this, I just
> conditionalized the foo_alloc() functions to always use plain calloc()
> when inside cygserver, and changed cygserver's Makefile to rebuild
> strfuncs.cc again instead of sharing the .o from the DLL.
>
> There is also a small additional buglet in that the call to
> sys_wcstombs_alloc() in __small_vsprintf() was passing PATH_MAX as the
> heap type, and that is not a valid cygheap_types. I changed it to
> HEAP_NOTHEAP as that is the only value that makes sense here since this
> pointer is subsequently free()'d and not cfree()'d.
>
> Attached are two patches, one for cygwin/ and one in cygserver/.
Thanks, applied.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
More information about the Cygwin-patches
mailing list