470,855 Members | 1,135 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

warning: "_POSIX_C_SOURCE" redefined

Including Python.h I got the following warining

warning: "_POSIX_C_SOURCE" redefined

in Python.h:

#define _POSIX_C_SOURCE 200112L

in features.h (included from string):

# define _POSIX_C_SOURCE 199506L

Is there a (potential) problem with this?

Thanks,
marc

Jul 18 '05 #1
1 11755
At some point, Marc Schellens <m_*********@hotmail.com> wrote:
Including Python.h I got the following warining

warning: "_POSIX_C_SOURCE" redefined

in Python.h:

#define _POSIX_C_SOURCE 200112L

in features.h (included from string):

# define _POSIX_C_SOURCE 199506L

Is there a (potential) problem with this?


There's no problem, but to get rid of the warning, check that
"Python.h" is the _first_ thing included (before system headers, such
as "stdio.h").

_POSIX_C_SOURCE is something that's defined by the user to tell the
runtime what version of the POSIX standard to use. From the comments
at the top of my features.h :

/* These are defined by the user (or the compiler)
to specify the desired environment:

__STRICT_ANSI__ ISO Standard C.
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
if >=199309L, add IEEE Std 1003.1b-1993;
if >=199506L, add IEEE Std 1003.1c-1995
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Jean-Pierre Andreaux | last post: by
reply views Thread by Lorenz Köhl | last post: by
2 posts views Thread by Kurt B. Kaiser | last post: by
2 posts views Thread by none | last post: by
2 posts views Thread by John | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.