[GRASS5] New MacOS X compilation errors

Andreas Lange Andreas.Lange at Rhein-Main.de
Sun Nov 19 14:26:40 EST 2000


Hi Markus, Hi Jeshua,

generally all modules should use the available G_* functions instead of
the system functions. I already changed some calls in some libraries and
modules.
Other functions than G_malloc are:
G_strcasecmp
G_strcmp
etc, etc. (can prepare a list if there is interest). 

But in this special case i would recommend not to change this. 

The problem in SWITCHER.c is that the function calls are in pre-ANSI
form without the proper typecasts and size_t types. 

Please give me some time to fix this!

cu,

Andreas

Markus Neteler wrote:
> 
> Hi all,
> 
> On Sat, Nov 18, 2000 at 06:39:51PM -0800, Jeshua Lacock wrote:
> > The XDRIVER24 module fails to compile because the module is dependent on the switcher.c that also fails to compile.  Here's the log:
> >
> > SWITCHER.c: In function `xalloc':
> > SWITCHER.c:1369: conflicting types for `malloc'
> > /System/Library/Frameworks/System.framework/Headers/bsd/stdlib.h:121: previous declaration of `malloc'
> > SWITCHER.c:1369: warning: extern declaration of `malloc' doesn't match global one
> > SWITCHER.c:1369: conflicting types for `realloc'
> > /System/Library/Frameworks/System.framework/Headers/bsd/stdlib.h:125: previous declaration of `realloc'
> > SWITCHER.c:1369: warning: extern declaration of `realloc' doesn't match global one
> > make[2]: *** [OBJ.powerpc-apple-darwin1.2/SWITCHER.o] Error 1
> > make[1]: *** [all] Error 2
> >
> > Any ideas?
> 
> Jeshua, could you try to replace all "malloc" with "G_malloc"?
> If o.k., we should check the entire CVS for malloc. I recently
> changed r.flow on that, seems to work o.k.
> 
> Markus
> 
> ----------------------------------------
> If you want to unsubscribe from GRASS Development Team mailing list write to:
> minordomo at geog.uni-hannover.de with
> subject 'unsubscribe grass5'

-- 
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange at Rhein-Main.de - A.C.Lange at GMX.net


---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list