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]

PATCH Windows doesn't have ffs()


With the -Werror changes, compile breaks in bfd on Windows because
theres no declaration of ffs(), despite it being provided by libiberty.
 This patch adds a check for it, and alphabetizes.

OK?

2005-03-24  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>

	* configure.in: Check for ffs decl and alphabetize.
	* sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.171
diff -c -3 -p -r1.171 configure.in
*** configure.in	23 Mar 2005 15:35:43 -0000	1.171
--- configure.in	25 Mar 2005 00:13:46 -0000
*************** AC_CHECK_FUNCS(strtoull)
*** 164,174 ****
  
  BFD_BINARY_FOPEN
  
! BFD_NEED_DECLARATION(strstr)
! BFD_NEED_DECLARATION(malloc)
! BFD_NEED_DECLARATION(realloc)
  BFD_NEED_DECLARATION(free)
  BFD_NEED_DECLARATION(getenv)
  
  # If we are configured native, pick a core file support file.
  COREFILE=
--- 164,175 ----
  
  BFD_BINARY_FOPEN
  
! BFD_NEED_DECLARATION(ffs)
  BFD_NEED_DECLARATION(free)
  BFD_NEED_DECLARATION(getenv)
+ BFD_NEED_DECLARATION(malloc)
+ BFD_NEED_DECLARATION(realloc)
+ BFD_NEED_DECLARATION(strstr)
  
  # If we are configured native, pick a core file support file.
  COREFILE=
Index: sysdep.h
===================================================================
RCS file: /cvs/src/src/bfd/sysdep.h,v
retrieving revision 1.7
diff -c -3 -p -r1.7 sysdep.h
*** sysdep.h	4 Nov 2003 11:30:54 -0000	1.7
--- sysdep.h	25 Mar 2005 00:13:46 -0000
*************** extern char *strrchr ();
*** 105,112 ****
  
  #include "filenames.h"
  
! #ifdef NEED_DECLARATION_STRSTR
! extern char *strstr ();
  #endif
  
  #ifdef NEED_DECLARATION_MALLOC
--- 105,120 ----
  
  #include "filenames.h"
  
! #ifdef NEED_DECLARATION_FFS
! extern int ffs (int);
! #endif
! 
! #ifdef NEED_DECLARATION_FREE
! extern void free ();
! #endif
! 
! #ifdef NEED_DECLARATION_GETENV
! extern char *getenv ();
  #endif
  
  #ifdef NEED_DECLARATION_MALLOC
*************** extern PTR malloc ();
*** 117,128 ****
  extern PTR realloc ();
  #endif
  
! #ifdef NEED_DECLARATION_FREE
! extern void free ();
! #endif
! 
! #ifdef NEED_DECLARATION_GETENV
! extern char *getenv ();
  #endif
  
  /* Define offsetof for those systems which lack it */
--- 125,132 ----
  extern PTR realloc ();
  #endif
  
! #ifdef NEED_DECLARATION_STRSTR
! extern char *strstr ();
  #endif
  
  /* Define offsetof for those systems which lack it */

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