realloc

Tainter tainter at ihlpb.ATT.COM
Fri Mar 31 07:05:45 AEST 1989


In article <9118 at alice.UUCP> ark at alice.UUCP (Andrew Koenig) writes:
>Hm.  Here's what my draft ANSI C spec has to say about realloc:

>	void *realloc(void *ptr, size_t size);
>  If `ptr' is a null pointer, the
>realloc function behaves like the malloc function for the
>specified size...

>Of course, not all C implementations behave this way.

This just serves to remind us all that there is ONE and ONLY ONE good
use for the __ANSI define, put the following at the top of your files:

#ifndef __ANSI

This text should not compile and will produce errors.  This should show you
uou don't want to compile this anywhere but where __ANSI is defined.

#endif

--johnathan.a.tainter--



More information about the Comp.lang.c mailing list