#include <ctype.h>
#include <sys/stat.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
/* Prototypes for local functions */
make_cleanup (free, filename);
scratch_chan = openp (getenv ("PATH"), 1, filename,
- write_files? O_RDWR: O_RDONLY, 0,
+ write_files? O_RDWR|O_BINARY: O_RDONLY|O_BINARY, 0,
&scratch_pathname);
if (scratch_chan < 0)
perror_with_name (filename);
(*exec_file_display_hook) (filename);
}
else if (from_tty)
- printf ("No exec file now.\n");
+ printf_filtered ("No exec file now.\n");
}
/* Set both the exec file and the symbol file, in one command.
unsigned count;
count = bfd_count_sections (some_bfd);
- if (count == 0)
- abort(); /* return 1? */
if (*start)
free ((PTR)*start);
*start = (struct section_table *) xmalloc (count * sizeof (**start));
exec_file_command, exec_close, /* open, close */
child_attach, 0, 0, 0, /* attach, detach, resume, wait, */
0, 0, /* fetch_registers, store_registers, */
- 0, 0, 0, /* prepare_to_store, conv_to, conv_from, */
+ 0, /* prepare_to_store, */
xfer_memory, exec_files_info,
0, 0, /* insert_breakpoint, remove_breakpoint, */
0, 0, 0, 0, 0, /* terminal stuff */