aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-27 10:28:57 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1998-11-27 10:28:57 +0000
commit4ae639597f68c1d6de4337dceeb61d532e732f72 (patch)
tree65a8fbad59efa861cb79e0c94bd9f5b105f2e7a0 /libiberty
parent103ad453d7c9f647aa2a3b734ec91e582c659284 (diff)
* choose-temp.c: Always include libiberty.h. Avoid redundancies.
* cplus-dem.c: Likewise. Conform to libiberty.h. * pexecute.c: Likewise. * splay-tree.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23935 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog7
-rw-r--r--libiberty/choose-temp.c4
-rw-r--r--libiberty/cplus-dem.c17
-rw-r--r--libiberty/pexecute.c9
-rw-r--r--libiberty/splay-tree.c4
5 files changed, 16 insertions, 25 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 93b4cdf1558..dba5a95a676 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,10 @@
+Fri Nov 27 13:26:06 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * choose-temp.c: Always include libiberty.h. Avoid redundancies.
+ * cplus-dem.c: Likewise. Conform to libiberty.h.
+ * pexecute.c: Likewise.
+ * splay-tree.c: Likewise.
+
1998-11-25 Mike Stump <mrs@wrs.com>
* Makefile.in (splay-tree.o): Add config.h dependency.
diff --git a/libiberty/choose-temp.c b/libiberty/choose-temp.c
index c65661424d8..089bd10208d 100644
--- a/libiberty/choose-temp.c
+++ b/libiberty/choose-temp.c
@@ -50,12 +50,10 @@ Boston, MA 02111-1307, USA. */
#include <stdio.h> /* May get P_tmpdir. */
#endif /* IN_GCC */
+#include "libiberty.h"
#ifdef IN_GCC
-extern char *xmalloc ();
extern int mkstemps ();
#else
-#include "ansidecl.h"
-#include "libiberty.h"
#if defined (__MSDOS__) || defined (_WIN32)
#define DIR_SEPARATOR '\\'
#endif
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 05026c1da4e..0d8a99c9baf 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -48,8 +48,7 @@ char * realloc ();
#undef CURRENT_DEMANGLING_STYLE
#define CURRENT_DEMANGLING_STYLE work->options
-extern char *xmalloc PARAMS((unsigned));
-extern char *xrealloc PARAMS((char *, unsigned));
+#include "libiberty.h"
static const char *mystrstr PARAMS ((const char *, const char *));
@@ -3987,22 +3986,22 @@ fatal (str)
exit (1);
}
-char *
+PTR
xmalloc (size)
- unsigned size;
+ size_t size;
{
- register char *value = (char *) malloc (size);
+ register PTR value = (PTR) malloc (size);
if (value == 0)
fatal ("virtual memory exhausted");
return value;
}
-char *
+PTR
xrealloc (ptr, size)
- char *ptr;
- unsigned size;
+ PTR ptr;
+ size_t size;
{
- register char *value = (char *) realloc (ptr, size);
+ register PTR value = (PTR) realloc (ptr, size);
if (value == 0)
fatal ("virtual memory exhausted");
return value;
diff --git a/libiberty/pexecute.c b/libiberty/pexecute.c
index 94fb2484966..fde411c92b2 100644
--- a/libiberty/pexecute.c
+++ b/libiberty/pexecute.c
@@ -53,16 +53,7 @@ Boston, MA 02111-1307, USA. */
lib$get_current_invo_context(decc$$get_vfork_jmpbuf()) : -1)
#endif /* VMS */
-#ifdef IN_GCC
-/* ??? Need to find a suitable header file. */
-#define PEXECUTE_FIRST 1
-#define PEXECUTE_LAST 2
-#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST)
-#define PEXECUTE_SEARCH 4
-#define PEXECUTE_VERBOSE 8
-#else
#include "libiberty.h"
-#endif
/* stdin file number. */
#define STDIN_FILE_NO 0
diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c
index 68b9f995f67..e14b93192c2 100644
--- a/libiberty/splay-tree.c
+++ b/libiberty/splay-tree.c
@@ -31,11 +31,7 @@
#include <stdlib.h>
#endif
-#ifndef IN_GCC
#include "libiberty.h"
-#else /* IN_GCC */
-extern char* xmalloc ();
-#endif /* IN_GCC */
#include "splay-tree.h"
static void splay_tree_delete_helper PARAMS((splay_tree,