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 Another Windows ffs() fix in gas


This fixes another -Werror problem due to the missing prototype of
ffs(), in gas.  This patch adds a check for it, and alphabetizes.

OK?

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

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

Index: as.h
===================================================================
RCS file: /cvs/src/src/gas/as.h,v
retrieving revision 1.44
diff -c -3 -p -r1.44 as.h
*** as.h	1 Mar 2005 02:00:14 -0000	1.44
--- as.h	26 Mar 2005 07:24:00 -0000
*************** extern void *alloca ();
*** 127,147 ****
  #endif /* !__MWERKS__ */
  
  /* Other stuff from config.h.  */
! #ifdef NEED_DECLARATION_STRSTR
! extern char *strstr ();
  #endif
! #ifdef NEED_DECLARATION_MALLOC
! extern PTR malloc ();
! extern PTR realloc ();
  #endif
  #ifdef NEED_DECLARATION_FREE
  extern void free ();
  #endif
! #ifdef NEED_DECLARATION_ERRNO
! extern int errno;
  #endif
! #ifdef NEED_DECLARATION_ENVIRON
! extern char **environ;
  #endif
  
  /* This is needed for VMS.  */
--- 127,150 ----
  #endif /* !__MWERKS__ */
  
  /* Other stuff from config.h.  */
! #ifdef NEED_DECLARATION_ENVIRON
! extern char **environ;
  #endif
! #ifdef NEED_DECLARATION_ERRNO
! extern int errno;
! #endif
! #ifdef NEED_DECLARATION_FFS
! extern int ffs (int);
  #endif
  #ifdef NEED_DECLARATION_FREE
  extern void free ();
  #endif
! #ifdef NEED_DECLARATION_MALLOC
! extern PTR malloc ();
! extern PTR realloc ();
  #endif
! #ifdef NEED_DECLARATION_STRSTR
! extern char *strstr ();
  #endif
  
  /* This is needed for VMS.  */
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.173
diff -c -3 -p -r1.173 configure.in
*** configure.in	23 Mar 2005 15:35:46 -0000	1.173
--- configure.in	26 Mar 2005 07:24:01 -0000
*************** gas_test_headers="
*** 707,717 ****
  #include <unistd.h>
  #endif
  "
- GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
- GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
- GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
- GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
- GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
  
  # Does errno.h declare errno, or do we have to add a separate declaration
  # for it?
--- 707,712 ----
*************** GAS_CHECK_DECL_NEEDED(errno, f, int f, [
*** 721,726 ****
--- 716,728 ----
  #endif
  ])
  
+ GAS_CHECK_DECL_NEEDED(environ, f, char **f, $gas_test_headers)
+ GAS_CHECK_DECL_NEEDED(ffs, f, int (*f)(int), $gas_test_headers)
+ GAS_CHECK_DECL_NEEDED(free, f, void (*f)(), $gas_test_headers)
+ GAS_CHECK_DECL_NEEDED(malloc, f, char *(*f)(), $gas_test_headers)
+ GAS_CHECK_DECL_NEEDED(sbrk, f, char *(*f)(), $gas_test_headers)
+ GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
+ 
  dnl This must come last.
  
  dnl We used to make symlinks to files in the source directory, but now

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