strange problem with self-compiled software on FC 5 T2...
Jonathan Berry
berryja at gmail.com
Tue Feb 7 01:52:44 UTC 2006
On 2/6/06, John Reiser <jreiser at bitwagon.com> wrote:
> Your code was:
> rv = fscanf(input, "%s %d %lf %lf %lf %lf", &c, &SatNr,
> &x, &y, &z, &korr);
>
> The manual page for scanf(3) says:
> l Indicates either that the conversion will be one of diouxX or n
> and the next pointer is a pointer to a long int or unsigned long
> int (rather than int), or that the conversion will be one of efg
> and the next pointer is a pointer to double (rather than float).
> Specifying two l characters is equivalent to L. If used with %c
> or %s the corresponding parameter is considered as a pointer to
> a wide character or wide character string respectively.
>
> L Indicates that the conversion will be either efg and the next
> pointer is a pointer to long double or the conversion will be
> dioux and the next pointer is a pointer to long long.
>
> So it looks like _IO_vfscanf_internal is interpreting your "%lf" as "%Lf",
> which is a bug. File a bug report with bugzilla about glibc.
Upon further thinking, I'm inclined to agree with this. I checked the
man pages in FC4 and assumed something changed here with the ABI
change. I should have checked the FC5T2 man page.... From my
experience with %ld and %d on 32-bit and 64-bit things can be very
confusing since int and long int are the same size on 32-bit x86.
It would still be interesting to see the difference between %lf and
%f. And also %Lf or %llf (which should be equivalent).
Jonathan
More information about the fedora-test-list
mailing list