Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / coffswap.h
index 8e1911f54c1059df0966c06546a1594d1d0e6ebd..3c147f532288c38f36a01e21fde10efdaeadad4d 100644 (file)
@@ -1,7 +1,5 @@
 /* Generic COFF swapping routines, for BFD.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
-   2001, 2002, 2005, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2017 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -324,7 +322,7 @@ coff_swap_sym_in (bfd * abfd, void * ext1, void * in1)
     }
 
   in->n_value = H_GET_32 (abfd, ext->e_value);
-  in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+  in->n_scnum = (short) H_GET_16 (abfd, ext->e_scnum);
   if (sizeof (ext->e_type) == 2)
     in->n_type = H_GET_16 (abfd, ext->e_type);
   else
@@ -382,7 +380,7 @@ static void
 coff_swap_aux_in (bfd *abfd,
                  void * ext1,
                  int type,
-                 int class,
+                 int in_class,
                  int indx,
                  int numaux,
                  void * in1)
@@ -391,10 +389,10 @@ coff_swap_aux_in (bfd *abfd,
   union internal_auxent *in = (union internal_auxent *) in1;
 
 #ifdef COFF_ADJUST_AUX_IN_PRE
-  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
+  COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, in_class, indx, numaux, in1);
 #endif
 
-  switch (class)
+  switch (in_class)
     {
     case C_FILE:
       if (ext->x_file.x_fname[0] == 0)
@@ -446,7 +444,8 @@ coff_swap_aux_in (bfd *abfd,
   in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
 #endif
 
-  if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+      || ISTAG (in_class))
     {
       in->x_sym.x_fcnary.x_fcn.x_lnnoptr = GET_FCN_LNNOPTR (abfd, ext);
       in->x_sym.x_fcnary.x_fcn.x_endndx.l = GET_FCN_ENDNDX (abfd, ext);
@@ -477,7 +476,7 @@ coff_swap_aux_in (bfd *abfd,
  end: ;
 
 #ifdef COFF_ADJUST_AUX_IN_POST
-  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
+  COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, in_class, indx, numaux, in1);
 #endif
 }
 
@@ -485,7 +484,7 @@ static unsigned int
 coff_swap_aux_out (bfd * abfd,
                   void * inp,
                   int type,
-                  int class,
+                  int in_class,
                   int indx ATTRIBUTE_UNUSED,
                   int numaux ATTRIBUTE_UNUSED,
                   void * extp)
@@ -494,12 +493,12 @@ coff_swap_aux_out (bfd * abfd,
   AUXENT *ext = (AUXENT *) extp;
 
 #ifdef COFF_ADJUST_AUX_OUT_PRE
-  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
+  COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, in_class, indx, numaux, extp);
 #endif
 
   memset (ext, 0, AUXESZ);
 
-  switch (class)
+  switch (in_class)
     {
     case C_FILE:
       if (in->x_file.x_fname[0] == 0)
@@ -537,7 +536,8 @@ coff_swap_aux_out (bfd * abfd,
   H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
 #endif
 
-  if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
+  if (in_class == C_BLOCK || in_class == C_FCN || ISFCN (type)
+      || ISTAG (in_class))
     {
       PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
       PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
@@ -567,7 +567,7 @@ coff_swap_aux_out (bfd * abfd,
 
  end:
 #ifdef COFF_ADJUST_AUX_OUT_POST
-  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
+  COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, in_class, indx, numaux, extp);
 #endif
   return AUXESZ;
 }
@@ -806,10 +806,10 @@ coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
 
       memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
       buf[sizeof (scnhdr_int->s_name)] = '\0';
-      (*_bfd_error_handler)
-       (_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
-        bfd_get_filename (abfd),
-        buf, scnhdr_int->s_nlnno);
+      _bfd_error_handler
+       /* xgettext:c-format */
+       (_("%B: warning: %s: line number overflow: 0x%lx > 0xffff"),
+        abfd, buf, scnhdr_int->s_nlnno);
       PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
     }
 
@@ -821,9 +821,9 @@ coff_swap_scnhdr_out (bfd * abfd, void * in, void * out)
 
       memcpy (buf, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
       buf[sizeof (scnhdr_int->s_name)] = '\0';
-      (*_bfd_error_handler) (_("%s: %s: reloc overflow: 0x%lx > 0xffff"),
-                            bfd_get_filename (abfd),
-                            buf, scnhdr_int->s_nreloc);
+      /* xgettext:c-format */
+      _bfd_error_handler (_("%B: %s: reloc overflow: 0x%lx > 0xffff"),
+                         abfd, buf, scnhdr_int->s_nreloc);
       bfd_set_error (bfd_error_file_truncated);
       PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
       ret = 0;
This page took 0.026953 seconds and 4 git commands to generate.