[Xapian-tickets] [Xapian] #665: Avoid C library functions not guaranteed to be thread-safe

Xapian nobody at xapian.org
Tue Nov 10 02:55:35 GMT 2015


#665: Avoid C library functions not guaranteed to be thread-safe
-------------------------+--------------------------
 Reporter:  olly         |             Owner:  olly
     Type:  defect       |            Status:  new
 Priority:  normal       |         Milestone:  1.4.x
Component:  Library API  |           Version:  1.3.2
 Severity:  normal       |        Resolution:
 Keywords:               |        Blocked By:
 Blocking:               |  Operating System:  All
-------------------------+--------------------------
Changes (by olly):

 * milestone:  1.3.x => 1.4.x


Comment:

 So the list is now:

  * `getenv()` - used to read things like `XAPIAN_FLUSH_THRESHOLD`.
  * `strerror()` (but only if there's no thread-safe alternative).
  * `atoi()` - quite a few uses.
  * `strtod()` - only use is in `NumberValueRangeProcessor::operator()` -
 also means that behaviour depends on the locale, which is probably not
 always desirable.

 We should have a section in the developer docs about this too.

 None of this directly affects the ABI, though eliminating uses of
 `getenv()` might need some API additions.  I don't think this should block
 1.4.0 though.

--
Ticket URL: <http://trac.xapian.org/ticket/665#comment:6>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list