This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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] PowerPC64 port part 4 of 7


PowerPC64 part 4 of 7 follows:

2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
	Peter Bergner <bergner@us.ibm.com>  Alan Modra <amodra@bigpond.net.au>
	* elf/elf.h: Add powerpc64 specific symbols for elf.
	* inet/in6_addr.c: Special handling of libc_hidden_def macro for PowerPC64.
	* stdlib/longlong.h: Add powerpc64 specific asm macros for multiple 
	percision integer math.
	* include/libc-symbols.h: Update macro to support dot names as required.
	by powerpc64.
	* sysdeps/powerpc/bits/setjmp.h: Add 64-bit support for jmpbuf when
	__powerpc64__ defined.
	* sysdeps/powerpc/bits/wordsize.h: Define WORDSIZE for 32-/64-bit.
	* sysdeps/powerpc/elf/libc-start.c: Correct alignment of *auxvec.
	* sysdeps/powerpc/fpu_control.h: Make union volitile to convince
	gcc to load int value for storage.
	* sysdeps/powerpc/gmp-mparam.h: New file.  Copied from 
	sysdeps/sparc.  Set the WORDSIZE for the GNU multiple precision 
	library (gmp) code.
	* sysdeps/powerpc/sysdep.h: Add powerpc64 specific macros and functions.
	* sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Add __powerpc64__ specific
	fields and adjust size/alignment for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Add __powerpc64__ specific
	fields and adjust size/alignment for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/bits/types.h:Add __powerpc64__ specific
	fields and adjust size/alignment for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/bits/socket.h: New file that adds 
	__powerpc64__ specific fields and adjust size/alignment for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/lchown.S: Work arround problem
	with symbol_version macro.
	* sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed: Handle loaders
	/lib/ld.so and /lib64/ld64.so.

2002-07-09  Steven Munroe  <sjmunroe@us.ibm.com>
	* sysdeps/powerpc/elf/libc-start.c : Scan Aux Vector for 
	AT_DCACHEBSIZE and copy value to __cache_line_size.
	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c : Scan Aux Vector for 
	AT_DCACHEBSIZE and copy value to __cache_line_size.
	* sysdeps/powerpc/ppc32/memset.S : Define __cache_line_size and use 
	its value to select the correct stride for dcbz.
	* sysdeps/powerpc/ppc64/memset.S : Define __cache_line_size and use 
	its value to select the correct stride for dcbz.

2002-06-04  Steven Munroe  <sjmunroe@us.ibm.com>
	* elf/dl-load.c (open_verify): When ELF_MULT_MACHINES_SUPPORTED
	elf header class missmatch call elf_host_tolerates_class (ehdr) 
	and elf_host_tolerates_machine (ehdr). If tolerated return -2.
	* elf/dl-load.c (open_path): When ELF_MULT_MACHINES_SUPPORTED
	and open_verify returns -2 then skip this library and continue 
	search.
	* elf/dl-load.c (_dl_map_object): When ELF_MULT_MACHINES_SUPPORTED
	and and absolute library path case and open_verify returns -2 then
	skip _dl_map_object_from_fd and return NULL.
	* elf/rtld.c (dl_main): When ELF_MULT_MACHINES_SUPPORTED and 
	processing LD_PRELOAD or processing "/etc/ld.so.preload". If 
	_dl_map_object returns NULL then skip this library and continue 
	processing LD_PRELOAD.
	* sysdeps/powerpc/ppc32/dl-machine.h: Define 
	ELF_MULT_MACHINES_SUPPORTED and implement elf_host_tolerates_class
	and elf_host_tolerates_machine.
	* sysdeps/powerpc/ppc64/dl-machine.h: Define 
	ELF_MULT_MACHINES_SUPPORTED and implement elf_host_tolerates_class
	and elf_host_tolerates_machine.
	This allows LD_PRELOAD (and "/etc/ld.so.preload") to contain a
	mix of 32- and 64-bit libraries and tolerate (skip) libraries 
	of this architecture but a different wordsize.

2002-06-04  Steven Munroe  <sjmunroe@us.ibm.com>

	* elf/cache.c: Add case for FLAG_POWERPC_LIB64.
	* sysdeps/generic/ldconfig.h: Add define for FLAG_POWERPC_LIB64.
	* sysdeps/unix/sysv/linux/powerpc/ldconfig.h: New file.
	* sysdeps/unix/sysv/linux/powerpc/readelflib.c: New file.
	* sysdeps/unix/sysv/linux/powerpc/ppc64/dl-cache.h: New file.
	Add support to ldconfig to recognise 32-bit and 64-bit libraries.
	Used s390 as a template.

2002-02-20  Steven Munroe  <sjmunroe@us.ibm.com>

	* login/programs/utmpdump.c(print_entry): Copy up->ut_tv.tv_sec and 
	up->ut_tv.tv_usec before printing to be 32-/64-bit agnostic.
	* sysdeps/unix/sysv/linux/powerpc/bits/time.h: Define struct timeval32
	for use in 64-bit apps (using utmp.h/utmpx.h) to read/write files 
	shared with 32-bit apps.
	* sysdeps/unix/sysv/linux/powerpc/bits/utmp.h: Use timeval32 instead
	of timeval for 64-bit.
	* sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h Use timeval32 instead
	of timeval for 64-bit.
	Ensure that the structs utmp and utmpx are the same size in 
	32-/64-bit. Allow both 32- and 64-bit apps to read/write /var/run/utmp.	

>>>>>>>> ppc64-shareppc-20020815.patch
diff -rc2PN -x *.orig libc23-cvstip-20020815/csu/gmon-start.c libc23/csu/gmon-start.c
*** libc23-cvstip-20020815/csu/gmon-start.c	Wed Feb 13 03:16:58 2002
--- libc23/csu/gmon-start.c	Thu Aug 15 16:54:50 2002
***************
*** 36,39 ****
--- 36,47 ----
  extern void etext;
  
+ #ifndef TEXT_START
+ #ifdef ENTRY_POINT_DECL
+ #define TEXT_START ENTRY_POINT
+ #else
+ #define TEXT_START &ENTRY_POINT
+ #endif
+ #endif
+ 
  #ifndef HAVE_INITFINI
  /* This function gets called at startup by the normal constructor
***************
*** 67,71 ****
    __monstartup ((u_long) ENTRY_POINT, (u_long) &etext);
  #else
!   __monstartup ((u_long) &ENTRY_POINT, (u_long) &etext);
  #endif
  
--- 75,79 ----
    __monstartup ((u_long) ENTRY_POINT, (u_long) &etext);
  #else
!   __monstartup ((u_long) TEXT_START, (u_long) &etext);
  #endif
  
diff -rc2PN -x *.orig libc23-cvstip-20020815/elf/cache.c libc23/elf/cache.c
*** libc23-cvstip-20020815/elf/cache.c	Mon Apr  8 10:20:59 2002
--- libc23/elf/cache.c	Thu Aug 15 16:54:50 2002
***************
*** 90,93 ****
--- 90,97 ----
        fputs(",64bit", stdout);
  #endif
+ #if defined __powerpc64__
+     case FLAG_POWERPC_LIB64:
+       fputs(",64bit", stdout);
+ #endif
      case 0:
        break;
diff -rc2PN -x *.orig libc23-cvstip-20020815/elf/dl-load.c libc23/elf/dl-load.c
*** libc23-cvstip-20020815/elf/dl-load.c	Thu Aug 15 03:43:20 2002
--- libc23/elf/dl-load.c	Thu Aug 15 16:54:50 2002
***************
*** 1370,1374 ****
  	       32-bit and 64-bit binaries can be run this might
  	       happen.  */
