* windows-nat.c: Reorganize #ifdef __CYGWIN__ considerations into one block.
authorChristopher Faylor <me+cygwin@cgf.cx>
Sat, 6 Mar 2010 19:27:09 +0000 (19:27 +0000)
committerChristopher Faylor <me+cygwin@cgf.cx>
Sat, 6 Mar 2010 19:27:09 +0000 (19:27 +0000)
commitb3c613f28f38008637691b32d2c8a79bc1b53940
treeac22b6d2d74f4ae90e91e76701c30c0aa8e3b772
parent9e9e071b2e0501d3413f48030f0f0edb0131305a
* windows-nat.c: Reorganize #ifdef __CYGWIN__ considerations into one block.
Define helper macros to reduce ifdefs in code.
(get_module_name): Use cygwin_buf_t for buffer and __PMAX for buffer size.
Call unadorned GetModuleFileNameEx rather than GetModuleFileNameEx*.
(windows_make_so): Use __PMAX to denote maximum buffer size and cygwin_buf_t
for buffer type.  Use GetSystemDirectory{W,A} as appropriate.
(get_image_name): Use __PMAX to denote maximum buffer size.
(handle_load_dll): Likewise.
(windows_pid_to_exec_file): Likewise.
(windows_create_inferior): Add many accommodations for older Cygwin and
non-Cygwin.
(bad_GetModuleFileNameExW): Control inclusion of this function based on
__USEWIDE conditional.
(bad_GetModuleFileNameExA): Likewise.
(_initialize_loadable): Just use real function names without the dyn_ part
since they are defined earlier.
gdb/ChangeLog
gdb/windows-nat.c