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]

Minor bfd/binary.c fix




bfd/binary.c includes safe-ctype.h.

safe-ctype.h uses the "const" keyword.

In certain non-ANSI compilers (ie hpux10.20) that will give an error.

This is typically dealt with something like this

#define const


Which typically happens in ansidecl.h, which is included by sysdeps.h.


Moving the inclusion of safe-ctype.h down gets the right definition of 
"const"  and makes bfd/binary.c compilable with non-ANSI compilers.

	* binary.c: Include safe-ctype.h after bfd.h and sysdep.h.

Index: binary.c
===================================================================
RCS file: /cvs/cvsfiles/devo/bfd/binary.c,v
retrieving revision 1.28
diff -c -3 -p -r1.28 binary.c
*** binary.c	2001/09/27 09:50:45	1.28
--- binary.c	2001/11/10 15:51:29
*************** Foundation, Inc., 59 Temple Place - Suit
*** 32,40 ****
     the file.  objcopy cooperates by specially setting the start
     address to zero by default.  */
  
- #include "safe-ctype.h"
  #include "bfd.h"
  #include "sysdep.h"
  #include "libbfd.h"
  
  /* Any bfd we create by reading a binary file has three symbols:
--- 32,40 ----
     the file.  objcopy cooperates by specially setting the start
     address to zero by default.  */
  
  #include "bfd.h"
  #include "sysdep.h"
+ #include "safe-ctype.h"
  #include "libbfd.h"
  
  /* Any bfd we create by reading a binary file has three symbols:




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