* dcrt0.cc (insert_file): Eliminate unused parameter.

(build_argv): Ditto.
* exceptions.cc (stack): Eliminate unused parameters.
(stackdump): Ditto.
(cygwin_stackdump): Reflect above changes.
(sig_handle): Ditto.
* fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid unused
parameter warning.
This commit is contained in:
Christopher Faylor 2000-05-07 03:29:08 +00:00
parent 75546193ec
commit eafa31fb9f
4 changed files with 67 additions and 51 deletions

View File

@ -1,3 +1,14 @@
Sat May 6 23:22:25 2000 Christopher Faylor <cgf@cygnus.com>
* dcrt0.cc (insert_file): Eliminate unused parameter.
(build_argv): Ditto.
* exceptions.cc (stack): Eliminate unused parameters.
(stackdump): Ditto.
(cygwin_stackdump): Reflect above changes.
(sig_handle): Ditto.
* fhandler.cc (fhandler_base::set_inheritance): Use kludge to avoid
unused parameter warning.
2000-05-06 Mumit Khan <khan@xraylith.wisc.edu> 2000-05-06 Mumit Khan <khan@xraylith.wisc.edu>
* include/wchar.h (wcscmp, wcslen): Fix prototypes. * include/wchar.h (wcscmp, wcslen): Fix prototypes.

View File

@ -185,7 +185,7 @@ host_dependent_constants::init ()
* -@foo and not the contents of foo. * -@foo and not the contents of foo.
*/ */
static int __stdcall static int __stdcall
insert_file (char *name, char *&cmd, int& alloc_cmd) insert_file (char *name, char *&cmd)
{ {
HANDLE f; HANDLE f;
DWORD size; DWORD size;
@ -424,7 +424,7 @@ build_argv (char *cmd, char **&argv, int &argc, int winshell)
{ {
if (++nesting > MAX_AT_FILE_LEVEL) if (++nesting > MAX_AT_FILE_LEVEL)
api_fatal ("Too many levels of nesting for %s", word); api_fatal ("Too many levels of nesting for %s", word);
if (insert_file (word, cmd, alloc_cmd)) if (insert_file (word, cmd))
continue; // There's new stuff in cmd now continue; // There's new stuff in cmd now
} }

View File

@ -269,9 +269,9 @@ stack_info::walk ()
return 1; return 1;
} }
/* Dump the stack using either the old method or the new Win32 API method */ /* Dump the stack */
void void
stack (HANDLE hproc, HANDLE hthread, CONTEXT *cx) stack (CONTEXT *cx)
{ {
int i; int i;
@ -295,10 +295,8 @@ cygwin_stackdump()
{ {
CONTEXT c; CONTEXT c;
c.ContextFlags = CONTEXT_FULL; c.ContextFlags = CONTEXT_FULL;
HANDLE h1 = GetCurrentProcess (); GetThreadContext (GetCurrentThread (), &c);
HANDLE h2 = GetCurrentThread (); stack(&c);
GetThreadContext (h2, &c);
stack(h1, h2, &c);
} }
static int NO_COPY keep_looping = 0; static int NO_COPY keep_looping = 0;
@ -360,7 +358,7 @@ try_to_debug ()
} }
void void
stackdump (HANDLE hproc, HANDLE hthread, EXCEPTION_RECORD *e, CONTEXT *in) stackdump (EXCEPTION_RECORD *e, CONTEXT *in)
{ {
char *p; char *p;
if (myself->progname[0]) if (myself->progname[0])
@ -382,7 +380,7 @@ stackdump (HANDLE hproc, HANDLE hthread, EXCEPTION_RECORD *e, CONTEXT *in)
} }
if (e) if (e)
exception (e, in); exception (e, in);
stack (hproc, hthread, in); stack (in);
} }
/* Main exception handler. */ /* Main exception handler. */
@ -487,7 +485,7 @@ handle_exceptions (EXCEPTION_RECORD *e, void *, CONTEXT *in, void *)
HANDLE hthread; HANDLE hthread;
DuplicateHandle (hMainProc, GetCurrentThread (), DuplicateHandle (hMainProc, GetCurrentThread (),
hMainProc, &hthread, 0, FALSE, DUPLICATE_SAME_ACCESS); hMainProc, &hthread, 0, FALSE, DUPLICATE_SAME_ACCESS);
stackdump (hMainProc, hthread, e, in); stackdump (e, in);
} }
try_to_debug (); try_to_debug ();
really_exit (EXIT_SIGNAL | sig); really_exit (EXIT_SIGNAL | sig);
@ -925,7 +923,7 @@ done:
exit_sig: exit_sig:
if (sig == SIGQUIT || sig == SIGABRT) if (sig == SIGQUIT || sig == SIGABRT)
{ {
stackdump (NULL, NULL, NULL, NULL); stackdump (NULL, NULL);
try_to_debug (); try_to_debug ();
} }
sigproc_printf ("signal %d, about to call do_exit", sig); sigproc_printf ("signal %d, about to call do_exit", sig);

View File

@ -1428,8 +1428,15 @@ fhandler_pipe::lseek (off_t offset, int whence)
return -1; return -1;
} }
#ifdef DEBUGGING
#define nameparm name
#else
#define nameparm
#endif
void void
fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *name) fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *nameparm)
#undef nameparm
{ {
HANDLE newh; HANDLE newh;