Header problems

Jim Shankland jas at llama.rtech.UUCP
Fri Mar 11 04:34:58 AEST 1988


In article <3351 at chinet.UUCP> dag at chinet.UUCP (Daniel A. Glasser) writes:
>Your use of NULL === 0 promotes unportable code, and is considered to be
>bad programming style in a world where portability across multiple machine
>architectures ... is required....  On machines were sizeof int !=
>sizeof(void *), the above definition will
>not work....  A better way to do it, in each place you want to define NULL,
>is:
>
>	#ifndef	NULL
>	#define	NULL	((void *)0)
>	#endif

Ack!  Here it comes again!  Warm up the ``kill'' file.
Jim Shankland
  ..!ihnp4!cpsc6a!\
               sun!rtech!jas
 ..!ucbvax!mtxinu!/



More information about the Comp.lang.c mailing list