OSDN Git Service

* windows-nat.c: Reorganize #ifdef __CYGWIN__ considerations into one block.
authorcgf <cgf>
Sun, 7 Mar 2010 04:27:08 +0000 (04:27 +0000)
committercgf <cgf>
Sun, 7 Mar 2010 04:27:08 +0000 (04:27 +0000)
commit0beb9013df97d7351b49647a8274bc47a059b947
tree1b286552e6b5f4b103bc2a0ed26d3b342a24abf1
parent3ae88d00a077600f199aee4b3ab6e94e278f04a8
* 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