Remove remnants of never-defined MALLOC_DEBUG and NEWVFORK
MALLOC_DEBUG and NEWVFORK haven't been defined since 2008 (4616253751
).
Remove all references to tem.
winsup/cygwin/ChangeLog:
acconfig.h: delete
dcrt0.cc (dll_crt0_1): remove NEWVFORK code.
dcrt0.cc (do_exit): ditto.
debug.h: ditto.
dtable.h: ditto.
winsup.h: ditto.
globals.cc: ditto.
malloc_wrapper.cc: ditto.
malloc_wrapper.cc (malloc_init): ditto.
spawn.cc (spawnve): ditto.
syscalls.cc (setsid): ditto.
Signed-off-by: Peter Foley <pefoley2@pefoley.com>
This commit is contained in:
parent
02cfe00445
commit
b259af51b8
|
@ -1,5 +0,0 @@
|
|||
/* Define if MALLOC_DEBUGGING support is requested. */
|
||||
#undef MALLOC_DEBUG
|
||||
|
||||
/* Define if using new vfork functionality. */
|
||||
#undef NEWVFORK
|
|
@ -1,9 +1,4 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
/* Define if MALLOC_DEBUGGING support is requested. */
|
||||
#undef MALLOC_DEBUG
|
||||
|
||||
/* Define if using new vfork functionality. */
|
||||
#undef NEWVFORK
|
||||
|
||||
/* Define if DEBUGGING support is requested. */
|
||||
#undef DEBUGGING
|
||||
|
|
|
@ -902,11 +902,6 @@ dll_crt0_1 (void *)
|
|||
Need to do this before any helper threads start. */
|
||||
debug_init ();
|
||||
|
||||
#ifdef NEWVFORK
|
||||
cygheap->fdtab.vfork_child_fixup ();
|
||||
main_vfork = vfork_storage.create ();
|
||||
#endif
|
||||
|
||||
cygbench ("pre-forkee");
|
||||
if (in_forkee)
|
||||
{
|
||||
|
@ -1197,15 +1192,6 @@ do_exit (int status)
|
|||
{
|
||||
syscall_printf ("do_exit (%d), exit_state %d", status, exit_state);
|
||||
|
||||
#ifdef NEWVFORK
|
||||
vfork_save *vf = vfork_storage.val ();
|
||||
if (vf != NULL && vf->pid < 0)
|
||||
{
|
||||
exit_state = ES_NOT_EXITING;
|
||||
vf->restore_exit (status);
|
||||
}
|
||||
#endif
|
||||
|
||||
lock_process until_exit (true);
|
||||
|
||||
if (exit_state < ES_EVENTS_TERMINATE)
|
||||
|
|
|
@ -7,16 +7,7 @@ This software is a copyrighted work licensed under the terms of the
|
|||
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||
details. */
|
||||
|
||||
#ifndef MALLOC_DEBUG
|
||||
#define MALLOC_CHECK do {} while (0)
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
#define MALLOC_CHECK ({\
|
||||
debug_printf ("checking malloc pool");\
|
||||
mallinfo ();\
|
||||
})
|
||||
#endif
|
||||
|
||||
#if !defined(_DEBUG_H_)
|
||||
#define _DEBUG_H_
|
||||
|
|
|
@ -25,9 +25,6 @@ class suffix_info;
|
|||
class dtable
|
||||
{
|
||||
fhandler_base **fds;
|
||||
#ifdef NEWVFORK
|
||||
fhandler_base **fds_on_hold;
|
||||
#endif
|
||||
fhandler_base **archetypes;
|
||||
unsigned narchetypes;
|
||||
unsigned farchetype;
|
||||
|
@ -77,9 +74,6 @@ public:
|
|||
void stdio_init ();
|
||||
void get_debugger_info ();
|
||||
void set_file_pointers_for_exec ();
|
||||
#ifdef NEWVFORK
|
||||
bool in_vfork_cleanup () {return fds_on_hold == fds;}
|
||||
#endif
|
||||
fhandler_base *find_archetype (device& dev);
|
||||
fhandler_base **add_archetype ();
|
||||
void delete_archetype (fhandler_base *);
|
||||
|
|
|
@ -88,9 +88,6 @@ int NO_COPY __isthreaded = 0;
|
|||
int __argc_safe;
|
||||
int __argc;
|
||||
char **__argv;
|
||||
#ifdef NEWVFORK
|
||||
vfork_save NO_COPY *main_vfork;
|
||||
#endif
|
||||
|
||||
_cygtls NO_COPY *_main_tls /* !globals.h */;
|
||||
|
||||
|
|
|
@ -18,9 +18,7 @@ details. */
|
|||
#include "perprocess.h"
|
||||
#include "miscfuncs.h"
|
||||
#include "cygmalloc.h"
|
||||
#ifndef MALLOC_DEBUG
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
extern "C" struct mallinfo dlmallinfo ();
|
||||
|
||||
/* we provide these stubs to call into a user's
|
||||
|
@ -281,7 +279,6 @@ malloc_init ()
|
|||
{
|
||||
mallock.init ("mallock");
|
||||
|
||||
#ifndef MALLOC_DEBUG
|
||||
/* Check if malloc is provided by application. If so, redirect all
|
||||
calls to malloc/free/realloc to application provided. This may
|
||||
happen if some other dll calls cygwin's malloc, but main code provides
|
||||
|
@ -296,7 +293,6 @@ malloc_init ()
|
|||
malloc_printf ("using %s malloc", use_internal ? "internal" : "external");
|
||||
internal_malloc_determined = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
|
|
|
@ -882,14 +882,6 @@ spawnve (int mode, const char *path, const char *const *argv,
|
|||
static char *const empty_env[] = { NULL };
|
||||
|
||||
int ret;
|
||||
#ifdef NEWVFORK
|
||||
vfork_save *vf = vfork_storage.val ();
|
||||
|
||||
if (vf != NULL && (vf->pid < 0) && mode == _P_OVERLAY)
|
||||
mode = _P_NOWAIT;
|
||||
else
|
||||
vf = NULL;
|
||||
#endif
|
||||
|
||||
syscall_printf ("spawnve (%s, %s, %p)", path, argv[0], envp);
|
||||
|
||||
|
@ -910,16 +902,6 @@ spawnve (int mode, const char *path, const char *const *argv,
|
|||
case _P_DETACH:
|
||||
case _P_SYSTEM:
|
||||
ret = ch_spawn.worker (path, argv, envp, mode);
|
||||
#ifdef NEWVFORK
|
||||
if (vf)
|
||||
{
|
||||
if (ret > 0)
|
||||
{
|
||||
debug_printf ("longjmping due to vfork");
|
||||
vf->restore_pid (ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
set_errno (EINVAL);
|
||||
|
|
|
@ -1129,21 +1129,6 @@ getppid ()
|
|||
extern "C" pid_t
|
||||
setsid (void)
|
||||
{
|
||||
#ifdef NEWVFORK
|
||||
vfork_save *vf = vfork_storage.val ();
|
||||
/* This is a horrible, horrible kludge */
|
||||
if (vf && vf->pid < 0)
|
||||
{
|
||||
pid_t pid = fork ();
|
||||
if (pid > 0)
|
||||
{
|
||||
syscall_printf ("longjmping due to vfork");
|
||||
vf->restore_pid (pid);
|
||||
}
|
||||
/* assuming that fork was successful */
|
||||
}
|
||||
#endif
|
||||
|
||||
if (myself->pgid == myself->pid)
|
||||
syscall_printf ("hmm. pgid %d pid %d", myself->pgid, myself->pid);
|
||||
else
|
||||
|
|
|
@ -88,9 +88,7 @@ extern const unsigned char case_folded_lower[];
|
|||
extern const unsigned char case_folded_upper[];
|
||||
#define cyg_toupper(c) ((char) case_folded_upper[(unsigned char)(c)])
|
||||
|
||||
#ifndef MALLOC_DEBUG
|
||||
#define cfree newlib_cfree_dont_use
|
||||
#endif
|
||||
|
||||
/* Used as type by sys_wcstombs_alloc and sys_mbstowcs_alloc. For a
|
||||
description see there. */
|
||||
|
|
Loading…
Reference in New Issue