summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--generic/tclZlib.c21
-rw-r--r--win/Makefile.in4
-rwxr-xr-xwin/configure4
-rw-r--r--win/tcl.m44
5 files changed, 25 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 07439cc..2567688 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-11 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclZlib.c: Eliminate warning: different 'const' qualifiers
+ with msvc compiler. A few more 'const' optimizations.
+ * win/tcl.m4: fix Windows build (msvc) for TIP #234 implementation
+ * win/Makefile.in:
+ * win/configure:
+
2008-12-11 Andreas Kupries <andreask@activestate.com>
* generic/tclIO.c (SetChannelFromAny and related): Modified the
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 548e941..5632640 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclZlib.c,v 1.3 2008/12/11 16:57:13 dkf Exp $
+ * RCS: @(#) $Id: tclZlib.c,v 1.4 2008/12/11 22:30:32 nijtmans Exp $
*/
#include "tclInt.h"
@@ -61,7 +61,8 @@ ConvertError(
case Z_VERSION_ERROR: codeStr = "VERSION"; break;
default:
codeStr = "unknown";
- sprintf(codeStr2 = codeStrBuf, "%d", code);
+ codeStr2 = codeStrBuf;
+ sprintf(codeStrBuf, "%d", code);
break;
}
Tcl_SetObjResult(interp, Tcl_NewStringObj(zError(code), -1));
@@ -112,7 +113,7 @@ GenerateHeader(
gz_header *headerPtr)
{
Tcl_Obj *value;
- static const char *types[] = {
+ static const char *const types[] = {
"binary", "text"
};
@@ -531,7 +532,7 @@ ZlibStream(
Tcl_Obj *const objv[])
{
StreamInfo *siPtr = clientData;
- static const char *subcmds[] = {
+ static const char *const subcmds[] = {
"adler32", "close", "eof", "finalize", "flush", "fullflush", "get",
"put", NULL
};
@@ -673,7 +674,7 @@ zstreamincmd(
int e, index;
Tcl_Obj *obj;
- static const char* cmds[] = { "fill", "drain", NULL, };
+ static const char *const cmds[] = { "fill", "drain", NULL, };
if (Tcl_GetIndexFromObj(ip, objv[1], cmds, "option", 0,
&index) != TCL_OK) {
@@ -738,7 +739,7 @@ ZlibCmdO(
z_stream stream;
Tcl_Obj *obj = Tcl_GetObjResult(ip);
- static const char* cmds[] = {
+ static const char *const cmds[] = {
"adler32", "crc32", "compress", "deflate", "decompress", "inflate",
"sdecompress", "sinflate", NULL,
};
@@ -1942,7 +1943,7 @@ ZlibCmd(
Tcl_ZlibStream zh;
Byte *data;
Tcl_Obj *obj = Tcl_GetObjResult(interp);
- static const char *commands[] = {
+ static const char *const commands[] = {
"adler32", "compress", "crc32", "decompress", "deflate", "gunzip",
"gzip", "inflate",
#ifdef TCLKIT_BUILD
@@ -1959,7 +1960,7 @@ ZlibCmd(
#endif
z_stack, z_stream, z_unstack
};
- static const char *stream_formats[] = {
+ static const char *const stream_formats[] = {
"compress", "decompress", "deflate", "gunzip", "gzip", "inflate",
NULL
};
@@ -2187,7 +2188,7 @@ ZlibStreamCmd(
Tcl_Obj *obj = Tcl_GetObjResult(interp);
int buffersize;
int flush = -1, i;
- static const char *cmds[] = {
+ static const char *const cmds[] = {
"add", "adler32", "close", "eof", "finalize", "flush",
"fullflush", "get", "put", "reset",
NULL
@@ -2196,7 +2197,7 @@ ZlibStreamCmd(
zs_add, zs_adler32, zs_close, zs_eof, zs_finalize, zs_flush,
zs_fullflush, zs_get, zs_put, zs_reset
};
- static const char *add_options[] = {
+ static const char *const add_options[] = {
"-buffer", "-finalize", "-flush", "-fullflush", NULL
};
enum addOptions {
diff --git a/win/Makefile.in b/win/Makefile.in
index 16d7474..ebe7f5c 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "./configure", which is a configuration script generated by the "autoconf"
# program (constructs like "@foo@" will get replaced in the actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.138 2008/12/11 14:32:34 nijtmans Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.139 2008/12/11 22:30:31 nijtmans Exp $
VERSION = @TCL_VERSION@
@@ -177,7 +177,7 @@ SHLIB_LD = @SHLIB_LD@
SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ $(LIBS)
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_SUFFIX = @SHLIB_SUFFIX@
-LIBS = @LIBS@ -lz
+LIBS = @LIBS@
RMDIR = rm -rf
MKDIR = mkdir -p
diff --git a/win/configure b/win/configure
index 54c8274..40a48f8 100755
--- a/win/configure
+++ b/win/configure
@@ -3798,7 +3798,7 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;}
fi
SHLIB_LD=""
SHLIB_LD_LIBS=""
- LIBS="-lws2_32"
+ LIBS="-lws2_32 -lz"
# mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't
LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32"
STLIB_LD='${AR} cr'
@@ -3976,7 +3976,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
fi
fi
- LIBS="user32.lib advapi32.lib ws2_32.lib"
+ LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib"
if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
# not work if AC_TRY_COMPILE is called. TEA has the
diff --git a/win/tcl.m4 b/win/tcl.m4
index 1a46527..872b955 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -446,7 +446,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
fi
SHLIB_LD=""
SHLIB_LD_LIBS=""
- LIBS="-lws2_32"
+ LIBS="-lws2_32 -lz"
# mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't
LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32"
STLIB_LD='${AR} cr'
@@ -614,7 +614,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
fi
fi
- LIBS="user32.lib advapi32.lib ws2_32.lib"
+ LIBS="user32.lib advapi32.lib ws2_32.lib zdll.lib"
if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
# not work if AC_TRY_COMPILE is called. TEA has the