[8862] in Athena Bugs
rsaix 7.3M: xlc
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue Jan 21 22:32:10 1992
Date: Tue, 21 Jan 92 22:31:56 -0500
From: "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>
To: bugs@Athena.MIT.EDU
System name: rosebud
Type and version: POWER 7.3M
Display type:
What were you trying to do?
Compile a program that uses open() with xlc or c89.
What's wrong:
The symbols that open()'s second argument needs are not
defined properly, even when including the correct header
files, under xlc and c89. I.e.:
rosebud% cat test.c
#include <fcntl.h>
#include <sys/mode.h>
main()
{
open("foo", O_CREAT|O_RDWR, 0777);
}
rosebud% cc test.c
rosebud% xlc test.c
6 | open("foo", O_CREAT|O_RDWR, 0777);
.................a.......b.............
a - 1506-045: (S) Undeclared variable.
b - 1506-045: (S) Undeclared variable.
rosebud% c89 test.c
6 | open("foo", O_CREAT|O_RDWR, 0777);
.................a.......b.............
a - 1506-045: (S) Undeclared variable.
b - 1506-045: (S) Undeclared variable.
rosebud%
What should have happened:
Either /etc/xlc.cfg needs to be updated to define other
symbols that aren't being defined, or the header files need to
be fixed in some way so that the symbols are defined when c89
and xlc are used.
Please describe any relevant documentation references:
open(2), /etc/xlc.cfg, /usr/include/fcntl.h.
jik