[Python-bugs-list] [ python-Bugs-691005 ] _POSIX_C_SOURCE redefined
SourceForge.net
noreply@sourceforge.net
Mon, 24 Feb 2003 10:20:43 -0800
Bugs item #691005, was opened at 2003-02-21 19:24
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=691005&group_id=5470
Category: Python Library
Group: Python 2.3
>Status: Closed
>Resolution: Invalid
Priority: 1
Submitted By: Mike Romberg (romberg)
Assigned to: Nobody/Anonymous (nobody)
Summary: _POSIX_C_SOURCE redefined
Initial Comment:
Not really a bug. Just a warning which might be
easy to cleanup with an ifndef. If the following simple
file is compiled with gcc-3.2.2 on redhat-8.0 (i686) using
the c++ compiler, you get the following warning:
--------------------- test.C -------------------
#include <iostream>
#include <Python.h>
-----------------------------------------------
In file included from
/usr/local/python-2.3a2/include/python2.3/Python.h:8,
from test.C:2:
/usr/local/python-2.3a2/include/python2.3/pyconfig.h:819:1:
warning: "_POSIX_C_SOURCE" redefined
In file included from
/usr/local/gcc-3.2.2/include/c++/3.2.2/i686-pc-linux-gnu/bits/os_defines.h:39,
from
/usr/local/gcc-3.2.2/include/c++/3.2.2/i686-pc-linux-gnu/bits/c++config.h:34,
from
/usr/local/gcc-3.2.2/include/c++/3.2.2/iostream:44,
from test.C:1:
/usr/include/features.h:131:1: warning: this is the
location of the previous definition
----------------------------------------------------------------------
>Comment By: Mike Romberg (romberg)
Date: 2003-02-24 11:20
Message:
Logged In: YES
user_id=61373
Doh! This is even documented on the python
C API reference. Sorry for wasting your time.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2003-02-22 03:43
Message:
Logged In: YES
user_id=6656
It's a really bad idea to include system headers *before*
including Python.h.
Do you still get the errors if you reverse the order?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=691005&group_id=5470