delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/18/04:51:12

Date: Thu, 16 Jan 1997 17:19:10 -0500 (EST)
From: root <root AT 206 DOT 172 DOT 218 DOT 60>
To: David Stockton <stockton AT bcm DOT tmc DOT edu>
cc: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: How do I know what is ANSI?
In-Reply-To: <199701131653.KAA28581@ginger.imgen.bcm.tmc.edu>
Message-ID: <Pine.LNX.3.93.970116171538.11272L-100000@206.172.218.60>
MIME-Version: 1.0

On Mon, 13 Jan 1997, David Stockton wrote:

> I have been working on a library of C++ routines that I will eventually want
> to compile on several platforms.  They compiled cleanly with "-Wall" but
> when I decided they would port more easily if I made them ANSI compliant.
> So I added the "-ansi" compile flag and it complained that malloc, calloc,
> etc. had no prototypes.  I am infering from this that they are not ANSI
> standard functions.  If they are not -- then what memory allocation 
> routines are?  Is there an easy way to look up what routines are ANSI
> standard?

malloc may be defined in more than one header file, however the one you
are using to include may not be the one ANSI puts it in.  Alternately
you've missed including a file.  malloc and calloc are both ANSI c
functions prototyped in stdlib.h.

I hope this helps.

Mike A. Harris                           http://www3.sympatico.ca/mharris
My dynamic address:      http://www3.sympatico.ca/mharris/ip-address.html
mailto:mharris AT sympatico DOT ca        mailto:mharris AT blackwidow DOT saultc DOT on DOT ca
The Ultimate: Linux 2.0.27, DOSemu, 4DOS 5.50c, DJGPP 2.01, Borland C 3.1

- Raw text -


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