aboutsummaryrefslogtreecommitdiff
path: root/libiberty/xmalloc.c
diff options
context:
space:
mode:
authorMumit Khan <khan@xraylith.wisc.edu>1999-04-11 22:21:28 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-11 16:21:28 -0600
commit36eb4217ac1176310c53f97c252c55054cfe0722 (patch)
tree5762fa94b9cb14ed79e44b91cc1ec221a108e538 /libiberty/xmalloc.c
parent82bed8708b5683a8b4de4ad4bc0f2eb31a2dbda9 (diff)
downloadgcc-36eb4217ac1176310c53f97c252c55054cfe0722.zip
gcc-36eb4217ac1176310c53f97c252c55054cfe0722.tar.gz
gcc-36eb4217ac1176310c53f97c252c55054cfe0722.tar.bz2
pexecute.c: Change all references to __UWIN__ to _UWIN.
* pexecute.c: Change all references to __UWIN__ to _UWIN. * xmalloc.c: Likewise. (xcalloc): UWIN has sbrk. (xrealloc): Fix guard macro. From-SVN: r26352
Diffstat (limited to 'libiberty/xmalloc.c')
-rw-r--r--libiberty/xmalloc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libiberty/xmalloc.c b/libiberty/xmalloc.c
index 1a12511..1bc15c9 100644
--- a/libiberty/xmalloc.c
+++ b/libiberty/xmalloc.c
@@ -43,22 +43,22 @@ PTR sbrk PARAMS ((ptrdiff_t));
/* The program name if set. */
static const char *name = "";
-#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
+#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN)
/* The initial sbrk, set when the program name is set. Not used for win32
ports other than cygwin32. */
static char *first_break = NULL;
-#endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
+#endif /* ! _WIN32 || __CYGWIN__ || _UWIN */
void
xmalloc_set_program_name (s)
const char *s;
{
name = s;
-#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
+#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN)
/* Win32 ports other than cygwin32 don't have brk() */
if (first_break == NULL)
first_break = (char *) sbrk (0);
-#endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
+#endif /* ! _WIN32 || __CYGWIN__ || _UWIN */
}
PTR
@@ -72,7 +72,7 @@ xmalloc (size)
newmem = malloc (size);
if (!newmem)
{
-#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (__UWIN__)
+#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN)
extern char **environ;
size_t allocated;
@@ -89,7 +89,7 @@ xmalloc (size)
"\n%s%sCan not allocate %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size);
-#endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
+#endif /* ! _WIN32 || __CYGWIN__ || _UWIN */
xexit (1);
}
return (newmem);
@@ -107,7 +107,7 @@ xcalloc (nelem, elsize)
newmem = calloc (nelem, elsize);
if (!newmem)
{
-#if ! defined (_WIN32) || defined (__CYGWIN__)
+#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN)
extern char **environ;
size_t allocated;
@@ -124,7 +124,7 @@ xcalloc (nelem, elsize)
"\n%s%sCan not allocate %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) (nelem * elsize));
-#endif /* ! _WIN32 || __CYGWIN __ */
+#endif /* ! _WIN32 || __CYGWIN__ || _UWIN */
xexit (1);
}
return (newmem);
@@ -145,7 +145,7 @@ xrealloc (oldmem, size)
newmem = realloc (oldmem, size);
if (!newmem)
{
-#ifndef __MINGW32__
+#if ! defined (_WIN32) || defined (__CYGWIN__) || defined (_UWIN)
extern char **environ;
size_t allocated;
@@ -157,12 +157,12 @@ xrealloc (oldmem, size)
"\n%s%sCan not reallocate %lu bytes after allocating %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size, (unsigned long) allocated);
-#else
+#else /* ! _WIN32 || __CYGWIN__ || _UWIN */
fprintf (stderr,
"\n%s%sCan not reallocate %lu bytes\n",
name, *name ? ": " : "",
(unsigned long) size);
-#endif /* __MINGW32__ */
+#endif /* ! _WIN32 || __CYGWIN__ || _UWIN */
xexit (1);
}
return (newmem);