Bug #19280 myx_grt_python.h:33, warning: "_POSIX_C_SOURCE" redefined
Submitted: 22 Apr 2006 16:32 Modified: 26 Apr 2006 15:42
Reporter: John Yodsnukis (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Preview Severity:S3 (Non-critical)
Version:1.0.6beta svn revision 1275 OS:Linux (Linux (Gentoo on PPC))
Assigned to: Alfredo Kojima CPU Architecture:Any

[22 Apr 2006 16:32] John Yodsnukis
Description:
In file included from /usr/include/python2.4/Python.h:8,
                 from ../../library_grt/include/myx_grt_python.h:33,
                 from myx_grt_shell.c:25:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from ../../library_util/shared_include/myx_shared_util_functions.h:20,
                 from ../../library_util/include/myx_util.h:27,
                 from ../../library_util/include/myx_util_functions.h:20,
                 from ../../library_util/include/myx_util_public_interface.h:24,
                 from ../../library_grt/include/myx_grt_public_interface.h:31,
                 from ../../library_grt/include/myx_grt_private.h:21,
                 from myx_grt_shell.c:20:
/usr/include/features.h:190:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.4/Python.h:8,
                 from ../../library_grt/include/myx_grt_python.h:33,
                 from myx_grt_python.c:22:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from ../../library_util/shared_include/myx_shared_util_functions.h:20,
                 from ../../library_util/include/myx_util.h:27,
                 from ../../library_util/include/myx_util_functions.h:20,
                 from ../../library_util/include/myx_util_public_interface.h:24,
                 from ../../library_grt/include/myx_grt_public_interface.h:31,
                 from ../../library_grt/include/myx_grt_private.h:21,
                 from ../../library_grt/include/myx_grt_python.h:27,
                 from myx_grt_python.c:22:
/usr/include/features.h:190:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.4/Python.h:8,
                 from ../../library_grt/include/myx_grt_python.h:33,
                 from myx_grt_python_common.c:22:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from ../../library_util/shared_include/myx_shared_util_functions.h:20,
                 from ../../library_util/include/myx_util.h:27,
                 from ../../library_util/include/myx_util_functions.h:20,
                 from ../../library_util/include/myx_util_public_interface.h:24,
                 from ../../library_grt/include/myx_grt_public_interface.h:31,
                 from ../../library_grt/include/myx_grt_private.h:21,
                 from myx_grt_python_common.c:21:
/usr/include/features.h:190:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.4/Python.h:8,
                 from ../../library_grt/include/myx_grt_python.h:33,
                 from myx_grt_python_shell.c:22:
/usr/include/python2.4/pyconfig.h:838:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from ../../library_util/shared_include/myx_shared_util_functions.h:20,
                 from ../../library_util/include/myx_util.h:27,
                 from ../../library_util/include/myx_util_functions.h:20,
                 from ../../library_util/include/myx_util_public_interface.h:24,
                 from ../../library_grt/include/myx_grt_public_interface.h:31,
                 from ../../library_grt/include/myx_grt_private.h:21,
                 from myx_grt_python_shell.c:21:
/usr/include/features.h:190:1: warning: this is the location of the previous definition

How to repeat:
compile from svn.  look at the warnings.

Suggested fix:
Change the order of the *python.;h includes:

--- mysql-gui-common/library_grt/include/myx_grt_python.h 
+++ mysql-gui-common/library_grt/include/myx_grt_python.h 
@@ -24,14 +24,14 @@
 extern "C" {
 #endif
 
-#include "myx_grt_private.h"
-
 #ifdef __APPLE__
 #include <Python/Python.h>
 #else
 #undef _DEBUG // for MSVC
 #include <Python.h>
 #endif
+
+#include "myx_grt_private.h"
   
 // used as interpreter context for Python loader and
 // is also accessible through __grt from the python interpreter (as a C obj)
--- mysql-gui-common/library_grt/source/myx_grt_python_shell.c 
+++ mysql-gui-common/library_grt/source/myx_grt_python_shell.c 
@@ -18,8 +18,8 @@
 
 #ifdef ENABLE_PYTHON_MODULES
 
+#include "myx_grt_python.h"
 #include "myx_grt_private.h"
-#include "myx_grt_python.h"
 
 
 // python internals
--- mysql-gui-common/library_grt/source/myx_grt_python_common.c 
+++ mysql-gui-common/library_grt/source/myx_grt_python_common.c 
@@ -18,8 +18,8 @@
 
 #ifdef ENABLE_PYTHON_MODULES
 
+#include "myx_grt_python.h"
 #include "myx_grt_private.h"
-#include "myx_grt_python.h"
 
 static PyTypeObject GRTValueType;
 static PyTypeObject GRTModuleType;
@@ -1822,7 +1822,7 @@
 PyDoc_STRVAR(ls_doc,
 "ls(path=None)"NLNL
 "Shows formatted contents of the current global tree node or"NL
-"the one refered to by path. You can get a raw list of members"NL
+"the one referred to by path. You can get a raw list of members"NL
 "with dir(object)."NL
 "See Also: cd(), pwd()");
[26 Apr 2006 15:42] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html