68kMLA Classic Interface

This is a version of the 68kMLA forums for viewing on your favorite old mac. Visitors on modern platforms may prefer the main site.

Click here to select a new forum.
unistd.h in A/UX
Posted by: ChristTrekker on 2011-01-19 14:39:16
Hmmm, why would gcc tell me that STDERR_FILENO is undeclared when unistd.h is included in the file?

Posted by: bbraun on 2011-01-19 15:41:02
#ifdef _POSIX_SOURCE
/* initial file descriptor values */
#define STDIN_FILENO    0
#define STDOUT_FILENO   1
#define STDERR_FILENO   2
_POSIX_SOURCE is undefined?

Posted by: ChristTrekker on 2011-01-19 17:08:08
_POSIX_SOURCE is undefined?
Nope, I pass -D_POSIX_SOURCE to gcc.

Posted by: bbraun on 2011-01-19 17:11:37
gcc -E with all the same flags should give you the preprocessed output to help in tracking it down.

Posted by: ChristTrekker on 2011-01-19 21:34:33
Looks like it may be pulling in the wrong unistd.h (gcc's) which does not have the #define in question.

Posted by: bbraun on 2011-01-20 07:46:29
gcc's unistd.h should be "correct". Where did you get your gcc? I built my gcc from the 2.7.2.3 sources using the gcc-2.7.2 patches at aux-penelope, and my unistd.h has the #ifdef _POSIX_SOURCE and the #define. If you grabbed gcc binaries from elsewhere, did you run gcc's fixincludes script?

Posted by: ChristTrekker on 2011-01-20 10:42:31
I installed a binary, from penelope or somewhere. It's been quite some time ago. If there were instructions to run a fix script, I'd've thought I'd've done it at the time, but maybe I didn't. Guess I'll try to look up this script and how to run it.

Posted by: bd1308 on 2011-01-27 07:41:03
I installed a binary, from penelope or somewhere. It's been quite some time ago. If there were instructions to run a fix script, I'd've thought I'd've done it at the time, but maybe I didn't. Guess I'll try to look up this script and how to run it.
you dont happen to own a Porsche 914 do you? I remember your handle from somewhere else......

1