On 13/08/09 10:52 PM, "Ingo Macherius" <[email protected]> wrote:

> The first version to support the function is
> http://library.gnome.org/devel/glib/2.12/glib-String-Utility-Functions.html
> 
> However, it was buggy unless 2.12.5 and up
> http://www.mail-archive.com/[email protected]/msg195198.ht
> ml
> 
> Plain strtoll works just fine, thus a simple patch would be
> 
> #ifdef GLIB_CHECK_VERSION(2,12,5)
> while ((n = (int)g_ascii_strtoll(sz, &sz, 10)) != 0) {
> #else
> while ((n = (int)strtoll(sz, &sz, 10)) != 0) {
> #endif
> 

Although this hack works, and may suffice for now - one problem is that it
is not thread safe ( g_ascii_strtoll is thread safe ) . One option may be to
backport a version of g_ascii_strtoll from a later glib as a proper
solution. If I get a chance I'll review that code.

For now, I am putting away a copy of this change into CVS however it really
isn't the most ideal solution (unless you are running without threads)




_______________________________________________
Bug-gnubg mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnubg

Reply via email to