[Python-Dev] Snake farm

Marc Recht marc@informatik.uni-bremen.de
11 Nov 2002 11:25:20 +0100

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

> So how do I request extensions on that system, beyond the functions
> defined in XPG/5 or XPG/6?
The used standard is defined by_POSIX_SOURCE, _POSIX_C_SOURCE,
_ANSI_SOURCE and _C99_SOURCE. In that order (sys/cdefs.h). These set
the internal defines __POSIX_VISIBLE, __XSI_VISIBLE, __BSD_VISIBLE,
__ISO_C_VISIBLE according to the given standard. If nothing is given=20
#define  __POSIX_VISIBLE      200112
#define  __XSI_VISIBLE     600
#define  __BSD_VISIBLE     1
#define  __ISO_C_VISIBLE      1999
is set. In this environment is everything we want.

> I have looked at them before, hence my claim that I think FreeBSD has
There have been a lot of changes between September and late October.
> a bug here.
I'm still not convinced that FreeBSD's behaviour is a bug. IMO it's only
strict. If you define a standard you get, if not you get all.

Although I'm quite sure the FreeBSD community doesn't like it I'll make
a patch against sys/defs.h to put a define _BSD_SOURCE at the top of the
chain which sets the default environment and post it to the
freebsd-current discussion list.

> Still, you add a case with "FreeBSD", and "rest of the world", the
I'm quite sure it's an object to be extended.. There are some strange
systems out there which all need special treatment..

> "rest of the world" case being where _GNU_SOURCE, _XOPEN_SOURCE,
> _XOPEN_SOURCE_EXTENDED, and _POSIX_C_SOURCE is defined. Why does it
> hurt if either _GNU_SOURCE or _XOPEN_SOURCE_EXTENDED would be defined
> on FreeBSD?
They both don't hurt. I only moved them into the "*" case, because
they're not needed for the FreeBSD case.=20

> Only if all other options have been exhausted. What problems occur if
> _XOPEN_SOURCE is defined?

> Did you try defining _GNU_SOURCE and _XOPEN_SOURCE_EXTENDED? I can see
It's no problem to define them. They're just not needed.

> that you don't want _POSIX_C_SOURCE to be defined, either.
If it's set then we don't get __BSD_VISIBLE.=20

"Premature optimization is the root of all evil." -- Donald E. Knuth

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.1 (FreeBSD)