From interran@lurch.Stanford.EDU Mon May  6 14:48:49 1991
Newsgroups: comp.windows.interviews
From: interran@lurch.Stanford.EDU (John Interrante)
Subject: Re: Help compiling IV 3.0 on Sun4/SunOS 4.1.1
In-Reply-To: lms@RLE-VLSI.MIT.EDU's message of 6 May 91 14:43:06 GMT
Date: 6 May 91 14:46:52

In article <9105061443.AA00902@galerkin.MIT.EDU> lms@RLE-VLSI.MIT.EDU
(Luis Miguel Silveira) writes:

   A compilation error shows up in iv/src/lib/Interviews/world.c:

     /usr/local/bin/CC    -O  -pic   -Dcplusplus_2_0     -I..    -I../../../.././src/include       -c ../world.c
     CC  ../world.c:
     "/usr/local/include/CC/stddef.h", line 6: error:  size_t redefined: previous: int  now:  unsigned int
     "/usr/local/include/CC/stddef.h", line 6: error:  size_t  declared as  int  and unsigned int
     2 errors
     *** Error code 1
     make: Fatal error: Command failed for target `world.o'

   Not being a C++ programmer so I really do not understand what is
   happening other than the info provided above.  Is this an Interviews
   problem or (more likely) a problem with our local C++ installation ?

Neither.  The problem is with SunOS 4.1.  They goofed and defined
size_t as int instead of unsigned int.  We patched the offending
header file as follows:

*** /usr/include/sys/stdtypes.h.save	Wed Feb  7 23:01:52 1990
--- /usr/include/sys/stdtypes.h	Fri Jun  1 02:18:40 1990
***************
*** 24,30 ****
  typedef	long		clock_t;	/* units=ticks (typically 60/sec) */
  typedef	long		time_t;		/* value = secs since epoch */
  
! typedef	int		size_t;		/* ??? */
  typedef int		ptrdiff_t;	/* result of subtracting two pointers */
  
  typedef	unsigned short	wchar_t;	/* big enough for biggest char set */
--- 24,30 ----
  typedef	long		clock_t;	/* units=ticks (typically 60/sec) */
  typedef	long		time_t;		/* value = secs since epoch */
  
! typedef	unsigned int	size_t;		/* ??? */
  typedef int		ptrdiff_t;	/* result of subtracting two pointers */
  
  typedef	unsigned short	wchar_t;	/* big enough for biggest char set */
--
John Interrante / interran@lurch.stanford.edu

