Date: Thu, 16 Jan 1997 17:19:10 -0500 (EST) From: root To: David Stockton cc: DJGPP Mail List Subject: Re: How do I know what is ANSI? In-Reply-To: <199701131653.KAA28581@ginger.imgen.bcm.tmc.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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