Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Server-Uuid: 7edb479a-fd89-11d2-9a77-0090273cd58c Message-ID: <03781128C7B74B4DBC27C55859C9D738D4296E@es06snlnt> From: "Trinkle, Jeff C" To: "'cygwin AT cygwin DOT com'" Subject: cygwin 1.3.1 bug in fscanf("%lf", &a) Date: Fri, 27 Apr 2001 14:38:46 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) X-Filter-Version: 1.3 (sass165) X-WSS-ID: 16F707441152759-01-01 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit I am having a problems with doubles on an HP laptop running Windows 2000 version 5.00.2195, service pack 1. Code and data file demonstrating the problem is below. This code works on other OSs and compilers. Also included below is the output from cygcheck -s -v -r. I also have what I believe are related problems using math functions, sin() and cos(), with double arguments. Any help would be appreciated. Jeff Trinkle ================== makefile =================== CFLAGS= -c -g -Ic:/cygwin/include -ansi LDFLAGS= -Lc:/cygwin/lib -lm test: test.o gcc -o test test.o ${LDFLAGS} test.o: test.c gcc ${CFLAGS} test.c ================== the code ================= /* This program demonstrates a bug in cygwin under windoze 2000. Doubles read by fscanf are 10 times their values in the input file, test.dat */ /* The same program runs just fine under Red Hat Linux 7.0 */ /* cygwin was installed directly from the web on 2/24/00 and no */ /* configuration was attempted. It was run as configured by the */ /* web installation */ #include int main () { int i, number, num_read; float y; FILE *fp; /* Read data */ fp = fopen("test.dat", "r"); fscanf(fp, "%d", &number); printf("\nNumbers"); for (i=0; i