aboutsummaryrefslogtreecommitdiff
path: root/gdb/state.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1993-01-06 18:22:01 +0000
committerSteve Chamberlain <sac@cygnus>1993-01-06 18:22:01 +0000
commita944e79a999ca5504b9f4220943032b5bbcc1e93 (patch)
tree5df975768b4f25fdbc93657fc4984b0524ccaa98 /gdb/state.c
parent81028ab0e7f01315dbb7853b81260670ba57fae0 (diff)
downloadgdb-a944e79a999ca5504b9f4220943032b5bbcc1e93.zip
gdb-a944e79a999ca5504b9f4220943032b5bbcc1e93.tar.gz
gdb-a944e79a999ca5504b9f4220943032b5bbcc1e93.tar.bz2
* symfile.c: If O_BINARY isn't defined, set it to 0, call openp for
binary files oring in the right bit. * main.c, source.c, state.c, symmisc.c: use macros defined in fopen-{bin|both} when fopening files. * remote-hms.c, remote-sim.c: lint
Diffstat (limited to 'gdb/state.c')
-rw-r--r--gdb/state.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/state.c b/gdb/state.c
index 51b73fa..64f86d6 100644
--- a/gdb/state.c
+++ b/gdb/state.c
@@ -198,7 +198,6 @@ static struct formnode *
alloc_formnode ()
{
struct formnode *fnp;
-
fnp = (struct formnode *) xmalloc (sizeof (struct formnode));
(void) memset (fnp, 0, sizeof (struct formnode));
fnp -> sibling = formtree;
@@ -461,7 +460,7 @@ load_state_command (arg_string, from_tty)
filename = tilde_expand (*argv);
make_cleanup (free, filename);
- if ((fp = fopen (filename, "r")) == NULL)
+ if ((fp = fopen (filename, FOPEN_RB)) == NULL)
{
perror_with_name (filename);
}
@@ -517,7 +516,7 @@ dump_state_command (arg_string, from_tty)
/* Now attempt to create a fresh state file. */
- if ((asfd = sfd_fopen (filename, "w")) == NULL)
+ if ((asfd = sfd_fopen (filename, FOPEN_WB)) == NULL)
{
perror_with_name (filename);
}