Fix filestuff.c build error if RLIMIT_NOFILE not defined.
[deliverable/binutils-gdb.git] / opcodes / mmix-dis.c
index d723b6bab813803eda6cf424e2a743e71202bf32..d2ce581a5546338d30f2a726bdc64df8ac8ea807 100644 (file)
@@ -1,27 +1,26 @@
 /* mmix-dis.c -- Disassemble MMIX instructions.
-   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2005, 2007, 2012 Free Software Foundation, Inc.
    Written by Hans-Peter Nilsson (hp@bitrange.com)
 
-   This file is part of GDB and the GNU binutils.
+   This file is part of the GNU opcodes library.
 
-   GDB and the GNU binutils are free software; you can redistribute
-   them and/or modify them under the terms of the GNU General Public
-   License as published by the Free Software Foundation; either version 2,
-   or (at your option) any later version.
+   This library is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
 
-   GDB and the GNU binutils are distributed in the hope that they
-   will be useful, but WITHOUT ANY WARRANTY; without even the implied
-   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-   the GNU General Public License for more details.
+   It is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this file; see the file COPYING.  If not, write to the Free
    Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
    MA 02110-1301, USA.  */
 
+#include "sysdep.h"
 #include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
 #include "opcode/mmix.h"
 #include "dis-asm.h"
 #include "libiberty.h"
@@ -73,7 +72,7 @@ static bfd_boolean
 initialize_mmix_dis_info (struct disassemble_info *info)
 {
   struct mmix_dis_info *minfop = malloc (sizeof (struct mmix_dis_info));
-  int i;
+  long i;
 
   if (minfop == NULL)
     return FALSE;
@@ -98,7 +97,6 @@ initialize_mmix_dis_info (struct disassemble_info *info)
          long symsize = bfd_get_symtab_upper_bound (abfd);
          asymbol **syms = malloc (symsize);
          long nsyms;
-         long i;
 
          if (syms == NULL)
            {
@@ -125,7 +123,7 @@ initialize_mmix_dis_info (struct disassemble_info *info)
   for (i = 0; i < 256; i++)
     if (minfop->reg_name[i] == NULL)
       {
-       sprintf (minfop->basic_reg_name[i], "$%d", i);
+       sprintf (minfop->basic_reg_name[i], "$%ld", i);
        minfop->reg_name[i] = minfop->basic_reg_name[i];
       }
 
This page took 0.02492 seconds and 4 git commands to generate.