[Simh] BUGREPORT: strncasecmp() in Cygwin

Alexander Voropay alec at sensi.org
Tue Feb 17 04:47:33 EST 2009


Hi!

CYGWIN and SIMH V3.8-1 gives the following bug.

The only module which affected this is a "ibm1130". Seems it redefines standart
"strncasecmp()" from the <string.h>

> uname -a
CYGWIN_NT-5.1 MYWINHOST 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

> gcc -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with:
/usr/build/package/orig/test.respin/gcc-3.4.4-3/configure --verbose
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,pascal,java,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs
--without-x --enable-libgcj --disable-java-awt --with-system-zlib
--enable-interpreter --disable-libgcj-debug --enable-threads=posix
--enable-java-gc=boehm --disable-win32-registry
--enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug
Thread model: posix
gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)



...
gcc -std=c99 -U__STRICT_ANSI__ -O2 -I. Ibm1130/ibm1130_cpu.c
Ibm1130/ibm1130_cr.c Ibm1130/ibm1130_disk.c Ibm1130/ibm1130_stddev.c
Ibm1130/ibm1130_sys.c Ibm1130/ibm1130_gdu.c Ibm1130/ibm1130_gui.c
Ibm1130/ibm1130_prt.c Ibm1130/ibm1130_fmt.c Ibm1130/ibm1130_ptrp.c
Ibm1130/ibm1130_plot.c Ibm1130/ibm1130_sca.c Ibm1130/ibm1130_t2741.c
scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c
sim_ether.c sim_tape.c -I Ibm1130 -o BIN/ibm1130.exe -lm -lwsock32
-lwinmm
In file included from Ibm1130/ibm1130_cpu.c:141:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_cr.c:1:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_disk.c:36:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_stddev.c:85:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_sys.c:27:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_gdu.c:1:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_gui.c:33:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_prt.c:49:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_ptrp.c:20:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_plot.c:21:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_sca.c:85:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
In file included from Ibm1130/ibm1130_t2741.c:6:
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
Ibm1130/ibm1130_defs.h:30: error: conflicting types for 'strncasecmp'
/usr/include/string.h:71: error: previous declaration of 'strncasecmp' was here
make: *** [BIN/ibm1130.exe] Error 1


More information about the Simh mailing list