This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Remove AC_HEADER_STAT from configure.ac


On 15-11-2012 14:24, Pierre Muller wrote:
>   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?

Yes.

>> 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?

No need.  gdb_stat.h includes sys/stat.h unconditionally.

> I didn't find any HAVE_STAT_H occurrence,
> and thus assumed this was unnecessary.

> PS: In the regenerated files,
> I discovered that configure has a strange, apparently unrelated
> change... Is this normal?

No.  I just tried regenerating configure in the current
mainline, with no changes to configure.ac, and configure
did not change for me.  Be sure to use pristine FSF autoconf 2.64.
Sounds like the autoconf you used has local mingw patches.

> 2012-11-15  Pierre Muller  <muller@sourceware.org>
> 
>         * configure.ac (AC_HEADER_STAT): Remove.
>         * gdb_stat.h (STAT_MACROS_BROKEN): Remove macro use
>         and corresponding code.
>         * configure: Regenerate.

Otherwise this is fine.  Thanks.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]