aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/net.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-14 21:26:15 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-14 21:26:15 +0000
commitc9629cefe942778a9c440e707e203b135de162ae (patch)
treee0927d50ab8b8c1266633af33876269c8c847203 /winsup/cygwin/net.cc
parent1f48d233ebee49407b8900a2214e5d582be86555 (diff)
downloadnewlib-c9629cefe942778a9c440e707e203b135de162ae.zip
newlib-c9629cefe942778a9c440e707e203b135de162ae.tar.gz
newlib-c9629cefe942778a9c440e707e203b135de162ae.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 910eeca..3a96849 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -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);