By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,537 Members | 1,440 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,537 IT Pros & Developers. It's quick & easy.

warning: "_POSIX_C_SOURCE" redefined

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.