use of malloc.h in KDE
Andy Fawcett
andy at athame.co.uk
Fri Nov 22 12:11:50 GMT 2002
On Friday 22 November 2002 13:57, David Faure wrote:
> On Friday 22 November 2002 12:26, Andy Fawcett wrote:
> > On Friday 22 November 2002 13:17, Waldo Bastian wrote:
> > > On Friday 22 November 2002 11:39, Andy Fawcett wrote:
> > > > Would it make sense to do the replace now, and those
> > > > implementations that still need <malloc.h> could include it
> > > > conditionally?
> > > >
> > > > Does anyone see any danger in this?
> > >
> > > I found 50 occurences of <malloc.h> with a quick scan. (I think I
> > > miss a few modules though)
> > >
> > > A lot of those are in yacc generated files where they occur like:
> > >
> > > #if 0 /* No need for malloc.h, which pollutes the namespace;
> > > instead, just don't use alloca. */
> > > #include <malloc.h>
> > > #endif
> > >
> > > So those aren't to cause any problems. Do you happen to have a
> > > list of the ones that are actually giving problems?
> >
> > Preparing one now.
> >
> > I'll post it later, once I have the full build done, probably in a
> > few hours time, as it's just a single 1.4 Athlon doing it.
>
> Bah, that's nothing perl+zsh can't do :)
>
> perl -e 'my $out=""; while(<>) { $out=$_ if(/^#if/); $out=""
> if(/^#endif/); if(/^#include .malloc.h/) { print "$ARGV : "; print
the ^ means it won't catch them if they are indented, but your point is
made ;)
A.
--
Andy Fawcett | "In an open world without walls and fences,
andy at athame.co.uk | we wouldn't need Windows and Gates."
tap at lspace.org | -- anon
More information about the kde-core-devel
mailing list