[Patches] [ python-Patches-729305 ] Compiler warning on Solaris 8

SourceForge.net noreply@sourceforge.net
Fri, 06 Jun 2003 15:28:29 -0700


Patches item #729305, was opened at 2003-04-29 04:42
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=729305&group_id=5470

Category: Build
Group: Python 2.2.x
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: George Neville-Neil (gnn)
Assigned to: Neal Norwitz (nnorwitz)
Summary: Compiler warning on Solaris 8

Initial Comment:
When compiling Python 2.2 on Solaris 8 there are complaints about _FILE_OFFSET_BITS being redefined.

The following is a patch to configure.in to remedy this.


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

>Comment By: Martin v. Löwis (loewis)
Date: 2003-06-07 00:28

Message:
Logged In: YES 
user_id=21627

Rejecting the patch: There is no bug that it fixes.

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

Comment By: Martin v. Löwis (loewis)
Date: 2003-05-03 01:57

Message:
Logged In: YES 
user_id=21627

Your observation is incorrect: sys/feature_tests.h does
*not* unconditionally define _FILE_OFFSET_BITS. Instead, it
reads

#if defined(_LP64)
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS       64
#endif
#if     _FILE_OFFSET_BITS - 0 != 64
#error  "invalid _FILE_OFFSET_BITS value specified"
#endif
#else   /* _LP64 */
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS       32
#endif
#if     _FILE_OFFSET_BITS - 0 != 32 && _FILE_OFFSET_BITS - 0
!= 64
#error  "invalid _FILE_OFFSET_BITS value specified"
#endif
#endif  /* _LP64 */

So _FILE_OFFSET_BITS is always defined conditionally only,
on the condition that it isn't already defined. Since
Python.h is included before anything else, feature_tests.h
does *not* define it, ever.

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

Comment By: George Neville-Neil (gnn)
Date: 2003-05-03 01:12

Message:
Logged In: YES 
user_id=767347

The point of the patch is that on Solaris 8 there is a file that already defines this and if configure does not notice this then
both pyconfig.h and the OS file sys/feature_test.h define it and 
when building a program with Python embedded in it you get a
lot of warnings.



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

Comment By: Martin v. Löwis (loewis)
Date: 2003-04-29 13:47

Message:
Logged In: YES 
user_id=21627

The patch is clearly incorrect; Python *must* define 
_FILE_OFFSET_BITS. What specific problem does that 
patch fix?

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

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-04-29 06:47

Message:
Logged In: YES 
user_id=80475

Neal, is this something you know about?

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

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