From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8253 invoked by alias); 30 Jul 2002 03:33:14 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8246 invoked from network); 30 Jul 2002 03:33:12 -0000 Received: from unknown (HELO rj.sgi.com) (192.82.208.96) by sources.redhat.com with SMTP; 30 Jul 2002 03:33:12 -0000 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by rj.sgi.com (8.12.2/8.12.2/linux-outbound_gateway-1.2) with ESMTP id g6U1X8il001059 for ; Mon, 29 Jul 2002 18:33:08 -0700 Received: from quasar.engr.sgi.com (quasar.engr.sgi.com [130.62.180.91]) by cthulhu.engr.sgi.com (SGI-8.9.3/8.9.3) with ESMTP id UAA87328 for ; Mon, 29 Jul 2002 20:33:11 -0700 (PDT) Received: (from davea@localhost) by quasar.engr.sgi.com (SGI-8.9.3/8.9.3) id UAA48966 for gdb-patches@sources.redhat.com; Mon, 29 Jul 2002 20:32:51 -0700 (PDT) Date: Mon, 29 Jul 2002 23:52:00 -0000 From: David Anderson Message-Id: <200207300332.UAA48966@quasar.engr.sgi.com> To: gdb-patches@sources.redhat.com Subject: Re: [RFA] gdb.base/shr1.c: Avoid preprocessor conflict on IRIX X-SW-Source: 2002-07/txt/msg00575.txt.bz2 Kevin Buettner writes: >Another Irix change. I don't really like this change; I played around >with compiler options in an attempt to avoid changing the source code, >but the only one that I came up with which might work is -Usgi. But >that's dangerous because there may be a system header which depends upon >``sgi''. No IRIX header (as distinct from user-written headers) should be standards-correct and depend on 'sgi' as it's clearly in the user namespace. Unfortunately a check thru some IRIX headers finds a few such broken headers :-( These are not things most apps would #include as they go into areas not covered by existing standards. Otherwise someone would have cleaned them up. ./netns/idp_var.h:#ifdef sgi ./netns/ns_pcb.h:#ifdef sgi ./netns/ns.h:#ifdef sgi ./netns/spp_var.h:#ifdef sgi ./netns/ns_error.h:#ifdef sgi ./netns/spp_timer.h:#ifdef sgi ./netns/ns_if.h:#ifdef sgi ./resolv.h:#if ((!defined(BSD)) || (BSD < 199306)) && !defined(sgi) ./arpa/nameser.h In nearly all of these 'sgi' has no effect unless 'KERNEL' is also #defined. In the other ones the effect on gdb test cases should also be nil. Normally 'sgi' is defined because it was defined before the C Standard rules came into effect in 1989. -Usgi seems perfectly sensible to me on IRIX, for compiling most test code (as long as the test code is not *looking* for -Dsgi :-) though given what I just discovered your caution is sensible. But still I think -Usgi would be fine (untested assertion on my part). Sign me a little embarrassed: I would not have thought we still had any such cruft laying around. David B. Anderson davea@sgi.com http://reality.sgiweb.org/davea