[Xapian-tickets] [Xapian] #738: Fix remote backend on 64-bit MS Windows

Xapian nobody at xapian.org
Sun Mar 25 23:20:18 BST 2018

#738: Fix remote backend on 64-bit MS Windows
 Reporter:  olly            |             Owner:  olly
     Type:  defect          |            Status:  new
 Priority:  low             |         Milestone:  1.4.6
Component:  Backend-Remote  |           Version:  1.4.0
 Severity:  normal          |        Resolution:
 Keywords:                  |        Blocked By:
 Blocking:                  |  Operating System:  Microsoft Windows
Changes (by olly):

 * milestone:  1.4.x => 1.4.6


 Having done a bit of digging, it seems that actually it's always safe to
 cast `HANDLE` to `int` - the values what occur all map to unsigned `int`
 values, except `INVALID_HANDLE` which maps to `-1` (which matches the `-1`
 for invalid fd that BSD sockets uses).

 I've pushed f006fc9325443bd93d1429fd19d68109a2d73eea to git master which
 adds a check that the cast doesn't mangled the value (and for 32-bit
 `SOCKET`, that we don't end up with a negative int value except from

 Marking for backport for 1.4.6.

Ticket URL: <https://trac.xapian.org/ticket/738#comment:3>
Xapian <https://xapian.org/>

More information about the Xapian-tickets mailing list