This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: _POSIX_C_SOURCE redefined
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: mwh, romberg
Priority: low Keywords:

Created on 2003-02-22 02:24 by romberg, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Messages (3)
msg14774 - (view) Author: Mike Romberg (romberg) * Date: 2003-02-22 02:24
  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


msg14775 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2003-02-22 10:43
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?
msg14776 - (view) Author: Mike Romberg (romberg) * Date: 2003-02-24 18:20
Logged In: YES 
user_id=61373

  Doh!  This is even documented on the python
C API reference.  Sorry for wasting your time.
History
Date User Action Args
2022-04-10 16:07:01adminsetgithub: 38029
2003-02-22 02:24:58rombergcreate