- if (!IS_ABSOLUTE_PATH (history_filename))
- history_filename = reconcat (history_filename, current_directory, "/",
- history_filename, (char *) NULL);
+ if (!history_filename_empty () && !IS_ABSOLUTE_PATH (history_filename))
+ {
+ gdb::unique_xmalloc_ptr<char> temp (gdb_abspath (history_filename));
+
+ xfree (history_filename);
+ history_filename = temp.release ();
+ }
+}
+
+static void
+init_gdb_version_vars (void)
+{
+ struct internalvar *major_version_var = create_internalvar ("_gdb_major");
+ struct internalvar *minor_version_var = create_internalvar ("_gdb_minor");
+ int vmajor = 0, vminor = 0, vrevision = 0;
+ sscanf (version, "%d.%d.%d", &vmajor, &vminor, &vrevision);
+ set_internalvar_integer (major_version_var, vmajor);
+ set_internalvar_integer (minor_version_var, vminor + (vrevision > 0));