Ping on HP-UX patch for a clean build

Steve Ellcey sje@cup.hp.com
Fri Jun 3 16:11:00 GMT 2005


> On Thu, 2005-06-02 at 15:35, Steve Ellcey wrote:
> > Yes, this was updated after my patch, so AC_CHECK_DECLS should work now.
> > Would you like me to update my patch and resubmit it or do you just 
> > want to tweak it?
> 
> I don't have any HPUX machine to test on, so it is easier for me if you
> do this.
> -- 
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

Here is a new patch done with AC_CHECK_DECLS and using the latest sources.
I tested on IA64 HP-UX and IA64 Linux and had no unexpected failures on
either platform.  I also verified that IA64 Linux continued to use the
getc_unlocked function.

Steve Ellcey
sje@cup.hp.com


binutils/ChangeLog:

2005-06-03  Steve Ellcey  <sje@cup.hp.com>

	configure.in: Check for getc_unlocked prototype.
	configure: Regenerate
	config.in: Regenerate
	strings.c: Only call getc_unlocked if we have seen a prototype.


*** src.orig/binutils/configure.in	Fri Jun  3 09:02:25 2005
--- src/binutils/configure.in	Fri Jun  3 09:02:00 2005
*************** BFD_NEED_DECLARATION(strstr)
*** 217,222 ****
--- 217,223 ----
  BFD_NEED_DECLARATION(sbrk)
  BFD_NEED_DECLARATION(getenv)
  BFD_NEED_DECLARATION(environ)
+ AC_CHECK_DECLS(getc_unlocked)
  
  BFD_BINARY_FOPEN
  
*** src.orig/binutils/strings.c	Fri Jun  3 09:02:17 2005
--- src/binutils/strings.c	Fri Jun  3 09:06:14 2005
*************** get_char (FILE *stream, file_off *addres
*** 447,453 ****
  	{
  	  if (stream == NULL)
  	    return EOF;
! #ifdef HAVE_GETC_UNLOCKED
  	  c = getc_unlocked (stream);
  #else
  	  c = getc (stream);
--- 447,458 ----
  	{
  	  if (stream == NULL)
  	    return EOF;
! 
! 	  /* Only use getc_unlocked if we found a declaration for it.
! 	     Otherwise, libc is not thread safe by default, and we
! 	     should not use it.  */
! 
! #if defined(HAVE_GETC_UNLOCKED) && HAVE_DECL_GETC_UNLOCKED
  	  c = getc_unlocked (stream);
  #else
  	  c = getc (stream);



More information about the Binutils mailing list