! 	    goto close_and_out;
  	  else if (ehdr->e_ident[EI_DATA] != byteorder)
  	    {
--- 1370,1395 ----
  	       32-bit and 64-bit binaries can be run this might
  	       happen.  */
! #ifdef ELF_MULT_MACHINES_SUPPORTED
! 	    {
! 	    	if (__builtin_expect (elf_host_tolerates_class (ehdr), 1)
! 		    &&  __builtin_expect (elf_host_tolerates_machine (ehdr), 1))
! 	        {
! 		    errstring = N_("ELF header for other machine mode");
! 		    __close (fd);
! 		    __set_errno (ENOENT);
! 		    fd = -2; /* return "tolerate" value */
! 
! 		    /* Print that this file is tolerated but ignored, if this is wanted. */
! 		    if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0))
! 			_dl_debug_printf ("  file=%s is incompatible with this loader but "
! 								"is tolerated\n", name);
! 		    return fd;
! 		}
! 	        else
! 		   goto close_and_out; 
! 	    }
! #else	       
! 	    goto close_and_out;   
! #endif
  	  else if (ehdr->e_ident[EI_DATA] != byteorder)
  	    {
***************
*** 1524,1529 ****
--- 1545,1564 ----
  	  if (this_dir->status[cnt] == unknown)
  	    {
+ #ifdef ELF_MULT_MACHINES_SUPPORTED
+       /* If open_verify returned -2 then this library is for another
+ 	     supported machine mode but is not supported by the current loader.
+ 	     For example a PowerPC64 loader may encounter a PowerPC32 ".so".  
+ 	     In this case we need to silently ignore the 32-bit ".so" but keep 
+ 	     the directory in the path. */
  	      if (fd != -1)
+ 	      {
  		this_dir->status[cnt] = existing;
+ 	      	if (fd == -2)
+ 		  fd = -1;		
+ 	      }
+ #else	    
+ 	      if (fd != -1)
+ 		this_dir->status[cnt] = existing;
+ #endif		
  	      else
  		{
***************
*** 1831,1838 ****
  	}
      }
! 
    if (__builtin_expect (fd, 0) == -1)
      {
        if (trace_mode
  	  && __builtin_expect (GL(dl_debug_mask) & DL_DEBUG_PRELINK, 0) == 0)
  	{
--- 1866,1878 ----
  	}
      }
! #ifdef ELF_MULT_MACHINES_SUPPORTED
!   if (__builtin_expect (fd, 0) < 0)
!     {
!       if (trace_mode && (fd == -1)
! #else  
    if (__builtin_expect (fd, 0) == -1)
      {
        if (trace_mode
+ #endif
  	  && __builtin_expect (GL(dl_debug_mask) & DL_DEBUG_PRELINK, 0) == 0)
  	{
***************
*** 1860,1863 ****
--- 1900,1914 ----
  	}
        else
+ #ifdef ELF_MULT_MACHINES_SUPPORTED
+       /* If open_verify returned -2 then this library is for another
+ 	     supported machine mode but not supported by the current loader.
+ 	     For example a PowerPC64 loader may encounter a PowerPC32 ".so" 
+ 	     in LD_PRELOAD.  In this case we need to silently ignore the 
+ 	     32-bit ".so" by skipping the call to _dl_map_object_from_fd and
+ 	     returning NULL.  */
+         if (fd == -2)
+ 			return NULL;
+ 		else
+ #endif      
  	INTUSE(_dl_signal_error) (errno, name, NULL,
  				  N_("cannot open shared object file"));
diff -rc2PN -x *.orig libc23-cvstip-20020815/elf/elf.h libc23/elf/elf.h
*** libc23-cvstip-20020815/elf/elf.h	Thu May 30 18:15:26 2002
--- libc23/elf/elf.h	Thu Aug 15 16:54:50 2002
***************
*** 1872,1875 ****
--- 1872,1947 ----
  #define R_PPC_NUM		37
  
+ /* PowerPC64 relocations defined by the ABIs */
+ #define R_PPC64_NONE		R_PPC_NONE
+ #define R_PPC64_ADDR32		R_PPC_ADDR32	/* 32bit absolute address */
+ #define R_PPC64_ADDR24		R_PPC_ADDR24	/* 26bit address, 2 bits ignored.  */
+ #define R_PPC64_ADDR16		R_PPC_ADDR16	/* 16bit absolute address */
+ #define R_PPC64_ADDR16_LO	R_PPC_ADDR16_LO	/* lower 16bit of absolute address */
+ #define R_PPC64_ADDR16_HI	R_PPC_ADDR16_HI	/* high 16bit of absolute address */
+ #define R_PPC64_ADDR16_HA	R_PPC_ADDR16_HA	/* adjusted high 16bit */
+ #define R_PPC64_ADDR14		R_PPC_ADDR14	/* 16bit address, 2 bits ignored */
+ #define R_PPC64_ADDR14_BRTAKEN	R_PPC_ADDR14_BRTAKEN
+ #define R_PPC64_ADDR14_BRNTAKEN	R_PPC_ADDR14_BRNTAKEN
+ #define R_PPC64_REL24		R_PPC_REL24	/* PC relative 26 bit */
+ #define R_PPC64_REL14		R_PPC_REL14	/* PC relative 16 bit */
+ #define R_PPC64_REL14_BRTAKEN	R_PPC_REL14_BRTAKEN
+ #define R_PPC64_REL14_BRNTAKEN	R_PPC_REL14_BRNTAKEN
+ #define R_PPC64_GOT16		R_PPC_GOT16
+ #define R_PPC64_GOT16_LO	R_PPC_GOT16_LO
+ #define R_PPC64_GOT16_HI	R_PPC_GOT16_HI
+ #define R_PPC64_GOT16_HA	R_PPC_GOT16_HA
+ 
+ #define R_PPC64_COPY		R_PPC_COPY
+ #define R_PPC64_GLOB_DAT	R_PPC_GLOB_DAT
+ #define R_PPC64_JMP_SLOT	R_PPC_JMP_SLOT
+ #define R_PPC64_RELATIVE	R_PPC_RELATIVE
+ 
+ #define R_PPC64_UADDR32		R_PPC_UADDR32
+ #define R_PPC64_UADDR16		R_PPC_UADDR16
+ #define R_PPC64_REL32		R_PPC_REL32
+ #define R_PPC64_PLT32		R_PPC_PLT32
+ #define R_PPC64_PLTREL32	R_PPC_PLTREL32
+ #define R_PPC64_PLT16_LO	R_PPC_PLT16_LO
+ #define R_PPC64_PLT16_HI	R_PPC_PLT16_HI
+ #define R_PPC64_PLT16_HA	R_PPC_PLT16_HA
+ 
+ #define R_PPC64_SECTOFF		R_PPC_SECTOFF
+ #define R_PPC64_SECTOFF_LO	R_PPC_SECTOFF_LO
+ #define R_PPC64_SECTOFF_HI	R_PPC_SECTOFF_HI
+ #define R_PPC64_SECTOFF_HA	R_PPC_SECTOFF_HA
+ #define R_PPC64_ADDR30      37  /* word30 (S + A - P) >> 2 */
+ #define R_PPC64_ADDR64      38  /* doubleword64 S + A */
+ #define R_PPC64_ADDR16_HIGHER   39  /* half16 #higher(S + A) */
+ #define R_PPC64_ADDR16_HIGHERA  40  /* half16 #highera(S + A) */
+ #define R_PPC64_ADDR16_HIGHEST  41  /* half16 #highest(S + A) */
+ #define R_PPC64_ADDR16_HIGHESTA 42  /* half16 #highesta(S + A) */
+ #define R_PPC64_UADDR64     43  /* doubleword64 S + A */
+ #define R_PPC64_REL64       44  /* doubleword64 S + A - P */
+ #define R_PPC64_PLT64       45  /* doubleword64 L + A */
+ #define R_PPC64_PLTREL64    46  /* doubleword64 L + A - P */
+ #define R_PPC64_TOC16       47  /* half16* S + A - .TOC. */
+ #define R_PPC64_TOC16_LO    48  /* half16 #lo(S + A - .TOC.) */
+ #define R_PPC64_TOC16_HI    49  /* half16 #hi(S + A - .TOC.) */
+ #define R_PPC64_TOC16_HA    50  /* half16 #ha(S + A - .TOC.) */
+ #define R_PPC64_TOC         51  /* doubleword .TOC. */
+ #define R_PPC64_PLTGOT16    52  /* half16* M + A */
+ #define R_PPC64_PLTGOT16_LO 53  /* half16 #lo(M + A) */
+ #define R_PPC64_PLTGOT16_HI 54  /* half16 #hi(M + A) */
+ #define R_PPC64_PLTGOT16_HA 55  /* half16 #ha(M + A) */
+ 
+ #define R_PPC64_ADDR16_DS			56 		/* half16ds*	(S + A) >> 2 */
+ #define R_PPC64_ADDR16_LO_DS	57		/* half16ds        #lo(S + A) >> 2 */
+ #define R_PPC64_GOT16_DS			58		/* half16ds*       (G + A) >> 2 */
+ #define R_PPC64_GOT16_LO_DS		59		/* half16ds        #lo(G + A) >> 2 */
+ #define R_PPC64_PLT16_LO_DS		60		/* half16ds        #lo(L + A) >> 2 */
+ #define R_PPC64_SECTOFF_DS		61		/* half16ds*       (R + A) >> 2 */
+ #define R_PPC64_SECTOFF_LO_DS 62	/* half16ds        #lo(R + A) >> 2 */
+ #define R_PPC64_TOC16_DS			63		/* half16ds*       (S + A - .TOC.) >> 2 */
+ #define R_PPC64_TOC16_LO_DS		64		/* half16ds        #lo(S + A - .TOC.) >> 2 */
+ #define R_PPC64_PLTGOT16_DS		65		/* half16ds*       (M + A) >> 2 */
+ #define R_PPC64_PLTGOT16_LO_DS 66	/* half16ds        #lo(M + A) >> 2 */
+ /* Keep this the last entry.  */
+ #define R_PPC64_NUM		67
+ 
  /* The remaining relocs are from the Embedded ELF ABI, and are not
     in the SVR4 ELF ABI.  */
***************
*** 1903,1906 ****
--- 1975,1981 ----
  #define R_PPC_TOC16		255
  
+ /* Processor specific values for the Dyn d_tag field.  */
+ #define DT_PPC64_GLINK	(DT_LOPROC + 0)
+ #define DT_PPC64_NUM		1
  
  /* ARM specific declarations */
diff -rc2PN -x *.orig libc23-cvstip-20020815/elf/rtld.c libc23/elf/rtld.c
*** libc23-cvstip-20020815/elf/rtld.c	Thu Aug 15 07:51:32 2002
--- libc23/elf/rtld.c	Thu Aug 15 16:54:50 2002
***************
*** 136,140 ****
  {
    struct link_map bootstrap_map;
!   hp_timing_t start_time;
  #if !defined HAVE_BUILTIN_MEMSET || defined USE_TLS
    size_t cnt;
--- 136,140 ----
  {
    struct link_map bootstrap_map;
!   hp_timing_t start_time = 0;
  #if !defined HAVE_BUILTIN_MEMSET || defined USE_TLS
    size_t cnt;
***************
*** 866,872 ****
--- 866,886 ----
  							       lt_library,
  							       0, 0);
+ #ifdef ELF_MULT_MACHINES_SUPPORTED
+ 		/* if _dl_map_object returned NULL then this library is for
+ 		   another supported machine mode but is not supported by the current
+ 		   loader.  For example a PowerPC64 loader may encounter a PowerPC32 
+ 		   ".so" in LD_Preload.  In this case we need to silently ignore the 
+ 		   32-bit ".so"! */
+ 	    if (new_map != NULL)
+ 	    {  						       
+ 			if (++new_map->l_opencount == 1)
+ 			/* It is no duplicate.  */
+ 			  ++npreloads;
+ 	    }
+ #else						       
  	    if (++new_map->l_opencount == 1)
  	      /* It is no duplicate.  */
  	      ++npreloads;
+ #endif
  	  }
  
***************
*** 936,942 ****
  								   lt_library,
  								   0, 0);
! 		if (++new_map->l_opencount == 1)
! 		  /* It is no duplicate.  */
! 		  ++npreloads;
  	      }
  	}
--- 950,970 ----
  								   lt_library,
  								   0, 0);
! #ifdef ELF_MULT_MACHINES_SUPPORTED
! 			/* if _dl_map_object returned NULL then this library is for
! 		       another supported machine mode but is not supported by the 
! 		       current loader.  For example a PowerPC64 loader may encounter
! 		       a PowerPC32 ".so" in "/etc/ld.so.preload".  In this case we 
! 		       need to silently ignore the 32-bit ".so"! */
! 			if (new_map != NULL)
! 			{  						       
! 				if (++new_map->l_opencount == 1)
! 				/* It is no duplicate.  */
! 				++npreloads;
! 			}
! #else						       
! 			if (++new_map->l_opencount == 1)
! 			/* It is no duplicate.  */
! 				++npreloads;
! #endif
  	      }
  	}
***************
*** 948,954 ****
  							     1, lt_library,
  							     0, 0);
! 	  if (++new_map->l_opencount == 1)
! 	    /* It is no duplicate.  */
! 	    ++npreloads;
  	}
  
--- 976,996 ----
  							     1, lt_library,
  							     0, 0);
! #ifdef ELF_MULT_MACHINES_SUPPORTED
! 		/* if _dl_map_object returned NULL then this library is for
! 		   another supported machine mode but does not work with this
! 		   loader and the machine mode it runs in. For example a
! 		   PowerPC64 loader may encounter a PowerPC32 ".so" in LD_PRELOAD. 
! 		   In this case we need to silently ignore the 32-bit ".so"! */
! 	    if (new_map != NULL)
! 	    {  						       
! 			if (++new_map->l_opencount == 1)
! 			/* It is no duplicate.  */
! 			  ++npreloads;
! 	    }
! #else						       
! 	    if (++new_map->l_opencount == 1)
! 	      /* It is no duplicate.  */
! 	      ++npreloads;
! #endif
  	}
  
***************
*** 1916,1917 ****
--- 1958,1975 ----
  #endif
  }
+ 
+ #ifdef __powerpc64__
+ /*	This dummy convinces gcc to not complain about _dl_start, i.e.:
+     "warning: `_dl_start' defined but not used".
+ 	_dl_start is called from _start (asm code) that is included 
+ 	as a macro (RTLD_START) from dl-machine.h.  */	
+ void
+ rtdl_dummy (void)
+ {
+ 	int dummy_void = 0;
+ 	
+ 	_dl_start(&dummy_void);
+ 	
+ 	return;
+ }
+ #endif
diff -rc2PN -x *.orig libc23-cvstip-20020815/include/libc-symbols.h libc23/include/libc-symbols.h
*** libc23-cvstip-20020815/include/libc-symbols.h	Mon Aug  5 23:29:40 2002
--- libc23/include/libc-symbols.h	Fri Aug 16 13:28:02 2002
***************
*** 81,86 ****
  #endif
  
! #ifndef C_SYMBOL_DOT_NAME
! # define C_SYMBOL_DOT_NAME(name) .##name
  #endif
  
--- 81,93 ----
  #endif
  
! #ifdef HAVE_ASM_GLOBAL_DOT_NAME
! # ifndef C_SYMBOL_DOT_NAME
! #  if defined __GNUC__ && defined __GNUC_MINOR__ \
!       && (__GNUC__ << 16) + __GNUC_MINOR__ >= (3 << 16) + 1
! #   define C_SYMBOL_DOT_NAME(name) .name
! #  else
! #   define C_SYMBOL_DOT_NAME(name) .##name
! #  endif
! # endif
  #endif
  
***************
*** 110,116 ****
  #  define weak_extern(symbol) _weak_extern (symbol)
  #  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
! #   define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
  #  else
! #   define _weak_extern(symbol)    asm (".weak " __SYMBOL_PREFIX #symbol);
  #  endif
  
--- 117,135 ----
  #  define weak_extern(symbol) _weak_extern (symbol)
  #  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
