Tried to compile Itcl 4.0b4 (as in Tcl 8.6 HEAD) on
win32 and linux (MSVC, MINGW, CYGWIN), and
collected everything needed to make it compile
without warnings on those platforms. I beleave
this addresses some warnings already seen bij
Larry Virden on sparc solaris 8 as well.
Explanation:
- various unnecessary includes, e.g. itclInt.h already
includes "tcl.h" and "itcl.h" and itclInt includes
<string.h> and <ctype.h> so itcl.h does not need
to do that.
- <unistd.h> does not exist and is not needed on win32.
- Use TEOV_callback * and Tcl_NRPostProc * as
function parameters in stead of void *, so we don't
need type casts. I believe this fixes some of the
warnings reported by Larry Virden
- Always define BUILD_itcl, so CYGWIN/unix can
make use of it as well.
- dllEntryPoint.c does not end in a newline, some
versions of gcc complain about that.
- use the UCHAR macro in all isupper()-like function
calls.
- Fixed some "statement not reached" warnings
Remark: Compilation on CYGWIN requires an update
to the latest tcl.m4 and re-generate the configure script.
That change is not included in this patch.
Looks like a lot of those problems are fixed in the repository
now, only the UCHAR causes warnings on cygwin.
So, here is a new patch with the remaining issue
proposed fix
patch for Itcl 3.4
Here is another patch, which fixes all warnings in Itcl 3.4, when compiling with cygwin (thanks to the TEA 3.9 upgrade this is now possible!). Most warnings originated from the -DUSE_NON_CONST, but there were signed <-> unsigned comparisions as well. This patch adds CONST and CONST84 in the proper places.
I am willing to commit those two patches myself , if someone gives me
the rights (provided that you agree with my approach...)
I'll see which of those patches are still valid, and how far this is fixed already