[Python-bugs-list] [ python-Bugs-635034 ] Don't define _XOPEN_SOURCE on OpenBSD

noreply@sourceforge.net noreply@sourceforge.net
Sat, 09 Nov 2002 12:02:56 -0800


Bugs item #635034, was opened at 2002-11-07 15:57
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=635034&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Jon Ribbens (jribbens)
Assigned to: Nobody/Anonymous (nobody)
Summary: Don't define _XOPEN_SOURCE on OpenBSD

Initial Comment:
Defining _XOPEN_SOURCE on OpenBSD breaks many 
things. For example, it makes the select and time 
modules unavailable (*oops*).

I think this is probably a bug in OpenBSD (I have 
bugreported it there) but in the absence of the ability to 
fix the bug in every OpenBSD installation in the world it 
would be nice if Python would detect OpenBSD and not 
define _XOPEN_SOURCE.

----------------------------------------------------------------------

>Comment By: Jon Ribbens (jribbens)
Date: 2002-11-09 20:02

Message:
Logged In: YES 
user_id=76089

It would be a great deal of effort to make separate bug reports 
(I would have to individually test every Python feature by 
hand), and it wouldn't gain anything.

The problem is that OpenBSD is buggy, has been since 
version 2.0 and still is in the very latest CVS. For example, if 
you define _XOPEN_SOURCE (its value doesn't make any 
difference, just if it is defined) then there is absolutely no way 
to get the select(), fd_set, etc, they are simply not available 
in any header file. You can't use select() in a C program that 
#defines _XOPEN_SOURCE.

I don't see why you say there is "no way" to withdraw the 
definition of _XOPEN_SOURCE - instead of making the 
addition of _XOPEN_SOURCE to the header file 
unconditional, simply detect OpenBSD in ./configure and 
don't define it in that case. Why is that difficult?

Why is _XOPEN_SOURCE being defined anyway? Because 
it breaks everything so badly on OpenBSD, and nobody has 
noticed this before, I am suspecting that almost no programs 
out there except Python define it. This makes it likely to 
break things on many different platforms.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-09 19:09

Message:
Logged In: YES 
user_id=21627

You need to provide more details. For the moment, I see *no
way* to withdraw the definition of _XOPEN_SOURCE, not even
for OpenBSD.

Please make separate bug reports for each issue, perhaps
starting with the select module. Why is it unavailable?
select *is* a feature of POSIX, after all (as is poll).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=635034&group_id=5470