diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-06-02 13:34:10 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-06-03 11:29:25 +0000 |
commit | 0ae534d2cfef358bcde3166ce3a29faf85bc632a (patch) | |
tree | f47f4748ddc8dfcfd22afeeffea6ba0b0ed42aea /gdb/windows-nat.c | |
parent | b1058ce98878654d8c19b7b6741d84615795b9a1 (diff) | |
download | gdb-0ae534d2cfef358bcde3166ce3a29faf85bc632a.zip gdb-0ae534d2cfef358bcde3166ce3a29faf85bc632a.tar.gz gdb-0ae534d2cfef358bcde3166ce3a29faf85bc632a.tar.bz2 |
Fix C++ build for Cygwin
gdb/ChangeLog:
2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
* windows-nat.c (handle_output_debug_string): Return type of
gdb_signal_from_host() is gdb_signal, not an int.
(windows_get_exec_module_filename): Add pointer casts for C++.
gdb/gdbserver/ChangeLog:
2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
* win32-low.c (win32_create_inferior): Add pointer casts for C++.
Diffstat (limited to 'gdb/windows-nat.c')
-rw-r--r-- | gdb/windows-nat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 2e8a777..149403a 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -864,7 +864,7 @@ handle_output_debug_string (struct target_waitstatus *ourstatus) to treat this like a real signal. */ char *p; int sig = strtol (s + sizeof (_CYGWIN_SIGNAL_STRING) - 1, &p, 0); - int gotasig = gdb_signal_from_host (sig); + gdb_signal gotasig = gdb_signal_from_host (sig); ourstatus->value.sig = gotasig; if (gotasig) @@ -1894,7 +1894,7 @@ windows_get_exec_module_filename (char *exe_name_ret, size_t exe_name_max_len) /* Cygwin prefers that the path be in /x/y/z format, so extract the filename into a temporary buffer first, and then convert it to POSIX format into the destination buffer. */ - cygwin_buf_t *pathbuf = alloca (exe_name_max_len * sizeof (cygwin_buf_t)); + cygwin_buf_t *pathbuf = (cygwin_buf_t *) alloca (exe_name_max_len * sizeof (cygwin_buf_t)); len = GetModuleFileNameEx (current_process_handle, dh_buf, pathbuf, exe_name_max_len); |