On Thursday 11 December 2003 02:16, Rhett Garber via RT wrote:
> I have a simple program that uses the BIO printf functionality:
>
> #include <stdio.h>
> #include "openssl/bio.h"
>
>
> int main(int argc, char* argv[])
> {
>     BIO *myBio = BIO_new_fp(stdout, 0);
>     BIO_printf(myBio, "float: %.1f\n", (float) 1000.1234);
>     return 0;
> }
>
>
> When I run this against either of our builds of 0.9.7c (or b) on HP-UX
> (PA and IA) the output of the above program will be "float: 000.1"  Note
> that the front part of the whole value is cut off.
>
> This does not occur on Linux.

What is the result of running this on your machine?
---<BEGIN CODE>---
#include <stdio.h>

int main(void)
{
        printf("float: %.1f\n", (float) 1000.1234);
        return 0;
}
---<END CODE>----

If this also results in "float: 000.1", then the error is in the HP compiler 
or libraries.  Given the peculiar field truncation, I'm guessing this is a 
library problem (but I don't have access to an HP system to check).
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to