From 987622b523bff105af2ebdfb33ef7c4c99b03def Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Thu, 19 Oct 1995 19:54:44 +0000 Subject: [PATCH] * Makefile.in (CC-LD): Rename to CC_LD, so MPW xform works. (MMALLOC_SRC): Define. (MMALLOC_CFLAGS): Use. (ser-mac.o): Add rule. * dwarfread.c, somread.c, ultra3-nat.c, xcoffread.c: Replace L_SET with SEEK_SET in all calls to bfd_seek. * scm-tags.h (scm_tags): Remove excess comma. --- gdb/ChangeLog | 8 ++++++++ gdb/dwarfread.c | 13 ++++--------- gdb/scm-tags.h | 2 +- gdb/somread.c | 4 ++-- gdb/ultra3-nat.c | 2 +- gdb/xcoffread.c | 4 ++-- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 950073d703c..038b39ed95a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,13 @@ Thu Oct 19 12:15:37 1995 Stan Shebs + * Makefile.in (CC-LD): Rename to CC_LD, so MPW xform works. + (MMALLOC_SRC): Define. + (MMALLOC_CFLAGS): Use. + (ser-mac.o): Add rule. + * dwarfread.c, somread.c, ultra3-nat.c, xcoffread.c: Replace L_SET + with SEEK_SET in all calls to bfd_seek. + * scm-tags.h (scm_tags): Remove excess comma. + * mpw-config.in: Adapt to work with autoconf'ed configury; build config.h, add empty definitions to mk.tmp. (powerpc-apple-macos): Make it work. diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index ea401963057..bd92ad15be4 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -57,11 +57,6 @@ other things to work on, if you get bored. :-) #include #endif -/* FIXME -- convert this to SEEK_SET a la POSIX, move to config files. */ -#ifndef L_SET -#define L_SET 0 -#endif - /* Some macros to provide DIE info for complaints. */ #define DIE_ID (curdie!=NULL ? curdie->die_ref : 0) @@ -731,7 +726,7 @@ dwarf_build_psymtabs (objfile, section_offsets, mainline, dbfoff, dbfsize, dbsize = dbfsize; dbbase = xmalloc (dbsize); dbroff = 0; - if ((bfd_seek (abfd, dbfoff, L_SET) != 0) || + if ((bfd_seek (abfd, dbfoff, SEEK_SET) != 0) || (bfd_read (dbbase, dbsize, 1, abfd) != dbsize)) { free (dbbase); @@ -2296,7 +2291,7 @@ read_ofile_symtab (pst) foffset = DBFOFF(pst) + dbroff; base_section_offsets = pst->section_offsets; baseaddr = ANOFFSET (pst->section_offsets, 0); - if (bfd_seek (abfd, foffset, L_SET) || + if (bfd_seek (abfd, foffset, SEEK_SET) || (bfd_read (dbbase, dbsize, 1, abfd) != dbsize)) { free (dbbase); @@ -2312,7 +2307,7 @@ read_ofile_symtab (pst) lnbase = NULL; if (LNFOFF (pst)) { - if (bfd_seek (abfd, LNFOFF (pst), L_SET) || + if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) || (bfd_read ((PTR) lnsizedata, sizeof (lnsizedata), 1, abfd) != sizeof (lnsizedata))) { @@ -2321,7 +2316,7 @@ read_ofile_symtab (pst) lnsize = target_to_host (lnsizedata, SIZEOF_LINETBL_LENGTH, GET_UNSIGNED, pst -> objfile); lnbase = xmalloc (lnsize); - if (bfd_seek (abfd, LNFOFF (pst), L_SET) || + if (bfd_seek (abfd, LNFOFF (pst), SEEK_SET) || (bfd_read (lnbase, lnsize, 1, abfd) != lnsize)) { free (lnbase); diff --git a/gdb/scm-tags.h b/gdb/scm-tags.h index 27fc34e4218..a3b736b59da 100644 --- a/gdb/scm-tags.h +++ b/gdb/scm-tags.h @@ -210,7 +210,7 @@ typedef long SCM; enum scm_tags { - scm_tc8_char = 0xf4, + scm_tc8_char = 0xf4 }; #define SCM_ITAG8(X) ((int)(X) & 0xff) diff --git a/gdb/somread.c b/gdb/somread.c index 1837da82825..522b6b50910 100644 --- a/gdb/somread.c +++ b/gdb/somread.c @@ -112,13 +112,13 @@ som_symtab_read (abfd, objfile, section_offsets) number_of_symbols = bfd_get_symcount (abfd); buf = alloca (symsize * number_of_symbols); - bfd_seek (abfd, obj_som_sym_filepos (abfd), L_SET); + bfd_seek (abfd, obj_som_sym_filepos (abfd), SEEK_SET); val = bfd_read (buf, symsize * number_of_symbols, 1, abfd); if (val != symsize * number_of_symbols) error ("Couldn't read symbol dictionary!"); stringtab = alloca (obj_som_stringtab_size (abfd)); - bfd_seek (abfd, obj_som_str_filepos (abfd), L_SET); + bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET); val = bfd_read (stringtab, obj_som_stringtab_size (abfd), 1, abfd); if (val != obj_som_stringtab_size (abfd)) error ("Can't read in HP string table."); diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c index ddf02ddca86..d63614b0113 100644 --- a/gdb/ultra3-nat.c +++ b/gdb/ultra3-nat.c @@ -250,7 +250,7 @@ fetch_core_registers () for (regno = 0 ; regno < NUM_REGS; regno++) { if (!CANNOT_FETCH_REGISTER(regno)) { - val = bfd_seek (core_bfd, (file_ptr) register_addr (regno, 0), L_SET); + val = bfd_seek (core_bfd, (file_ptr) register_addr (regno, 0), SEEK_SET); if (val < 0 || (val = bfd_read (buf, sizeof buf, 1, core_bfd)) < 0) { char * buffer = (char *) alloca (strlen (reg_names[regno]) + 35); strcpy (buffer, "Reading core register "); diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index b8c5ff1c481..ce36c9517a1 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1882,7 +1882,7 @@ init_stringtab (abfd, offset, objfile) ((struct coff_symfile_info *)objfile->sym_private)->strtbl = NULL; - if (bfd_seek (abfd, offset, L_SET) < 0) + if (bfd_seek (abfd, offset, SEEK_SET) < 0) error ("cannot seek to string table in %s: %s", bfd_get_filename (abfd), bfd_errmsg (bfd_get_error ())); @@ -2648,7 +2648,7 @@ xcoff_initial_scan (objfile, section_offsets, mainline) /* Read the symbols. We keep them in core because we will want to access them randomly in read_symbol*. */ - val = bfd_seek (abfd, symtab_offset, L_SET); + val = bfd_seek (abfd, symtab_offset, SEEK_SET); if (val < 0) error ("Error reading symbols from %s: %s", name, bfd_errmsg (bfd_get_error ())); -- 2.30.2