Summary: | Weird D-BUS problem with strtod usage | ||
---|---|---|---|
Product: | dbus | Reporter: | Brian Cameron <brian.cameron> |
Component: | core | Assignee: | Havoc Pennington <hp> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | ch.ehrlicher, padraig.obriain |
Version: | unspecified | ||
Hardware: | SPARC | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Brian Cameron
2006-08-22 13:22:22 UTC
For reference: http://www.opensolaris.org/jive/thread.jspa?threadID=12383 is there another function we could use? Looks like a Solaris issue so we could have a workaround on Solaris but I much rather find a function that would work on all platforms. According to the man page hex is legal and there are no notes to the contrary. What does the man page say on Solaris? I think that this bug should be closed. If we compile dbus with -xc99 option of compiler then the problem does not occur. Perhaps we should include a patch witch detects the sun compiler and adds the -xc99 flag before closing this I think it's only necessary to add this flag when compiling with the Sun Studio compiler. Here is how you would construct a configure test for this compiler. And should be a simple matter of adding -xc99 to the CFLAGS if the test returns true (if g_have_sunstudio_visibility=yes). AC_MSG_CHECKING([whether using Sun Studio C compiler]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if defined(__SUNPRO_C) #else # include "error: this is not Sun Studio." #endif ]], [[]])], [ g_have_sunstudio_visibility=yes ], [ g_have_sunstudio_visibility=no ]) AC_MSG_RESULT($g_have_sunstudio_visibility) If parsing hex is really c99-only, as someone on the list says also, then there are other compilers besides Sun that will give problems. Maybe we should try and figure out if we really need to parse hex or it's just in the test suite for no good reason. Perhaps the documentation just needs to mention that building with C99 enabled (e.g. -xc99 when using the Sun Studio compiler) is needed. Perhaps this "make check" test should be moved into configure so that configure fails if the user isn't building with C99 options? Again, I don't think we want to require c99. Either we should confirm that we don't need to support hex parsing, or we should add a way to parse hex that's portable. We've the same problem on windows ... I also found a workaround for non c99 compliant systems -> http://www.netlib.org/fp/dtoa.c maintaining that is some serious overkill if we don't need to parse hex anyhow, though, as I believe we don't... Bugzilla Upgrade Mass Bug Change NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO. - benjsc fd.o Wrangler committed. thanks woops, ignore the above as I did not commit this. I mistakenly added the comment to the wrong bug. Fixed back in 2007 (between 1.1.0 and 1.1.2), while this bug was in NEEDINFO state: commit ed57b9c663db89370055c5196e7e0b537647e9ef Author: Havoc Pennington <hp@redhat.com> Date: 2007-07-12 22:18:05 +0000 2007-07-12 Havoc Pennington <hp@redhat.com> * dbus/dbus-sysdeps-util.c (_dbus_sysdeps_test): invert the test for parsing hex as double to be sure it fails to work * dbus/dbus-sysdeps.c (_dbus_string_parse_double): don't allow hex numbers. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.