Subject: Hello world won't compile, what did I do wrong?
To: 'port-sparc@netbsd.org' <port-sparc@netbsd.org>
From: Steven Grunza <steven.grunza@dgms.com>
List: port-sparc
Date: 06/16/1999 10:45:17
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)
=======================================================
Steven Grunza Hardware Engineer
------------------------------------------------------------------
--------------------------------------------
mailto:grunza@dgms.com Ulticom
voice: (856) 787 - 2759 1020 Briggs Road
fax: (856) 866 - 2033 Mt. Laurel, NJ 08054
flames: /dev/null
------------------------------------------------------------------
--------------------------------------------
Unix is user friendly, it's just particular about with whom it makes
friends.