Subject: Re: Hello world won't compile, what did I do wrong?
To: Steven Grunza <steven.grunza@dgms.com>
From: Alfred Perlstein <bright@rush.net>
List: port-sparc
Date: 06/16/1999 11:40:11
On Wed, 16 Jun 1999, Steven Grunza wrote:

> Why doesn't this build?  Can anyone help with this?  It works on a 
> NetBSD-1.4 fresh install but not on a NetBSD-1.4 upgrade.
> 
> 
> grunza@hw-ss1%(34) cat tst.c
> #include <stdio.h>
> #include <unistd.h>
> 
> int main( void )
> {
> 
>    printf( "Hello, world\n" );
> 
>    return(0);
> }
> 
> /* end of file tst.c    */
> 
> 
> grunza@hw-ss1%(35) gcc -v -o tst tst.c
> Using builtin specs.
> gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
>  /usr/libexec/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 
> -Dsparc -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ -D__sparc__ -D__NetBSD__ 
> -D__KPRINTF_ATTRIBUTE__ -D__sparc -Asystem(unix) -Asystem(NetBSD) 
> -Acpu(sparc) -Amachine(sparc) tst.c /tmp/cciDinDh.i
> GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc)
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/include
> End of search list.
>  /usr/libexec/cc1 /tmp/cciDinDh.i -quiet -dumpbase tst.c -version -o 
> /tmp/ccp4I1W4.s
> GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc-ne  
> tbsd) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 
> release).
> In file included from tst.c:2:
> /usr/include/unistd.h:253: syntax error before `ualarm'
> /usr/include/unistd.h:253: warning: parameter names (without types) 
> in function declaration
> /usr/include/unistd.h:253: warning: data definition has no type or 
> storage class
> /usr/include/unistd.h:254: warning: parameter names (without types) 
> in function declaration
> grunza@hw-ss1%(36)

try including sys/types.h

-Alfred