2003-01-09 Andrew Cagney <ac131313@redhat.com>

* infrun.c (follow_fork): Use ISO C definition.
	* expprint.c (print_subexp): Use xfree instead of free.
	* charset.c: Include "gdb_string.h" instead of <string.h>.
	(register_iconv_charsets): Use ISO C definition.
	(host_charset, target_charset): Ditto.
	* Makefile.in (charset.o): Update dependencies.
	(mi-cmd-env.o): Update dependencies.

Index: mi/ChangeLog
2003-01-09  Andrew Cagney  <ac131313@redhat.com>

	* mi-cmd-env.c: Include "gdb_string.h" instead of <string.h>.
	Move all includes to after "defs.h".
This commit is contained in:
Andrew Cagney 2003-01-09 18:03:38 +00:00
parent 754533e434
commit 4ef3f3be7a
7 changed files with 31 additions and 15 deletions

View file

@ -1,3 +1,13 @@
2003-01-09 Andrew Cagney <ac131313@redhat.com>
* infrun.c (follow_fork): Use ISO C definition.
* expprint.c (print_subexp): Use xfree instead of free.
* charset.c: Include "gdb_string.h" instead of <string.h>.
(register_iconv_charsets): Use ISO C definition.
(host_charset, target_charset): Ditto.
* Makefile.in (charset.o): Update dependencies.
(mi-cmd-env.o): Update dependencies.
2003-01-08 Andrew Cagney <cagney@redhat.com>
* alpha-linux-tdep.c (alpha_linux_sigcontext_addr): Use

View file

@ -1561,7 +1561,8 @@ c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
$(c_lang_h) $(cp_abi_h)
charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) gdb_assert.h
charset.o: charset.c $(defs_h) $(charset_h) $(gdbcmd_h) $(gdb_assert_h) \
$(gdb_string_h)
cli-out.o: cli-out.c $(defs_h) $(ui_out_h) $(cli_out_h) $(gdb_string_h) \
$(gdb_assert_h)
coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
@ -2496,9 +2497,9 @@ mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
$(mi_cmds_h) $(mi_getopt_h) $(ui_out_h) $(gdb_string_h) $(disasm_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h) $(inferior.h) \
$(mi_getopt_h) $(environ_h) $(gdbcmd_h) $(top_h)
mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
$(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h)
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h)

View file

@ -24,7 +24,7 @@
#include "gdb_assert.h"
#include <stddef.h>
#include <string.h>
#include "gdb_string.h"
#include <ctype.h>
#ifdef HAVE_ICONV
@ -442,7 +442,7 @@ cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
static void
register_iconv_charsets ()
register_iconv_charsets (void)
{
/* Here we should check whether various character sets were
recognized by the local iconv implementation.
@ -479,7 +479,7 @@ cached_iconv_convert (struct cached_iconv *ci, int from_char, int *to_char)
}
static void
register_iconv_charsets ()
register_iconv_charsets (void)
{
}
@ -1016,7 +1016,7 @@ set_host_charset (const char *charset)
const char *
host_charset ()
host_charset (void)
{
return current_host_charset->name;
}
@ -1032,7 +1032,7 @@ set_target_charset (const char *charset)
const char *
target_charset ()
target_charset (void)
{
return current_target_charset->name;
}

View file

@ -220,7 +220,7 @@ print_subexp (register struct expression *exp, register int *pos,
}
fprintf_unfiltered (stream, "]");
/* "selector" was malloc'd by target_read_string. Free it. */
free (selector);
xfree (selector);
return;
}

View file

@ -66,7 +66,7 @@ static int restore_selected_frame (void *);
static void build_infrun (void);
static int follow_fork ();
static int follow_fork (void);
static void set_schedlock_func (char *args, int from_tty,
struct cmd_list_element *c);
@ -377,7 +377,7 @@ static const char *follow_fork_mode_string = follow_fork_mode_parent;
static int
follow_fork ()
follow_fork (void)
{
const char *follow_mode = follow_fork_mode_string;
int follow_child = (follow_mode == follow_fork_mode_child);

View file

@ -1,3 +1,8 @@
2003-01-09 Andrew Cagney <ac131313@redhat.com>
* mi-cmd-env.c: Include "gdb_string.h" instead of <string.h>.
Move all includes to after "defs.h".
2002-12-13 Jeff Johnston <jjohnstn@redhat.com>
* mi-cmds.c (-environment-directory) Change to use mi_cmd_env_dir,

View file

@ -19,9 +19,6 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include <string.h>
#include <sys/stat.h>
#include "defs.h"
#include "inferior.h"
#include "value.h"
@ -35,6 +32,9 @@
#include "ui-out.h"
#include "top.h"
#include "gdb_string.h"
#include <sys/stat.h>
static void env_cli_command (const char *cli, char *args);
static void env_mod_path (char *dirname, char **which_path);
extern void _initialize_mi_cmd_env (void);