On Mon, 12 Sep 2005 10:36:55 +0100, Nicholas Clark <[EMAIL PROTECTED]> wrote:

> 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 ?

That's beyond my scope, but if you can come up with such a scheme, I can
incorporate that in the base patch, instead of the need to patch handy.h
twice. I *need* a ref to it in order to have the new symbols being included
in the generated files, unless ... (/me starts experimenting with another
scheme ...)

-- 
H.Merijn Brand        Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using Perl 5.6.2, 5.8.0, 5.8.5, & 5.9.2  on HP-UX 10.20, 11.00 & 11.11,
 AIX 4.3 & 5.2, SuSE 9.2 & 9.3, and Cygwin. http://www.cmve.net/~merijn
Smoking perl: http://www.test-smoke.org,    perl QA: http://qa.perl.org
 reports  to: [EMAIL PROTECTED],                perl-qa@perl.org

Reply via email to