[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: use of malloc.h in KDE
From: David Faure <david () mandrakesoft ! com>
Date: 2002-11-22 11:57:07
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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 "$out" if ($out); print \
"UNCONDITIONAL!\n" if ($out eq "");}}' kdepim/**/*
says:
kdepim/korganizer/plugins/holidays/parseholiday.c : #ifdef HAVE_MALLOC_H
kdepim/korganizer/plugins/holidays/parseholiday.c : #if 0 /* No need for malloc.h, \
which pollutes the namespace; kdepim/korganizer/plugins/holidays/parseholiday.y : \
#ifdef HAVE_MALLOC_H kdepim/libical/src/libical/icallangbind.c : UNCONDITIONAL!
kdepim/libical/src/libical/icalyacc.c : #if 0 /* No need for malloc.h, which pollutes \
the namespace; kdepim/libical/src/libicalvcal/vcc.y : #ifndef __MWERKS__
kdepim/libical/src/libicalvcal/vobject.c : #ifndef MWERKS
kdepim/libkcal/versit/vcc.c : #ifndef __FreeBSD__
kdepim/libkcal/versit/vcc.c : #if 0 /* No need for malloc.h, which pollutes the \
namespace; kdepim/libkcal/versit/vcc.y : #ifndef __FreeBSD__
grep for UNCONDITIONAL and you'll see which ones are a problem :)
(e.g. kdepim/libical/src/libical/icallangbind.c above)
- --
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE93huU72KcVAmwbhARAgjiAJ9HPrJZoMOuYLDTSrSE6ppcFRQ7OACfdg+Q
q7nFN/S+PAOm9Jnm/rwEMMI=
=Lben
-----END PGP SIGNATURE-----
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic