* windows-nat.c (windows_get_absolute_argv0): Move from here...
* mingw-hdep.c (windows_get_absolute_argv0): ...to here.
Include main.h.
* windows-nat.h (windows_get_absolute_argv0): Move prototype from
here...
* main.h (windows_get_absolute_argv0): ...to here.
+2013-04-06 Eli Zaretskii <eliz@gnu.org>
+
+ * windows-nat.c (windows_get_absolute_argv0): Move from here...
+ * mingw-hdep.c (windows_get_absolute_argv0): ...to here.
+ Include main.h.
+
+ * windows-nat.h (windows_get_absolute_argv0): Move prototype from
+ here...
+ * main.h (windows_get_absolute_argv0): ...to here.
+
2013-04-05 Doug Evans <dje@google.com>
* dwarf2read.c (struct dwarf2_per_objfile): Tweak comment.
#include "maint.h"
#include "filenames.h"
-#ifdef __MINGW32__
-# include "windows-nat.h"
-#endif
/* The selected interpreter. This will be used as a set command
variable, so it should always be malloc'ed - since
extern int batch_silent;
extern int batch_flag;
+/* From mingw-hdep.c, used by main.c. */
+
+/* Return argv[0] in absolute form, if possible, or ARGV0 if not. The
+ return value is in malloc'ed storage. */
+extern char *windows_get_absolute_argv0 (const char *argv0);
+
#endif
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
+#include "main.h"
#include "serial.h"
#include "event-loop.h"
return buffer;
}
+/* Return an absolute file name of the running GDB, if possible, or
+ ARGV0 if not. The return value is in malloc'ed storage. */
+
+char *
+windows_get_absolute_argv0 (const char *argv0)
+{
+ char full_name[PATH_MAX];
+
+ if (GetModuleFileName (NULL, full_name, PATH_MAX))
+ return xstrdup (full_name);
+ return xstrdup (argv0);
+}
+
/* Wrapper for select. On Windows systems, where the select interface
only works for sockets, this uses the GDB serial abstraction to
handle sockets, consoles, pipes, and serial ports.
return 0; /* failure */
}
-/* Return an absolute file name of the running GDB, if possible, or
- ARGV0 if not. The return value is in malloc'ed storage. */
-char *
-windows_get_absolute_argv0 (const char *argv0)
-{
- char full_name[PATH_MAX];
-
- if (GetModuleFileName (NULL, full_name, PATH_MAX))
- return xstrdup (full_name);
- return xstrdup (argv0);
-}
-
/* Encapsulate the information required in a call to
symbol_file_add_args. */
struct safe_symbol_file_add_args
whether a given register is a segment register or not. */
extern void windows_set_segment_register_p (segment_register_p_ftype *fun);
-/* Return argv[0] in absolute form, if possible, or ARGV0 if not. The
- return value is in malloc'ed storage. */
-extern char *windows_get_absolute_argv0 (const char *argv0);
-
#endif