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 REALTIME_HI/LO macros from target headers


Daniel Jacobowitz wrote:

> > For Linux, the nm-linux.h file already defines those macros, so the
> > definitions in the tm files appear to be fully redundant.
> 
> The nm-linux.h define is redundant too, isn't it?  And off by one?
> Compare to the top of signals.c.  Or is the copy in signals.c off by
> one?

Right.  The nm-linux.h define should be redundant too.  However, it
is actually the correct version; the one at the top of signals.c
is off by one.  (SIGRTMAX is the number of last real-time signal,
REALTIME_HI is supposed to be one beyond the number of the last
real-time signal.)

So we should fix the default definition in signals.c, and then
remove the redundant define in nm-linux.h.  In fact, this would
allow to remove the #include <signal.h> from nm-linux.h as well,
but that *might* cause breakage if any of the native Linux targets
happens to rely on that implicit inclusion of <signal.h>.
That's unfortunately a bit hard to test for ...

> Patch looks OK modulo that question.

Would it be OK to commit the current patch as-is, and do the removal
from nm-linux.h as a follow-on patch?

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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