From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17689 invoked by alias); 6 Jun 2011 15:05:44 -0000 Received: (qmail 17678 invoked by uid 22791); 6 Jun 2011 15:05:42 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_FC X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 15:05:26 +0000 Received: by vws2 with SMTP id 2so3248237vws.20 for ; Mon, 06 Jun 2011 08:05:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.73.66 with SMTP id j2mr2868993vdv.116.1307372725173; Mon, 06 Jun 2011 08:05:25 -0700 (PDT) Received: by 10.52.110.68 with HTTP; Mon, 6 Jun 2011 08:05:25 -0700 (PDT) In-Reply-To: <20110606041634.GA6074@tw2.lan> References: <20110606041634.GA6074@tw2.lan> Date: Mon, 06 Jun 2011 15:05:00 -0000 Message-ID: Subject: Re: AIX net/if_arp.h include fix for struct fc_softc From: David Edelsohn To: "Peter O'Gorman" Cc: gcc-patches@gcc.gnu.org, bkorb@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00418.txt.bz2 On Mon, Jun 6, 2011 at 12:16 AM, Peter O'Gorman wrote: > Hi, > > We ran across an issue with qt-4.7 built with gcc-4.4 on AIX 5.2, 5.3, > 6.1, and 7.1 where some static constructors were not being called. It > turned out to be a header file issue, see, for example, > https://www.ibm.com/developerworks/forums/thread.jspa?threadID=3D211873&t= start=3D-2 > > Using fixincludes to fix the header allows us to build a working qt. > > The erroneous struct declaration is: > struct =A0fc_softc { > =A0 =A0 =A0 =A0struct arpcom =A0 fc_ac; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* FCS= common part =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0struct ndd =A0 =A0*nddp; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/*= returned from NS =A0 =A0 =A0 =A0 =A0 =A0*/ > =A0 =A0 =A0 =A0int(*efcnet_arp_fct) > =A0 =A0 =A0 =A0 =A0 =A0 (struct ndd *, struct mbuf *); /* efcnet_arp func= tion address */ > } *fc_softc ; > > when fixed it becomes: > typedef struct _fc_softc { > =A0 =A0 =A0 =A0struct arpcom =A0 fc_ac; =A0 =A0 =A0 =A0 =A0 =A0 =A0/* FCS= common part =A0 =A0 =A0 =A0 =A0 =A0 */ > =A0 =A0 =A0 =A0struct ndd =A0 =A0*nddp; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0/*= returned from NS =A0 =A0 =A0 =A0 =A0 =A0*/ > =A0 =A0 =A0 =A0int(*efcnet_arp_fct) > =A0 =A0 =A0 =A0 =A0 =A0 (struct ndd *, struct mbuf *); /* efcnet_arp func= tion address */ > } *fc_softc ; > > David, do you have any idea if this is what it's supposed to be? > > Ok for trunk? The header certainly does not make sense as is and does not follow AIX header file conventions. typedef is the only thing that makes sense, which was confirmed by some other AIX developer with whom I checked. (I would have expected fc_softc_t as well if it was intended as a typedef, but that's a separate issue.) This change is okay. I will try to find the AIX header owners to fix the problem as well. Thanks, David