This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix strfuncs-related breakage of cygserver


Hi Brian,

On Feb  4 13:10, Corinna Vinschen wrote:
> 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.

On second thought it occured to me that there's no good reason that
cygserver shouldn't use standard C functions instead of the internal
__small_printf stuff, given that it is linked against Cygwin anyway.

So what I did was to remove every trace of dependency to Cygwin sources,
except for the version information.

I'd be grateful if you could have a sanitizing look.  Maybe I missed
something.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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