From: Gurusamy Sarathy Date: Thu, 7 Aug 1997 00:00:00 +0000 (+0000) Subject: getservby*() calls fail on Windows NT X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0af56dfea04837510821e168d4a9191fc1d73b0e;p=p5sagit%2Fp5-mst-13.2.git getservby*() calls fail on Windows NT This patch is needed to avoid GPFs on calls to getservby*() on Windows NT, when compiling with the Borland compiler. The same bug is present on Windows95 when using either compiler. The patch simply enables the Windows95 workaround. p5p-msgid: 199706231654.MAA23276@aatma.engin.umich.edu --- diff --git a/win32/win32sck.c b/win32/win32sck.c index fe5b2e7..d541a7e 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -694,9 +694,12 @@ win32_savecopyservent(struct servent*d, struct servent*s, const char *proto) d->s_name = s->s_name; d->s_aliases = s->s_aliases; d->s_port = s->s_port; +#ifndef __BORLANDC__ /* Buggy on Win95 and WinNT-with-Borland-WSOCK */ if (!IsWin95() && s->s_proto && strlen(s->s_proto)) d->s_proto = s->s_proto; - else if (proto && strlen(proto)) + else +#endif + if (proto && strlen(proto)) d->s_proto = (char *)proto; else d->s_proto = "tcp";