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: Fri, 3 Feb 2006 22:00:25 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, gdb-patches@sourceware.org
> 
> > If we had safe_strerror try a macro which the nm-*.h file could
> > define, I'd feel better about the change.
> 
> Except we're trying to kill the aggravating NM files, remember?  Also,
> it would be an XM file, and we've already successfully killed those (or
> most of them).  We replaced them with autoconf magic, which is not
> fundamentally different from the USE_WIN32API bits.

Right.

But we still can separate system-specific code from system-independent
one.  One way is to have a function which is only defined on systems
which need it.  Something like this:

  #ifdef NEED_FOOBAR
  foobar ();
  #endif

with the body of `foobar' hiding all the rest on a Windows-specific
source file.  I think such a method minimizes the bad impact of
ifdef's and does not annoy too much when one reads the sources.


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