On Mon, Sep 12, 2005 at 08:37:27AM +0200, H.Merijn Brand wrote:
> On Sat, 10 Sep 2005 17:59:00 -0700, "Steve Peters via RT"
> <[EMAIL PROTECTED]> wrote:
> 
> > > [nicholas - Wed Jun 01 08:09:31 2005]:

> > > It's not clear if any other malloc implementations provide these
> > >    functions, or
> > > the same functionality with another name, apart from Perl's own
> > >    malloc's
> > > malloced_size

> > Adding the detection for these function is pretty simple, and Configure
> > doesn't need to do anything more that standard libc scanning.  I'm guessing
> > it would be easy to add to Metaconfig to check.  The following patches can
> > do it for playing with, but don't apply to p4.

> > --- config_h.SH.old     Tue Jun 21 14:56:18 2005
> > +++ config_h.SH Sat Sep 10 19:22:05 2005
> > @@ -3889,6 +3889,18 @@
> >   */
> >  #$d_libm_lib_version LIBM_LIB_VERSION          /**/
> >  
> > +/* HAS_MALLOC_SIZE
> > + *      This symbol, if defined, indicates that the malloc_size
> > + *      routine is available for use.
> > + */
> > +#$d_malloc_size HAS_MALLOC_SIZE         /**/
> > +
> > +/* HAS_MALLOC_GOOD_SIZE
> > + *      This symbol, if defined, indicates that the malloc_good_size
> > + *      routine is available for use.
> > + */
> > +#$d_malloc_good_size HAS_MALLOC_GOOD_SIZE         /**/
> > +
> >  /* HAS_NL_LANGINFO:
> >   *     This symbol, if defined, indicates that the nl_langinfo routine is
> >   *     available to return local data.  You will also need <langinfo.h>
> 
> I'll see. Looks complete.
> I'll also have to add this to handy.h, unless you have a real location where
> these new `things' are referenced.

Whilst I realise that we can only probe for names we know, as is this doesn't
suggest a framework for how to cope with the functions having a different
name.

Do we define 2 "names" for them that are actually macros in handy.h, that use
malloc_size()/malloced_size() and malloc_good_size()/undef ?

Nicholas Clark

Reply via email to