[Patch] libiberty/physmem support for w32
Zack Weinberg
zack@codesourcery.com
Tue Feb 25 19:09:00 GMT 2003
"Kaveh R. Ghazi" <ghazi@caip.rutgers.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
More information about the Gcc-patches
mailing list