Mail Archives: djgpp/2001/09/29/12:49:06
CBFalconer wrote:
>
> Les Cargill wrote:
> >
> > cwg wrote:
> > >
> > > it's in the turbo-c project i'm working on.
> > > what would be the djgpp replacement?
> >
> > Possibly <malloc.h>? grep is our friend...
>
> No, it is in <stdlib.h>. The C standard is your friend.
>
If he was interested in the 'C' standard, he would have looked there
first.
Just to be persnickety, he asked about <alloh.h>. There are things
declared there other than malloc(). There is probably no direct
<alloc.h> replacement in GNU. I don't know. Never had to ask the
question before.
I also noticed, in the Borland <malloc.h> , this:
File MALLOC.H:
/* malloc.h
#if !defined(__MALLOC_H)
#define __MALLOC_H
#if !defined(__ALLOC_H)
#include <alloc.h>
Borland's <alloc.h> is sorta disjoint from
the GNU usual stuff. malloc() does get prototyped in both
places in Borland. There are other malloc() variants, and
more of them appear in <malloc.h> than in <stdlib.h> . I always
disliked that - it should appear in one place.
In general, my preferred method of resolving includes when porting
to an unfmailiar environment is to remove the offending include,
making sure -Wall(or equivalent) is on, and making a list of all
the prototype errors.
grep for those, then massage until warnings disappear.
> --
> Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT XXXXworldnet DOT att DOT net)
> (Remove "XXXX" from reply address. yahoo works unmodified)
> mailto:uce AT ftc DOT gov (for spambots to harvest)
--
http://home.att.net/~lcargill
- Raw text -