xlc and <sys/dir.h> brain damage
Bill Wohler
wohler at sapwdf.UUCP
Wed May 15 23:23:46 AEST 1991
folks,
the following example compiles under cc, but not under xlc. why not?
is this brain damage in the way dir.h or standards.h is set up?
the meat of dir.h is only included if _POSIX_SOURCE is defined,
which isn't defined when _ANSI_C_SOURCE is as in the case with
xlc.
does anyone really use xlc?
[wohler at is0002:507]% cat foo.c
#include <dirent.h>
foo()
{
DIR *dirname = opendir("/tmp");
}
[wohler at is0002:508]% cc -c foo.c
[wohler at is0002:509]% xlc -c foo.c
5 | DIR *dirname = opendir("/tmp");
........a....b.........................
a - 1506-045: (S) Undeclared variable.
b - 1506-045: (S) Undeclared variable.
--
--bw
-----
Bill Wohler <wohler at sap-ag.de> <sapwdf!wohler>
Heidelberg Red Barons Ultimate Frisbee Team
More information about the Comp.unix.aix
mailing list