This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Convert libiberty to use ISO C prototype style 5/n


I would need additional eyes to double check this set, mainly because
it removes codes from obstack that are predicated on !defined(__STDC__):
those codes just assume the absence of ISO C prototype style.
The patch is fully bootstrapped and regtested on an i686-pc-linux-gnu.

Thanks,

-- Gaby
include/
2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* partition.h: Remove use of PARAMS.
	* obstack.h: Remove conditional prototypes __STDC__.
	* objalloc.h:  Remove use of PARAMS.
	* splay-tree.h: Likewise.

libiberty/
2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	Convert libiberty to use ISO C prototype style 5/n.
	* random.c (srandom, initstate, setstate, random): Use ISO C
	prototypes. 
	* putenv.c (putenv): Likewise.
	* physmem.c (physmem_available, physmem_total, main): Likewise.
	* pex-win32.c (fix_argv, pexecute, pwait): Likewise.
	* pex-unix.c (pexecute, pwait): Likewise.
	* pex-msdos.c (pexecute, pwait): Likewise.
	* pex-djgpp.c (pexecute, pwait): Likewise.
	* partition.c (partition_new, partition_delete, partition_union) 
	(elem_compare, partition_print): Likewise.
	* obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk, 
	_obstack_allocated_p, _obstack_free, obstack_free, 
	_obstack_memory_used, print_and_abort, obstack_next_free,
	obstack_object_size, obstack_base): Likewise.  Remove codes
	predicated on !defined(__STDC__).
	* objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free, 
	objalloc_free_block): Use ISO C prototypes.
	* mkstemps.c (mkstemps): Likewise.
	* memset.c (memset): Likewise.
	* mempcpy.c (mempcpy): Likewise.
	* rename.c (rename): Likewise.
	* rindex.c (rindex): Likewise.
	* setenv.c (setenv, unsetenv): Likewise.
	* sigsetmask.c (sigsetmask): Likewise.
	* snprintf.c (snprintf): Likewise.
	* sort.c (sort_pointers, xmalloc): Likewise. 
	* spaces.c (spaces): Likewise.
	* splay-tree.c (splay_tree_delete_helper, 
	splay_tree_splay_helper, splay_tree_splay, 
	splay_tree_foreach_helper, splay_tree_xmalloc_allocate,
	splay_tree_new, splay_tree_xmalloc_allocate, 
	splay_tree_new_with_allocator, splay_tree_delete,
	splay_tree_insert, splay_tree_remove, splay_tree_lookup, 
	splay_tree_max, splay_tree_min, splay_tree_predecessor, 
	splay_tree_successor, splay_tree_foreach, 
	splay_tree_compare_ints, splay_tree_compare_pointers): Likewise.
	* stpcpy.c (stpcpy): Likewise.
	* stpncpy.c (stpncpy): Likewise.
	* strcasecmp.c (strcasecmp): Likewise.
	* strchr.c (strchr): Likewise.
 	* strdup.c (strdup): Likewise.
 
