Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!samsung!emory!ox.com!math.fu-berlin.de!unido!sapwdf!wohler From: wohler@sapwdf.UUCP (Bill Wohler) Newsgroups: comp.unix.aix Subject: xlc and brain damage Message-ID: <2811@sapwdf.UUCP> Date: 15 May 91 13:23:46 GMT Reply-To: Bill Wohler Organization: SAP AG, Walldorf, Germany Lines: 29 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@is0002:507]% cat foo.c #include foo() { DIR *dirname = opendir("/tmp"); } [wohler@is0002:508]% cc -c foo.c [wohler@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 Heidelberg Red Barons Ultimate Frisbee Team