Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-22
17:19 • Ticket [1905560fff] --enable-symbols 'make test' fails on MSVC2005 s... artifact: f39b8b2796 user: serhiy.storchaka
2026-10-21
09:06 • Closed ticket [1905560fff]. artifact: 840d3bf1e3 user: serhiy.storchaka
2008-03-02
03:52 • New ticket [1905560fff]. artifact: 10b19a47a3 user: kennykb

--enable-symbols 'make test' fails on MSVC2005

Closed / Fixed1905560fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 41 days ago
Descriptionplain2008-03-02 03:52:26
Using MSVC2005, running 'configure --enable-symbols', 'make', and 'make test', I get:

cat.c
../win/cat.c(26) : error C2220: warning treated as error - no 'object' file generated
../win/cat.c(26) : warning C4996: 'read': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _read. See online help for details.
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\io.h(329) : see declaration of 'read'
../win/cat.c(30) : warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\io.h(334) : see declaration of 'write'
../win/cat.c(33) : warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _write. See online help for details.
        C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\io.h(334) : see declaration of 'write'
make: *** [cat32.obj] Error 2

If I edit the generated Makefile manually and include 
-D_CRT_NONSTDC_NO_DEPRECATE, the problem goes away.
This definition is safe for all versions of MSVC,
not just 2k5.
serhiy.storchakawiki2026-10-21 09:06:36

Fixed in 8.5.3 by [8d5cc700eb]: win/tcl.m4 defines _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE for MSVC (still so in 8.6 and 9.x), and win/cat.c now uses _read/_write. Closing.

serhiy.storchaka Ticket [1905560fff]: 3 changes [History diff]2026-10-22 17:19:29
Log in (anonymous is fine) to add a comment.