diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-11-27 10:09:17 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-11-27 10:09:17 +0000 |
commit | 2778b98d9088057e96730a5a4f314d9d57bedc65 (patch) | |
tree | 34ccf49c3a33a630b8aabf80bc4b9c4bd0db64b8 /gcc/protoize.c | |
parent | 3081a3ada689c56e5a8c348aac90dfe7f00122bd (diff) | |
download | gcc-2778b98d9088057e96730a5a4f314d9d57bedc65.zip gcc-2778b98d9088057e96730a5a4f314d9d57bedc65.tar.gz gcc-2778b98d9088057e96730a5a4f314d9d57bedc65.tar.bz2 |
system.h: Include libiberty.h.
* system.h: Include libiberty.h.
* c-aux-info.c: Remove prototypes for concat/concat3. Change
function `concat' from fixed parameters to variable parameters,
as is done in libiberty. All callers of concat/concat3
changed to use the new `concat' with variable args.
* cccp.c: Remove things made redundant by libiberty.h and/or
conform to libiberty standards.
* cexp.y: Likewise.
* collect2.c: Likewise.
* config/1750a/1750a.h: Likewise.
* cppalloc.c: Likewise.
* cppexp.c: Likewise.
* cppfiles.c: Likewise.
* cpphash.c: Likewise.
* cpplib.c: Likewise.
* dyn-string.c: Likewise.
* fix-header.c: Likewise.
* gcc.c: Likewise.
* gcov.c: Likewise.
* genattr.c: Likewise.
* genattrtab.c: Likewise.
* gencheck.c: Likewise.
* gencodes.c: Likewise.
* genconfig.c: Likewise.
* genemit.c: Likewise.
* genextract.c: Likewise.
* genflags.c: Likewise.
* gengenrtl.c: Likewise.
* genopinit.c: Likewise.
* genoutput.c: Likewise.
* genpeep.c: Likewise.
* genrecog.c: Likewise.
* getpwd.c: Likewise.
* halfpic.c: Likewise.
* hash.c: Likewise.
* mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes
in NEED_DECLARATION_* macros.
* mips-tfile.c: Remove things made redundant by libiberty.h and/or
conform to libiberty standards.
(fatal): Fix const-ification of variable `format' in
!ANSI_PROTOTYPES case.
* prefix.c: Remove things made redundant by libiberty.h and/or
conform to libiberty standards.
* print-rtl.c: Rename variable `spaces' to `xspaces' to avoid
conflicting with function `spaces' from libiberty.
* profile.c: Remove things made redundant by libiberty.h and/or
conform to libiberty standards.
* protoize.c: Likewise.
* rtl.h: Likewise.
* scan.h: Likewise.
* tlink.c: Likewise.
* toplev.c: Likewise.
* toplev.h: Likewise.
* tree.h: Likewise.
From-SVN: r23931
Diffstat (limited to 'gcc/protoize.c')
-rw-r--r-- | gcc/protoize.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/gcc/protoize.c b/gcc/protoize.c index 659dab7..77b1a11 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -109,17 +109,8 @@ extern char *version_string; extern char *getpwd (); -extern char *choose_temp_base PROTO ((void)); extern char * my_strerror PROTO ((int)); -extern int pexecute PROTO ((const char *, char * const *, const char *, - const char *, char **, char **, int)); -extern int pwait PROTO ((int, int *, int)); -/* Flag arguments to pexecute. */ -#define PEXECUTE_FIRST 1 -#define PEXECUTE_LAST 2 -#define PEXECUTE_SEARCH 4 - static void usage PROTO ((void)) ATTRIBUTE_NORETURN; static void aux_info_corrupted PROTO ((void)) ATTRIBUTE_NORETURN; static void declare_source_confusing PROTO ((const char *)) ATTRIBUTE_NORETURN; @@ -128,13 +119,8 @@ static void declare_source_confusing PROTO ((const char *)) ATTRIBUTE_NORETURN; These were made to facilitate compilation with old brain-dead DEC C compilers which didn't properly grok `void*' types. */ -#ifdef __STDC__ -typedef void * pointer_type; -typedef const void * const_pointer_type; -#else -typedef char * pointer_type; -typedef char * const_pointer_type; -#endif +typedef PTR pointer_type; +typedef const PTR const_pointer_type; #if defined(POSIX) @@ -605,19 +591,15 @@ my_strerror(e) pointer_type xmalloc (byte_count) - size_t byte_count; + size_t byte_count; { - pointer_type rv; - - rv = (pointer_type) malloc (byte_count); + register pointer_type rv = (pointer_type) malloc (byte_count); if (rv == NULL) { fprintf (stderr, "\n%s: virtual memory exceeded\n", pname); exit (FATAL_EXIT_CODE); - return 0; /* avoid warnings */ } - else - return rv; + return rv; } /* Reallocate some space, but check that the reallocation was successful. */ @@ -627,17 +609,13 @@ xrealloc (old_space, byte_count) pointer_type old_space; size_t byte_count; { - pointer_type rv; - - rv = (pointer_type) realloc (old_space, byte_count); + register pointer_type rv = (pointer_type) realloc (old_space, byte_count); if (rv == NULL) { fprintf (stderr, "\n%s: virtual memory exceeded\n", pname); exit (FATAL_EXIT_CODE); - return 0; /* avoid warnings */ } - else - return rv; + return rv; } /* Deallocate the area pointed to by an arbitrary pointer, but first, strip |