From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17530 invoked by alias); 15 Nov 2012 14:24:58 -0000 Received: (qmail 17520 invoked by uid 22791); 15 Nov 2012 14:24:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 14:24:50 +0000 Received: from md15.u-strasbg.fr (md15.u-strasbg.fr [130.79.200.204]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAFEOgsN003852 ; Thu, 15 Nov 2012 15:24:42 +0100 (CET) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms17.u-strasbg.fr [130.79.204.117]) by md15.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id qAFEOfuT031687 ; Thu, 15 Nov 2012 15:24:41 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from E6510Muller (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 qAFEOecb014899 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) ; Thu, 15 Nov 2012 15:24:41 +0100 (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Pedro Alves'" Cc: References: <50a4aadb.c54c420a.715f.5d53SMTPIN_ADDED@mx.google.com> <50A4C0C5.8020901@redhat.com> In-Reply-To: <50A4C0C5.8020901@redhat.com> Subject: [RFA] Remove AC_HEADER_STAT from configure.ac Date: Thu, 15 Nov 2012 14:24:00 -0000 Message-ID: <000301cdc33c$f4203d20$dc60b760$@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: 2012-11/txt/msg00397.txt.bz2 Hi Pedro, I tried to do the AC_HEADER_STAT removal patch... > > When moving headers to common/, we need to ensure that whatever config.h > HAVE_FOO symbols they are using are also produced by gdbserver's configure > too. Didn't know about this... Seems like I underestimated the complexity. > gdb_wait.h seems to depend on AC_CHECK_HEADERS checks for sys/wait.h and > wait.h. gdbserver's configure only checks the former. Would adding wait.h to the gdbserver configure be enough for this problem? > gdb_stat.h seems to depend on AC_HEADER_STAT for STAT_MACROS_BROKEN. > gdbserver's configure doesn't call that macro. But, according to autoconf's > manual: > > > Macro: AC_HEADER_STAT > > > > If the macros S_ISDIR, S_ISREG, etc. defined in sys/stat.h do not work > properly > > (returning false positives), define STAT_MACROS_BROKEN. This is > > the case on Tektronix UTekV, Amdahl UTS and Motorola System V/88. > > > > This macro is obsolescent, as no current systems have the bug. New > > programs need not use this macro. > > These old hosts are not relevant for GDB anymore (I found references to > Motorola 88000 but support was removed on 6.0). So we can just remove > the AC_HEADER_STAT call from gdb's configure.ac, and remove the whole > STAT_MACROS_BROKEN block from gdb_stat.h. That would be done as a separate > patch (in a separate email thread). I'd prefer that be done before the > move, thus avoiding adding AC_HEADER_STAT to gdbserver. I tried... Here is the result. Should we add stat.h to the list of checked headers? I didn't find any HAVE_STAT_H occurrence, and thus assumed this was unnecessary. Pierre Muller PS: In the regenerated files, I discovered that configure has a strange, apparently unrelated change... Is this normal? $ cvs diff -u -p configure Index: configure =================================================================== RCS file: /cvs/src/src/gdb/configure,v retrieving revision 1.376 diff -u -p -r1.376 configure --- configure 14 Nov 2012 19:16:03 -0000 1.376 +++ configure 15 Nov 2012 14:21:16 -0000 >>> Expected changes removed... @@ -12712,7 +12670,7 @@ else # First check to see if --with-tcl was specified. case "${host}" in - *-*-cygwin*) platDir="win" ;; + *-*-cygwin*|*-*-mingw*) platDir="win" ;; *) platDir="unix" ;; esac if test x"${with_tclconfig}" != x ; then @@ -12841,7 +12799,7 @@ else # then check for a private Tk library case "${host}" in - *-*-cygwin*) platDir="win" ;; + *-*-cygwin*|*-*-mingw*) platDir="win" ;; *) platDir="unix" ;; esac if test x"${ac_cv_c_tkconfig}" = x ; then ChangeLog entry: 2012-11-15 Pierre Muller * configure.ac (AC_HEADER_STAT): Remove. * gdb_stat.h (STAT_MACROS_BROKEN): Remove macro use and corresponding code. * configure: Regenerate. * config.in: Regenerate. Index: src/gdb/configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.187 diff -u -p -r1.187 configure.ac --- src/gdb/configure.ac 14 Nov 2012 19:16:04 -0000 1.187 +++ src/gdb/configure.ac 15 Nov 2012 14:16:46 -0000 @@ -1072,7 +1072,6 @@ fi # ------------------------- # AC_HEADER_DIRENT -AC_HEADER_STAT AC_HEADER_STDC # elf_hp.h is for HP/UX 64-bit shared library support. AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \ Index: src/gdb/gdb_stat.h =================================================================== RCS file: /cvs/src/src/gdb/gdb_stat.h,v retrieving revision 1.10 diff -u -p -r1.10 gdb_stat.h --- src/gdb/gdb_stat.h 4 Jan 2012 08:17:02 -0000 1.10 +++ src/gdb/gdb_stat.h 15 Nov 2012 14:16:46 -0000 @@ -22,19 +22,6 @@ #include #include -#ifdef STAT_MACROS_BROKEN -#undef S_ISBLK -#undef S_ISCHR -#undef S_ISDIR -#undef S_ISREG -#undef S_ISFIFO -#undef S_ISLNK -#undef S_ISSOCK -#undef S_ISMPB -#undef S_ISMPC -#undef S_ISNWK -#endif - #if !defined(S_ISBLK) && defined(S_IFBLK) #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) #endif