From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14342 invoked by alias); 8 Mar 2010 16:38:03 -0000 Received: (qmail 14284 invoked by uid 22791); 8 Mar 2010 16:38:01 -0000 X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_40,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.154) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Mar 2010 16:37:57 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.2/jtpda-5.5pre1) with ESMTP id o28GbsDp091351 for ; Mon, 8 Mar 2010 17:37:54 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms1.u-strasbg.fr [IPv6:2001:660:2402:d::10]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o28GbsRv062483 for ; Mon, 8 Mar 2010 17:37:54 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o28GbsQr043442 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Mon, 8 Mar 2010 17:37:54 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFA] Fix cygwin compilation failure for python code Date: Mon, 08 Mar 2010 16:38:00 -0000 Message-ID: <001201cabedd$ba216100$2e642300$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00312.txt.bz2 Using Cygwin, I got several compilation failures related to the incomplete struct symtab_and_line used as parameter in function symtab_and_line_to_sal_object. The patch below allows for me to read in "symtab.h" before "python-internal.h" is read, and thus get a real definition of the symtab_and_line struct. I wonder why I am the only one having this problem? Is this patch OK? Otherwise, how should such problems be handled? Pierre Muller 2010-03-08 Pierre Muller * py-lazy-string.c: Move "python-internal.h" inlcusion to allow compilation. * py-objfile.c: Idem. * py-utils.c: Add "symtab.h" header to allow compilation. Index: py-lazy-string.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-lazy-string.c,v retrieving revision 1.2 diff -u -p -r1.2 py-lazy-string.c --- py-lazy-string.c 5 Mar 2010 19:28:13 -0000 1.2 +++ py-lazy-string.c 8 Mar 2010 16:30:13 -0000 @@ -18,12 +18,12 @@ along with this program. If not, see . */ #include "defs.h" -#include "python-internal.h" #include "charset.h" #include "value.h" #include "exceptions.h" #include "valprint.h" #include "language.h" +#include "python-internal.h" typedef struct { PyObject_HEAD Index: py-objfile.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-objfile.c,v retrieving revision 1.3 diff -u -p -r1.3 py-objfile.c --- py-objfile.c 1 Jan 2010 07:31:50 -0000 1.3 +++ py-objfile.c 8 Mar 2010 16:30:13 -0000 @@ -18,10 +18,10 @@ along with this program. If not, see . */ #include "defs.h" -#include "python-internal.h" #include "charset.h" #include "objfiles.h" #include "language.h" +#include "python-internal.h" typedef struct { Index: py-utils.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-utils.c,v retrieving revision 1.3 diff -u -p -r1.3 py-utils.c --- py-utils.c 5 Mar 2010 20:18:17 -0000 1.3 +++ py-utils.c 8 Mar 2010 16:30:13 -0000 @@ -19,6 +19,7 @@ #include "defs.h" #include "charset.h" +#include "symtab.h" #include "python-internal.h"