Commit 89f602a7 by Mumit Khan Committed by Jeff Law

pexecute.c (__CYGWIN32__): Rename to

        * pexecute.c (__CYGWIN32__): Rename to
        (__CYGWIN__): this.
        * xmalloc.c: Likewise.
        Changes to support i386-pc-uwin.
        * configure.in (*-*-uwin*): Workaround for vfork bug.
        * configure: Regenerate.
        * pexecute.c (pexecute): Be like standard Unix.
        (pwait): Likewise.
        * xmalloc.c (first_break): Define.
        (xmalloc_set_program_name): Use.
        (xmalloc): Use.

From-SVN: r25694
parent 926bb5ed
Thu Mar 11 01:22:58 1999 Mumit Khan <khan@xraylith.wisc.edu>
* pexecute.c (__CYGWIN32__): Rename to
(__CYGWIN__): this.
* xmalloc.c: Likewise.
Changes to support i386-pc-uwin.
* configure.in (*-*-uwin*): Workaround for vfork bug.
* configure: Regenerate.
* pexecute.c (pexecute): Be like standard Unix.
(pwait): Likewise.
* xmalloc.c (first_break): Define.
(xmalloc_set_program_name): Use.
(xmalloc): Use.
Thu Mar 11 01:07:55 1999 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
......
......@@ -276,6 +276,13 @@ if test -z "${setobjs}"; then
AC_DEFINE(HAVE_SYS_ERRLIST)
;;
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
# FIXME: This should be removed once vfork in uwin's runtime is fixed.
ac_cv_func_vfork_works=no
;;
esac
# We haven't set the list of objects yet. Use the standard autoconf
......
......@@ -230,18 +230,18 @@ pwait (pid, status, flags)
#endif /* MSDOS */
#if defined (_WIN32)
#if defined (_WIN32) && ! defined (__UWIN__)
#include <process.h>
#ifdef __CYGWIN32__
#ifdef __CYGWIN__
#define fix_argv(argvec) (argvec)
extern int _spawnv ();
extern int _spawnvp ();
#else /* ! __CYGWIN32__ */
#else /* ! __CYGWIN__ */
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */
......@@ -279,7 +279,7 @@ fix_argv (argvec)
return (const char * const *) argvec;
}
#endif /* __CYGWIN32__ */
#endif /* __CYGWIN__ */
#include <io.h>
#include <fcntl.h>
......@@ -396,7 +396,7 @@ pwait (pid, status, flags)
int *status;
int flags;
{
#ifdef __CYGWIN32__
#ifdef __CYGWIN__
return wait (status);
#else
int termstat;
......@@ -416,10 +416,10 @@ pwait (pid, status, flags)
*status = (((termstat) & 0xff) << 8);
return pid;
#endif /* __CYGWIN32__ */
#endif /* __CYGWIN__ */
}
#endif /* _WIN32 */
#endif /* _WIN32 && ! __UWIN__ */
#ifdef OS2
......@@ -602,7 +602,7 @@ pfinish ()
/* include for Unix-like environments but not for Dos-like environments */
#if ! defined (__MSDOS__) && ! defined (OS2) && ! defined (MPW) \
&& ! defined (_WIN32)
&& ! (defined (_WIN32) && ! defined (__UWIN__))
extern int execv ();
extern int execvp ();
......@@ -731,4 +731,4 @@ pwait (pid, status, flags)
return pid;
}
#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! _WIN32 */
#endif /* ! __MSDOS__ && ! OS2 && ! MPW && ! (_WIN32 && ! __UWIN__) */
......@@ -43,22 +43,22 @@ PTR sbrk PARAMS ((ptrdiff_t));
/* The program name if set. */
static const char *name = "";
#if ! defined (_WIN32) || defined (__CYGWIN32__)
#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
#endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
void
xmalloc_set_program_name (s)
const char *s;
{
name = s;
#if ! defined (_WIN32) || defined (__CYGWIN32__)
#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 || __CYGWIN32 __ */
#endif /* ! _WIN32 || __CYGWIN __ || __UWIN__ */
}
PTR
......@@ -72,7 +72,7 @@ xmalloc (size)
newmem = malloc (size);
if (!newmem)
{
#if ! defined (_WIN32) || defined (__CYGWIN32__)
#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 || __CYGWIN32 __ */
#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 (__CYGWIN32__)
#if ! defined (_WIN32) || defined (__CYGWIN__)
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 || __CYGWIN32 __ */
#endif /* ! _WIN32 || __CYGWIN __ */
xexit (1);
}
return (newmem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment