Mail Archives: cygwin/2001/04/27/18:58:00
This is probably related to the ongoing thread "bug report: sscanf
problem with cygwin 1.3.1-1". All *scanf() functions will have a
similar bug. Me, I'm still waiting on the build of my debuggable kernel
to finish (us poor grad students don't own fast computers....) Has
anybody had a chance to debug the __svfscanf_r() routine?
--Chuck
"Trinkle, Jeff C" wrote:
>
> 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 <stdio.h>
>
> 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<number; i++) {
> num_read = fscanf(fp, "%f", &y);
> if (num_read != 1) {
> printf("\nRead error!\n\n");
> exit(1);
> }
> else
> printf("\n%6.2f", y);
> }
> printf("\n");
> fclose(fp);
>
> return 0;
> }
>
> ================ contents of the data file =========================
> 5
> 1.9
> 21.7
> -3.4
> -14.1
> 2.6
>
> ============== cygcheck -s -v -r output ==========================
>
> Cygnus Win95/NT Configuration Diagnostics
> Current System Time: Fri Apr 27 14:06:42 2001
>
> WinNT Ver 5.0 build 2195 Service Pack 1
>
> Path: /usr/local/bin
> /usr/bin
> /bin
> /cygdrive/c/Program Files/MiKTeX/miktex/bin
> /cygdrive/c/WINNT/system32
> /cygdrive/c/WINNT
> /cygdrive/c/WINNT/System32/Wbem
> /cygdrive/c/matlabr12/bin/win32
> /usr/bin
>
> SysDir: C:\WINNT\System32
> WinDir: C:\WINNT
>
> PWD = `c:/jctrink/Code/Milgram'
> USER = `administrator'
> MAKE_MODE = `unix'
> HOME = `/home/administrator'
>
> NUMBER_OF_PROCESSORS = `1'
> PROMPT = `$P$G'
> LOGONSERVER = `\\DC12SNLNT'
> OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
> COMSPEC = `C:\WINNT\system32\cmd.exe'
> !C: = `C:\cygwin\bin'
> SYSTEMDRIVE = `C:'
> HOSTNAME = `JCTRINKLP2'
> PROCESSOR_REVISION = `0806'
> DISKEEPERICON = `C:\Program Files\Executive Software\DiskeeperWorkstation\'
> PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
> COMPUTERNAME = `JCTRINKLP2'
> WINDIR = `C:\WINNT'
> USERPROFILE = `C:\Documents and Settings\jctrink'
> PS1 = `\[\033]0;\w\007
> \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> $ '
> PROGRAMFILES = `C:\Program Files'
> !:: = `::\'
> MACHTYPE = `i686-pc-cygwin'
> PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 6, GenuineIntel'
> OS = `Windows_NT'
> OLDPWD = `/home/administrator'
> PROCESSOR_ARCHITECTURE = `x86'
> TEMP = `/cygdrive/c/DOCUME~1/jctrink/LOCALS~1/Temp'
> PROCESSOR_LEVEL = `6'
> SYSTEMROOT = `C:\WINNT'
> HOMEDRIVE = `C:'
> ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
> SHLVL = `1'
> APPDATA = `C:\Documents and Settings\jctrink\Application Data'
> COMMONPROGRAMFILES = `C:\Program Files\Common Files'
> HOMEPATH = `\'
> USERDOMAIN = `SANDIA'
> USERNAME = `jctrink'
> SHELL = `/bin/sh'
> HOSTTYPE = `i686'
> OSTYPE = `cygwin'
> TERM = `cygwin'
> SMS_LOCAL_DIR = `C:\WINNT'
> _ = `/usr/bin/cygcheck'
> TZ = `MST7MDT6,M4.1.0/2,M10.5.0/2'
>
> HKEY_CURRENT_USER\Software\Cygnus Solutions
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
> (default) = `/cygdrive'
> cygdrive flags = 0x00000022
> HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
> HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrd
> er\Start Menu\Programs\Cygnus Solutions
> (default) = (unsupported type)
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
> (default) = `C:/cygwin'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
> (default) = `C:/cygwin/bin'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
> (default) = `C:/cygwin/lib'
> flags = 0x0000000a
> HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
>
> c: hd NTFS 19062Mb 32% CP CS UN PA FC HPNOTEBOOK
> d: cd N/A N/A
> e: net NTFS 297902Mb 62% CP CS UN PA CIFS.HOMEDIR
> g: net NTFS 297902Mb 62% CP CS UN PA CIFS.HOMEDIR
>
> C:\cygwin\bin /usr/bin system binmode
> C:\cygwin\lib /usr/lib system binmode
> C:\cygwin / system binmode
> c: /cygdrive/c user binmode,noumount
> e: /cygdrive/e user binmode,noumount
> g: /cygdrive/g user binmode,noumount
>
> Found: C:\cygwin\bin\bash.exe
> Found: C:\cygwin\bin\cat.exe
> Found: C:\cygwin\bin\cpp.exe
> Found: C:\cygwin\bin\find.exe
> Found: C:\cygwin\bin\gcc.exe
> Found: C:\cygwin\bin\gdb.exe
> Found: C:\cygwin\bin\ld.exe
> Found: C:\cygwin\bin\ls.exe
> Found: C:\cygwin\bin\make.exe
> Found: C:\cygwin\bin\sh.exe
>
> 56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
> "cygbz21.0.dll" v0.0 ts=2000/11/20 16:53
> 82k 2001/01/21 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
> "cygform5.dll" v0.0 ts=2001/1/21 13:39
> 18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
> "cyggdbm.dll" v0.0 ts=2000/10/22 20:26
> 17k 2001/01/07 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
> "cyghistory4.dll" v0.0 ts=2001/1/6 21:34
> 14k 2000/10/23 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
> "cygintl.dll" v0.0 ts=2000/10/23 13:02
> 81k 2000/12/05 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
> "cygitcl30.dll" v0.0 ts=2000/11/25 18:43
> 35k 2000/12/05 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
> "cygitk30.dll" v0.0 ts=2000/11/25 18:43
> 45k 2000/10/22 C:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
> "cygjbig1.dll" v0.0 ts=2000/10/22 17:06
> 119k 2000/10/23 C:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
> "cygjpeg6b.dll" v0.0 ts=2000/10/22 18:58
> 53k 2001/01/21 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
> "cygmenu5.dll" v0.0 ts=2001/1/21 13:39
> 414k 2001/01/21 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
> "cygncurses++5.dll" v0.0 ts=2001/1/21 13:40
> 299k 2001/01/21 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
> "cygncurses5.dll" v0.0 ts=2001/1/21 13:38
> 34k 2001/01/21 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
> "cygpanel5.dll" v0.0 ts=2001/1/21 13:38
> 163k 2001/02/03 C:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
> "cygpng2.dll" v0.0 ts=2001/2/3 14:21
> 108k 2001/01/07 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
> "cygreadline4.dll" v0.0 ts=2001/1/6 21:34
> 390k 2000/12/05 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
> "cygtcl80.dll" v0.0 ts=2000/11/25 18:39
> 5k 2000/12/05 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
> 10k 2000/12/05 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
> "cygtclreg80.dll" v0.0 ts=2000/11/25 18:39
> 243k 2000/10/23 C:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
> "cygtiff3.dll" v0.0 ts=2000/10/22 19:14
> 623k 2000/12/05 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
> "cygtk80.dll" v0.0 ts=2000/11/25 18:43
> 41k 2000/11/20 C:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
> "cygXpm-noX4.dll" v0.0 ts=2000/11/19 19:41
> 45k 2000/11/20 C:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
> "cygXpm-X4.dll" v0.0 ts=2000/11/19 19:45
> 49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
> "cygz.dll" v0.0 ts=2001/2/3 13:35
> 631k 2001/04/25 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
> "cygwin1.dll" v0.0 ts=2001/4/24 18:01
> Cygwin DLL version info:
> dll major: 1003
> dll minor: 1
> dll epoch: 19
> dll bad signal mask: 19005
> dll old termios: 5
> dll malloc env: 28
> api major: 0
> api minor: 38
> shared data: 3
> dll identifier: cygwin1
> mount registry: 2
> cygnus registry name: Cygnus Solutions
> cygwin registry name: Cygwin
> program options name: Program Options
> cygwin mount registry name: mounts v2
> cygdrive flags: cygdrive flags
> cygdrive prefix: cygdrive prefix
> cygdrive default prefix:
> build date: Tue Apr 24 20:01:02 EDT 2001
> shared id: cygwin1S3
>
> Use -h to see help about each section
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -