[GRASS5] [bug #3813] (grass) r.sim.water tries to include malloc.h on Mac OS X

this bug's URL: http://intevation.de/rt/webrt?serial_num=3813
-------------------------------------------------------------------------

Subject: r.sim.water tries to include malloc.h on Mac OS X

Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.1 CVS

r.sim.water tries to include malloc.h on Mac OS X. Mac OS X doesn't use malloc.h, so r.sim.water fails
to build.

-------------------------------------------- Managed by Request Tracker

this bug's URL: http://intevation.de/rt/webrt?serial_num=3813
---------------------------------------------------------------------
----

Subject: r.sim.water tries to include malloc.h on Mac OS X

Platform: Mac OSX
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: 6.1 CVS

r.sim.water tries to include malloc.h on Mac OS X. Mac OS X doesn't
use malloc.h, so r.sim.water fails to build.

pick one:
a) Try changing #include <malloc.h> to #include <stdlib.h>
in raster/simwe/r.sim.water/main.c

b) Try changing all occurrences of malloc() to G_malloc() and
removing #include <malloc.h>

Stuff which should probably be using G_malloc() instead of malloc():

$ grep -rI malloc display/* raster/* general/* misc/* vector/* | \
     grep -v G_malloc | cut -f1 -d: | sort | uniq
display/d.rast.edit/menu.c
display/drivers/HTMLMAP/Graph_Set.c
display/drivers/HTMLMAP/Polygn_abs.c
display/drivers/HTMLMAP/Text.c
display/drivers/lib/Text3.c
raster/r.drain/main.c
raster/r.fill.dir/dopolys.c
raster/r.fill.dir/filldir.c
raster/r.fill.dir/ppupdate.c
raster/r.in.gdal/main.c
raster/r.in.gridatb/file_io.c
raster/r.le/r.le.setup/setup.c
raster/r.mapcalc/evaluate.c
raster/r.mapcalc/expression.c
raster/r.mapcalc/lex.yy.c
raster/r.mapcalc/y.tab.c
raster/r.out.mpeg/main.c
raster/r.out.mpeg/write.c
raster/r.out.tiff/r.out.tiff.c
raster/r.param.scale/nrutil.c
raster/r.resamp.rst/main.c
raster/r.sun/main.c
raster/r.sunmask/main.c
raster/r.surf.contour/flag_create.c
raster/r.terraflow/IOStream/lib/src/mm.cc
raster/r.terraflow/filldepr.cc
raster/r.terraflow/main.cc
raster/r.terraflow/stats.cc
raster/r.to.vect/global.h
raster/r.to.vect/lines.c
raster/r.to.vect/util.c
raster/r.topidx/file_io.c
raster/r.topmodel/file_io.c
raster/r.topmodel/topmodel.c
raster/simwe/r.sim.sediment/main.c
raster/simwe/r.sim.water/main.c
raster/simwe/simlib/input.c
raster/wildfire/r.spread/spread.c
vector/v.convert/read.c
vector/v.in.dwg/entity.c
vector/v.in.dwg/main.c
vector/v.mapcalc/list.c
vector/v.mapcalc/yylex.c
vector/v.surf.rst/main.c
vector/v.surf.rst/up_rst.diff
vector/v.vol.rst/dataoct.c
vector/v.vol.rst/main.c
vector/v.vol.rst/oct.c
vector/v.vol.rst/user1.c
vector/v.vol.rst/user2.c
vector/v.vol.rst/user3.c
vector/v.voronoi/sw_memory.c
vector/v.voronoi/vo_main.c

?

Hamish