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]

[RFC] Clarify windows-nat.c code


Hi all,

  as my long series of patches that introduced common/windows-hdep.[ch]
files did not seem to get much support, I will try to
sort out things directly inside windows-nat.c source.

  The problem is that currently the source code has 
18 #if(n)def __CYGWIN__
and 5 #if(n)def __USEWIDE
  but some code can easily be rearranged to reduce the
number of  #if(n)def __CYGWIN__
  
  There are two different ways we can do this:
option 1) Change as little as possible
just trying to better identify code that should be
Cygwin specific and code that should depend on whether or 
not we are using UNICODE Windows API functions.

option 2) Try, as Eli suggested to get rid of most
of the macros by simply using the standard Windows API
macro: UNICODE.

  The second option might need more changes to the
current source code, but would probably result in
a source code that would be easier to follow for Windows API
used programmers.
  another drawback of option 2 is that adding -DUNICODE to 
CFLAGS would have influences on other Windows specific source files
(like for instance ser-mingw.c).

  I have no strong preference, but would like to sort this out first before
submitting patches, as simplifying current source code
is crucial for my awaiting patches about environment support,
win32 on mingw64 support or 
multiple executable support for Windows OS.

  
Pierre Muller




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