[Python-bugs-list] [ python-Bugs-637321 ] _POSIX_C_SOURCE redfined

noreply@sourceforge.net noreply@sourceforge.net
Tue, 12 Nov 2002 11:59:56 -0800


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

Category: Build
Group: None
>Status: Closed
>Resolution: Later
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Martin v. Löwis (loewis)
Summary: _POSIX_C_SOURCE redfined

Initial Comment:
I recently build and installed a current CVS python. 
When I used it to build some C extension modules, I get
a warning about redefinition of _POSIX_C_SOURCE.  Is
this related to your recent changes?

building 'ExtensionClass' extension
gcc -g -Wall -Wstrict-prototypes -fPIC
-I/usr/local/include/python2.3 -c
ExtensionClass/src/ExtensionClass.c -o
build/temp.linux-i686-2.3/ExtensionClass.o
In file included from
/usr/local/include/python2.3/Python.h:8,
                 from
ExtensionClass/src/ExtensionClass.h:94,
                 from
ExtensionClass/src/ExtensionClass.c:28:
/usr/local/include/python2.3/pyconfig.h:795: warning:
`_POSIX_C_SOURCE' redefined
/usr/include/features.h:164: warning: this is the
location of the previous definition


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

>Comment By: Jeremy Hylton (jhylton)
Date: 2002-11-12 19:59

Message:
Logged In: YES 
user_id=31392

It looks like stdio.h is included first (and redundantly) in
ExtensionClass.c.  I've never seen the warning before, so
some recent change to python has exposed the problem in
ExtensionClass.


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

Comment By: Martin v. Löwis (loewis)
Date: 2002-11-12 19:54

Message:
Logged In: YES 
user_id=21627

Unlikely. More likely, ExtensionClass.c includes a system
header before including Python.h, which is an error.

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

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