This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [Patch] libiberty/physmem support for w32


"Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu> writes:

>  > Please factor common code out to a helper routine.
>
> Zack - I looked and couldn't figure out how exactly to factor out any
> code that didn't make things especially ugly.  The only thing that
> comes out easily is the one function call to
> GetModuleHandle("kernel32.dll").
>
> The rest of the code, because it uses different structs and members
> ends up being unique.  Perhaps I'm missing something, if so please
> help me understand what it is.  Otherwise I'd like to consider the
> code as supplied.

I stared at this a bunch and I think you're right, there isn't much we
can do here.  It's annoying, because this isn't just a Win32 problem,
*all* the platform blocks are

#ifdef SOMETHING
  code
  code
  code
#endif

... several screens below ...

#ifdef SOMETHING
  almost
  but not quite
  identical
  code
#endif

But yeah, don't let me grousing stop you.

zw


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