Index: include/objalloc.h
===================================================================
RCS file: /cvs/gcc/gcc/include/objalloc.h,v
retrieving revision 1.3
diff -p -r1.3 objalloc.h
*** include/objalloc.h	18 Sep 2001 13:39:40 -0000	1.3
--- include/objalloc.h	27 Mar 2005 19:50:17 -0000
*************** struct objalloc_align { char x; double d
*** 64,75 ****
  
  /* Create an objalloc structure.  Returns NULL if malloc fails.  */
  
! extern struct objalloc *objalloc_create PARAMS ((void));
  
  /* Allocate space from an objalloc structure.  Returns NULL if malloc
     fails.  */
  
! extern PTR _objalloc_alloc PARAMS ((struct objalloc *, unsigned long));
  
  /* The macro version of objalloc_alloc.  We only define this if using
     gcc, because otherwise we would have to evaluate the arguments
--- 64,75 ----
  
  /* Create an objalloc structure.  Returns NULL if malloc fails.  */
  
! extern struct objalloc *objalloc_create (void);
  
  /* Allocate space from an objalloc structure.  Returns NULL if malloc
     fails.  */
  
! extern PTR _objalloc_alloc (struct objalloc *, unsigned long);
  
  /* The macro version of objalloc_alloc.  We only define this if using
     gcc, because otherwise we would have to evaluate the arguments
*************** extern PTR _objalloc_alloc PARAMS ((stru
*** 105,115 ****
  
  /* Free an entire objalloc structure.  */
  
! extern void objalloc_free PARAMS ((struct objalloc *));
  
  /* Free a block allocated by objalloc_alloc.  This also frees all more
     recently allocated blocks.  */
  
! extern void objalloc_free_block PARAMS ((struct objalloc *, PTR));
  
  #endif /* OBJALLOC_H */
--- 105,115 ----
  
  /* Free an entire objalloc structure.  */
  
! extern void objalloc_free (struct objalloc *);
  
  /* Free a block allocated by objalloc_alloc.  This also frees all more
     recently allocated blocks.  */
  
! extern void objalloc_free_block (struct objalloc *, PTR);
  
  #endif /* OBJALLOC_H */
Index: include/obstack.h
===================================================================
RCS file: /cvs/gcc/gcc/include/obstack.h,v
retrieving revision 1.7
diff -p -r1.7 obstack.h
*** include/obstack.h	13 Jul 2004 20:54:38 -0000	1.7
--- include/obstack.h	27 Mar 2005 19:50:17 -0000
***************
*** 1,6 ****
  /* obstack.h - object stack macros
     Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
!    1999, 2000
     Free Software Foundation, Inc.
  
  
--- 1,6 ----
  /* obstack.h - object stack macros
     Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
!    1999, 2000, 2001, 2002, 2003, 2004, 2005
     Free Software Foundation, Inc.
  
  
*************** extern "C" {
*** 145,155 ****
  
  #if defined _LIBC || defined HAVE_STRING_H
  # include <string.h>
! # if defined __STDC__ && __STDC__
! #  define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
! # else
! #  define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
! # endif
  #else
  # ifdef memcpy
  #  define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
--- 145,151 ----
  
  #if defined _LIBC || defined HAVE_STRING_H
  # include <string.h>
! # define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
  #else
  # ifdef memcpy
  #  define _obstack_memcpy(To, From, N) memcpy ((To), (char *)(From), (N))
*************** struct obstack		/* control current objec
*** 174,191 ****
    char	*chunk_limit;		/* address of char after current chunk */
    PTR_INT_TYPE temp;		/* Temporary for some macros.  */
    int   alignment_mask;		/* Mask of alignment for each object. */
- #if defined __STDC__ && __STDC__
    /* These prototypes vary based on `use_extra_arg', and we use
       casts to the prototypeless function type in all assignments,
       but having prototypes here quiets -Wstrict-prototypes.  */
    struct _obstack_chunk *(*chunkfun) (void *, long);
    void (*freefun) (void *, struct _obstack_chunk *);
    void *extra_arg;		/* first arg for chunk alloc/dealloc funcs */
- #else
-   struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk.  */
-   void (*freefun) ();		/* User's function to free a chunk.  */
-   char *extra_arg;		/* first arg for chunk alloc/dealloc funcs */
- #endif
    unsigned use_extra_arg:1;	/* chunk alloc/dealloc funcs take extra arg */
    unsigned maybe_empty_object:1;/* There is a possibility that the current
  				   chunk contains a zero-length object.  This
--- 170,181 ----
*************** struct obstack		/* control current objec
*** 198,204 ****
  
  /* Declare the external functions we use; they are in obstack.c.  */
  
- #if defined __STDC__ && __STDC__
  extern void _obstack_newchunk (struct obstack *, int);
  extern void _obstack_free (struct obstack *, void *);
  extern int _obstack_begin (struct obstack *, int, int,
--- 188,193 ----
*************** extern int _obstack_begin_1 (struct obst
*** 207,222 ****
  			     void *(*) (void *, long),
  			     void (*) (void *, void *), void *);
  extern int _obstack_memory_used (struct obstack *);
- #else
- extern void _obstack_newchunk ();
- extern void _obstack_free ();
- extern int _obstack_begin ();
- extern int _obstack_begin_1 ();
- extern int _obstack_memory_used ();
- #endif
  
- #if defined __STDC__ && __STDC__
- 
  /* Do the function-declarations after the structs
     but before defining the macros.  */
  
--- 196,202 ----
*************** int obstack_alignment_mask (struct obsta
*** 255,273 ****
  int obstack_chunk_size (struct obstack *obstack);
  int obstack_memory_used (struct obstack *obstack);
  
- #endif /* __STDC__ */
- 
- /* Non-ANSI C cannot really support alternative functions for these macros,
-    so we do not declare them.  */
- 
  /* Error handler called when `obstack_chunk_alloc' failed to allocate
     more memory.  This can be set to a user defined function.  The
     default action is to print a message and abort.  */
- #if defined __STDC__ && __STDC__
  extern void (*obstack_alloc_failed_handler) (void);
- #else
- extern void (*obstack_alloc_failed_handler) ();
- #endif
  
  /* Exit value used when `print_and_abort' is used.  */
  extern int obstack_exit_failure;
--- 235,244 ----
*************** extern int obstack_exit_failure;
*** 292,299 ****
  
  /* To prevent prototype warnings provide complete argument list in
     standard C version.  */
- #if defined __STDC__ && __STDC__
- 
  # define obstack_init(h) \
    _obstack_begin ((h), 0, 0, \
  		  (void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
--- 263,268 ----
*************** extern int obstack_exit_failure;
*** 317,348 ****
  # define obstack_freefun(h, newfreefun) \
    ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
  
- #else
- 
- # define obstack_init(h) \
-   _obstack_begin ((h), 0, 0, \
- 		  (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
- 
- # define obstack_begin(h, size) \
-   _obstack_begin ((h), (size), 0, \
- 		  (void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
- 
- # define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
-   _obstack_begin ((h), (size), (alignment), \
- 		    (void *(*) ()) (chunkfun), (void (*) ()) (freefun))
- 
- # define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
-   _obstack_begin_1 ((h), (size), (alignment), \
- 		    (void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
- 
- # define obstack_chunkfun(h, newchunkfun) \
-   ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
- 
- # define obstack_freefun(h, newfreefun) \
-   ((h) -> freefun = (void (*)()) (newfreefun))
- 
- #endif
- 
  #define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
  
  #define obstack_blank_fast(h,n) ((h)->next_free += (n))
--- 286,291 ----
*************** __extension__								\
*** 586,606 ****
    (h)->object_base = (h)->next_free,					\
    __INT_TO_PTR ((h)->temp))
  
! # if defined __STDC__ && __STDC__
! #  define obstack_free(h,obj)						\
  ( (h)->temp = (char *) (obj) - (char *) (h)->chunk,			\
    (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
     ? (int) ((h)->next_free = (h)->object_base				\
  	    = (h)->temp + (char *) (h)->chunk)				\
     : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
- # else
- #  define obstack_free(h,obj)						\
- ( (h)->temp = (char *) (obj) - (char *) (h)->chunk,			\
-   (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
-    ? (int) ((h)->next_free = (h)->object_base				\
- 	    = (h)->temp + (char *) (h)->chunk)				\
-    : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
- # endif
  
  #endif /* not __GNUC__ or not __STDC__ */
  
--- 529,540 ----
    (h)->object_base = (h)->next_free,					\
    __INT_TO_PTR ((h)->temp))
  
! # define obstack_free(h,obj)						\
  ( (h)->temp = (char *) (obj) - (char *) (h)->chunk,			\
    (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
     ? (int) ((h)->next_free = (h)->object_base				\
  	    = (h)->temp + (char *) (h)->chunk)				\
     : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
  
  #endif /* not __GNUC__ or not __STDC__ */
  
Index: include/partition.h
===================================================================
RCS file: /cvs/gcc/gcc/include/partition.h,v
retrieving revision 1.5
diff -p -r1.5 partition.h
*** include/partition.h	27 Oct 2002 01:00:34 -0000	1.5
--- include/partition.h	27 Mar 2005 19:50:17 -0000
*************** typedef struct partition_def 
*** 64,76 ****
    struct partition_elem elements[1];
  } *partition;
  
! extern partition partition_new          PARAMS((int));
! extern void partition_delete            PARAMS((partition));
! extern int partition_union              PARAMS((partition,
! 						int,
! 						int));
! extern void partition_print             PARAMS((partition,
! 						FILE*));
  
  /* Returns the canonical element corresponding to the class containing
     ELEMENT__ in PARTITION__.  */
--- 64,73 ----
    struct partition_elem elements[1];
  } *partition;
  
! extern partition partition_new (int);
! extern void partition_delete (partition);
! extern int partition_union (partition, int, int);
! extern void partition_print (partition,	FILE*);
  
  /* Returns the canonical element corresponding to the class containing
     ELEMENT__ in PARTITION__.  */
Index: include/splay-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/include/splay-tree.h,v
retrieving revision 1.19
diff -p -r1.19 splay-tree.h
*** include/splay-tree.h	30 Mar 2004 19:23:16 -0000	1.19
--- include/splay-tree.h	27 Mar 2005 19:50:17 -0000
*************** typedef struct splay_tree_node_s *splay_
*** 52,81 ****
  
  /* The type of a function which compares two splay-tree keys.  The
     function should return values as for qsort.  */
! typedef int (*splay_tree_compare_fn) PARAMS((splay_tree_key, splay_tree_key));
  
  /* The type of a function used to deallocate any resources associated
     with the key.  */
! typedef void (*splay_tree_delete_key_fn) PARAMS((splay_tree_key));
  
  /* The type of a function used to deallocate any resources associated
     with the value.  */
! typedef void (*splay_tree_delete_value_fn) PARAMS((splay_tree_value));
  
  /* The type of a function used to iterate over the tree.  */
! typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
  
  /* The type of a function used to allocate memory for tree root and
     node structures.  The first argument is the number of bytes needed;
     the second is a data pointer the splay tree functions pass through
     to the allocator.  This function must never return zero.  */
! typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
  
  /* The type of a function used to free memory allocated using the
     corresponding splay_tree_allocate_fn.  The first argument is the
     memory to be freed; the latter is a data pointer the splay tree
     functions pass through to the freer.  */
! typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
  
  /* The nodes in the splay tree.  */
  struct splay_tree_node_s GTY(())
--- 52,81 ----
  
  /* The type of a function which compares two splay-tree keys.  The
     function should return values as for qsort.  */
! typedef int (*splay_tree_compare_fn) (splay_tree_key, splay_tree_key);
  
  /* The type of a function used to deallocate any resources associated
     with the key.  */
! typedef void (*splay_tree_delete_key_fn) (splay_tree_key);
  
  /* The type of a function used to deallocate any resources associated
     with the value.  */
! typedef void (*splay_tree_delete_value_fn) (splay_tree_value);
  
  /* The type of a function used to iterate over the tree.  */
! typedef int (*splay_tree_foreach_fn) (splay_tree_node, void*);
  
  /* The type of a function used to allocate memory for tree root and
     node structures.  The first argument is the number of bytes needed;
     the second is a data pointer the splay tree functions pass through
     to the allocator.  This function must never return zero.  */
! typedef PTR (*splay_tree_allocate_fn) (int, void *);
  
  /* The type of a function used to free memory allocated using the
     corresponding splay_tree_allocate_fn.  The first argument is the
     memory to be freed; the latter is a data pointer the splay tree
     functions pass through to the freer.  */
! typedef void (*splay_tree_deallocate_fn) (void *, void *);
  
  /* The nodes in the splay tree.  */
  struct splay_tree_node_s GTY(())
*************** struct splay_tree_s GTY(())
*** 114,156 ****
  };
  typedef struct splay_tree_s *splay_tree;
  
! extern splay_tree splay_tree_new        PARAMS((splay_tree_compare_fn,
! 					        splay_tree_delete_key_fn,
! 					        splay_tree_delete_value_fn));
! extern splay_tree splay_tree_new_with_allocator
!                                         PARAMS((splay_tree_compare_fn,
! 					        splay_tree_delete_key_fn,
  					        splay_tree_delete_value_fn,
!                                                 splay_tree_allocate_fn,
!                                                 splay_tree_deallocate_fn,
!                                                 void *));
! extern void splay_tree_delete           PARAMS((splay_tree));
! extern splay_tree_node splay_tree_insert          
! 		                        PARAMS((splay_tree,
! 					        splay_tree_key,
! 					        splay_tree_value));
! extern void splay_tree_remove		PARAMS((splay_tree,
! 						splay_tree_key));
! extern splay_tree_node splay_tree_lookup   
!                                         PARAMS((splay_tree,
! 					        splay_tree_key));
! extern splay_tree_node splay_tree_predecessor
!                                         PARAMS((splay_tree,
! 						splay_tree_key));
! extern splay_tree_node splay_tree_successor
!                                         PARAMS((splay_tree,
! 						splay_tree_key));
! extern splay_tree_node splay_tree_max
!                                         PARAMS((splay_tree));
! extern splay_tree_node splay_tree_min
!                                         PARAMS((splay_tree));
! extern int splay_tree_foreach           PARAMS((splay_tree,
! 					        splay_tree_foreach_fn,
! 					        void*));
! extern int splay_tree_compare_ints      PARAMS((splay_tree_key,
! 						splay_tree_key));
! extern int splay_tree_compare_pointers  PARAMS((splay_tree_key,
! 						splay_tree_key));
  					       
  #ifdef __cplusplus
  }
--- 114,141 ----
  };
  typedef struct splay_tree_s *splay_tree;
  
! extern splay_tree splay_tree_new        (splay_tree_compare_fn,
!                                          splay_tree_delete_key_fn,
!                                          splay_tree_delete_value_fn);
! extern splay_tree splay_tree_new_with_allocator (splay_tree_compare_fn,
!                                                  splay_tree_delete_key_fn,
  					        splay_tree_delete_value_fn,
!                                                  splay_tree_allocate_fn,
!                                                  splay_tree_deallocate_fn,
!                                                  void *);
! extern void splay_tree_delete           (splay_tree);
! extern splay_tree_node splay_tree_insert (splay_tree,
!                                           splay_tree_key,
!                                           splay_tree_value);
! extern void splay_tree_remove	(splay_tree, splay_tree_key);
! extern splay_tree_node splay_tree_lookup (splay_tree, splay_tree_key);
! extern splay_tree_node splay_tree_predecessor (splay_tree, splay_tree_key);
! extern splay_tree_node splay_tree_successor (splay_tree, splay_tree_key);
! extern splay_tree_node splay_tree_max (splay_tree);
! extern splay_tree_node splay_tree_min (splay_tree);
! extern int splay_tree_foreach (splay_tree, splay_tree_foreach_fn, void*);
! extern int splay_tree_compare_ints (splay_tree_key, splay_tree_key);
! extern int splay_tree_compare_pointers (splay_tree_key,	splay_tree_key);
  					       
  #ifdef __cplusplus
  }
Index: libiberty/mempcpy.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/mempcpy.c,v
retrieving revision 1.1
diff -p -r1.1 mempcpy.c
*** libiberty/mempcpy.c	16 Apr 2003 02:56:46 -0000	1.1
--- libiberty/mempcpy.c	27 Mar 2005 19:50:21 -0000
***************
*** 1,5 ****
  /* Implement the mempcpy function.
!    Copyright (C) 2003 Free Software Foundation, Inc.
     Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
  
  This file is part of the libiberty library.
--- 1,5 ----
  /* Implement the mempcpy function.
!    Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
     Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
  
  This file is part of the libiberty library.
*************** Copies @var{length} bytes from memory re
*** 30,48 ****
  */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
! extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
  
  PTR
! mempcpy (dst, src, len)
!      PTR dst;
!      const PTR src;
!      size_t len;
  {
    return (char *) memcpy (dst, src, len) + len;
  }
--- 30,41 ----
  */
  
  #include <ansidecl.h>
  #include <stddef.h>
  
! extern PTR memcpy (PTR, const PTR, size_t);
  
  PTR
! mempcpy (PTR dst, const PTR src, size_t len)
  {
    return (char *) memcpy (dst, src, len) + len;
  }
Index: libiberty/memset.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/memset.c,v
retrieving revision 1.4
diff -p -r1.4 memset.c
*** libiberty/memset.c	15 Apr 2003 03:35:47 -0000	1.4
--- libiberty/memset.c	27 Mar 2005 19:50:21 -0000
*************** Sets the first @var{count} bytes of @var
*** 13,29 ****
  */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
  PTR
! memset (dest, val, len)
!      PTR dest;
!      register int val;
!      register size_t len;
  {
    register unsigned char *ptr = (unsigned char*)dest;
    while (len-- > 0)
--- 13,22 ----
  */
  
  #include <ansidecl.h>
  #include <stddef.h>
  
  PTR
! memset (PTR dest, register int val, register size_t len)
  {
    register unsigned char *ptr = (unsigned char*)dest;
    while (len-- > 0)
Index: libiberty/mkstemps.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/mkstemps.c,v
retrieving revision 1.8
diff -p -r1.8 mkstemps.c
*** libiberty/mkstemps.c	29 Apr 2004 15:28:42 -0000	1.8
--- libiberty/mkstemps.c	27 Mar 2005 19:50:22 -0000
*************** reading and writing.
*** 71,79 ****
  */
  
  int
! mkstemps (template, suffix_len)
!      char *template;
!      int suffix_len;
  {
    static const char letters[]
      = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
--- 71,77 ----
  */
  
  int
! mkstemps (char *template, int suffix_len)
  {
    static const char letters[]
      = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Index: libiberty/objalloc.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/objalloc.c,v
retrieving revision 1.6
diff -p -r1.6 objalloc.c
*** libiberty/objalloc.c	20 Nov 2004 02:44:34 -0000	1.6
--- libiberty/objalloc.c	27 Mar 2005 19:50:22 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 39,46 ****
  #include <stdlib.h>
  #else
  /* For systems with larger pointers than ints, this must be declared.  */
! extern PTR malloc PARAMS ((size_t));
! extern void free PARAMS ((PTR));
  #endif
  
  #endif
--- 39,46 ----
  #include <stdlib.h>
  #else
  /* For systems with larger pointers than ints, this must be declared.  */
! extern PTR malloc (size_t);
! extern void free (PTR);
  #endif
  
  #endif
*************** struct objalloc_chunk
*** 85,91 ****
  /* Create an objalloc structure.  */
  
  struct objalloc *
! objalloc_create ()
  {
    struct objalloc *ret;
    struct objalloc_chunk *chunk;
--- 85,91 ----
  /* Create an objalloc structure.  */
  
  struct objalloc *
! objalloc_create (void)
  {
    struct objalloc *ret;
    struct objalloc_chunk *chunk;
*************** objalloc_create ()
*** 114,122 ****
  /* Allocate space from an objalloc structure.  */
  
  PTR
! _objalloc_alloc (o, len)
!      struct objalloc *o;
!      unsigned long len;
  {
    /* We avoid confusion from zero sized objects by always allocating
       at least 1 byte.  */
--- 114,120 ----
  /* Allocate space from an objalloc structure.  */
  
  PTR
! _objalloc_alloc (struct objalloc *o, unsigned long len)
  {
    /* We avoid confusion from zero sized objects by always allocating
       at least 1 byte.  */
*************** _objalloc_alloc (o, len)
*** 171,178 ****
  /* Free an entire objalloc structure.  */
  
  void
! objalloc_free (o)
!      struct objalloc *o;
  {
    struct objalloc_chunk *l;
  
--- 169,175 ----
  /* Free an entire objalloc structure.  */
  
  void
! objalloc_free (struct objalloc *o)
  {
    struct objalloc_chunk *l;
  
*************** objalloc_free (o)
*** 193,201 ****
     recently allocated blocks.  */
  
  void
! objalloc_free_block (o, block)
!      struct objalloc *o;
!      PTR block;
  {
    struct objalloc_chunk *p, *small;
    char *b = (char *) block;
--- 190,196 ----
     recently allocated blocks.  */
  
  void
! objalloc_free_block (struct objalloc *o, PTR block)
  {
    struct objalloc_chunk *p, *small;
    char *b = (char *) block;
Index: libiberty/obstack.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/obstack.c,v
retrieving revision 1.5
diff -p -r1.5 obstack.c
*** libiberty/obstack.c	13 Nov 2001 03:46:00 -0000	1.5
--- libiberty/obstack.c	27 Mar 2005 19:50:22 -0000
***************
*** 52,62 ****
  #ifndef ELIDE_CODE
  
  
- #if defined (__STDC__) && __STDC__
  #define POINTER void *
- #else
- #define POINTER char *
- #endif
  
  /* Determine default alignment.  */
  struct fooalign {char x; double d;};
--- 52,58 ----
*************** union fooround {long x; double d;};
*** 81,93 ****
     jump to the handler pointed to by `obstack_alloc_failed_handler'.
     This variable by default points to the internal function
     `print_and_abort'.  */
- #if defined (__STDC__) && __STDC__
  static void print_and_abort (void);
  void (*obstack_alloc_failed_handler) (void) = print_and_abort;
- #else
- static void print_and_abort ();
- void (*obstack_alloc_failed_handler) () = print_and_abort;
- #endif
  
  /* Exit value used when `print_and_abort' is used.  */
  #if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
--- 77,84 ----
*************** struct obstack *_obstack;
*** 148,164 ****
     free up some memory, then call this again.  */
  
  int
! _obstack_begin (h, size, alignment, chunkfun, freefun)
!      struct obstack *h;
!      int size;
!      int alignment;
! #if defined (__STDC__) && __STDC__
!      POINTER (*chunkfun) (long);
!      void (*freefun) (void *);
! #else
!      POINTER (*chunkfun) ();
!      void (*freefun) ();
! #endif
  {
    register struct _obstack_chunk *chunk; /* points to new chunk */
  
--- 139,146 ----
     free up some memory, then call this again.  */
  
  int
! _obstack_begin (struct obstack *h, int size, int alignment,
!                 POINTER (*chunkfun) (long), void (*freefun) (void *))
  {
    register struct _obstack_chunk *chunk; /* points to new chunk */
  
*************** _obstack_begin (h, size, alignment, chun
*** 181,193 ****
        size = 4096 - extra;
      }
  
- #if defined (__STDC__) && __STDC__
    h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
    h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- #else
-   h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
-   h->freefun = freefun;
- #endif
    h->chunk_size = size;
    h->alignment_mask = alignment - 1;
    h->use_extra_arg = 0;
--- 163,170 ----
*************** _obstack_begin (h, size, alignment, chun
*** 206,223 ****
  }
  
  int
! _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
!      struct obstack *h;
!      int size;
!      int alignment;
! #if defined (__STDC__) && __STDC__
!      POINTER (*chunkfun) (POINTER, long);
!      void (*freefun) (POINTER, POINTER);
! #else
!      POINTER (*chunkfun) ();
!      void (*freefun) ();
! #endif
!      POINTER arg;
  {
    register struct _obstack_chunk *chunk; /* points to new chunk */
  
--- 183,191 ----
  }
  
  int
! _obstack_begin_1 (struct obstack *h, int size, int alignment,
!                   POINTER (*chunkfun) (POINTER, long),
!                   void (*freefun) (POINTER, POINTER), POINTER arg)
  {
    register struct _obstack_chunk *chunk; /* points to new chunk */
  
*************** _obstack_begin_1 (h, size, alignment, ch
*** 240,252 ****
        size = 4096 - extra;
      }
  
- #if defined(__STDC__) && __STDC__
    h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
    h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
- #else
-   h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
-   h->freefun = freefun;
- #endif
    h->chunk_size = size;
    h->alignment_mask = alignment - 1;
    h->extra_arg = arg;
--- 208,215 ----
*************** _obstack_begin_1 (h, size, alignment, ch
*** 272,280 ****
     to the beginning of the new one.  */
  
  void
! _obstack_newchunk (h, length)
!      struct obstack *h;
!      int length;
  {
    register struct _obstack_chunk *old_chunk = h->chunk;
    register struct _obstack_chunk *new_chunk;
--- 235,241 ----
     to the beginning of the new one.  */
  
  void
! _obstack_newchunk (struct obstack *h, int length)
  {
    register struct _obstack_chunk *old_chunk = h->chunk;
    register struct _obstack_chunk *new_chunk;
*************** _obstack_newchunk (h, length)
*** 335,350 ****
     This is here for debugging.
     If you use it in a program, you are probably losing.  */
  
- #if defined (__STDC__) && __STDC__
  /* Suppress -Wmissing-prototypes warning.  We don't want to declare this in
     obstack.h because it is just for debugging.  */
  int _obstack_allocated_p (struct obstack *h, POINTER obj);
- #endif
  
  int
! _obstack_allocated_p (h, obj)
!      struct obstack *h;
!      POINTER obj;
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
--- 296,307 ----
     This is here for debugging.
     If you use it in a program, you are probably losing.  */
  
  /* Suppress -Wmissing-prototypes warning.  We don't want to declare this in
     obstack.h because it is just for debugging.  */
  int _obstack_allocated_p (struct obstack *h, POINTER obj);
  
  int
! _obstack_allocated_p (struct obstack *h, POINTER obj)
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
*************** _obstack_allocated_p (h, obj)
*** 370,378 ****
     This is the first one, called from non-ANSI code.  */
  
  void
! _obstack_free (h, obj)
!      struct obstack *h;
!      POINTER obj;
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
--- 327,333 ----
     This is the first one, called from non-ANSI code.  */
  
  void
! _obstack_free (struct obstack *h, POINTER obj)
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
*************** _obstack_free (h, obj)
*** 404,412 ****
  /* This function is used from ANSI code.  */
  
  void
! obstack_free (h, obj)
!      struct obstack *h;
!      POINTER obj;
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
--- 359,365 ----
  /* This function is used from ANSI code.  */
  
  void
! obstack_free (struct obstack *h, POINTER obj)
  {
    register struct _obstack_chunk *lp;	/* below addr of any objects in this chunk */
    register struct _obstack_chunk *plp;	/* point to previous chunk if any */
*************** obstack_free (h, obj)
*** 436,443 ****
  }
  
  int
! _obstack_memory_used (h)
!      struct obstack *h;
  {
    register struct _obstack_chunk* lp;
    register int nbytes = 0;
--- 389,395 ----
  }
  
  int
! _obstack_memory_used (struct obstack *h)
  {
    register struct _obstack_chunk* lp;
    register int nbytes = 0;
*************** _obstack_memory_used (h)
*** 462,468 ****
  #endif
  
  static void
! print_and_abort ()
  {
    fputs (_("memory exhausted\n"), stderr);
    exit (obstack_exit_failure);
--- 414,420 ----
  #endif
  
  static void
! print_and_abort (void)
  {
    fputs (_("memory exhausted\n"), stderr);
    exit (obstack_exit_failure);
*************** print_and_abort ()
*** 475,593 ****
  /* Now define the functional versions of the obstack macros.
     Define them to simply use the corresponding macros to do the job.  */
  
- #if defined (__STDC__) && __STDC__
- /* These function definitions do not work with non-ANSI preprocessors;
-    they won't pass through the macro names in parentheses.  */
- 
  /* The function names appear in parentheses in order to prevent
     the macro-definitions of the names from being expanded there.  */
  
! POINTER (obstack_base) (obstack)
!      struct obstack *obstack;
  {
    return obstack_base (obstack);
  }
  
! POINTER (obstack_next_free) (obstack)
!      struct obstack *obstack;
  {
    return obstack_next_free (obstack);
  }
  
! int (obstack_object_size) (obstack)
!      struct obstack *obstack;
  {
    return obstack_object_size (obstack);
  }
  
! int (obstack_room) (obstack)
!      struct obstack *obstack;
  {
    return obstack_room (obstack);
  }
  
! int (obstack_make_room) (obstack, length)
!      struct obstack *obstack;
!      int length;
  {
    return obstack_make_room (obstack, length);
  }
  
! void (obstack_grow) (obstack, pointer, length)
!      struct obstack *obstack;
!      POINTER pointer;
!      int length;
  {
    obstack_grow (obstack, pointer, length);
  }
  
! void (obstack_grow0) (obstack, pointer, length)
!      struct obstack *obstack;
!      POINTER pointer;
!      int length;
  {
    obstack_grow0 (obstack, pointer, length);
  }
  
! void (obstack_1grow) (obstack, character)
!      struct obstack *obstack;
!      int character;
  {
    obstack_1grow (obstack, character);
  }
  
! void (obstack_blank) (obstack, length)
!      struct obstack *obstack;
!      int length;
  {
    obstack_blank (obstack, length);
  }
  
! void (obstack_1grow_fast) (obstack, character)
!      struct obstack *obstack;
!      int character;
  {
    obstack_1grow_fast (obstack, character);
  }
  
! void (obstack_blank_fast) (obstack, length)
!      struct obstack *obstack;
!      int length;
  {
    obstack_blank_fast (obstack, length);
  }
  
! POINTER (obstack_finish) (obstack)
!      struct obstack *obstack;
  {
    return obstack_finish (obstack);
  }
  
! POINTER (obstack_alloc) (obstack, length)
!      struct obstack *obstack;
!      int length;
  {
    return obstack_alloc (obstack, length);
  }
  
! POINTER (obstack_copy) (obstack, pointer, length)
!      struct obstack *obstack;
!      POINTER pointer;
!      int length;
  {
    return obstack_copy (obstack, pointer, length);
  }
  
! POINTER (obstack_copy0) (obstack, pointer, length)
!      struct obstack *obstack;
!      POINTER pointer;
!      int length;
  {
    return obstack_copy0 (obstack, pointer, length);
  }
  
- #endif /* __STDC__ */
- 
  #endif /* 0 */
  
  #endif	/* !ELIDE_CODE */
--- 427,510 ----
  /* Now define the functional versions of the obstack macros.
     Define them to simply use the corresponding macros to do the job.  */
  
  /* The function names appear in parentheses in order to prevent
     the macro-definitions of the names from being expanded there.  */
  
! POINTER (obstack_base) (struct obstack *obstack)
  {
    return obstack_base (obstack);
  }
  
! POINTER (obstack_next_free) (struct obstack *obstack)
  {
    return obstack_next_free (obstack);
  }
  
! int (obstack_object_size) (struct obstack *obstack)
  {
    return obstack_object_size (obstack);
  }
  
! int (obstack_room) (struct obstack *obstack)
  {
    return obstack_room (obstack);
  }
  
! int (obstack_make_room) (struct obstack *obstack, int length)
  {
    return obstack_make_room (obstack, length);
  }
  
! void (obstack_grow) (struct obstack *obstack, POINTER pointer, int length)
  {
    obstack_grow (obstack, pointer, length);
  }
  
! void (obstack_grow0) (struct obstack *obstack, POINTER pointer, int length)
  {
    obstack_grow0 (obstack, pointer, length);
  }
  
! void (obstack_1grow) (struct obstack *obstack, int character)
  {
    obstack_1grow (obstack, character);
  }
  
! void (obstack_blank) (struct obstack *obstack, int length)
  {
    obstack_blank (obstack, length);
  }
  
! void (obstack_1grow_fast) (struct obstack *obstack, int character)
  {
    obstack_1grow_fast (obstack, character);
  }
  
! void (obstack_blank_fast) (struct obstack *obstack, int length)
  {
    obstack_blank_fast (obstack, length);
  }
  
! POINTER (obstack_finish) (struct obstack *obstack)
  {
    return obstack_finish (obstack);
  }
  
! POINTER (obstack_alloc) (struct obstack *obstack, int length)
  {
    return obstack_alloc (obstack, length);
  }
  
! POINTER (obstack_copy) (struct obstack *obstack, POINTER pointer, int length)
  {
    return obstack_copy (obstack, pointer, length);
  }
  
! POINTER (obstack_copy0) (struct obstack *obstack, POINTER pointer, int length)
  {
    return obstack_copy0 (obstack, pointer, length);
  }
  
  #endif /* 0 */
  
  #endif	/* !ELIDE_CODE */
Index: libiberty/partition.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/partition.c,v
retrieving revision 1.5
diff -p -r1.5 partition.c
*** libiberty/partition.c	16 May 2001 20:44:03 -0000	1.5
--- libiberty/partition.c	27 Mar 2005 19:50:22 -0000
*************** static int elem_compare PARAMS ((const v
*** 40,47 ****
     element is in a class by itself.  */
  
  partition
! partition_new (num_elements)
!      int num_elements;
  {
    int e;
    
--- 40,46 ----
     element is in a class by itself.  */
  
  partition
! partition_new (int num_elements)
  {
    int e;
    
*************** partition_new (num_elements)
*** 62,69 ****
  /* Freeds a partition.  */
  
  void
! partition_delete (part)
!       partition part;
  {
    free (part);
  }
--- 61,67 ----
  /* Freeds a partition.  */
  
  void
! partition_delete (partition part)
  {
    free (part);
  }
*************** partition_delete (part)
*** 74,83 ****
     resulting union class.  */
  
  int
! partition_union (part, elem1, elem2)
!      partition part;
!      int elem1;
!      int elem2;
  {
    struct partition_elem *elements = part->elements;
    struct partition_elem *e1;
--- 72,78 ----
     resulting union class.  */
  
  int
! partition_union (partition part, int elem1, int elem2)
  {
    struct partition_elem *elements = part->elements;
    struct partition_elem *e1;
*************** partition_union (part, elem1, elem2)
*** 126,134 ****
     pointer to each.  Used to qsort such an array.  */
  
  static int 
! elem_compare (elem1, elem2)
!      const void *elem1;
!      const void *elem2;
  {
    int e1 = * (const int *) elem1;
    int e2 = * (const int *) elem2;
--- 121,127 ----
     pointer to each.  Used to qsort such an array.  */
  
  static int 
! elem_compare (const void *elem1, const void *elem2)
  {
    int e1 = * (const int *) elem1;
    int e2 = * (const int *) elem2;
*************** elem_compare (elem1, elem2)
*** 144,152 ****
     class are sorted.  */
  
  void
! partition_print (part, fp)
!      partition part;
!      FILE *fp;
  {
    char *done;
    int num_elements = part->num_elements;
--- 137,143 ----
     class are sorted.  */
  
  void
! partition_print (partition part, FILE *fp)
  {
    char *done;
    int num_elements = part->num_elements;
Index: libiberty/pex-djgpp.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/pex-djgpp.c,v
retrieving revision 1.1
diff -p -r1.1 pex-djgpp.c
*** libiberty/pex-djgpp.c	24 Jan 2003 20:02:11 -0000	1.1
--- libiberty/pex-djgpp.c	27 Mar 2005 19:50:22 -0000
*************** static int last_status = 0;
*** 49,61 ****
  static int last_reaped = 0;
  
  int
! pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
!      const char *program;
!      char * const *argv;
!      const char *this_pname;
!      const char *temp_base;
!      char **errmsg_fmt, **errmsg_arg;
!      int flags;
  {
    int rc;
  
--- 49,57 ----
  static int last_reaped = 0;
  
  int
! pexecute (const char *program, char * const *argv, const char *this_pname,
!           const char *temp_base, char **errmsg_fmt,
!           char **errmsg_arg, int flags)
  {
    int rc;
  
*************** pexecute (program, argv, this_pname, tem
*** 82,91 ****
  }
  
  int
! pwait (pid, status, flags)
!      int pid;
!      int *status;
!      int flags;
  {
    /* On MSDOS each pexecute must be followed by its associated pwait.  */
    if (pid != last_pid
--- 78,84 ----
  }
  
  int
! pwait (int pid, int *status, int flags)
  {
    /* On MSDOS each pexecute must be followed by its associated pwait.  */
    if (pid != last_pid
Index: libiberty/pex-msdos.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/pex-msdos.c,v
retrieving revision 1.1
diff -p -r1.1 pex-msdos.c
*** libiberty/pex-msdos.c	24 Jan 2003 20:02:11 -0000	1.1
--- libiberty/pex-msdos.c	27 Mar 2005 19:50:22 -0000
*************** static int last_status = 0;
*** 47,59 ****
  static int last_reaped = 0;
  
  int
! pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
!      const char *program;
!      char * const *argv;
!      const char *this_pname;
!      const char *temp_base;
!      char **errmsg_fmt, **errmsg_arg;
!      int flags;
  {
    int rc;
    char *scmd, *rf;
--- 47,55 ----
  static int last_reaped = 0;
  
  int
! pexecute (const char *program, char * const *argv, const char *this_pname,
!           const char *temp_base, char **errmsg_fmt, char **errmsg_arg,
!           int flags)
  {
    int rc;
    char *scmd, *rf;
*************** pexecute (program, argv, this_pname, tem
*** 126,135 ****
  #endif
  
  int
! pwait (pid, status, flags)
!      int pid;
!      int *status;
!      int flags;
  {
    /* On MSDOS each pexecute must be followed by its associated pwait.  */
    if (pid != last_pid
--- 122,128 ----
  #endif
  
  int
! pwait (int pid, int *status, int flags)
  {
    /* On MSDOS each pexecute must be followed by its associated pwait.  */
    if (pid != last_pid
Index: libiberty/pex-unix.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/pex-unix.c,v
retrieving revision 1.3
diff -p -r1.3 pex-unix.c
*** libiberty/pex-unix.c	30 Nov 2004 02:56:42 -0000	1.3
--- libiberty/pex-unix.c	27 Mar 2005 19:50:22 -0000
***************
*** 1,7 ****
  /* Utilities to execute a program in a subprocess (possibly linked by pipes
     with other subprocesses), and wait for it.  Generic Unix version
     (also used for UWIN and VMS).
!    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
     Free Software Foundation, Inc.
  
  This file is part of the libiberty library.
--- 1,7 ----
  /* Utilities to execute a program in a subprocess (possibly linked by pipes
     with other subprocesses), and wait for it.  Generic Unix version
     (also used for UWIN and VMS).
!    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
     Free Software Foundation, Inc.
  
  This file is part of the libiberty library.
*************** extern int errno;
*** 80,93 ****
     exactly once and is not an argument, or is marked volatile.  */
  
  int
! pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg,
! 	  flagsarg)
!      const char *program;
!      char * const *argv;
!      const char *this_pname;
!      const char *temp_base ATTRIBUTE_UNUSED;
!      char **errmsg_fmt, **errmsg_arg;
!      int flagsarg;
  {
    int pid;
    int pdes[2];
--- 80,88 ----
     exactly once and is not an argument, or is marked volatile.  */
  
  int
! pexecute (const char *program, char * const *argv, const char *this_pname,
!           const char *temp_base ATTRIBUTE_UNUSED,
!           char **errmsg_fmt, char **errmsg_arg, int flagsarg)
  {
    int pid;
    int pdes[2];
*************** pexecute (program, argv, this_pname, tem
*** 203,212 ****
  }
  
  int
! pwait (pid, status, flags)
!      int pid;
!      int *status;
!      int flags ATTRIBUTE_UNUSED;
  {
    /* ??? Here's an opportunity to canonicalize the values in STATUS.
       Needed?  */
--- 198,204 ----
  }
  
  int
! pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED)
  {
    /* ??? Here's an opportunity to canonicalize the values in STATUS.
       Needed?  */
Index: libiberty/pex-win32.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/pex-win32.c,v
retrieving revision 1.4
diff -p -r1.4 pex-win32.c
*** libiberty/pex-win32.c	31 May 2004 10:32:58 -0000	1.4
--- libiberty/pex-win32.c	27 Mar 2005 19:50:22 -0000
***************
*** 1,6 ****
  /* Utilities to execute a program in a subprocess (possibly linked by pipes
     with other subprocesses), and wait for it.  Generic Win32 specialization.
!    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
     Free Software Foundation, Inc.
  
  This file is part of the libiberty library.
--- 1,6 ----
  /* Utilities to execute a program in a subprocess (possibly linked by pipes
     with other subprocesses), and wait for it.  Generic Win32 specialization.
!    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
     Free Software Foundation, Inc.
  
  This file is part of the libiberty library.
*************** Boston, MA 02111-1307, USA.  */
*** 53,60 ****
     to remove the outermost set of double quotes from all arguments.  */
  
  static const char * const *
! fix_argv (argvec)
!      char **argvec;
  {
    int i;
    char * command0 = argvec[0];
--- 53,59 ----
     to remove the outermost set of double quotes from all arguments.  */
  
  static const char * const *
! fix_argv (char **argvec)
  {
    int i;
    char * command0 = argvec[0];
*************** fix_argv (argvec)
*** 138,150 ****
  
  /* Win32 supports pipes */
  int
! pexecute (program, argv, this_pname, temp_base, errmsg_fmt, errmsg_arg, flags)
!      const char *program;
!      char * const *argv;
!      const char *this_pname ATTRIBUTE_UNUSED;
!      const char *temp_base ATTRIBUTE_UNUSED;
!      char **errmsg_fmt, **errmsg_arg;
!      int flags;
  {
    int pid;
    int pdes[2];
--- 137,146 ----
  
  /* Win32 supports pipes */
  int
! pexecute (const char *program, char * const *argv,
!           const char *this_pname ATTRIBUTE_UNUSED,
!           const char *temp_base ATTRIBUTE_UNUSED,
!           char **errmsg_fmt, char **errmsg_arg, int flags)
  {
    int pid;
    int pdes[2];
*************** pexecute (program, argv, this_pname, tem
*** 230,239 ****
     macros. Note that WIFSIGNALED will never be true under CRTDLL. */
  
  int
! pwait (pid, status, flags)
!      int pid;
!      int *status;
!      int flags ATTRIBUTE_UNUSED;
  {
    int termstat;
  
--- 226,232 ----
     macros. Note that WIFSIGNALED will never be true under CRTDLL. */
  
  int
! pwait (int pid, int *status, int flags ATTRIBUTE_UNUSED)
  {
    int termstat;
  
Index: libiberty/physmem.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/physmem.c,v
retrieving revision 1.11
diff -p -r1.11 physmem.c
*** libiberty/physmem.c	9 Jun 2003 05:20:02 -0000	1.11
--- libiberty/physmem.c	27 Mar 2005 19:50:22 -0000
***************
*** 1,5 ****
  /* Calculate the size of physical memory.
!    Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
--- 1,5 ----
  /* Calculate the size of physical memory.
!    Copyright 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
*************** typedef WINBOOL (WINAPI *PFN_MS_EX) (lME
*** 80,86 ****
  
  /* Return the total amount of physical memory.  */
  double
! physmem_total ()
  {
  #if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE
    { /* This works on linux-gnu, solaris2 and cygwin.  */
--- 80,86 ----
  
  /* Return the total amount of physical memory.  */
  double
! physmem_total (void)
  {
  #if defined _SC_PHYS_PAGES && defined _SC_PAGESIZE
    { /* This works on linux-gnu, solaris2 and cygwin.  */
*************** physmem_total ()
*** 184,190 ****
  
  /* Return the amount of physical memory available.  */
  double
! physmem_available ()
  {
  #if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE
    { /* This works on linux-gnu, solaris2 and cygwin.  */
--- 184,190 ----
  
  /* Return the amount of physical memory available.  */
  double
! physmem_available (void)
  {
  #if defined _SC_AVPHYS_PAGES && defined _SC_PAGESIZE
    { /* This works on linux-gnu, solaris2 and cygwin.  */
*************** physmem_available ()
*** 290,296 ****
  # include <stdlib.h>
  
  int
! main ()
  {
    printf ("%12.f %12.f\n", physmem_total (), physmem_available ());
    exit (0);
--- 290,296 ----
  # include <stdlib.h>
  
  int
! main (void)
  {
    printf ("%12.f %12.f\n", physmem_total (), physmem_available ());
    exit (0);
Index: libiberty/putenv.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/putenv.c,v
retrieving revision 1.5
diff -p -r1.5 putenv.c
*** libiberty/putenv.c	22 Jan 2002 20:03:29 -0000	1.5
--- libiberty/putenv.c	27 Mar 2005 19:50:22 -0000
*************** extern char *alloca ();
*** 67,74 ****
  
  /* Put STRING, which is of the form "NAME=VALUE", in the environment.  */
  int
! putenv (string)
!      const char *string;
  {
    const char *const name_end = strchr (string, '=');
  
--- 67,73 ----
  
  /* Put STRING, which is of the form "NAME=VALUE", in the environment.  */
  int
! putenv (const char *string)
  {
    const char *const name_end = strchr (string, '=');
  
Index: libiberty/random.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/random.c,v
retrieving revision 1.8
diff -p -r1.8 random.c
*** libiberty/random.c	17 Oct 2001 21:15:41 -0000	1.8
--- libiberty/random.c	27 Mar 2005 19:50:23 -0000
*************** control over the state of the random num
*** 80,86 ****
  
  #endif
  
! long int random ();
  
  /* An improved random number generation package.  In addition to the standard
     rand()/srand() like interface, this package also has a special state info
--- 80,86 ----
  
  #endif
  
! long int random (void);
  
  /* An improved random number generation package.  In addition to the standard
     rand()/srand() like interface, this package also has a special state info
*************** static long int *end_ptr = &randtbl[size
*** 227,234 ****
     introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
     for default usage relies on values produced by this routine.  */
  void
! srandom (x)
!   unsigned int x;
  {
    state[0] = x;
    if (rand_type != TYPE_0)
--- 227,233 ----
     introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
     for default usage relies on values produced by this routine.  */
  void
! srandom (unsigned int x)
  {
    state[0] = x;
    if (rand_type != TYPE_0)
*************** srandom (x)
*** 255,264 ****
     setstate so that it doesn't matter when initstate is called.
     Returns a pointer to the old state.  */
  PTR
! initstate (seed, arg_state, n)
!   unsigned int seed;
!   PTR arg_state;
!   unsigned long n;
  {
    PTR ostate = (PTR) &state[-1];
  
--- 254,260 ----
     setstate so that it doesn't matter when initstate is called.
     Returns a pointer to the old state.  */
  PTR
! initstate (unsigned int seed, PTR arg_state, unsigned long n)
  {
    PTR ostate = (PTR) &state[-1];
  
*************** initstate (seed, arg_state, n)
*** 324,331 ****
     Returns a pointer to the old state information.  */
  
  PTR
! setstate (arg_state)
!   PTR arg_state;
  {
    register long int *new_state = (long int *) arg_state;
    register int type = new_state[0] % MAX_TYPES;
--- 320,326 ----
     Returns a pointer to the old state information.  */
  
  PTR
! setstate (PTR arg_state)
  {
    register long int *new_state = (long int *) arg_state;
    register int type = new_state[0] % MAX_TYPES;
*************** setstate (arg_state)
*** 378,384 ****
     pointer if the front one has wrapped.  Returns a 31-bit random number.  */
  
  long int
! random ()
  {
    if (rand_type == TYPE_0)
      {
--- 373,379 ----
     pointer if the front one has wrapped.  Returns a 31-bit random number.  */
  
  long int
! random (void)
  {
    if (rand_type == TYPE_0)
      {
Index: libiberty/rename.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/rename.c,v
retrieving revision 1.5
diff -p -r1.5 rename.c
*** libiberty/rename.c	15 Apr 2003 20:36:33 -0000	1.5
--- libiberty/rename.c	27 Mar 2005 19:50:23 -0000
*************** exists, it is removed.
*** 22,30 ****
  #endif
  
  int
! rename (zfrom, zto)
!      const char *zfrom;
!      const char *zto;
  {
    if (link (zfrom, zto) < 0)
      {
--- 22,28 ----
  #endif
  
  int
! rename (const char *zfrom, const char *zto)
  {
    if (link (zfrom, zto) < 0)
      {
Index: libiberty/rindex.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/rindex.c,v
retrieving revision 1.5
diff -p -r1.5 rindex.c
*** libiberty/rindex.c	7 Oct 2001 21:53:31 -0000	1.5
--- libiberty/rindex.c	27 Mar 2005 19:50:23 -0000
*************** deprecated in new programs in favor of @
*** 15,23 ****
  extern char *strrchr ();
  
  char *
! rindex (s, c)
!   char *s;
!   int c;
  {
    return strrchr (s, c);
  }
--- 15,21 ----
  extern char *strrchr ();
  
  char *
! rindex (char *s, int c)
  {
    return strrchr (s, c);
  }
Index: libiberty/safe-ctype.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/safe-ctype.c,v
retrieving revision 1.5
diff -p -r1.5 safe-ctype.c
*** libiberty/safe-ctype.c	22 Jun 2003 15:59:49 -0000	1.5
--- libiberty/safe-ctype.c	27 Mar 2005 19:50:23 -0000
***************
*** 1,6 ****
  /* <ctype.h> replacement macros.
  
!    Copyright (C) 2000 Free Software Foundation, Inc.
     Contributed by Zack Weinberg <zackw@stanford.edu>.
  
  This file is part of the libiberty library.
--- 1,7 ----
  /* <ctype.h> replacement macros.
  
!    Copyright (C) 2000, 2001, 2002, 2003, 2004,
!    2005 Free Software Foundation, Inc.
     Contributed by Zack Weinberg <zackw@stanford.edu>.
  
  This file is part of the libiberty library.
Index: libiberty/setenv.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/setenv.c,v
retrieving revision 1.10
diff -p -r1.10 setenv.c
*** libiberty/setenv.c	22 Jan 2002 20:03:29 -0000	1.10
--- libiberty/setenv.c	27 Mar 2005 19:50:23 -0000
*************** static char **last_environ;
*** 80,89 ****
  
  
  int
! setenv (name, value, replace)
!      const char *name;
!      const char *value;
!      int replace;
  {
    register char **ep = 0;
    register size_t size;
--- 80,86 ----
  
  
  int
! setenv (const char *name, const char *value, int replace)
  {
    register char **ep = 0;
    register size_t size;
*************** setenv (name, value, replace)
*** 164,171 ****
  }
  
  void
! unsetenv (name)
!      const char *name;
  {
    const size_t len = strlen (name);
    char **ep;
--- 161,167 ----
  }
  
  void
! unsetenv (const char *name)
  {
    const size_t len = strlen (name);
    char **ep;
Index: libiberty/sigsetmask.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/sigsetmask.c,v
retrieving revision 1.5
diff -p -r1.5 sigsetmask.c
*** libiberty/sigsetmask.c	15 Apr 2003 03:35:47 -0000	1.5
--- libiberty/sigsetmask.c	27 Mar 2005 19:50:23 -0000
*************** be the value @code{1}).
*** 21,32 ****
  #include <sys/types.h>
  #include <signal.h>
  
! extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
  
  #ifdef SIG_SETMASK
  int
! sigsetmask (set)
!       int set;
  {
      sigset_t new;
      sigset_t old;
--- 21,31 ----
  #include <sys/types.h>
  #include <signal.h>
  
! extern void abort (void) ATTRIBUTE_NORETURN;
  
  #ifdef SIG_SETMASK
  int
! sigsetmask (int set)
  {
      sigset_t new;
      sigset_t old;
Index: libiberty/snprintf.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/snprintf.c,v
retrieving revision 1.1
diff -p -r1.1 snprintf.c
*** libiberty/snprintf.c	16 Apr 2003 22:42:07 -0000	1.1
--- libiberty/snprintf.c	27 Mar 2005 19:50:23 -0000
*************** this function is used.
*** 41,58 ****
  
  #include "ansidecl.h"
  
- #ifdef ANSI_PROTOTYPES
  #include <stdarg.h>
  #include <stddef.h>
- #else
- #include <varargs.h>
- #define size_t unsigned long
- #endif
  
! int vsnprintf PARAMS ((char *, size_t, const char *, va_list));
  
  int
! snprintf VPARAMS ((char *s, size_t n, const char *format, ...))
  {
    int result;
    VA_OPEN (ap, format);
--- 41,53 ----
  
  #include "ansidecl.h"
  
  #include <stdarg.h>
  #include <stddef.h>
  
! int vsnprintf (char *, size_t, const char *, va_list);
  
  int
! snprintf (char *s, size_t n, const char *format, ...)
  {
    int result;
    VA_OPEN (ap, format);
Index: libiberty/sort.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/sort.c,v
retrieving revision 1.5
diff -p -r1.5 sort.c
*** libiberty/sort.c	23 Jul 2000 19:13:46 -0000	1.5
--- libiberty/sort.c	27 Mar 2005 19:50:23 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 44,53 ****
  /* POINTERS and WORK are both arrays of N pointers.  When this
     function returns POINTERS will be sorted in ascending order.  */
  
! void sort_pointers (n, pointers, work)
!      size_t n;
!      void **pointers;
!      void **work;
  {
    /* The type of a single digit.  This can be any unsigned integral
       type.  When changing this, DIGIT_MAX should be changed as 
--- 44,50 ----
  /* POINTERS and WORK are both arrays of N pointers.  When this
     function returns POINTERS will be sorted in ascending order.  */
  
! void sort_pointers (size_t n, void **pointers, void **work)
  {
    /* The type of a single digit.  This can be any unsigned integral
       type.  When changing this, DIGIT_MAX should be changed as 
*************** void sort_pointers (n, pointers, work)
*** 140,147 ****
  
  #include <stdio.h>
  
! void *xmalloc (n)
!      size_t n;
  {
    return malloc (n);
  }
--- 137,143 ----
  
  #include <stdio.h>
  
! void *xmalloc (size_t n)
  {
    return malloc (n);
  }
Index: libiberty/spaces.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/spaces.c,v
retrieving revision 1.3
diff -p -r1.3 spaces.c
*** libiberty/spaces.c	16 Oct 2001 02:50:13 -0000	1.3
--- libiberty/spaces.c	27 Mar 2005 19:50:23 -0000
*************** valid until at least the next call.
*** 37,49 ****
  #include <unixlib.h>
  #else
  /* For systems with larger pointers than ints, these must be declared.  */
! extern PTR malloc PARAMS ((size_t));
! extern void free PARAMS ((PTR));
  #endif
  
  const char *
! spaces (count)
!   int count;
  {
    register char *t;
    static char *buf;
--- 37,48 ----
  #include <unixlib.h>
  #else
  /* For systems with larger pointers than ints, these must be declared.  */
! extern PTR malloc (size_t);
! extern void free (PTR);
  #endif
  
  const char *
! spaces (int count)
  {
    register char *t;
    static char *buf;
Index: libiberty/splay-tree.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/splay-tree.c,v
retrieving revision 1.24
diff -p -r1.24 splay-tree.c
*** libiberty/splay-tree.c	7 Dec 2004 20:01:17 -0000	1.24
--- libiberty/splay-tree.c	27 Mar 2005 19:50:23 -0000
*************** Boston, MA 02111-1307, USA.  */
*** 37,63 ****
  #include "libiberty.h"
  #include "splay-tree.h"
  
! static void splay_tree_delete_helper    PARAMS((splay_tree, 
! 						splay_tree_node));
! static void splay_tree_splay            PARAMS((splay_tree,
! 						splay_tree_key));
! static splay_tree_node splay_tree_splay_helper     
!                                         PARAMS((splay_tree,
  						splay_tree_key,
  						splay_tree_node*,
  						splay_tree_node*,
! 						splay_tree_node*));
! static int splay_tree_foreach_helper    PARAMS((splay_tree,
! 					        splay_tree_node,
! 						splay_tree_foreach_fn,
! 						void*));
  
  /* Deallocate NODE (a member of SP), and all its sub-trees.  */
  
  static void 
! splay_tree_delete_helper (sp, node)
!      splay_tree sp;
!      splay_tree_node node;
  {
    splay_tree_node pending = 0;
    splay_tree_node active = 0;
--- 37,56 ----
  #include "libiberty.h"
  #include "splay-tree.h"
  
! static void splay_tree_delete_helper (splay_tree, splay_tree_node);
! static void splay_tree_splay (splay_tree, splay_tree_key);
! static splay_tree_node splay_tree_splay_helper (splay_tree,
  						splay_tree_key,
  						splay_tree_node*,
  						splay_tree_node*,
! 						splay_tree_node*);
! static int splay_tree_foreach_helper (splay_tree, splay_tree_node,
!                                       splay_tree_foreach_fn, void*);
  
  /* Deallocate NODE (a member of SP), and all its sub-trees.  */
  
  static void 
! splay_tree_delete_helper (splay_tree sp, splay_tree_node node)
  {
    splay_tree_node pending = 0;
    splay_tree_node active = 0;
*************** splay_tree_delete_helper (sp, node)
*** 118,129 ****
     and grandparent, respectively, of NODE.  */
  
  static splay_tree_node
! splay_tree_splay_helper (sp, key, node, parent, grandparent)
!      splay_tree sp;
!      splay_tree_key key;
!      splay_tree_node *node;
!      splay_tree_node *parent;
!      splay_tree_node *grandparent;
  {
    splay_tree_node *next;
    splay_tree_node n;
--- 111,119 ----
     and grandparent, respectively, of NODE.  */
  
  static splay_tree_node
! splay_tree_splay_helper (splay_tree sp, splay_tree_key key,
!                          splay_tree_node *node, splay_tree_node *parent,
!                          splay_tree_node *grandparent)
  {
    splay_tree_node *next;
    splay_tree_node n;
*************** splay_tree_splay_helper (sp, key, node, 
*** 229,237 ****
  /* Splay SP around KEY.  */
  
  static void
! splay_tree_splay (sp, key)
!      splay_tree sp;
!      splay_tree_key key;
  {
    if (sp->root == 0)
      return;
--- 219,225 ----
  /* Splay SP around KEY.  */
  
  static void
! splay_tree_splay (splay_tree sp, splay_tree_key key)
  {
    if (sp->root == 0)
      return;
*************** splay_tree_splay (sp, key)
*** 246,256 ****
     value is returned.  Otherwise, this function returns 0.  */
  
  static int
! splay_tree_foreach_helper (sp, node, fn, data)
!      splay_tree sp;
!      splay_tree_node node;
!      splay_tree_foreach_fn fn;
!      void* data;
  {
    int val;
  
--- 234,241 ----
     value is returned.  Otherwise, this function returns 0.  */
  
  static int
! splay_tree_foreach_helper (splay_tree sp, splay_tree_node node,
!                            splay_tree_foreach_fn fn, void *data)
  {
    int val;
  
*************** splay_tree_foreach_helper (sp, node, fn,
*** 271,287 ****
  
  /* An allocator and deallocator based on xmalloc.  */
  static void *
! splay_tree_xmalloc_allocate (size, data)
!      int size;
!      void *data ATTRIBUTE_UNUSED;
  {
    return (void *) xmalloc (size);
  }
  
  static void
! splay_tree_xmalloc_deallocate (object, data)
!      void *object;
!      void *data ATTRIBUTE_UNUSED;
  {
    free (object);
  }
--- 256,268 ----
  
  /* An allocator and deallocator based on xmalloc.  */
  static void *
! splay_tree_xmalloc_allocate (int size, void *data ATTRIBUTE_UNUSED)
  {
    return (void *) xmalloc (size);
  }
  
  static void
! splay_tree_xmalloc_deallocate (void *object, void *data ATTRIBUTE_UNUSED)
  {
    free (object);
  }
*************** splay_tree_xmalloc_deallocate (object, d
*** 293,302 ****
     nodes added.  */
  
  splay_tree 
! splay_tree_new (compare_fn, delete_key_fn, delete_value_fn)
!      splay_tree_compare_fn compare_fn;
!      splay_tree_delete_key_fn delete_key_fn;
!      splay_tree_delete_value_fn delete_value_fn;
  {
    return (splay_tree_new_with_allocator
            (compare_fn, delete_key_fn, delete_value_fn,
--- 274,282 ----
     nodes added.  */
  
  splay_tree 
! splay_tree_new (splay_tree_compare_fn compare_fn,
!                 splay_tree_delete_key_fn delete_key_fn,
!                 splay_tree_delete_value_fn delete_value_fn)
  {
    return (splay_tree_new_with_allocator
            (compare_fn, delete_key_fn, delete_value_fn,
*************** splay_tree_new (compare_fn, delete_key_f
*** 309,322 ****
     values.  */
  
  splay_tree 
! splay_tree_new_with_allocator (compare_fn, delete_key_fn, delete_value_fn,
!                                allocate_fn, deallocate_fn, allocate_data)
!      splay_tree_compare_fn compare_fn;
!      splay_tree_delete_key_fn delete_key_fn;
!      splay_tree_delete_value_fn delete_value_fn;
!      splay_tree_allocate_fn allocate_fn;
!      splay_tree_deallocate_fn deallocate_fn;
!      void *allocate_data;
  {
    splay_tree sp = (splay_tree) (*allocate_fn) (sizeof (struct splay_tree_s),
                                                 allocate_data);
--- 289,300 ----
     values.  */
  
  splay_tree 
! splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn,
!                                splay_tree_delete_key_fn delete_key_fn,
!                                splay_tree_delete_value_fn delete_value_fn,
!                                splay_tree_allocate_fn allocate_fn,
!                                splay_tree_deallocate_fn deallocate_fn,
!                                void *allocate_data)
  {
    splay_tree sp = (splay_tree) (*allocate_fn) (sizeof (struct splay_tree_s),
                                                 allocate_data);
*************** splay_tree_new_with_allocator (compare_f
*** 334,341 ****
  /* Deallocate SP.  */
  
  void 
! splay_tree_delete (sp)
!      splay_tree sp;
  {
    splay_tree_delete_helper (sp, sp->root);
    (*sp->deallocate) ((char*) sp, sp->allocate_data);
--- 312,318 ----
  /* Deallocate SP.  */
  
  void 
! splay_tree_delete (splay_tree sp)
  {
    splay_tree_delete_helper (sp, sp->root);
    (*sp->deallocate) ((char*) sp, sp->allocate_data);
*************** splay_tree_delete (sp)
*** 346,355 ****
     with the new value.  Returns the new node.  */
  
  splay_tree_node
! splay_tree_insert (sp, key, value)
!      splay_tree sp;
!      splay_tree_key key;
!      splay_tree_value value;
  {
    int comparison = 0;
  
--- 323,329 ----
     with the new value.  Returns the new node.  */
  
  splay_tree_node
! splay_tree_insert (splay_tree sp, splay_tree_key key, splay_tree_value value)
  {
    int comparison = 0;
  
*************** splay_tree_insert (sp, key, value)
*** 401,409 ****
  /* Remove KEY from SP.  It is not an error if it did not exist.  */
  
  void
! splay_tree_remove (sp, key)
!      splay_tree sp;
!      splay_tree_key key;
  {
    splay_tree_splay (sp, key);
  
--- 375,381 ----
  /* Remove KEY from SP.  It is not an error if it did not exist.  */
  
  void
! splay_tree_remove (splay_tree sp, splay_tree_key key)
  {
    splay_tree_splay (sp, key);
  
*************** splay_tree_remove (sp, key)
*** 443,451 ****
     otherwise.  */
  
  splay_tree_node
! splay_tree_lookup (sp, key)
!      splay_tree sp;
!      splay_tree_key key;
  {
    splay_tree_splay (sp, key);
  
--- 415,421 ----
     otherwise.  */
  
  splay_tree_node
! splay_tree_lookup (splay_tree sp, splay_tree_key key)
  {
    splay_tree_splay (sp, key);
  
*************** splay_tree_lookup (sp, key)
*** 458,465 ****
  /* Return the node in SP with the greatest key.  */
  
  splay_tree_node
! splay_tree_max (sp)
!      splay_tree sp;
  {
    splay_tree_node n = sp->root;
  
--- 428,434 ----
  /* Return the node in SP with the greatest key.  */
  
  splay_tree_node
! splay_tree_max (splay_tree sp)
  {
    splay_tree_node n = sp->root;
  
*************** splay_tree_max (sp)
*** 475,482 ****
  /* Return the node in SP with the smallest key.  */
  
  splay_tree_node
! splay_tree_min (sp)
!      splay_tree sp;
  {
    splay_tree_node n = sp->root;
  
--- 444,450 ----
  /* Return the node in SP with the smallest key.  */
  
  splay_tree_node
! splay_tree_min (splay_tree sp)
  {
    splay_tree_node n = sp->root;
  
*************** splay_tree_min (sp)
*** 493,501 ****
     predecessor.  KEY need not be present in the tree.  */
  
  splay_tree_node
! splay_tree_predecessor (sp, key)
!      splay_tree sp;
!      splay_tree_key key;
  {
    int comparison;
    splay_tree_node node;
--- 461,467 ----
     predecessor.  KEY need not be present in the tree.  */
  
  splay_tree_node
! splay_tree_predecessor (splay_tree sp, splay_tree_key key)
  {
    int comparison;
    splay_tree_node node;
*************** splay_tree_predecessor (sp, key)
*** 526,534 ****
     successor.  KEY need not be present in the tree.  */
  
  splay_tree_node
! splay_tree_successor (sp, key)
!      splay_tree sp;
!      splay_tree_key key;
  {
    int comparison;
    splay_tree_node node;
--- 492,498 ----
     successor.  KEY need not be present in the tree.  */
  
  splay_tree_node
! splay_tree_successor (splay_tree sp, splay_tree_key key)
  {
    int comparison;
    splay_tree_node node;
*************** splay_tree_successor (sp, key)
*** 561,570 ****
     Otherwise, this function returns 0.  */
  
  int
! splay_tree_foreach (sp, fn, data)
!      splay_tree sp;
!      splay_tree_foreach_fn fn;
!      void *data;
  {
    return splay_tree_foreach_helper (sp, sp->root, fn, data);
  }
--- 525,531 ----
     Otherwise, this function returns 0.  */
  
  int
! splay_tree_foreach (splay_tree sp, splay_tree_foreach_fn fn, void *data)
  {
    return splay_tree_foreach_helper (sp, sp->root, fn, data);
  }
*************** splay_tree_foreach (sp, fn, data)
*** 572,580 ****
  /* Splay-tree comparison function, treating the keys as ints.  */
  
  int
! splay_tree_compare_ints (k1, k2)
!      splay_tree_key k1;
!      splay_tree_key k2;
  {
    if ((int) k1 < (int) k2)
      return -1;
--- 533,539 ----
  /* Splay-tree comparison function, treating the keys as ints.  */
  
  int
! splay_tree_compare_ints (splay_tree_key k1, splay_tree_key k2)
  {
    if ((int) k1 < (int) k2)
      return -1;
*************** splay_tree_compare_ints (k1, k2)
*** 587,595 ****
  /* Splay-tree comparison function, treating the keys as pointers.  */
  
  int
! splay_tree_compare_pointers (k1, k2)
!      splay_tree_key k1;
!      splay_tree_key k2;
  {
    if ((char*) k1 < (char*) k2)
      return -1;
--- 546,552 ----
  /* Splay-tree comparison function, treating the keys as pointers.  */
  
  int
! splay_tree_compare_pointers (splay_tree_key k1, splay_tree_key k2)
  {
    if ((char*) k1 < (char*) k2)
      return -1;
Index: libiberty/stpcpy.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/stpcpy.c,v
retrieving revision 1.1
diff -p -r1.1 stpcpy.c
*** libiberty/stpcpy.c	16 Apr 2003 02:56:46 -0000	1.1
--- libiberty/stpcpy.c	27 Mar 2005 19:50:23 -0000
*************** Copies the string @var{src} into @var{ds
*** 30,48 ****
  */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
! extern size_t strlen PARAMS ((const char *));
! extern PTR memcpy PARAMS ((PTR, const PTR, size_t));
  
  char *
! stpcpy (dst, src)
!      char *dst;
!      const char *src;
  {
    const size_t len = strlen (src);
    return (char *) memcpy (dst, src, len + 1) + len;
--- 30,42 ----
  */
  
  #include <ansidecl.h>
  #include <stddef.h>
  
! extern size_t strlen (const char *);
! extern PTR memcpy (PTR, const PTR, size_t);
  
  char *
! stpcpy (char *dst, const char *src)
  {
    const size_t len = strlen (src);
    return (char *) memcpy (dst, src, len + 1) + len;
Index: libiberty/stpncpy.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/stpncpy.c,v
retrieving revision 1.2
diff -p -r1.2 stpncpy.c
*** libiberty/stpncpy.c	16 Apr 2003 04:42:38 -0000	1.2
--- libiberty/stpncpy.c	27 Mar 2005 19:50:23 -0000
*************** strlen(@var{src}).
*** 32,51 ****
  */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
! extern size_t strlen PARAMS ((const char *));
! extern char *strncpy PARAMS ((char *, const char *, size_t));
  
  char *
! stpncpy (dst, src, len)
!      char *dst;
!      const char *src;
!      size_t len;
  {
    size_t n = strlen (src);
    if (n > len)
--- 32,44 ----
  */
  
  #include <ansidecl.h>
  #include <stddef.h>
  
! extern size_t strlen (const char *);
! extern char *strncpy (char *, const char *, size_t);
  
  char *
! stpncpy (char *dst, const char *src, size_t len)
  {
    size_t n = strlen (src);
    if (n > len)
Index: libiberty/strcasecmp.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/strcasecmp.c,v
retrieving revision 1.5
diff -p -r1.5 strcasecmp.c
*** libiberty/strcasecmp.c	15 Apr 2003 03:35:47 -0000	1.5
--- libiberty/strcasecmp.c	27 Mar 2005 19:50:23 -0000
*************** static char sccsid[] = "@(#)strcasecmp.c
*** 25,35 ****
  #endif /* LIBC_SCCS and not lint */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
  /*
   * This array is designed for mapping upper and lower case letter
--- 25,31 ----
*************** static const unsigned char charmap[] = {
*** 73,80 ****
  };
  
  int
! strcasecmp(s1, s2)
!     const char *s1, *s2;
  {
      register unsigned char u1, u2;
  
--- 69,75 ----
  };
  
  int
! strcasecmp(const char *s1, const char *s2)
  {
      register unsigned char u1, u2;
  
Index: libiberty/strchr.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/strchr.c,v
retrieving revision 1.6
diff -p -r1.6 strchr.c
*** libiberty/strchr.c	7 Oct 2001 21:53:31 -0000	1.6
--- libiberty/strchr.c	27 Mar 2005 19:50:23 -0000
*************** null character, the results are undefine
*** 16,24 ****
  #include <ansidecl.h>
  
  char *
! strchr (s, c)
!   register const char *s;
!   int c;
  {
    do {
      if (*s == c)
--- 16,22 ----
  #include <ansidecl.h>
  
  char *
! strchr (register const char *s, int c)
  {
    do {
      if (*s == c)
Index: libiberty/strdup.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/strdup.c,v
retrieving revision 1.6
diff -p -r1.6 strdup.c
*** libiberty/strdup.c	15 Jan 2004 16:28:04 -0000	1.6
--- libiberty/strdup.c	27 Mar 2005 19:50:23 -0000
*************** Returns a pointer to a copy of @var{s} i
*** 10,28 ****
  */
  
  #include <ansidecl.h>
- #ifdef ANSI_PROTOTYPES
  #include <stddef.h>
- #else
- #define size_t unsigned long
- #endif
  
! extern size_t	strlen PARAMS ((const char*));
! extern PTR	malloc PARAMS ((size_t));
! extern PTR	memcpy PARAMS ((PTR, const PTR, size_t));
  
  char *
! strdup(s)
!      const char *s;
  {
    size_t len = strlen (s) + 1;
    char *result = (char*) malloc (len);
--- 10,23 ----
  */
  
  #include <ansidecl.h>
  #include <stddef.h>
  
! extern size_t	strlen (const char*);
! extern PTR	malloc (size_t);
! extern PTR	memcpy (PTR, const PTR, size_t);
  
  char *
! strdup(const char *s)
  {
    size_t len = strlen (s) + 1;
    char *result = (char*) malloc (len);



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