From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26843 invoked by alias); 31 Jul 2014 09:57:43 -0000 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 Received: (qmail 26825 invoked by uid 89); 31 Jul 2014 09:57:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 31 Jul 2014 09:57:39 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6V9vcgj017872 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 31 Jul 2014 05:57:38 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6V9vatK018544; Thu, 31 Jul 2014 05:57:37 -0400 Message-ID: <53DA1310.7060207@redhat.com> Date: Thu, 31 Jul 2014 10:00:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tom Tromey , Gary Benson CC: gdb-patches@sourceware.org Subject: Re: [PATCH 14/13] Move errno.h to common-defs.h References: <1406644635-1011-1-git-send-email-gbenson@redhat.com> <1406724370-20612-1-git-send-email-gbenson@redhat.com> <87zjfqti57.fsf@fleche.redhat.com> In-Reply-To: <87zjfqti57.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00802.txt.bz2 On 07/31/2014 02:46 AM, Tom Tromey wrote: >>>>>> "Gary" == Gary Benson writes: > > Gary> This commit moves the inclusion of errno.h to common-defs.h and > Gary> removes all other inclusions. Note that prior to this commit errno.h > Gary> was included unconditionally in defs.h, whereas in common-defs.h it is > Gary> protected by "#ifdef HAVE_ERRNO_H". This does not change the status > Gary> quo, since presumably every platform on which GDB builds has errno.h. > > Gary> Is this ok to commit? > > Gary> * configure.ac (AC_CHECK_HEADERS): Add errno.h. > > If a header in common/, nat/, or target/ requires an autoconf define, > then the check should be added to common/common.m4 and then the various > configure scripts rebuilt. > > This way we ensure that gdb and gdbserver keep in sync. There were > problems with this in the past. > > I think it's fine to unconditionally include errno.h. For one thing > some files in gdb did this. That's actually not a good justification. We should always check the history of why the check is on the gdb or gdbserver side. That's because the set of hosts/ports supported by either side is not a strict superset of the other side. The checks for HAVE_ERRNO_H on the gdbserver side were added for the Windows CE port (as git blame/log will show -- 68070c10). There's no native gdb Windows CE, so it didn't need that. That said, the CE port is broken for other (similar) reasons. E.g., the CE port predated use of both libiberty and gnulib in gdbserver, and libiberty unconditionally includes errno.h as well, for example. I don't think we should completely nuke the port because most of the arch abstractions in the Windows target side are needed for Windows (NT) on ARM anyway, but it's super fine with me to not have it prevent modernization of the core code base. (If someone were to fix the port, she just somehow come up with an errno.h replacement and make it available to all of the build, including libiberty, which doesn't use gnulib.) > Also I believe it is pulled into gnulib as > a dependency of some other module; though you'd probably want to check > this. Yeah, I think so. > > If you go this route then I guess it would be nice to remove errno.h > checks instead. Let's do that. -- Thanks, Pedro Alves