[comp.unix.ultrix] gcc's ANSI include files

klg0582@uxa.cso.uiuc.edu (Ken-Huang Lin) (02/06/91)

We installed gcc 1.37.1 on Vax station II and DEC station 3100 running
Ultrix 3.1 recently. The compiler doesn't recognize ANSI standard
include file "stdlib.h", nor does it have the standard string function
"strstr". The error messages are:
  stdlib.h: No such file or directory
for the former, and
  Undefined:
  _strstr
for the latter, even when I add "-ansi" option in the compiling.

Any help would be much appreciated,
 
Ken H. Lin
khlin@uiwpl.ece.uiuc.edu

meissner@osf.org (Michael Meissner) (02/06/91)

In article <1991Feb5.171322.8769@ux1.cso.uiuc.edu>
klg0582@uxa.cso.uiuc.edu (Ken-Huang Lin) writes:

| We installed gcc 1.37.1 on Vax station II and DEC station 3100 running
| Ultrix 3.1 recently. The compiler doesn't recognize ANSI standard
| include file "stdlib.h", nor does it have the standard string function
| "strstr". The error messages are:
|   stdlib.h: No such file or directory
| for the former, and
|   Undefined:
|   _strstr
| for the latter, even when I add "-ansi" option in the compiling.
| 
| Any help would be much appreciated,
|  
| Ken H. Lin
| khlin@uiwpl.ece.uiuc.edu

Umm, GCC does not supply a complete ANSI library system, it relies on
the vendor libraries and include files (there are two levels to being
ANSI standard -- with and without a library).  Revision 4.0 started
supplying standard headers, but blew it in terms of what actually went
in the headers (the const keyword in particular was missing in several
of the headers).  It looks like most of the problems are fixed in 4.1,
though sys/file.h still contains the bogus line:

	#ifdef KERNEL && !defined(_POSIX_SOURCE)

So the answer is rev-up your OS, and complain to DEC if it doesn't
meet the standard.....
--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142

Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?