[comp.lang.c] compiling gcc under Ultrix

kjh@visual1.jhuapl.edu (Kenneth J. Heeres) (11/15/90)

I am attempting to install gcc on a decstation 5000 under
ultrix 4.1.  I use config.gcc with the decstation option.
I received the following error during make:
  stddef.h line 12  illegal type combination
   typedef unsigned long size_t;

I tried compiling this statement in a separate file and did
not receive the error.  I assume I am having a problem with
a previous definition.  Does anyone know what is going on?

thanks,

ken

gwyn@smoke.brl.mil (Doug Gwyn) (11/16/90)

In article <1990Nov14.164414.16983@aplcen.apl.jhu.edu> kjh@visual1.jhuapl.edu (Kenneth J. Heeres) writes:
>  stddef.h line 12  illegal type combination
>   typedef unsigned long size_t;

size_t must have been previously typedefed.  Since there is no #iftypedef
available, it's hard to avoid such situations.  Usually, ANSI C implementors
associate a reserved preprocessing macro such as __SIZE_T_DEFINED with their
typedef for size_t, so that every header that might have to typedef it can:
	#ifndef __SIZE_T_DEFINED
	#define	__SIZE_T_DEFINED
	typedef unsigned long size_t;
	#endif