+Mon Nov 6 15:00:50 1995 Ian Lance Taylor <ian@cygnus.com>
+
+ * bucomm.h: Include <sys/types.h>.
+ * ar.c: Don't include <sys/types.h> or <stdio.h>.
+ * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise.
+
Fri Nov 3 12:38:09 1995 Ian Lance Taylor <ian@cygnus.com>
* objdump.c: Include <sys/types.h>.
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
\f
#include "bfd.h"
-#include "sysdep.h"
#include "progress.h"
#include "bucomm.h"
#include <getopt.h>
#include "libiberty.h"
+#include <sys/stat.h>
-static bfd_vma parse_vma PARAMS ((const char *, const char *));
static flagword parse_flags PARAMS ((const char *));
static struct section_list *find_section_list PARAMS ((const char *, boolean));
static void setup_section PARAMS ((bfd *, asection *, PTR));
exit (exit_status);
}
-/* Parse a string into a VMA, with a fatal error if it can't be
- parsed. */
-
-static bfd_vma
-parse_vma (s, arg)
- const char *s;
- const char *arg;
-{
- bfd_vma ret;
- const char *end;
-
- ret = bfd_scan_vma (s, &end, 0);
- if (*end != '\0')
- {
- fprintf (stderr, "%s: %s: bad number: %s\n", program_name, arg, s);
- exit (1);
- }
- return ret;
-}
-
/* Parse section flags into a flagword, with a fatal error if the
string can't be parsed. */
bfd_fatal (bfd_get_filename (ibfd));
if (relsize == 0)
- return 0;
+ return;
relpp = (arelent **) xmalloc (relsize);
relcount = bfd_canonicalize_reloc (ibfd, isection, relpp, symbols);
fromfd = open (from, O_RDONLY);
if (fromfd < 0)
return -1;
- tofd = open (to, O_WRONLY | O_CREAT | O_TRUNC);
+ tofd = creat (to, 0777);
if (tofd < 0)
{
saved = errno;