! #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define _weak_extern(symbol) \
!         asm (".weakext " __SYMBOL_PREFIX #symbol "\n\t"	\
! 	     ".weakext ." __SYMBOL_PREFIX #symbol);
! #   else
! #    define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
! #   endif
  #  else
! #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define _weak_extern(symbol) \
!         asm (".weak " __SYMBOL_PREFIX #symbol "\n\t"	\
! 	     ".weak ." __SYMBOL_PREFIX #symbol); 
! #   else
! #    define _weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
! #   endif
  #  endif
  
***************
*** 125,142 ****
  
  # ifdef HAVE_ASM_SET_DIRECTIVE
! #  define strong_alias(original, alias)		\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
  # else
  #  ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #   define strong_alias(original, alias)	\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #  else
! #   define strong_alias(original, alias)	\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #  endif
  # endif
--- 144,177 ----
  
  # ifdef HAVE_ASM_SET_DIRECTIVE
! #  ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #   define strong_alias(original, alias)				\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
!   .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP	\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP		\
!   .set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original)
! #   define strong_data_alias(original, alias)				\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
    .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
+ #  else
+ #   define strong_alias(original, alias)				\
+   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
+   .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
+ #   define strong_data_alias(original, alias) strong_alias(original, alias)
+ #  endif
  # else
  #  ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #   define strong_alias(original, alias)				\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP		\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP		\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+ #   define strong_data_alias(original, alias)				\
+   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
+   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #  else
! #   define strong_alias(original, alias)				\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP		\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+ #   define strong_data_alias(original, alias) strong_alias(original, alias)
  #  endif
  # endif
***************
*** 144,150 ****
  # ifdef HAVE_WEAK_SYMBOLS
  #  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
! #   define weak_alias(original, alias)	\
    .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
! #   define weak_extern(symbol)	\
    .weakext C_SYMBOL_NAME (symbol)
  
--- 179,191 ----
  # ifdef HAVE_WEAK_SYMBOLS
  #  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
! #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define weak_alias(original, alias)					\
!   .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
!   .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
! #   else
! #    define weak_alias(original, alias)					\
    .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
! #   endif
! #   define weak_extern(symbol)						\
    .weakext C_SYMBOL_NAME (symbol)
  
***************
*** 152,167 ****
  
  #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define weak_alias(original, alias)	\
!   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #   else
! #    define weak_alias(original, alias)	\
!   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #   endif
  
! #   define weak_extern(symbol)	\
    .weak C_SYMBOL_NAME (symbol)
  
--- 193,208 ----
  
  #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define weak_alias(original, alias)					\
!   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP				\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP		\
!   .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP				\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #   else
! #    define weak_alias(original, alias)					\
!   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP				\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #   endif
  
! #   define weak_extern(symbol)						\
    .weak C_SYMBOL_NAME (symbol)
  
***************
*** 335,347 ****
       _default_symbol_version(real, name, version)
  # ifdef __ASSEMBLER__
! #  define _symbol_version(real, name, version) \
       .symver real, name##@##version
! #  define _default_symbol_version(real, name, version) \
       .symver real, name##@##@##version
  # else
! #  define _symbol_version(real, name, version) \
       __asm__ (".symver " #real "," #name "@" #version)
! #  define _default_symbol_version(real, name, version) \
       __asm__ (".symver " #real "," #name "@@" #version)
  # endif
  #else
--- 376,406 ----
       _default_symbol_version(real, name, version)
  # ifdef __ASSEMBLER__
! #  ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #   define _symbol_version(real, name, version) \
!      .symver real, name##@##version ASM_LINE_SEP			\
!      .symver .##real, .##name##@##version
! #   define _default_symbol_version(real, name, version) \
!      .symver real, name##@##@##version ASM_LINE_SEP			\
!      .symver .##real, .##name##@##@##version
! #  else
! #   define _symbol_version(real, name, version) \
       .symver real, name##@##version
! #   define _default_symbol_version(real, name, version) \
       .symver real, name##@##@##version
+ #  endif
  # else
! #  ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #   define _symbol_version(real, name, version) \
!      __asm__ (".symver " #real "," #name "@" #version "\n\t"	\
! 	      ".symver ." #real ",." #name "@" #version)
! #   define _default_symbol_version(real, name, version) \
!      __asm__ (".symver " #real "," #name "@@" #version "\n\t"	\
! 	      ".symver ." #real ",." #name "@@" #version)
! #  else
! #   define _symbol_version(real, name, version) \
       __asm__ (".symver " #real "," #name "@" #version)
! #   define _default_symbol_version(real, name, version) \
       __asm__ (".symver " #real "," #name "@@" #version)
+ #  endif
  # endif
  #else
***************
*** 410,413 ****
--- 469,487 ----
     libc_hidden_weak (foo)
  
+    Simularly for global data. If references to foo within libc.so should 
+    always go to foo defined in libc.so, then in include/foo.h you add:
+ 
+    libc_hidden_proto (foo)
+ 
+    line and after foo's definition:
+ 
+    int foo = INITIAL_FOO_VALUE;
+    libc_hidden_data_def (foo)
+ 
+    or
+ 
+    int foo = INITIAL_FOO_VALUE;
+    libc_hidden_data_weak (foo)
+ 
     If foo is normally just an alias (strong or weak) of some other function,
     you should use the normal strong_alias first, then add libc_hidden_def
***************
*** 462,476 ****
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
- #  else
  #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #    define __hidden_def1(original, alias)			\
!   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
!   C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #   else
! #    define __hidden_def1(original, alias)			\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #   endif
  #  endif
--- 536,556 ----
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #     define __hidden_dot_def1(original, alias)	 ASM_LINE_SEP	\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
!   .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
  #   else
! #     define __hidden_dot_def1(original, alias)
! #   endif
! #  else
! #   define __hidden_def1(original, alias)			\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
+ #   ifdef HAVE_ASM_GLOBAL_DOT_NAME
+ #    define __hidden_dot_def1(original, alias)	ASM_LINE_SEP	\
+   ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
+   C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
+ #   else
+ #    define __hidden_def1(original, alias)
  #   endif
  #  endif
***************
*** 478,483 ****
--- 558,569 ----
  #  define __hidden_def3(...) __hidden_def2 (__VA_ARGS__)
  #  define hidden_def(name)					\
+   __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name) \
+   __hidden_dot_def1 (__GI_##name, name)));
+ #  define hidden_data_def(name)					\
    __asm__ (__hidden_def3 (__hidden_def1 (__GI_##name, name)));
  #  define hidden_ver(local, name)				\
+   __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name) \
+   __hidden_dot_def1 (local, __GI_##name)));
+ #  define hidden_data_ver(local, name)				\
    __asm__ (__hidden_def3 (__hidden_def1 (local, __GI_##name)));
  #  ifdef HAVE_WEAK_SYMBOLS
***************
*** 485,502 ****
  #    define __hidden_weak1(original, alias)			\
    .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
- #   else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
  #    ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #     define __hidden_weak1(original, alias)			\
    .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #    else
! #     define __hidden_weak1(original, alias)			\
!   .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
  #    endif
  #   endif
  #   define hidden_weak(name)					\
    __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
  #  else
--- 571,596 ----
  #    define __hidden_weak1(original, alias)			\
    .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
  #    ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
!   .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
! #    else
! #     define __hidden_dot_weak1(original, alias)	
! #    endif
! #   else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
! #    define __hidden_weak1(original, alias)			\
    .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
!   C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
! #    ifdef HAVE_ASM_GLOBAL_DOT_NAME
! #     define __hidden_dot_weak1(original, alias)	ASM_LINE_SEP	\
    ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
    C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
  #    else
! #     define __hidden_dot_weak1(original, alias)	
  #    endif
  #   endif
  #   define hidden_weak(name)					\
+   __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name) \
+   __hidden_dot_weak1 (__GI_##name, name)));
+ #   define hidden_data_weak(name)					\
    __asm__ (__hidden_def3 (__hidden_weak1 (__GI_##name, name)));
  #  else
***************
*** 516,519 ****
--- 610,616 ----
  #  define hidden_weak(name)	hidden_def (name)
  #  define hidden_ver(local, name) strong_alias (local, __GI_##name)
+ #  define hidden_data_def(name)	strong_data_alias (name, __GI_##name)
+ #  define hidden_data_weak(name)	hidden_data_def (name)
+ #  define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
  #  define HIDDEN_JUMPTARGET(name) __GI_##name
  # endif
***************
*** 527,530 ****
--- 624,630 ----
  # define hidden_def(name)
  # define hidden_ver(local, name)
+ # define hidden_data_weak(name)
+ # define hidden_data_def(name)
+ # define hidden_data_ver(local, name)
  #endif
  
***************
*** 534,537 ****
--- 634,640 ----
  # define libc_hidden_weak(name) hidden_weak (name)
  # define libc_hidden_ver(local, name) hidden_ver (local, name)
+ # define libc_hidden_data_def(name) hidden_data_def (name)
+ # define libc_hidden_data_weak(name) hidden_data_weak (name)
+ # define libc_hidden_data_ver(local, name) hidden_data_ver (local, name)
  #else
  # define libc_hidden_proto(name)
***************
*** 539,542 ****
--- 642,648 ----
  # define libc_hidden_weak(name)
  # define libc_hidden_ver(local, name)
+ # define libc_hidden_data_def(name)
+ # define libc_hidden_data_weak(name)
+ # define libc_hidden_data_ver(local, name)
  #endif
  
***************
*** 546,549 ****
--- 652,658 ----
  # define rtld_hidden_weak(name) hidden_weak (name)
  # define rtld_hidden_ver(local, name) hidden_ver (local, name)
+ # define rtld_hidden_data_def(name) hidden_data_def (name)
+ # define rtld_hidden_data_weak(name) hidden_data_weak (name)
+ # define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
  #else
  # define rtld_hidden_proto(name)
***************
*** 551,554 ****
--- 660,666 ----
  # define rtld_hidden_weak(name)
  # define rtld_hidden_ver(local, name)
+ # define rtld_hidden_data_def(name)
+ # define rtld_hidden_data_weak(name)
+ # define rtld_hidden_data_ver(local, name)
  #endif
  
***************
*** 558,561 ****
--- 670,676 ----
  # define libm_hidden_weak(name) hidden_weak (name)
  # define libm_hidden_ver(local, name) hidden_ver (local, name)
+ # define libm_hidden_data_def(name) hidden_data_def (name)
+ # define libm_hidden_data_weak(name) hidden_data_weak (name)
+ # define libm_hidden_data_ver(local, name) hidden_data_ver (local, name)
  #else
  # define libm_hidden_proto(name)
***************
*** 563,566 ****
--- 678,684 ----
  # define libm_hidden_weak(name)
  # define libm_hidden_ver(local, name)
+ # define libm_hidden_data_def(name)
+ # define libm_hidden_data_weak(name)
+ # define libm_hidden_data_ver(local, name)
  #endif
  
diff -rc2PN -x *.orig libc23-cvstip-20020815/inet/in6_addr.c libc23/inet/in6_addr.c
*** libc23-cvstip-20020815/inet/in6_addr.c	Mon Aug  5 23:29:36 2002
--- libc23/inet/in6_addr.c	Fri Aug 16 13:29:17 2002
***************
*** 22,27 ****
  const struct in6_addr in6addr_any =
  { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
! libc_hidden_def (in6addr_any)
  const struct in6_addr in6addr_loopback =
  { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
! libc_hidden_def (in6addr_loopback)
--- 22,27 ----
  const struct in6_addr in6addr_any =
  { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
! libc_hidden_data_def (in6addr_any)
  const struct in6_addr in6addr_loopback =
  { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
! libc_hidden_data_def (in6addr_loopback)
diff -rc2PN -x *.orig libc23-cvstip-20020815/login/programs/utmpdump.c libc23/login/programs/utmpdump.c
*** libc23-cvstip-20020815/login/programs/utmpdump.c	Thu Jul  5 23:55:34 2001
--- libc23/login/programs/utmpdump.c	Thu Aug 15 16:54:50 2002
***************
*** 30,37 ****
  print_entry (struct utmp *up)
  {
  #if _HAVE_UT_TV - 0
    printf ("[%d] [%05d] [%-4.4s] [%-8.8s] [%-12.12s] [%-15.15s] [%ld]\n",
  	  up->ut_type, up->ut_pid, up->ut_id, up->ut_user,
! 	  up->ut_line, 4 + ctime (&up->ut_tv.tv_sec), up->ut_tv.tv_usec);
  #else
    printf ("[%d] [%05d] [%-4.4s] [%-8.8s] [%-12.12s] [%-15.15s]\n",
--- 30,44 ----
  print_entry (struct utmp *up)
  {
+ /*  For combined 32/64-bit systems, files that are shared between 
+ 	32- and 64-bit applications must be the same size.  64-bit utmp.h uses 
+ 	timeval32 to match 32-bit, so we need to copy and expand it to timeval
+ 	for 64-bit.  This code works for both 32 and 64-bit compilation */
+   __time_t utmp_sec = up->ut_tv.tv_sec;
+   __suseconds_t utmp_usec = up->ut_tv.tv_usec;
+   
  #if _HAVE_UT_TV - 0
    printf ("[%d] [%05d] [%-4.4s] [%-8.8s] [%-12.12s] [%-15.15s] [%ld]\n",
  	  up->ut_type, up->ut_pid, up->ut_id, up->ut_user,
! 	  up->ut_line, 4 + ctime (&utmp_sec), utmp_usec);
  #else
    printf ("[%d] [%05d] [%-4.4s] [%-8.8s] [%-12.12s] [%-15.15s]\n",
diff -rc2PN -x *.orig libc23-cvstip-20020815/stdlib/longlong.h libc23/stdlib/longlong.h
*** libc23-cvstip-20020815/stdlib/longlong.h	Thu Jul  5 23:55:41 2001
--- libc23/stdlib/longlong.h	Thu Aug 15 16:54:50 2002
***************
*** 760,764 ****
  #endif /* __ns32000__ */
  
! #if (defined (_ARCH_PPC) || defined (_IBMR2)) && W_TYPE_SIZE == 32
  #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
    do {									\
--- 760,765 ----
  #endif /* __ns32000__ */
  
! #if (defined (_ARCH_PPC) || defined (_IBMR2)) 
! #if W_TYPE_SIZE == 32
  #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
    do {									\
***************
*** 830,833 ****
--- 831,835 ----
  	   : "r" ((USItype) (x)))
  #define COUNT_LEADING_ZEROS_0 32
+ 
  #if defined (_ARCH_PPC)
  #define umul_ppmm(ph, pl, m0, m1) \
***************
*** 878,881 ****
--- 880,982 ----
  #define UDIV_TIME 100
  #endif
+ #else /* W_TYPE_SIZE != 32 */
+ #if defined (__powerpc64__) || defined (powerpc64) 
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+   do {									\
+     if (__builtin_constant_p (bh) && (bh) == 0)				\
+       __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2"		\
+ 	     : "=r" ((UDItype) (sh)),					\
+ 	       "=&r" ((UDItype) (sl))					\
+ 	     : "%r" ((UDItype) (ah)),					\
+ 	       "%r" ((UDItype) (al)),					\
+ 	       "rI" ((UDItype) (bl)));					\
+     else if (__builtin_constant_p (bh) && (bh) ==~(UDItype) 0)		\
+       __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2"		\
+ 	     : "=r" ((UDItype) (sh)),					\
+ 	       "=&r" ((UDItype) (sl))					\
+ 	     : "%r" ((UDItype) (ah)),					\
+ 	       "%r" ((UDItype) (al)),					\
+ 	       "rI" ((UDItype) (bl)));					\
+     else								\
+       __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3"		\
+ 	     : "=r" ((UDItype) (sh)),					\
+ 	       "=&r" ((UDItype) (sl))					\
+ 	     : "%r" ((UDItype) (ah)),					\
+ 	       "r" ((UDItype) (bh)),					\
+ 	       "%r" ((UDItype) (al)),					\
+ 	       "rI" ((UDItype) (bl)));					\
+   } while (0)
+ #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+   do {									\
+     if (__builtin_constant_p (ah) && (ah) == 0)				\
+       __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2"	\
+ 	       : "=r" ((UDItype) (sh)),					\
+ 		 "=&r" ((UDItype) (sl))					\
+ 	       : "r" ((UDItype) (bh)),					\
+ 		 "rI" ((UDItype) (al)),					\
+ 		 "r" ((UDItype) (bl)));					\
+     else if (__builtin_constant_p (ah) && (ah) ==~(UDItype) 0)		\
+       __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2"	\
+ 	       : "=r" ((UDItype) (sh)),					\
+ 		 "=&r" ((UDItype) (sl))					\
+ 	       : "r" ((UDItype) (bh)),					\
+ 		 "rI" ((UDItype) (al)),					\
+ 		 "r" ((UDItype) (bl)));					\
+     else if (__builtin_constant_p (bh) && (bh) == 0)			\
+       __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2"		\
+ 	       : "=r" ((UDItype) (sh)),					\
+ 		 "=&r" ((UDItype) (sl))					\
+ 	       : "r" ((UDItype) (ah)),					\
+ 		 "rI" ((UDItype) (al)),					\
+ 		 "r" ((UDItype) (bl)));					\
+     else if (__builtin_constant_p (bh) && (bh) ==~(UDItype) 0)		\
+       __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2"		\
+ 	       : "=r" ((UDItype) (sh)),					\
+ 		 "=&r" ((UDItype) (sl))					\
+ 	       : "r" ((UDItype) (ah)),					\
+ 		 "rI" ((UDItype) (al)),					\
+ 		 "r" ((UDItype) (bl)));					\
+     else								\
+       __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2"	\
+ 	       : "=r" ((UDItype) (sh)),					\
+ 		 "=&r" ((UDItype) (sl))					\
+ 	       : "r" ((UDItype) (ah)),					\
+ 		 "r" ((UDItype) (bh)),					\
+ 		 "rI" ((UDItype) (al)),					\
+ 		 "r" ((UDItype) (bl)));					\
+   } while (0)
+ 
+ #define count_leading_zeros(count, x) \
+   __asm__ ("{cntlz|cntlzd} %0,%1"					\
+ 	   : "=r" (count)					\
+ 	   : "r" ((UDItype) (x)))
+ #define COUNT_LEADING_ZEROS_0 64
+ 
+ #define umul_ppmm(ph, pl, m0, m1) \
+   do {									\
+     UDItype __m0 = (m0), __m1 = (m1);					\
+     __asm__ ("mulhdu %0,%1,%2"						\
+ 	     : "=r" ((UDItype) ph)					\
+ 	     : "%r" (__m0),						\
+ 	       "r" (__m1));						\
+     (pl) = __m0 * __m1;							\
+   } while (0)
+ #define UMUL_TIME 16
+ 
+ #define smul_ppmm(ph, pl, m0, m1) \
+   do {									\
+     DItype __m0 = (m0), __m1 = (m1);					\
+     __asm__ ("mulhd %0,%1,%2"						\
+ 	     : "=r" ((DItype) ph)					\
+ 	     : "%r" (__m0),						\
+ 	       "r" (__m1));						\
+     (pl) = __m0 * __m1;							\
+   } while (0)
+ #define SMUL_TIME 16
+ #define UDIV_TIME 72
+ #else
+ #error Hmmmm, not where I expected to be... (2)
+ #endif /*defined (__powerpc64__)*/
+ #endif /* W_TYPE_SIZE == 32 */
  #endif /* Power architecture variants.  */
  
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/generic/ldconfig.h libc23/sysdeps/generic/ldconfig.h
*** libc23-cvstip-20020815/sysdeps/generic/ldconfig.h	Thu Jul  5 23:55:49 2001
--- libc23/sysdeps/generic/ldconfig.h	Thu Aug 15 16:54:50 2002
***************
*** 32,35 ****
--- 32,36 ----
  #define FLAG_X8664_LIB64	0x0300
  #define FLAG_S390_LIB64		0x0400
+ #define FLAG_POWERPC_LIB64	0x0500
  
  /* Declared in cache.c.  */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/bits/setjmp.h libc23/sysdeps/powerpc/bits/setjmp.h
*** libc23-cvstip-20020815/sysdeps/powerpc/bits/setjmp.h	Thu Jul  5 23:56:01 2001
--- libc23/sysdeps/powerpc/bits/setjmp.h	Thu Aug 15 16:54:50 2002
***************
*** 32,43 ****
  # define JB_GPR2   1
  # define JB_LR     2  /* The address we will return to */
! # define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
! # define JB_CR     21 /* Condition code registers. */
! # define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
! # define JB_SIZE   (58*4)
  #endif
  
  #ifndef	_ASM
  typedef long int __jmp_buf[58];
  #endif
  
--- 32,54 ----
  # define JB_GPR2   1
  # define JB_LR     2  /* The address we will return to */
! # if defined __powerpc64__
! #  define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 double words in total */
! #  define JB_CR     21 /* Condition code registers. */
! #  define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18 double words total */
! #  define JB_SIZE   (40*8)
! # else
! #  define JB_GPRS   3  /* GPRs 14 through 31 are saved, 18 in total */
! #  define JB_CR     21 /* Condition code registers. */
! #  define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total */
! #  define JB_SIZE   (58*4)
! # endif 
  #endif
  
  #ifndef	_ASM
+ # if defined __powerpc64__
+ typedef long int __jmp_buf[40];
+ # else
  typedef long int __jmp_buf[58];
+ # endif
  #endif
  
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/bits/wordsize.h libc23/sysdeps/powerpc/bits/wordsize.h
*** libc23-cvstip-20020815/sysdeps/powerpc/bits/wordsize.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/powerpc/bits/wordsize.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,7 ----
+ /* Determine the wordsize from the preprocessor defines.  */
+ 
+ #if defined __powerpc64__
+ # define __WORDSIZE	64
+ #else
+ # define __WORDSIZE	32
+ #endif
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/elf/libc-start.c libc23/sysdeps/powerpc/elf/libc-start.c
*** libc23-cvstip-20020815/sysdeps/powerpc/elf/libc-start.c	Thu Jan 31 19:31:58 2002
--- libc23/sysdeps/powerpc/elf/libc-start.c	Thu Aug 15 16:54:50 2002
***************
*** 27,30 ****
--- 27,34 ----
  extern int _dl_starting_up;
  weak_extern (_dl_starting_up)
+ 
+ extern int __cache_line_size;
+ weak_extern (__cache_line_size)
+ 
  extern int __libc_multiple_libcs;
  extern void *__libc_stack_end;
***************
*** 38,41 ****
--- 42,62 ----
  };
  
+ static inline void
+ __aux_init_cache (ElfW(auxv_t) *av)
+ {
+   for (; av->a_type != AT_NULL; ++av)
+     switch (av->a_type)
+       {
+       case AT_DCACHEBSIZE:
+       	{
+ 			int *cls = & __cache_line_size;
+ 			if (cls != NULL)
+     			*cls = av->a_un.a_val;
+ 		}
+ 		break;
+       }
+ }
+ 
+ 
  int
  /* GKM FIXME: GCC: this should get __BP_ prefix by virtue of the
***************
*** 67,74 ****
    if (*stack_on_entry != NULL)
      {
        /* ...in which case, we have argc as the top thing on the
! 	 stack, followed by argv (NULL-terminated), envp (likewise),
! 	 and the auxilary vector.  */
!       argc = *(int *__unbounded) stack_on_entry;
        ubp_av = stack_on_entry + 1;
        ubp_ev = ubp_av + argc + 1;
--- 88,98 ----
    if (*stack_on_entry != NULL)
      {
+       long temp_argc;
        /* ...in which case, we have argc as the top thing on the
!          stack, followed by argv (NULL-terminated), envp (likewise),
! 	     and the auxilary vector.  */
! 	  /* 32/64-bit agnostic load from stack */
!       temp_argc = *(long *__unbounded) stack_on_entry;
!       argc = (int)temp_argc;
        ubp_av = stack_on_entry + 1;
        ubp_ev = ubp_av + argc + 1;
***************
*** 76,81 ****
        auxvec = ubp_ev;
        while (*(char *__unbounded *__unbounded) auxvec != NULL)
! 	++auxvec;
!       ++auxvec;
  # ifndef SHARED
        _dl_aux_init ((ElfW(auxv_t) *) auxvec);
--- 100,105 ----
        auxvec = ubp_ev;
        while (*(char *__unbounded *__unbounded) auxvec != NULL)
!         ++(char**)auxvec; /* fix alignment for powerpc64 */
!       ++(char**)auxvec;
  # ifndef SHARED
        _dl_aux_init ((ElfW(auxv_t) *) auxvec);
***************
*** 85,93 ****
      }
  
!   INIT_ARGV_and_ENVIRON;
  
    /* Store something that has some relationship to the end of the
       stack, for backtraces.  This variable should be thread-specific.  */
!   __libc_stack_end = stack_on_entry + 4;
  
    /* Register the destructor of the dynamic linker if there is any.  */
--- 109,119 ----
      }
  
!   INIT_ARGV_and_ENVIRON;      
!     /* set up cache line size etc from aux vector. */
!     __aux_init_cache((ElfW(auxv_t) *) auxvec);
  
    /* Store something that has some relationship to the end of the
       stack, for backtraces.  This variable should be thread-specific.  */
!   __libc_stack_end = stack_on_entry + 8;
  
    /* Register the destructor of the dynamic linker if there is any.  */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/fpu/fpu_control.h libc23/sysdeps/powerpc/fpu/fpu_control.h
*** libc23-cvstip-20020815/sysdeps/powerpc/fpu/fpu_control.h	Wed Dec  5 18:12:11 2001
--- libc23/sysdeps/powerpc/fpu/fpu_control.h	Thu Aug 15 16:54:50 2002
***************
*** 51,55 ****
  /* Macros for accessing the hardware control word.  */
  #define _FPU_GETCW(cw) ( { \
!   union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
    __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
    (cw)=tmp.cw[1]; \
--- 51,55 ----
  /* Macros for accessing the hardware control word.  */
  #define _FPU_GETCW(cw) ( { \
!   volatile union { double d; fpu_control_t cw[2]; } tmp __attribute__ ((__aligned__(8))); \
    __asm__ ("mffs 0; stfd%U0 0,%0" : "=m" (tmp.d) : : "fr0"); \
    (cw)=tmp.cw[1]; \
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/gmp-mparam.h libc23/sysdeps/powerpc/gmp-mparam.h
*** libc23-cvstip-20020815/sysdeps/powerpc/gmp-mparam.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/powerpc/gmp-mparam.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,29 ----
+ /* gmp-mparam.h -- Compiler/machine parameter header file.
+ 
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 
+ This file is part of the GNU MP Library.
+ 
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or (at your
+ option) any later version.
+ 
+ The GNU MP Library 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 Lesser General Public
+ License for more details.
+ 
+ You should have received a copy of the GNU Lesser General Public License
+ along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
+ 
+ #include <bits/wordsize.h>
+ 
+ #define BITS_PER_MP_LIMB __WORDSIZE
+ #define BYTES_PER_MP_LIMB (__WORDSIZE / 8)
+ #define BITS_PER_LONGINT __WORDSIZE
+ #define BITS_PER_INT 32
+ #define BITS_PER_SHORTINT 16
+ #define BITS_PER_CHAR 8
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/powerpc/sysdep.h libc23/sysdeps/powerpc/sysdep.h
*** libc23-cvstip-20020815/sysdeps/powerpc/sysdep.h	Mon Nov  5 03:29:42 2001
--- libc23/sysdeps/powerpc/sysdep.h	Thu Aug 15 16:54:50 2002
***************
*** 110,113 ****
--- 110,324 ----
  #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
  
+ #ifdef __powerpc64__
+ 
+ 
+ /* If compiled for profiling, call `_mcount' at the start of each function.  
+     see ppc-mcount.S for more details */
+ #ifdef	PROF
+ /* The mcount code relies on a the return address being on the stack
+    to locate our caller and so it can restore it; so store one just
+    for its benefit.  */
+ #ifdef PIC
+ #ifdef SYSV_ELF_PROFILING
+ #define CALL_MCOUNT							      \
+   .pushsection;								      \
+   .section ".data";    							      \
+   .align ALIGNARG(2);							      \
+ 0:.long 0;								      \
+   .previous;								      \
+   mflr  r0;								      \
+   std   r0,16(r1);	       						      \
+   ld   r0,0b@got(r2);							      \
+   bl    JUMPTARGET(_mcount);
+ #else /* SYSV_ELF_PROFILING */
+ #define CALL_MCOUNT							      \
+   mflr  r0;								      \
+   std   r0,16(r1);	       						      \
+   bl    JUMPTARGET(_mcount);
+ #endif /* SYSV_ELF_PROFILING */
+ #else  /* PIC */
+ #ifdef SYSV_ELF_PROFILING
+ #define CALL_MCOUNT							      \
+   .pushsection;								      \
+   .section ".data";    							      \
+   .align ALIGNARG(2);							      \
+ 0:.long 0;								      \
+   .previous;								      \
+   mflr  r0;								      \
+   std   r0,16(r1);	       						      \
+   ld   r0,0b@got(r2);							      \
+   bl    JUMPTARGET(_mcount);
+ #else /* SYSV_ELF_PROFILING */
+ #define CALL_MCOUNT							      \
+   mflr  r0;								      \
+   std   r0,16(r1);	       						      \
+   bl    JUMPTARGET(_mcount);
+ #endif /* SYSV_ELF_PROFILING */
+ #endif /* PIC */
+ #else  /* PROF */
+ #define CALL_MCOUNT		/* Do nothing.  */
+ #endif /* PROF */
+ 
+ #define DOT_LABEL(X) .##X
+ 
+ #define ENTRY(name)					      \
+ 	.section	".text"; \
+ 	.align ALIGNARG(2); \
+ 	.globl DOT_LABEL(name); \
+ 	.type DOT_LABEL(name),@function ; \
+ 	.globl name; \
+ 	.section	".opd","aw"; \
+ name##: ; \
+ 	.quad DOT_LABEL(name) ; \
+ 	.quad .TOC.@tocbase, 0; \
+ 	.previous; \
+ DOT_LABEL(name): 
+ 
+ 
+ #define EALIGN_W_0  /* No words to insert.  */
+ #define EALIGN_W_1  nop
+ #define EALIGN_W_2  nop;nop
+ #define EALIGN_W_3  nop;nop;nop
+ #define EALIGN_W_4  EALIGN_W_3;nop
+ #define EALIGN_W_5  EALIGN_W_4;nop
+ #define EALIGN_W_6  EALIGN_W_5;nop
+ #define EALIGN_W_7  EALIGN_W_6;nop
+ 
+ /* EALIGN is like ENTRY, but does alignment to 'words'*4 bytes
+    past a 2^align boundary.  */
+ #ifdef PROF
+ #define EALIGN(name, alignt, words)					      \
+ 	.section	".text"; \
+ 	.globl DOT_LABEL(name); \
+ 	.type DOT_LABEL(name),@function ; \
+ 	.globl name; \
+ 	.section	".opd","aw"; \
+ name##: ; \
+ 	.quad DOT_LABEL(name) ; \
+ 	.quad .TOC.@tocbase, 0; \
+ 	.previous; \
+ 	.align ALIGNARG(alignt); \
+   EALIGN_W_##words;							      \
+ DOT_LABEL(name):		\
+   CALL_MCOUNT								      \
+   b 0f;									      \
+   .align ALIGNARG(alignt);						      \
+   EALIGN_W_##words;							      \
+   0:							    
+ #else /* PROF */
+ #define EALIGN(name, alignt, words)					      \
+ 	.section	".text"; \
+ 	.globl DOT_LABEL(name); \
+ 	.type DOT_LABEL(name),@function ; \
+ 	.globl name; \
+ 	.section	".opd","aw"; \
+ name##: ; \
+ 	.quad DOT_LABEL(name) ; \
+ 	.quad .TOC.@tocbase, 0; \
+ 	.previous; \
+ 	.align ALIGNARG(alignt); \
+   EALIGN_W_##words;							      \
+ DOT_LABEL(name):
+ #endif
+ 
+ /* Local labels stripped out by the linker.  */
+ #undef L
+ #define L(x) .L##x
+ 
+ #define tostring(s) #s
+ #define stringify(s) tostring(s)
+ #define XGLUE(a,b) a##b
+ #define GLUE(a,b) XGLUE(a,b)
+ #define LT_LABEL(name) GLUE(.LT,name)
+ #define LT_LABELSUFFIX(name,suffix) GLUE(GLUE(.LT,name),suffix)
+ 
+ /* Support Traceback tables */
+ #define TB_ASM			0x000c000000000000
+ #define TB_GLOBALLINK	0x0000800000000000
+ #define TB_IS_EPROL		0x0000400000000000
+ #define TB_HAS_TBOFF	0x0000200000000000
+ #define TB_INT_PROC		0x0000100000000000
+ #define TB_HAS_CTL		0x0000080000000000
+ #define TB_TOCLESS		0x0000040000000000
+ #define TB_FP_PRESENT	0x0000020000000000
+ #define TB_LOG_ABORT	0x0000010000000000
+ #define TB_INT_HANDL	0x0000008000000000
+ #define TB_NAME_PRESENT	0x0000004000000000
+ #define TB_USES_ALLOCA	0x0000002000000000
+ #define TB_SAVES_CR		0x0000000200000000
+ #define TB_SAVES_LR		0x0000000100000000
+ #define TB_STORES_BC	0x0000000080000000
+ #define TB_FIXUP		0x0000000040000000
+ #define TB_FP_SAVED(fprs)	(((fprs) & 0x3f) << 24)
+ #define TB_GPR_SAVED(gprs)	(((fprs) & 0x3f) << 16)
+ #define TB_FIXEDPARMS(parms)	(((parms) & 0xff) << 8)
+ #define TB_FLOATPARMS(parms)	(((parms) & 0x7f) << 1)
+ #define TB_PARMSONSTK	0x0000000000000001
+ 
+ #define PPC_HIGHER(v) (((v) >> 32) & 0xffff)
+ #define TB_DEFAULT	TB_ASM | TB_HAS_TBOFF | TB_NAME_PRESENT
+ 
+ #define TRACEBACK(name) \
+ LT_LABEL(name): ; \
+ 	.long	0 ; \
+ 	.quad	TB_DEFAULT ; \
+ 	.long	LT_LABEL(name)-DOT_LABEL(name) ; \
+ 	.short	LT_LABELSUFFIX(name,_name_end)-LT_LABELSUFFIX(name,_name_start) ; \
+ LT_LABELSUFFIX(name,_name_start): ;\
+ 	.ascii	stringify(name) ; \
+ LT_LABELSUFFIX(name,_name_end): ; \
+ 	.align	2 ;
+ 
+ #define TRACEBACK_MASK(name,mask) \
+ LT_LABEL(name): ; \
+ 	.long	0 ; \
+ 	.quad	TB_DEFAULT | mask ; \
+ 	.long	LT_LABEL(name)-DOT_LABEL(name) ; \
+ 	.short	LT_LABELSUFFIX(name,_name_end)-LT_LABELSUFFIX(name,_name_start) ; \
+ LT_LABELSUFFIX(name,_name_start): ;\
+ 	.ascii	stringify(name) ; \
+ LT_LABELSUFFIX(name,_name_end): ; \
+ 	.align	2 ;
+ 
+ /* END generates Traceback tables */
+ #undef	END
+ #define END(name)							      \
+   TRACEBACK(name)	\
+   ASM_SIZE_DIRECTIVE(name)
+ 
+ /* This form supports more informative traceback tables */
+ #define END_GEN_TB(name,mask)	\
+   TRACEBACK_MASK(name,mask)	\
+   ASM_SIZE_DIRECTIVE(name)
+   
+   
+ #define DO_CALL(syscall)				      		      \
+     li 0,syscall;						              \
+     sc
+ 
+ /* ppc64 is always PIC */
+ #define JUMPTARGET(name) DOT_LABEL(name)
+ 
+ #define PSEUDO(name, syscall_name, args)				      \
+   .section ".text";							      \
+   ENTRY (name)								      \
+     DO_CALL (SYS_ify (syscall_name));
+ 
+ #define PSEUDO_RET							      \
+     bnslr;								      \
+     b JUMPTARGET(__syscall_error)
+     
+ #define ret PSEUDO_RET
+ 
+ #undef	PSEUDO_END
+ #define	PSEUDO_END(name)						      \
+   END (name)
+ 
+ /* Label in text section.  */
+ /* ppc64 function descriptors which requires . notation */
+ #define C_TEXT(name) .##name
+ 
+ #else  /* must be powerpc32 */
+ 
  /* If compiled for profiling, call `_mcount' at the start of each function.  */
  #ifdef	PROF
***************
*** 216,219 ****
--- 427,432 ----
  /* Label in text section.  */
  #define C_TEXT(name) name
+ 
+ #endif /* __powerpc64__ */
  
  #endif /* __ELF__ */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/shm.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/shm.h	Thu Jul  5 23:56:19 2001
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/shm.h	Thu Aug 15 16:54:50 2002
***************
*** 44,52 ****
--- 44,58 ----
    {
      struct ipc_perm shm_perm;          /* operation permission struct */
+ #if __WORDSIZE == 32
      unsigned int __unused1;
+ #endif
      __time_t shm_atime;                        /* time of last shmat() */
+ #if __WORDSIZE == 32
      unsigned int __unused2;
+ #endif
      __time_t shm_dtime;                        /* time of last shmdt() */
+ #if __WORDSIZE == 32
      unsigned int __unused3;
+ #endif
      __time_t shm_ctime;                        /* time of last change by shmctl() */
      unsigned int __unused4;
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/socket.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/socket.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/socket.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/socket.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,320 ----
+ /* System-specific socket constants and types.  Linux/PowerPC64 version.
+    Copyright (C) 1991,1992,1994-1999,2000,2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef __BITS_SOCKET_H
+ #define __BITS_SOCKET_H
+ 
+ #if !defined _SYS_SOCKET_H && !defined _NETINET_IN_H
+ # error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
+ #endif
+ 
+ #define	__need_size_t
+ #define __need_NULL
+ #include <stddef.h>
+ 
+ #include <limits.h>
+ #include <sys/types.h>
+ 
+ /* Type for length arguments in socket calls.  */
+ #ifndef __socklen_t_defined
+ typedef __socklen_t socklen_t;
+ # define __socklen_t_defined
+ #endif
+ 
+ /* Types of sockets.  */
+ enum __socket_type
+ {
+   SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
+ 				   byte streams.  */
+ #define SOCK_STREAM SOCK_STREAM
+   SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
+ 				   of fixed maximum length.  */
+ #define SOCK_DGRAM SOCK_DGRAM
+   SOCK_RAW = 3,			/* Raw protocol interface.  */
+ #define SOCK_RAW SOCK_RAW
+   SOCK_RDM = 4,			/* Reliably-delivered messages.  */
+ #define SOCK_RDM SOCK_RDM
+   SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
+ 				   datagrams of fixed maximum length.  */
+ #define SOCK_SEQPACKET SOCK_SEQPACKET
+   SOCK_PACKET = 10		/* Linux specific way of getting packets
+ 				   at the dev level.  For writing rarp and
+ 				   other similar things on the user level. */
+ #define SOCK_PACKET SOCK_PACKET
+ };
+ 
+ /* Protocol families.  */
+ #define	PF_UNSPEC	0	/* Unspecified.  */
+ #define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
+ #define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
+ #define	PF_FILE		PF_LOCAL /* Another non-standard name for PF_LOCAL.  */
+ #define	PF_INET		2	/* IP protocol family.  */
+ #define	PF_AX25		3	/* Amateur Radio AX.25.  */
+ #define	PF_IPX		4	/* Novell Internet Protocol.  */
+ #define	PF_APPLETALK	5	/* Appletalk DDP.  */
+ #define	PF_NETROM	6	/* Amateur radio NetROM.  */
+ #define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
+ #define	PF_ATMPVC	8	/* ATM PVCs.  */
+ #define	PF_X25		9	/* Reserved for X.25 project.  */
+ #define	PF_INET6	10	/* IP version 6.  */
+ #define	PF_ROSE		11	/* Amateur Radio X.25 PLP.  */
+ #define	PF_DECnet	12	/* Reserved for DECnet project.  */
+ #define	PF_NETBEUI	13	/* Reserved for 802.2LLC project.  */
+ #define	PF_SECURITY	14	/* Security callback pseudo AF.  */
+ #define	PF_KEY		15	/* PF_KEY key management API.  */
+ #define	PF_NETLINK	16
+ #define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD.  */
+ #define	PF_PACKET	17	/* Packet family.  */
+ #define	PF_ASH		18	/* Ash.  */
+ #define	PF_ECONET	19	/* Acorn Econet.  */
+ #define	PF_ATMSVC	20	/* ATM SVCs.  */
+ #define	PF_SNA		22	/* Linux SNA Project */
+ #define	PF_IRDA		23	/* IRDA sockets.  */
+ #define	PF_PPPOX	24	/* PPPoX sockets.  */
+ #define	PF_WANPIPE	25	/* Wanpipe API sockets.  */
+ #define	PF_BLUETOOTH	31	/* Bluetooth sockets.  */
+ #define	PF_MAX		32	/* For now..  */
+ 
+ /* Address families.  */
+ #define	AF_UNSPEC	PF_UNSPEC
+ #define	AF_LOCAL	PF_LOCAL
+ #define	AF_UNIX		PF_UNIX
+ #define	AF_FILE		PF_FILE
+ #define	AF_INET		PF_INET
+ #define	AF_AX25		PF_AX25
+ #define	AF_IPX		PF_IPX
+ #define	AF_APPLETALK	PF_APPLETALK
+ #define	AF_NETROM	PF_NETROM
+ #define	AF_BRIDGE	PF_BRIDGE
+ #define	AF_ATMPVC	PF_ATMPVC
+ #define	AF_X25		PF_X25
+ #define	AF_INET6	PF_INET6
+ #define	AF_ROSE		PF_ROSE
+ #define	AF_DECnet	PF_DECnet
+ #define	AF_NETBEUI	PF_NETBEUI
+ #define	AF_SECURITY	PF_SECURITY
+ #define	AF_KEY		PF_KEY
+ #define	AF_NETLINK	PF_NETLINK
+ #define	AF_ROUTE	PF_ROUTE
+ #define	AF_PACKET	PF_PACKET
+ #define	AF_ASH		PF_ASH
+ #define	AF_ECONET	PF_ECONET
+ #define	AF_ATMSVC	PF_ATMSVC
+ #define	AF_SNA		PF_SNA
+ #define	AF_IRDA		PF_IRDA
+ #define	AF_PPPOX	PF_PPPOX
+ #define	AF_WANPIPE	PF_WANPIPE
+ #define	AF_BLUETOOTH	PF_BLUETOOTH
+ #define	AF_MAX		PF_MAX
+ 
+ /* Socket level values.  Others are defined in the appropriate headers.
+ 
+    XXX These definitions also should go into the appropriate headers as
+    far as they are available.  */
+ #define SOL_RAW		255
+ #define SOL_DECNET      261
+ #define SOL_X25         262
+ #define SOL_PACKET	263
+ #define SOL_ATM		264	/* ATM layer (cell level).  */
+ #define SOL_AAL		265	/* ATM Adaption Layer (packet level).  */
+ #define SOL_IRDA	266
+ 
+ /* Maximum queue length specifiable by listen.  */
+ #define SOMAXCONN	128
+ 
+ /* Get the definition of the macro to define the common sockaddr members.  */
+ #include <bits/sockaddr.h>
+ 
+ /* Structure describing a generic socket address.  */
+ struct sockaddr
+   {
+     __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
+     char sa_data[14];		/* Address data.  */
+   };
+ 
+ 
+ /* Structure large enough to hold any socket address (with the historical
+    exception of AF_UNIX).  We reserve 128 bytes.  */
+ #if ULONG_MAX > 0xffffffff
+ # define __ss_aligntype	__uint64_t
+ #else
+ # define __ss_aligntype	__uint32_t
+ #endif
+ #define _SS_SIZE	128
+ #define _SS_PADSIZE	(_SS_SIZE - (2 * sizeof (__ss_aligntype)))
+ 
+ struct sockaddr_storage
+   {
+     __SOCKADDR_COMMON (ss_);	/* Address family, etc.  */
+     __ss_aligntype __ss_align;	/* Force desired alignment.  */
+     char __ss_padding[_SS_PADSIZE];
+   };
+ 
+ 
+ /* Bits in the FLAGS argument to `send', `recv', et al.  */
+ enum
+   {
+     MSG_OOB		= 0x01,	/* Process out-of-band data.  */
+ #define MSG_OOB		MSG_OOB
+     MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
+ #define MSG_PEEK	MSG_PEEK
+     MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
+ #define MSG_DONTROUTE	MSG_DONTROUTE
+ #ifdef __USE_GNU
+     /* DECnet uses a different name.  */
+     MSG_TRYHARD		= MSG_DONTROUTE,
+ # define MSG_TRYHARD	MSG_DONTROUTE
+ #endif
+     MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
+ #define MSG_CTRUNC	MSG_CTRUNC
+     MSG_PROXY		= 0x10,	/* Supply or ask second address.  */
+ #define MSG_PROXY	MSG_PROXY
+     MSG_TRUNC		= 0x20,
+ #define	MSG_TRUNC	MSG_TRUNC
+     MSG_DONTWAIT	= 0x40, /* Nonblocking IO.  */
+ #define	MSG_DONTWAIT	MSG_DONTWAIT
+     MSG_EOR		= 0x80, /* End of record.  */
+ #define	MSG_EOR		MSG_EOR
+     MSG_WAITALL		= 0x100, /* Wait for a full request.  */
+ #define	MSG_WAITALL	MSG_WAITALL
+     MSG_FIN		= 0x200,
+ #define	MSG_FIN		MSG_FIN
+     MSG_SYN		= 0x400,
+ #define	MSG_SYN		MSG_SYN
+     MSG_CONFIRM		= 0x800, /* Confirm path validity.  */
+ #define	MSG_CONFIRM	MSG_CONFIRM
+     MSG_RST		= 0x1000,
+ #define	MSG_RST		MSG_RST
+     MSG_ERRQUEUE	= 0x2000, /* Fetch message from error queue.  */
+ #define	MSG_ERRQUEUE	MSG_ERRQUEUE
+     MSG_NOSIGNAL	= 0x4000, /* Do not generate SIGPIPE.  */
+ #define	MSG_NOSIGNAL	MSG_NOSIGNAL
+     MSG_MORE		= 0x8000  /* Sender will send more.  */
+ #define	MSG_MORE	MSG_MORE
+   };
+ 
+ 
+ /* Structure describing messages sent by
+    `sendmsg' and received by `recvmsg'.  */
+ struct msghdr
+   {
+     void *msg_name;		/* Address to send to/receive from.  */
+     socklen_t msg_namelen;	/* Length of address data.  */
+ 
+     struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
+     size_t msg_iovlen;		/* Number of elements in the vector.  */
+ 
+     void *msg_control;		/* Ancillary data (eg BSD filedesc passing). */
+     size_t msg_controllen;	/* Ancillary data buffer length.  */
+ 
+     int msg_flags;		/* Flags on received message.  */
+   };
+ 
+ /* Structure used for storage of ancillary data object information.  */
+ struct cmsghdr
+   {
+     size_t cmsg_len;		/* Length of data in cmsg_data plus length
+ 				   of cmsghdr structure.  */
+     int cmsg_level;		/* Originating protocol.  */
+     int cmsg_type;		/* Protocol specific type.  */
+ #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+     __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data.  */
+ #endif
+   };
+ 
+ /* Ancillary data object manipulation macros.  */
+ #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
+ # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
+ #else
+ # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
+ #endif
+ #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
+ #define CMSG_FIRSTHDR(mhdr) \
+   ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
+    ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
+ #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
+ 			 & (size_t) ~(sizeof (size_t) - 1))
+ #define CMSG_SPACE(len) (CMSG_ALIGN (len) \
+ 			 + CMSG_ALIGN (sizeof (struct cmsghdr)))
+ #define CMSG_LEN(len)   (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len))
+ 
+ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
+ 				      struct cmsghdr *__cmsg) __THROW;
+ #ifdef __USE_EXTERN_INLINES
+ # ifndef _EXTERN_INLINE
+ #  define _EXTERN_INLINE extern __inline
+ # endif
+ _EXTERN_INLINE struct cmsghdr *
+ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+ {
+   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
+     /* The kernel header does this so there may be a reason.  */
+     return 0;
+ 
+   __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg
+ 			       + CMSG_ALIGN (__cmsg->cmsg_len));
+ #ifdef __powerpc64__
+   if ((unsigned char *) (__cmsg + 1) >= ((unsigned char *) __mhdr->msg_control
+ 					+ __mhdr->msg_controllen)
+ # else
+   if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control
+ 					+ __mhdr->msg_controllen)
+ # endif /* __powerpc64__ */
+       || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)
+ 	  > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)))
+     /* No more entries.  */
+     return 0;
+   return __cmsg;
+ }
+ #endif	/* Use `extern inline'.  */
+ 
+ /* Socket level message types.  This must match the definitions in
+    <linux/socket.h>.  */
+ enum
+   {
+     SCM_RIGHTS = 0x01,		/* Transfer file descriptors.  */
+ #define SCM_RIGHTS SCM_RIGHTS
+ #ifdef __USE_BSD
+     SCM_CREDENTIALS = 0x02,     /* Credentials passing.  */
+ # define SCM_CREDENTIALS SCM_CREDENTIALS
+ #endif
+     __SCM_CONNECT = 0x03	/* Data array is `struct scm_connect'.  */
+   };
+ 
+ /* User visible structure for SCM_CREDENTIALS message */
+ 
+ struct ucred
+ {
+   pid_t pid;			/* PID of sending process.  */
+   uid_t uid;			/* UID of sending process.  */
+   gid_t gid;			/* GID of sending process.  */
+ };
+ 
+ /* Get socket manipulation related informations from kernel headers.  */
+ #include <asm/socket.h>
+ 
+ 
+ /* Structure used to manipulate the SO_LINGER option.  */
+ struct linger
+   {
+     int l_onoff;		/* Nonzero to linger on close.  */
+     int l_linger;		/* Time to linger.  */
+   };
+ 
+ #endif	/* bits/socket.h */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/stat.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/stat.h	Thu Jul  5 23:56:19 2001
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/stat.h	Thu Aug 15 16:54:50 2002
***************
*** 38,42 ****
--- 38,44 ----
      __dev_t st_dev;			/* Device.  */
  #ifndef __USE_FILE_OFFSET64
+ # if __WORDSIZE == 32
      unsigned short int __pad1;
+ # endif
      __ino_t st_ino;			/* File serial number.	*/
  #else
***************
*** 48,52 ****
--- 50,56 ----
      __gid_t st_gid;			/* Group ID of the file's group.*/
      __dev_t st_rdev;			/* Device number, if device.  */
+ #if __WORDSIZE == 32
      unsigned short int __pad2;
+ #endif
  #ifndef __USE_FILE_OFFSET64
      __off_t st_size;			/* Size of file, in bytes.  */
***************
*** 81,85 ****
--- 85,91 ----
      __gid_t st_gid;			/* Group ID of the file's group.*/
      __dev_t st_rdev;			/* Device number, if device.  */
+ #if __WORDSIZE == 32
      unsigned short int __pad2;
+ #endif
      __off64_t st_size;			/* Size of file, in bytes.  */
      __blksize_t st_blksize;		/* Optimal block size for I/O.  */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/time.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/time.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/time.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/time.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,81 ----
+ /* System-dependent timing definitions.  Linux version.
+    Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ /*
+  * Never include this file directly; use <time.h> instead.
+  */
+ 
+ #include <bits/wordsize.h>
+ 
+ #ifndef __need_timeval
+ # ifndef _BITS_TIME_H
+ #  define _BITS_TIME_H	1
+ 
+ /* ISO/IEC 9899:1990 7.12.1: <time.h>
+    The macro `CLOCKS_PER_SEC' is the number per second of the value
+    returned by the `clock' function. */
+ /* CAE XSH, Issue 4, Version 2: <time.h>
+    The value of CLOCKS_PER_SEC is required to be 1 million on all
+    XSI-conformant systems. */
+ #  define CLOCKS_PER_SEC  1000000l
+ 
+ #  if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
+ /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
+    presents the real value for clock ticks per second for the system.  */
+ #   include <bits/types.h>
+ extern long int __sysconf (int);
+ #   define CLK_TCK ((__clock_t) __sysconf (2))	/* 2 is _SC_CLK_TCK */
+ #  endif
+ 
+ #  ifdef __USE_POSIX199309
+ /* Identifier for system-wide realtime clock.  */
+ #   define CLOCK_REALTIME	0
+ 
+ /* Flag to indicate time is absolute.  */
+ #   define TIMER_ABSTIME	1
+ #  endif
+ 
+ # endif	/* bits/time.h */
+ #endif
+ 
+ #ifdef __need_timeval
+ # undef __need_timeval
+ # ifndef _STRUCT_TIMEVAL
+ #  define _STRUCT_TIMEVAL	1
+ #  include <bits/types.h>
+ 
+ /* A time value that is accurate to the nearest
+    microsecond but also has a range of years.  */
+ struct timeval
+   {
+     __time_t tv_sec;		/* Seconds.  */
+     __suseconds_t tv_usec;	/* Microseconds.  */
+   };
+ 
+ /* need this for combined 32/64-bit systems. This allows 
+    struct utmp to be the same size in both. */
+ #if __WORDSIZE == 64
+ struct timeval32
+   {
+     __time32_t tv_sec;		/* Seconds.  */
+     __suseconds32_t tv_usec;	/* Microseconds.  */
+   };
+ #endif
+ # endif	/* struct timeval */
+ #endif	/* need timeval */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/types.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/types.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/types.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/types.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,176 ----
+ /* Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ /*
+  * Never include this file directly; use <sys/types.h> instead.
+  */
+ 
+ #ifndef	_BITS_TYPES_H
+ #define	_BITS_TYPES_H	1
+ 
+ #include <features.h>
+ 
+ #define __need_size_t
+ #include <stddef.h>
+ #include <bits/wordsize.h>
+ 
+ /* Convenience types.  */
+ typedef unsigned char __u_char;
+ typedef unsigned short __u_short;
+ typedef unsigned int __u_int;
+ typedef unsigned long int __u_long;
+ #if __WORDSIZE == 64
+ typedef unsigned long int __u_quad_t;
+ typedef long int __quad_t;
+ #else
+ # ifdef __GLIBC_HAVE_LONG_LONG
+ __extension__ typedef signed long long int __quad_t;
+ __extension__ typedef unsigned long long int __u_quad_t;
+ # else
+ typedef struct
+   {
+     long int __val[2];
+   } __quad_t;
+ typedef struct
+   {
+     __u_long __val[2];
+   } __u_quad_t;
+ # endif
+ #endif
+ typedef signed char __int8_t;
+ typedef unsigned char __uint8_t;
+ typedef signed short int __int16_t;
+ typedef unsigned short int __uint16_t;
+ typedef signed int __int32_t;
+ typedef unsigned int __uint32_t;
+ #if __WORDSIZE == 64
+ typedef signed long int __int64_t;
+ typedef unsigned long int __uint64_t;
+ #else
+ # ifdef __GLIBC_HAVE_LONG_LONG
+ __extension__ typedef signed long long int __int64_t;
+ __extension__ typedef unsigned long long int __uint64_t;
+ # endif
+ #endif
+ typedef __quad_t *__qaddr_t;
+ 
+ typedef __u_quad_t __dev_t;		/* Type of device numbers.  */
+ typedef __u_int __uid_t;		/* Type of user identifications.  */
+ typedef __u_int __gid_t;		/* Type of group identifications.  */
+ typedef __u_long __ino_t;		/* Type of file serial numbers.  */
+ typedef __u_quad_t __ino64_t;	/* Type of file serial numbers.  */
+ typedef __u_int __mode_t;		/* Type of file attribute bitmasks.  */
+ #if __WORDSIZE == 64
+ typedef __u_long __nlink_t; 	/* Type of file link counts.  */
+ #else
+ typedef __u_int __nlink_t; 		/* Type of file link counts.  */
+ #endif
+ typedef long int __off_t;		/* Type of file sizes and offsets.  */
+ typedef __quad_t __loff_t;		/* Type of file sizes and offsets.  */
+ typedef int __pid_t;			/* Type of process identifications.  */
+ #if __WORDSIZE == 64
+ typedef long int __ssize_t;		/* Type of a byte count, or error.  */
+ #else
+ typedef int __ssize_t;			/* Type of a byte count, or error.  */
+ #endif
+ typedef __u_long __rlim_t;		/* Type of resource counts.  */
+ typedef __u_quad_t __rlim64_t;		/* Type of resource counts (LFS).  */
+ typedef __u_int __id_t;			/* General type for ID.  */
+ 
+ typedef struct
+   {
+     int __val[2];
+   } __fsid_t;				/* Type of file system IDs.  */
+ 
+ /* Everythin' else.  */
+ typedef int __daddr_t;			/* The type of a disk address.  */
+ typedef char *__caddr_t;
+ typedef long int __time_t;
+ typedef unsigned int __useconds_t;
+ typedef long int __suseconds_t;
+ typedef long int __swblk_t;		/* Type of a swap block maybe?  */
+ 
+ #if __WORDSIZE == 64
+ typedef __int32_t __time32_t;
+ typedef __int32_t __suseconds32_t;
+ #endif
+ 
+ typedef long int __clock_t;
+ 
+ /* Clock ID used in clock and timer functions.  */
+ typedef int __clockid_t;
+ 
+ /* Timer ID returned by `timer_create'.  */
+ typedef int __timer_t;
+ 
+ /* Number of descriptors that can fit in an `fd_set'.  */
+ #define __FD_SETSIZE	1024
+ 
+ 
+ typedef int __key_t;
+ 
+ /* Used in `struct shmid_ds'.  */
+ #if __WORDSIZE == 64
+ typedef int __ipc_pid_t;
+ #else
+ typedef unsigned short int __ipc_pid_t;
+ #endif
+ 
+ 
+ /* Type to represent block size.  */
+ typedef long int __blksize_t;
+ 
+ /* Types from the Large File Support interface.  */
+ 
+ /* Type to count number os disk blocks.  */
+ typedef long int __blkcnt_t;
+ typedef __quad_t __blkcnt64_t;
+ 
+ /* Type to count file system blocks.  */
+ typedef __u_long __fsblkcnt_t;
+ typedef __u_quad_t __fsblkcnt64_t;
+ 
+ /* Type to count file system inodes.  */
+ typedef __u_long __fsfilcnt_t;
+ typedef __u_quad_t __fsfilcnt64_t;
+ 
+ /* Type of file sizes and offsets.  */
+ typedef __loff_t __off64_t;
+ 
+ 
+ /* Used in XTI.  */
+ typedef long int __t_scalar_t;
+ typedef unsigned long int __t_uscalar_t;
+ 
+ /* Duplicates info from stdint.h but this is used in unistd.h.  */
+ #if __WORDSIZE == 64
+ typedef long int __intptr_t;
+ #else
+ typedef int __intptr_t;
+ #endif
+ 
+ /* Duplicate info from sys/socket.h.  */
+ typedef unsigned int __socklen_t;
+ 
+ 
+ /* Now add the thread types.  */
+ #if defined __USE_POSIX199506 || defined __USE_UNIX98
+ # include <bits/pthreadtypes.h>
+ #endif
+ 
+ #endif /* bits/types.h */
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/utmp.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/utmp.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/utmp.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/utmp.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,115 ----
+ /* The `struct utmp' type, describing entries in the utmp file.  GNU version.
+    Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef _UTMP_H
+ # error "Never include <bits/utmp.h> directly; use <utmp.h> instead."
+ #endif
+ 
+ #include <paths.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ 
+ 
+ #define UT_LINESIZE	32
+ #define UT_NAMESIZE	32
+ #define UT_HOSTSIZE	256
+ 
+ 
+ /* The structure describing an entry in the database of
+    previous logins.  */
+ struct lastlog
+   {
+     __time_t ll_time;
+     char ll_line[UT_LINESIZE];
+     char ll_host[UT_HOSTSIZE];
+   };
+ 
+ 
+ /* The structure describing the status of a terminated process.  This
+    type is used in `struct utmp' below.  */
+ struct exit_status
+   {
+     short int e_termination;	/* Process termination status.  */
+     short int e_exit;		/* Process exit status.  */
+   };
+ 
+ 
+ /* The structure describing an entry in the user accounting database.  */
+ struct utmp
+ {
+   short int ut_type;		/* Type of login.  */
+   pid_t ut_pid;			/* Process ID of login process.  */
+   char ut_line[UT_LINESIZE];	/* Devicename.  */
+   char ut_id[4];		/* Inittab ID.  */
+   char ut_user[UT_NAMESIZE];	/* Username.  */
+   char ut_host[UT_HOSTSIZE];	/* Hostname for remote login.  */
+   struct exit_status ut_exit;	/* Exit status of a process marked
+ 				   as DEAD_PROCESS.  */
+ 
+ /* need this for combined 32/64-bit systems so that files 
+    shared between 32/64bit are the same size */
+ #if __WORDSIZE == 64
+   int ut_session;		/* Session ID, used for windowing.  */
+   struct timeval32 ut_tv;		/* Time entry was made.  */
+ #else
+   long int ut_session;		/* Session ID, used for windowing.  */
+   struct timeval ut_tv;		/* Time entry was made.  */
+ #endif
+ 
+   int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+   char __unused[20];		/* Reserved for future use.  */
+ };
+ 
+ /* Backwards compatibility hacks.  */
+ #define ut_name		ut_user
+ #ifndef _NO_UT_TIME
+ /* We have a problem here: `ut_time' is also used otherwise.  Define
+    _NO_UT_TIME if the compiler complains.  */
+ # define ut_time	ut_tv.tv_sec
+ #endif
+ #define ut_xtime	ut_tv.tv_sec
+ #define ut_addr		ut_addr_v6[0]
+ 
+ 
+ /* Values for the `ut_type' field of a `struct utmp'.  */
+ #define EMPTY		0	/* No valid user accounting information.  */
+ 
+ #define RUN_LVL		1	/* The system's runlevel.  */
+ #define BOOT_TIME	2	/* Time of system boot.  */
+ #define NEW_TIME	3	/* Time after system clock changed.  */
+ #define OLD_TIME	4	/* Time when system clock changed.  */
+ 
+ #define INIT_PROCESS	5	/* Process spawned by the init process.  */
+ #define LOGIN_PROCESS	6	/* Session leader of a logged in user.  */
+ #define USER_PROCESS	7	/* Normal process.  */
+ #define DEAD_PROCESS	8	/* Terminated process.  */
+ 
+ #define ACCOUNTING	9
+ 
+ /* Old Linux name for the EMPTY type.  */
+ #define UT_UNKNOWN	EMPTY
+ 
+ 
+ /* Tell the user that we have a modern system with UT_HOST, UT_PID,
+    UT_TYPE, UT_ID and UT_TV fields.  */
+ #define _HAVE_UT_TYPE	1
+ #define _HAVE_UT_PID	1
+ #define _HAVE_UT_ID	1
+ #define _HAVE_UT_TV	1
+ #define _HAVE_UT_HOST	1
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h libc23/sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,97 ----
+ /* Structures and definitions for the user accounting database.  GNU version.
+    Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #ifndef _UTMPX_H
+ # error "Never include <bits/utmpx.h> directly; use <utmpx.h> instead."
+ #endif
+ 
+ #include <bits/types.h>
+ #include <sys/time.h>
+ 
+ 
+ #ifdef __USE_GNU
+ # include <paths.h>
+ # define _PATH_UTMPX	_PATH_UTMP
+ # define _PATH_WTMPX	_PATH_WTMP
+ #endif
+ 
+ 
+ #define __UT_LINESIZE	32
+ #define __UT_NAMESIZE	32
+ #define __UT_HOSTSIZE	256
+ 
+ 
+ /* The structure describing the status of a terminated process.  This
+    type is used in `struct utmpx' below.  */
+ struct __exit_status
+   {
+ #ifdef __USE_GNU
+     short int e_termination;	/* Process termination status.  */
+     short int e_exit;		/* Process exit status.  */
+ #else
+     short int __e_termination;	/* Process termination status.  */
+     short int __e_exit;		/* Process exit status.  */
+ #endif
+   };
+ 
+ 
+ /* The structure describing an entry in the user accounting database.  */
+ struct utmpx
+ {
+   short int ut_type;		/* Type of login.  */
+   __pid_t ut_pid;		/* Process ID of login process.  */
+   char ut_line[__UT_LINESIZE];	/* Devicename.  */
+   char ut_id[4];		/* Inittab ID. */
+   char ut_user[__UT_NAMESIZE];	/* Username.  */
+   char ut_host[__UT_HOSTSIZE];	/* Hostname for remote login.  */
+   struct __exit_status ut_exit;	/* Exit status of a process marked
+ 				   as DEAD_PROCESS.  */
+ 
+ /* need this for combined 32/64-bit systems so that files 
+    shared between 32/64bit are the same size */
+ #if __WORDSIZE == 64
+   int ut_session;		/* Session ID, used for windowing.  */
+   struct timeval32 ut_tv;		/* Time entry was made.  */
+ #else
+   long int ut_session;		/* Session ID, used for windowing.  */
+   struct timeval ut_tv;		/* Time entry was made.  */
+ #endif
+   __int32_t ut_addr_v6[4];	/* Internet address of remote host.  */
+   char __unused[20];		/* Reserved for future use.  */
+ };
+ 
+ 
+ /* Values for the `ut_type' field of a `struct utmpx'.  */
+ #define EMPTY		0	/* No valid user accounting information.  */
+ 
+ #ifdef __USE_GNU
+ # define RUN_LVL	1	/* The system's runlevel.  */
+ #endif
+ #define BOOT_TIME	2	/* Time of system boot.  */
+ #define NEW_TIME	3	/* Time after system clock changed.  */
+ #define OLD_TIME	4	/* Time when system clock changed.  */
+ 
+ #define INIT_PROCESS	5	/* Process spawned by the init process.  */
+ #define LOGIN_PROCESS	6	/* Session leader of a logged in user.  */
+ #define USER_PROCESS	7	/* Normal process.  */
+ #define DEAD_PROCESS	8	/* Terminated process.  */
+ 
+ #ifdef __USE_GNU
+ # define ACCOUNTING	9	/* System accounting.  */
+ #endif
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c libc23/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c	Thu Jul  5 23:56:19 2001
--- libc23/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c	Thu Aug 15 16:54:50 2002
***************
*** 21,24 ****
--- 21,47 ----
  #include "config.h"
  #include "kernel-features.h"
+ #include <ldsodefs.h>
+ 
+ extern int __cache_line_size;
+ weak_extern (__cache_line_size)
+ 
+ #define DL_PLATFORM_INIT __aux_init_cache(_dl_auxv)
+ 
+ /* set __cache_line_size with d-cache line size from the aux vector */
+ static inline void
+ __aux_init_cache (ElfW(auxv_t) *av)
+ {
+   for (; av->a_type != AT_NULL; ++av)
+     switch (av->a_type)
+       {
+       case AT_DCACHEBSIZE:
+       	{
+ 			int *cls = & __cache_line_size;
+ 			if (cls != NULL)
+     			*cls = av->a_un.a_val;
+ 		}
+ 		break;
+       }
+ }
  
  #ifndef __ASSUME_STD_AUXV
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/lchown.S libc23/sysdeps/unix/sysv/linux/powerpc/lchown.S
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/lchown.S	Thu Jul  5 23:56:19 2001
--- libc23/sysdeps/unix/sysv/linux/powerpc/lchown.S	Thu Aug 15 16:54:50 2002
***************
*** 31,35 ****
  	PSEUDO_END(__lchown)
  	weak_alias (__lchown, lchown)
! #if defined PIC && defined DO_VERSIONING
  	symbol_version (__lchown, chown, GLIBC_2.0);
  #endif
--- 31,35 ----
  	PSEUDO_END(__lchown)
  	weak_alias (__lchown, lchown)
! #if defined PIC && defined DO_VERSIONING && !defined __PPC64__
  	symbol_version (__lchown, chown, GLIBC_2.0);
  #endif
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/ldconfig.h libc23/sysdeps/unix/sysv/linux/powerpc/ldconfig.h
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/ldconfig.h	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/ldconfig.h	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,26 ----
+ /* Copyright (C) 2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ #include <sysdeps/generic/ldconfig.h>
+ 
+ #define SYSDEP_KNOWN_INTERPRETER_NAMES \
+   { "/lib/ld.so.1", FLAG_ELF_LIBC6 },	\
+   { "/lib64/ld64.so.1", FLAG_ELF_LIBC6 },
+ #define SYSDEP_KNOWN_LIBRARY_NAMES \
+   { "libc.so.6", FLAG_ELF_LIBC6 },	\
+   { "libm.so.6", FLAG_ELF_LIBC6 },
diff -rc2PN -x *.orig libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/readelflib.c libc23/sysdeps/unix/sysv/linux/powerpc/readelflib.c
*** libc23-cvstip-20020815/sysdeps/unix/sysv/linux/powerpc/readelflib.c	Wed Dec 31 18:00:00 1969
--- libc23/sysdeps/unix/sysv/linux/powerpc/readelflib.c	Thu Aug 15 16:54:50 2002
***************
*** 0 ****
--- 1,60 ----
+ /* Copyright (C) 2001 Free Software Foundation, Inc.
+    This file is part of the GNU C Library.
+ 
+    The GNU C Library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+ 
+    The GNU C Library 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
+    Lesser General Public License for more details.
+ 
+    You should have received a copy of the GNU Lesser General Public
+    License along with the GNU C Library; if not, write to the Free
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+    02111-1307 USA.  */
+ 
+ 
+ int process_elf32_file (const char *file_name, const char *lib, int *flag,
+ 			unsigned int *osversion, char **soname,
+ 			void *file_contents, size_t file_length);
+ int process_elf64_file (const char *file_name, const char *lib, int *flag,
+ 			unsigned int *osversion, char **soname,
+ 			void *file_contents, size_t file_length);
+ 
+ /* Returns 0 if everything is ok, != 0 in case of error.  */
+ int
+ process_elf_file (const char *file_name, const char *lib, int *flag,
+ 		  unsigned int *osversion, char **soname, void *file_contents,
+ 		  size_t file_length)
+ {
+   ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
+   int ret;
+ 
+   if (elf_header->e_ident [EI_CLASS] == ELFCLASS32)
+     return process_elf32_file (file_name, lib, flag, osversion, soname,
+ 			       file_contents, file_length);
+   else
+     {
+       ret = process_elf64_file (file_name, lib, flag, osversion, soname,
+ 				file_contents, file_length);
+       /* PowerPC 64bit libraries are always libc.so.6+.  */
+       if (!ret)
+ 	*flag = FLAG_POWERPC_LIB64|FLAG_ELF_LIBC6;
+       return ret;
+     }
+ }
+ 
+ #undef __ELF_NATIVE_CLASS
+ #undef process_elf_file
+ #define process_elf_file process_elf32_file
+ #define __ELF_NATIVE_CLASS 32
+ #include "sysdeps/generic/readelflib.c"
+ 
+ #undef __ELF_NATIVE_CLASS
+ #undef process_elf_file
+ #define process_elf_file process_elf64_file
+ #define __ELF_NATIVE_CLASS 64
+ #include "sysdeps/generic/readelflib.c"

<<<<<<<< ppc64-shareppc-20020815.patch


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