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: Support Windows extended error numbers in safe_strerror


> Date: Thu, 9 Feb 2006 09:57:53 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
> 
> Of course there's a flip side.  If I do it Eli's way, the default
> version has to compile and link.  Which happens to be the case for
> the two examples we have today, but also a pretty limiting assumption.

If the default version doesn't compile on the platform that needs the
hook, the solution is simple: define enough macros and stub functions
to effectively make it the default version a nop on that platform.

But in practice, the need for this rarely if ever arises.  Macros and
global symbols that are highly unportable tend to be used only if
defined, as in:

    #if defined (TIOCGWINSZ)
      if (ioctl (tty, TIOCGWINSZ, &window_size) == 0)
	{
	  _rl_screenwidth = (int) window_size.ws_col;
	  _rl_screenheight = (int) window_size.ws_row;
	}
    #endif /* TIOCGWINSZ */


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