Unix Technical Forum

workaround for buggy strtod is not necessary

This is a discussion on workaround for buggy strtod is not necessary within the pgsql Hackers forums, part of the PostgreSQL category; --> Solaris had broken strtod function when parse "Inf" and "Nan". See solaris.h. This bug has been fixed for all ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 05:07 AM
Zdenek Kotala
 
Posts: n/a
Default workaround for buggy strtod is not necessary


Solaris had broken strtod function when parse "Inf" and "Nan". See
solaris.h. This bug has been fixed for all current versions of Solaris (
8, 9, 10). See

http://sunsolve.sun.com/search/docum...ause=108993-62
http://sunsolve.sun.com/search/docum...ause=112874-34


Workaround is not necessary now, but I'm not sure if workaround removing
is good idea. There are some possible variants:


1) keep workaround in the code for compatibility with unpatched system
and adjust comment in solaris.h

2) remove workaround and mention required Solaris patch in the
Solaris.FAQ document

3) add some test into configure script and use workaround only on
unpatched system. (It should be nightmare for packagers)


Any suggestion?

Thanks Zdenek






---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 05:07 AM
Bruce Momjian
 
Posts: n/a
Default Re: workaround for buggy strtod is not necessary

Zdenek Kotala wrote:
>
> Solaris had broken strtod function when parse "Inf" and "Nan". See
> solaris.h. This bug has been fixed for all current versions of Solaris (
> 8, 9, 10). See
>
> http://sunsolve.sun.com/search/docum...ause=108993-62
> http://sunsolve.sun.com/search/docum...ause=112874-34
>
>
> Workaround is not necessary now, but I'm not sure if workaround removing
> is good idea. There are some possible variants:
>
>
> 1) keep workaround in the code for compatibility with unpatched system
> and adjust comment in solaris.h
>
> 2) remove workaround and mention required Solaris patch in the
> Solaris.FAQ document
>
> 3) add some test into configure script and use workaround only on
> unpatched system. (It should be nightmare for packagers)


#1. What do you want to change about the existing comment?

/*
* Many versions of Solaris have broken strtod() --- see bug #4751182.
* For the moment we just assume they all do; it's probably not worth
* the trouble to add a configure test for this.
*/


--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-12-2008, 05:07 AM
Zdenek Kotala
 
Posts: n/a
Default Re: workaround for buggy strtod is not necessary

Bruce Momjian wrote:
> Zdenek Kotala wrote:
>> Solaris had broken strtod function when parse "Inf" and "Nan". See
>> solaris.h. This bug has been fixed for all current versions of Solaris (
>> 8, 9, 10). See
>>
>> http://sunsolve.sun.com/search/docum...ause=108993-62
>> http://sunsolve.sun.com/search/docum...ause=112874-34
>>
>>
>> Workaround is not necessary now, but I'm not sure if workaround removing
>> is good idea. There are some possible variants:
>>
>>
>> 1) keep workaround in the code for compatibility with unpatched system
>> and adjust comment in solaris.h
>>
>> 2) remove workaround and mention required Solaris patch in the
>> Solaris.FAQ document
>>
>> 3) add some test into configure script and use workaround only on
>> unpatched system. (It should be nightmare for packagers)

>
> #1. What do you want to change about the existing comment?
>
> /*
> * Many versions of Solaris have broken strtod() --- see bug #4751182.
> * For the moment we just assume they all do; it's probably not worth
> * the trouble to add a configure test for this.
> */
>


/* Many versions of Solaris had broken strtod() -- see bug #4751182.
Now, it is fixed in recent versions of Solaris (8 and above -- see patch
108993-62 and 112874-34). However, there should be many unpatched
system. For the moment we just assume they all do; it's probably not
worth the trouble to add a configure test for this. */


It is only update that it is fixed and why workaround is not removed.

Zdenek





---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-12-2008, 05:08 AM
Bruce Momjian
 
Posts: n/a
Default Re: workaround for buggy strtod is not necessary

Zdenek Kotala wrote:
> Bruce Momjian wrote:
> > Zdenek Kotala wrote:
> >> Solaris had broken strtod function when parse "Inf" and "Nan". See
> >> solaris.h. This bug has been fixed for all current versions of Solaris (
> >> 8, 9, 10). See
> >>
> >> http://sunsolve.sun.com/search/docum...ause=108993-62
> >> http://sunsolve.sun.com/search/docum...ause=112874-34
> >>
> >>
> >> Workaround is not necessary now, but I'm not sure if workaround removing
> >> is good idea. There are some possible variants:
> >>
> >>
> >> 1) keep workaround in the code for compatibility with unpatched system
> >> and adjust comment in solaris.h
> >>
> >> 2) remove workaround and mention required Solaris patch in the
> >> Solaris.FAQ document
> >>
> >> 3) add some test into configure script and use workaround only on
> >> unpatched system. (It should be nightmare for packagers)

> >
> > #1. What do you want to change about the existing comment?
> >
> > /*
> > * Many versions of Solaris have broken strtod() --- see bug #4751182.
> > * For the moment we just assume they all do; it's probably not worth
> > * the trouble to add a configure test for this.
> > */
> >

>
> /* Many versions of Solaris had broken strtod() -- see bug #4751182.
> Now, it is fixed in recent versions of Solaris (8 and above -- see patch
> 108993-62 and 112874-34). However, there should be many unpatched
> system. For the moment we just assume they all do; it's probably not
> worth the trouble to add a configure test for this. */
>
>
> It is only update that it is fixed and why workaround is not removed.


OK, great information, updated comment is:

/*
* Many versions of Solaris have broken strtod() --- see bug #4751182.
* This has been fixed in current versions of Solaris:
*
* http://sunsolve.sun.com/search/docum...ause=108993-62
* http://sunsolve.sun.com/search/docum...ause=112874-34
*
* However, many people might not have patched versions, so
* still use our own fix for the buggy version.
*/

--
Bruce Momjian bruce@momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-12-2008, 05:08 AM
Zdenek Kotala
 
Posts: n/a
Default Re: workaround for buggy strtod is not necessary

Bruce Momjian napsal(a):
> OK, great information, updated comment is:
>
> /*
> * Many versions of Solaris have broken strtod() --- see bug #4751182.
> * This has been fixed in current versions of Solaris:
> *
> * http://sunsolve.sun.com/search/docum...ause=108993-62
> * http://sunsolve.sun.com/search/docum...ause=112874-34
> *
> * However, many people might not have patched versions, so
> * still use our own fix for the buggy version.
> */
>



Excellent, thanks Bruce

Zdenek

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:22 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com