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] ARI fixes: move gdb_stat.h and gdb_wait.h to common subdirectory.


On 15-11-2012 08:41, Pierre Muller wrote:

> 2012-11-14  Pierre Muller  <muller@sourceware.org>
> 
>         ARI fixes: move gdb_wait and gdb_stat headers to common
> subdirectory.
>         * gdb_stat.h: Delete. Moved to common directory.
>         * common/gdb_stat.h: New file.
>         * gdb_wait.h: Delete. Moved to common directory.
>         * common/gdb_wait.h: New file.
>         * Makefile.in (H_FILES_NO_SRC): Adapt to new header
>         location.
>         * contrib/ari/gdb_ari.sh (wait.h rule): Adapt to new gdb_wait.h
>         location.
>         (stat.h rule): Adapt to new gdb_stat.h location.
>         * common/linux-osdata.c: Include "gdb_stat.h" header instead of
>         <sys/stat.h> header.
>         * common/linux-ptrace.c: Include "gdb_wait.h" header instead of
>         <sys/wait.h> header.

Note tabs vs spaces.

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.

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.

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.

-- 
Pedro Alves


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