* cygtls.h (san): New structure.

(cygtls::andreas): New element.  Replaces _myfault and _myfault_errno.
(cygtls::fault_guarded): Use andreas.
(cygtls::return_from_fault): Ditto.
(cygtls::setup_fault): Add a parameter denoting where to store old fault
handler, if any and use it to "stack" faults.
(cygtls::reset_fault): Restore fault from parameter.
(myfault::sebastian): New variable.
(myfault::~myfault): Pass sebastian to reset_fault.
(myfault::myfault): Store old fault values in sebastian.
This commit is contained in:
Christopher Faylor
2005-09-14 21:26:15 +00:00
parent 1f48d233eb
commit c9629cefe9
4 changed files with 46 additions and 26 deletions

View File

@ -938,7 +938,9 @@ cygwin_gethostbyname (const char *name)
sig_dispatch_pending ();
myfault efault;
if (efault.faulted (EFAULT))
return NULL;
{ console_printf ("OUCH!\n");
return NULL;
}
unsigned char tmp_addr[4];
struct hostent tmp, *h;
@ -969,7 +971,10 @@ cygwin_gethostbyname (const char *name)
hostent *res = (hostent *) dup_ent (hostent_buf, h, t_hostent);
if (res)
debug_printf ("h_name %s", res);
{
debug_printf ("h_name %s", res->h_name);
debug_printf ("HERE");
}
else
{
debug_printf ("dup_ent returned NULL for name %s, h %p", name, h);