[Xapian-devel] Re: [Xapian-commits] 7990:
trunk/xapian-core/trunk/xapian-core/bin/
trunk/xapian-core/tests/harness/
Mark Hammond
mhammond at skippinet.com.au
Fri Mar 30 02:11:28 BST 2007
> On Thu, Mar 29, 2007 at 03:39:01PM +0100, richard wrote:
> > bin/xapian-tcpsrv.cc,tests/harness/testsuite.cc: First of many
> > parts of a large patch from Mark Hammond working towards enabling
> > remote databases on windows. When displaying errors which might
> > be socket errors, display the error number as well as the output
> > of strerror - on windows, strerror doesn't display useful
> > information for socket errors.
>
> This code might offer a better fix:
>
> http://www.google.com/codesearch?hl=en&q=+package:%22http://to
> r.eff.org/dist/tor-0.1.2.1-alpha.tar.gz%22+tor_socket_strerror
+show:ULmcj_LGIg4:aiz98Rv1Bto:3M10UhHDobA&sa=N&cd=1&ct=rc&cs_p=http://tor.ef
f.org/dist/tor-0.1.2.1->
alpha.tar.gz&cs_f=tor-0.1.2.1-alpha/src/common/compat.c#a0
>
> Licence looks like 3 clause BSD:
>
> http://www.google.com/codesearch?hl=en&q=show:WHRL-LL_qCY:4EVx
G8zTHfY:3f1cnpHARno&sa=N&ct=rd&cs_p=http://tor.eff.org/dist/tor-0.1.2.1-alph
a.tar.gz&cs_f=tor-0.1.2.1-> alpha/LICENSE
Windows has an API function 'FormatMessage' which accepts socket error
codes. It also ensures a localized message is returned.
The only reason I didn't go that way was that I was concerned about the
"footprint" of the patch and trying not to touch the non-windows code where
possible. I'm happy to help move this to a better solution though.
Cheers,
Mark
More information about the Xapian-devel
mailing list