This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [patch] fix strfuncs-related breakage of cygserver
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 4 Feb 2008 13:10:16 +0100
- Subject: Re: [patch] fix strfuncs-related breakage of cygserver
- References: <47A6888D.5CF73D29@dessent.net>
- Reply-to: cygwin-patches at cygwin dot com
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