Fix C++ build for Cygwin
authorJon Turney <jon.turney@dronecode.org.uk>
Thu, 2 Jun 2016 13:34:10 +0000 (13:34 +0000)
committerJon Turney <jon.turney@dronecode.org.uk>
Fri, 3 Jun 2016 11:29:25 +0000 (11:29 +0000)
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++.

gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/win32-low.c
gdb/windows-nat.c

index 82d14b3e3c540a34cbe44dc283a991e6efc70c2a..af4ddcc447dc8da300d30a271d9dbab428856087 100644 (file)
@@ -1,3 +1,9 @@
+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++.
+
 2016-06-02  Tom Tromey  <tom@tromey.com>
 
        PR python/18984:
index 8b379257c69503b4df9902666e0b34204ed39ed7..079507ae306d941ce8a7101de158b6018c54d449 100644 (file)
@@ -1,3 +1,7 @@
+2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
+
+       * win32-low.c (win32_create_inferior): Add pointer casts for C++.
+
 2016-05-17  Yao Qi  <yao.qi@linaro.org>
 
        * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
index e60be5a6df1570f825002f32777fa1bff6daa779..70abfcd4d03c3dabf5df4b61bb89e3e17041b06f 100644 (file)
@@ -642,8 +642,8 @@ win32_create_inferior (char *program, char **program_args)
   if (path_ptr)
     {
       int size = cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, NULL, 0);
-      orig_path = alloca (strlen (path_ptr) + 1);
-      new_path = alloca (size);
+      orig_path = (char *) alloca (strlen (path_ptr) + 1);
+      new_path = (char *) alloca (size);
       strcpy (orig_path, path_ptr);
       cygwin_conv_path_list (CCP_POSIX_TO_WIN_A, path_ptr, new_path, size);
       setenv ("PATH", new_path, 1);
index 2e8a777411dc2dd07c5453ea792d87ee88004c15..149403ae0c5f22152a76002c952b4ebc37bac024 100644 (file)
@@ -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);
This page took 0.033207 seconds and 4 git commands to generate.