[ python-Bugs-1005308 ] _XOPEN_SOURCE issue on IRIX 5.3

SourceForge.net noreply at sourceforge.net
Thu Aug 12 07:05:37 CEST 2004


Bugs item #1005308, was opened at 2004-08-08 01:10
Message generated for change (Comment added) made by mhertha
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1005308&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Georg Schwarz (gschwarz)
Assigned to: Nobody/Anonymous (nobody)
Summary: _XOPEN_SOURCE issue on IRIX 5.3

Initial Comment:
On IRIX 5.3 /usr/include/sys/types.h contains:

#if ( !defined(_XOPEN_SOURCE) && !defined(_POSIX_SOURCE) 
) || defined(_BSD_TYPES) || defined(_BSD_COMPAT)
/*
 * Nested include for BSD/sockets source compatibility.
 * (The select macros used to be defined here).
 */
#include <sys/bsd_types.h>
#endif

sys/bsd_types.h however defines u_int.
If _XOPEN_SOURCE is defined (in pyconfig.h) this results 
in u_int not being known and the compilation to fail.  

One way to get around this is to change configure as 
follows (similarly as it is already being done for some 
other OSes, it seems...):

--- configure.orig      2004-08-08 00:18:33.000000000 +
0200
+++ configure   2004-08-08 00:18:59.000000000 +0200
@@ -1466,6 +1466,8 @@
   # has another value. By not (re)defining it, the 
defaults come in place.
   AIX/4)
     define_xopen_source=no;;
+  IRIX/5.*)
+    define_xopen_source=no;;
 esac
 
 if test $define_xopen_source = yes



I am not sure if this is the best way to solve that 
problem though.


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

Comment By: Maik Hertha (mhertha)
Date: 2004-08-12 07:05

Message:
Logged In: YES 
user_id=768223

Undefining _XOPEN_SOURCE leads to unpredictable compiling
errors on IRIX 6.5.xx even for python.main.

As in the Irix Manpages for intro(3) mentioned, define
_BSD_TYPES if you want BSD compatibility only partly.

For IRIX 6.5.xx this is used only for the bsddbmodule.

--maik./

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

Comment By: Maik Hertha (mhertha)
Date: 2004-08-11 14:03

Message:
Logged In: YES 
user_id=768223

This item could be solved by adding -D_BSD_TYPES in the
BASECFLAGS-line of the Makefile on Irix 6.5.xx and MIPSpro
Compilers: Version 7.3.1.3m

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

Comment By: Georg Schwarz (gschwarz)
Date: 2004-08-08 19:32

Message:
Logged In: YES 
user_id=951222

On IRIX 5.3 unter /usr/include _BSD_TYPES occurs as follows:
/usr/include/sys/time.h:#if !defined(_POSIX_SOURCE) || 
defined(_BSD_TYPES) || defined(_BSD_COMPAT)
/usr/include/sys/types.h:#if ( !defined(_XOPEN_SOURCE) && 
!defined(_POSIX_SOURCE) ) || defined(_BSD_TYPES) || 
defined(_BSD_COMPAT)
/usr/include/unistd.h:#if ( !defined(_XOPEN_SOURCE) && 
!defined(_POSIX_SOURCE) ) || defined(_BSD_TYPES) || 
defined(_BSD_COMPAT)

Therefore it seems pretty harmless to define _BSD_TYPEs. I 
manually did so by adding -D_BSD_TYPES to OPT= in the 
toplevel Makefile. With this modification python 2.3.4 
compiles even with _XOPEN_SOURCE defined.


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

Comment By: Martin v. Löwis (loewis)
Date: 2004-08-08 15:22

Message:
Logged In: YES 
user_id=21627

Will it build correctly if you define _BSD_TYPES or _BSD_COMPAT?

What is the difference between these two (i.e. which one is
less intrusive)? Get these defined directly, or would we
have to define something else which in turn causes
_BSD_TYPES (say) to be defined?

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

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


More information about the Python-bugs-list mailing list