[Xapian-devel] Replace atoi and atol with strtol strtoul:Need Help

Priyank Bhatt priyankbhatt1234 at gmail.com
Mon Dec 22 06:43:01 GMT 2014

I am attaching diff file which is basically of date.cc and
datematchdecider.cc in */xapian-application/omega/* in which i modified
atoi function. If i need to submit patch in some other way please let me

I have checked for overflow and underflow condition using errno variable
which becomes equal to ERANGE when underflow or overflow occurs and for
checking underflow or overflow the strtol returns LONG_MIN and LONG_MAX for
this i had to add climits header file and also i had to add errno.h header
file for errno variable.

Thank You,
Priyank Bhatt

On 20 December 2014 at 23:37, Priyank Bhatt <priyankbhatt1234 at gmail.com>

> ok i will submit the patch , But What should be done if strtol or strtoll
> overflows or underflow's .
> Thank You,
> Priyank Bhatt
> On 20 December 2014 at 03:43, Olly Betts <olly at survex.com> wrote:
>> On Sat, Dec 20, 2014 at 12:42:08AM +0530, Priyank Bhatt wrote:
>> > As James said I am attaching two file *date.cc* and
>> *datematchdecider.cc*
>> Please send patches, not complete source files:
>> http://trac.xapian.org/browser/git/xapian-core/HACKING#L1176
>> Patches are much smaller, and don't require the reviewer to work out the
>> exact version of the source file you started from.
>> Cheers,
>>     Olly
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141222/bcabe3b3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.patch
Type: text/x-patch
Size: 3404 bytes
Desc: not available
URL: <http://lists.xapian.org/pipermail/xapian-devel/attachments/20141222/bcabe3b3/attachment.bin>

More information about the Xapian-devel mailing list