Olly Betts
2007-Mar-29 14:56 UTC
[Xapian-devel] Re: [Xapian-commits] 7990: trunk/xapian-core/ trunk/xapian-core/bin/ trunk/xapian-core/tests/harness/
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://tor.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.eff.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:4EVxG8zTHfY:3f1cnpHARno&sa=N&ct=rd&cs_p=http://tor.eff.org/dist/tor-0.1.2.1-alpha.tar.gz&cs_f=tor-0.1.2.1-alpha/LICENSE Cheers, Olly
Richard Boulton
2007-Mar-29 15:35 UTC
[Xapian-devel] Re: [Xapian-commits] 7990: trunk/xapian-core/ trunk/xapian-core/bin/ trunk/xapian-core/tests/harness/
Olly Betts wrote:> This code might offer a better fix:I noticed that (or something which looks very like it), but this is only needed in a couple of places and I didn't think it was worth worrying about much right now - it's easy enough to look up the error codes for now, but it probably would be worth fixing at some point. -- Richard
Mark Hammond
2007-Mar-30 01:11 UTC
[Xapian-devel] Re: [Xapian-commits] 7990: trunk/xapian-core/trunk/xapian-core/bin/ trunk/xapian-core/tests/harness/
> 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:4EVxG8zTHfY: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