This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Remove inclusions of <ctype.h> from gas/


Hi Guys,

  I am applying the patch below to fix the last two files which
  include <ctype.h> in preference to "safe-ctype.h".  For one file the
  inclusion was unnecessary, for the other I needed to update the
  macro uses as well.

Cheers
        Nick

2003-07-14  Nick Clifton  <nickc@redhat.com>

	* config/tc-ip2k.c: Remove inclusion of <ctype.h>
	* config/tc-tic4x.c: Replace inclusion of <ctype.h> with
	"safe-ctype.h" and update use of macros.
	* Makefile.am: Update dependencies.
	* Makefile.in: Regenerate.

Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/gas/Makefile.am,v
retrieving revision 1.78
diff -c -3 -p -r1.78 Makefile.am
*** Makefile.am	24 Jun 2003 11:10:40 -0000	1.78
--- Makefile.am	14 Jul 2003 09:51:57 -0000
*************** DEPTC_frv_coff = $(INCDIR)/symcat.h $(sr
*** 1094,1100 ****
  DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \
!   subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
    $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
    cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
  DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
--- 1094,1100 ----
  DEPTC_frv_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h \
! subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
    $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
    cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
  DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
*************** DEPTC_tic4x_coff = $(INCDIR)/symcat.h $(
*** 1451,1461 ****
    $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
    $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
!   $(INCDIR)/obstack.h
  DEPTC_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
!   $(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h
  DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
--- 1451,1461 ----
    $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
    $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
!   $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
  DEPTC_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
!   $(INCDIR)/opcode/tic4x.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h
  DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
*************** DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(
*** 1974,1985 ****
  DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
!   $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
  DEPOBJ_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
    $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
!   struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
  DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
--- 1974,1985 ----
  DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
!   $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/safe-ctype.h
  DEPOBJ_tic4x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
    $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
!   struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/safe-ctype.h
  DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
    $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
    $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
*************** DEP_tic30_elf = $(srcdir)/config/obj-elf
*** 2342,2351 ****
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
  DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
    $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
!   $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
  DEP_tic4x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
!   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h
  DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
    $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \
    $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
--- 2342,2352 ----
    $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
  DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
    $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
!   $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h
  DEP_tic4x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
    $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
!   $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic4x.h \
!   $(INCDIR)/safe-ctype.h
  DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
    $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \
    $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
Index: config/tc-ip2k.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ip2k.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 tc-ip2k.c
*** config/tc-ip2k.c	21 May 2003 12:07:55 -0000	1.6
--- config/tc-ip2k.c	14 Jul 2003 09:52:30 -0000
***************
*** 19,26 ****
     Boston, MA 02111-1307, USA.  */
  
  #include <stdio.h>
- #include <ctype.h>
- 
  #include "as.h"
  #include "subsegs.h"     
  #include "symcat.h"
--- 19,24 ----
Index: config/tc-tic4x.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-tic4x.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 tc-tic4x.c
*** config/tc-tic4x.c	18 May 2003 22:52:35 -0000	1.9
--- config/tc-tic4x.c	14 Jul 2003 09:52:41 -0000
***************
*** 46,53 ****
  */
  
  #include <stdio.h>
! #include <ctype.h>
! 
  #include "as.h"
  #include "opcode/tic4x.h"
  #include "subsegs.h"
--- 46,52 ----
  */
  
  #include <stdio.h>
! #include "safe-ctype.h"
  #include "as.h"
  #include "opcode/tic4x.h"
  #include "subsegs.h"
*************** tic4x_insert_reg (regname, regnum)
*** 737,743 ****
    symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
  				   &zero_address_frag));
    for (i = 0; regname[i]; i++)
!     buf[i] = islower (regname[i]) ? toupper (regname[i]) : regname[i];
    buf[i] = '\0';
  
    symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
--- 736,742 ----
    symbol_table_insert (symbol_new (regname, reg_section, (valueT) regnum,
  				   &zero_address_frag));
    for (i = 0; regname[i]; i++)
!     buf[i] = islower (regname[i]) ? TOUPPER (regname[i]) : regname[i];
    buf[i] = '\0';
  
    symbol_table_insert (symbol_new (buf, reg_section, (valueT) regnum,
*************** tic4x_indirect_parse (operand, indirect)
*** 1556,1562 ****
  	  if (*s == '%')
  	    s++;
  #endif
! 	  while (isalnum (*s))
  	    *b++ = *s++;
  	  *b++ = '\0';
  	  if (!(symbolP = symbol_find (name)))
--- 1555,1561 ----
  	  if (*s == '%')
  	    s++;
  #endif
! 	  while (ISALNUM (*s))
  	    *b++ = *s++;
  	  *b++ = '\0';
  	  if (!(symbolP = symbol_find (name)))
*************** tic4x_indirect_parse (operand, indirect)
*** 1623,1629 ****
  	  break;
  
  	default:
! 	  if (tolower (*s) != *n)
  	    return 0;
  	  s++;
  	}
--- 1622,1628 ----
  	  break;
  
  	default:
! 	  if (TOLOWER (*s) != *n)
  	    return 0;
  	  s++;
  	}
*************** md_parse_option (c, arg)
*** 2869,2875 ****
    switch (c)
      {
      case OPTION_CPU:             /* cpu brand */
!       if (tolower (*arg) == 'c')
  	arg++;
        tic4x_cpu = atoi (arg);
        if (!IS_CPU_TIC3X (tic4x_cpu) && !IS_CPU_TIC4X (tic4x_cpu))
--- 2868,2874 ----
    switch (c)
      {
      case OPTION_CPU:             /* cpu brand */
!       if (TOLOWER (*arg) == 'c')
  	arg++;
        tic4x_cpu = atoi (arg);
        if (!IS_CPU_TIC3X (tic4x_cpu) && !IS_CPU_TIC4X (tic4x_cpu))
*************** tic4x_unrecognized_line (c)
*** 2959,2972 ****
    int lab;
    char *s;
  
!   if (c != '$' || !isdigit (input_line_pointer[0]))
      return 0;
  
    s = input_line_pointer;
  
    /* Let's allow multiple digit local labels.  */
    lab = 0;
!   while (isdigit (*s))
      {
        lab = lab * 10 + *s - '0';
        s++;
--- 2958,2971 ----
    int lab;
    char *s;
  
!   if (c != '$' || ! ISDIGIT (input_line_pointer[0]))
      return 0;
  
    s = input_line_pointer;
  
    /* Let's allow multiple digit local labels.  */
    lab = 0;
!   while (ISDIGIT (*s))
      {
        lab = lab * 10 + *s - '0';
        s++;
*************** md_undefined_symbol (name)
*** 2991,3003 ****
       char *name;
  {
    /* Look for local labels of the form $n.  */
!   if (name[0] == '$' && isdigit (name[1]))
      {
        symbolS *symbolP;
        char *s = name + 1;
        int lab = 0;
  
!       while (isdigit ((unsigned char) *s))
  	{
  	  lab = lab * 10 + *s - '0';
  	  s++;
--- 2990,3002 ----
       char *name;
  {
    /* Look for local labels of the form $n.  */
!   if (name[0] == '$' && ISDIGIT (name[1]))
      {
        symbolS *symbolP;
        char *s = name + 1;
        int lab = 0;
  
!       while (ISDIGIT ((unsigned char) *s))
  	{
  	  lab = lab * 10 + *s - '0';
  	  s++;
        


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]