This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Build of egcs-971105 on m68k-next-nextstep3 successful
- To: egcs at cygnus dot com, Toon dot Moene at iwr1 dot iwr dot uni-heidelberg dot de (toon at moene dot indiv dot nluug dot nl)
- Subject: Re: Build of egcs-971105 on m68k-next-nextstep3 successful
- From: "Hermann Lauer" <Hermann dot Lauer at IWR dot Uni-Heidelberg dot De>
- Date: Fri, 14 Nov 1997 03:05:52 +0100
Hello Toon,
I'd like to tell you some experiences with nextstep3.3:
> This is probably an error in the autoconfed -Defines because
> NextStep does define those constants, e.g. in
> /usr/include/bsd/sys/stat.h
No, this constants aren't defined in /usr/include/bsd/sys/stat.h:
...
#ifdef _POSIX_SOURCE
#define S_IRUSR _S_IRUSR /* read permission, owner */
#define S_IRGRP 0000040 /* read permission, group */
#define S_IROTH 0000004 /* read permission, other */
#define S_IWUSR _S_IWUSR /* write permission, owner */
#define S_IWGRP 0000020 /* write permission, group */
#define S_IWOTH 0000002 /* write permission, other */
#define S_IXUSR _S_IXUSR /* execute/search permission, */
/* owner */
#define S_IXGRP 0000010 /* execute/search permission, */
/* group */
#define S_IXOTH 0000001 /* execute/search permission, */
/* other */
#define S_IRWXU 0000700 /* read, write, execute */
/* permissions, owner */
#define S_IRWXG 0000070 /* read, write, execute */
/* permissions, group */
#define S_IRWXO 0000007 /* read, write, execute */
/* permissions, other */
#define S_ISBLK(mode) (((mode) & (_S_IFMT)) == (_S_IFBLK))
#define S_ISCHR(mode) (((mode) & (_S_IFMT)) == (_S_IFCHR))
#define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
#define S_ISFIFO(mode) (((mode) & (_S_IFMT)) == (_S_IFIFO))
#define S_ISREG(mode) (((mode) & (_S_IFMT)) == (_S_IFREG))
#endif /* _POSIX_SOURCE */
....
The point is the #ifdef _POSIX_SOURCE.
NeXTStep has no posix support - yes, it claims to have it but the libposix.a is
heavily broken ! (look at deja news for NeXTStep & posix if you like to hear
some opinions...)
So every serious program (as gcc etc.) must avoid the -posix option to cc
(=gcc2.5.8 or so), which in turn defines _POSIX_SOURCE while compiling.
So forget all part's of the NeXTStep headers in the #ifdef _POSIX_SOURCE -
of course, some of them are nevertheless correct and can give you hints how to
implement them.
BTW: NeXT seems to know about the broken posix support - in OpenStep the
libposix.a is omitted - but the headers still includes that parts ! :-(
Best is to treat NeXTStep as a 4.3 BSD System.
Hope this helps you a little bit.
Greetings
Hermann