www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/29/12:49:06

Message-ID: <3BB5FAAD.AB8B09C1@worldnet.att.net>
From: Les Cargill <lcargill AT worldnet DOT att DOT net>
X-Mailer: Mozilla 4.72 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: what's #include <alloc.h>?
References: <o1at7.26464$2H2 DOT 2100965 AT e3500-atl1 DOT usenetserver DOT com> <3BB5378E DOT 8E596BC8 AT worldnet DOT att DOT net> <3BB56F83 DOT 5DD6EEAB AT yahoo DOT com>
Lines: 54
Date: Sat, 29 Sep 2001 16:42:58 GMT
NNTP-Posting-Host: 12.86.209.138
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc04-news.ops.worldnet.att.net 1001781778 12.86.209.138 (Sat, 29 Sep 2001 16:42:58 GMT)
NNTP-Posting-Date: Sat, 29 Sep 2001 16:42:58 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019