From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11433 invoked by alias); 6 Jun 2011 04:16:55 -0000 Received: (qmail 11422 invoked by uid 22791); 6 Jun 2011 04:16:53 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_50,TW_FC,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail1.thewrittenword.com (HELO mail1.thewrittenword.com) (69.67.212.77) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Jun 2011 04:16:39 +0000 Received: from mail1.il.thewrittenword.com (emma-internal-gw.il.thewrittenword.com [192.168.13.25]) by mail1.thewrittenword.com (Postfix) with ESMTP id D42D55C0A; Mon, 6 Jun 2011 04:44:50 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.4.4 mail1.thewrittenword.com D42D55C0A Received: from tw2.lan (unknown [192.168.1.254]) by mail1.il.thewrittenword.com (Postfix) with ESMTP id 8339F96B; Mon, 6 Jun 2011 04:16:38 +0000 (UTC) Received: from tw2.lan (tw2.lan [127.0.0.1]) by tw2.lan (8.14.4/8.14.4) with ESMTP id p564Gbqo030581; Sun, 5 Jun 2011 23:16:37 -0500 Received: (from pogma@localhost) by tw2.lan (8.14.4/8.14.4/Submit) id p564GYPj030580; Sun, 5 Jun 2011 23:16:34 -0500 Date: Mon, 06 Jun 2011 04:16:00 -0000 From: "Peter O'Gorman" To: gcc-patches@gcc.gnu.org Cc: dje.gcc@gmail.com, bkorb@gnu.org Subject: AIX net/if_arp.h include fix for struct fc_softc Message-ID: <20110606041634.GA6074@tw2.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00354.txt.bz2 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1165 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=211873&tstart=-2 Using fixincludes to fix the header allows us to build a working qt. The erroneous struct declaration is: struct fc_softc { struct arpcom fc_ac; /* FCS common part */ struct ndd *nddp; /* returned from NS */ int(*efcnet_arp_fct) (struct ndd *, struct mbuf *); /* efcnet_arp function address */ } *fc_softc ; when fixed it becomes: typedef struct _fc_softc { struct arpcom fc_ac; /* FCS common part */ struct ndd *nddp; /* returned from NS */ int(*efcnet_arp_fct) (struct ndd *, struct mbuf *); /* efcnet_arp function address */ } *fc_softc ; David, do you have any idea if this is what it's supposed to be? Ok for trunk? Peter -- Peter O'Gorman pogma@thewrittenword.com --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="aix_fc_softc.patch" Content-length: 998 Index: ChangeLog =================================================================== --- ChangeLog (revision 174678) 2011-??-?? Peter O'Gorman * inclhack.def (aix_net_if_arp): New fix. * fixincl.x: Regenerate. * tests/base/net/if_arp.h [AIX_NET_IF_ARP_CHECK]: New test. Index: inclhack.def =================================================================== --- inclhack.def (revision 174678) +++ inclhack.def (working copy) @@ -369,6 +369,19 @@ test_text = "#define _Complex_I __I\n"; }; +/* + * net/if_arp.h defines a variable fc_softc instead of adding a + * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1 + */ +fix = { + hackname = aix_net_if_arp; + mach = "*-*-aix*"; + files = "net/if_arp.h"; + select = "^struct fc_softc \\{"; + c_fix = format; + c_fix_arg = "typedef struct _fc_softc {"; + test_text = "struct fc_softc {"; +}; /* * pthread.h on AIX 4.3.3 tries to define a macro without whitspace --KsGdsel6WgEHnImy--