From: SourceForge.net <no...@so...> - 2010-04-27 12:01:04
|
Bugs item #2991415, was opened at 2010-04-23 16:52 Message generated for change (Comment added) made by nijtmans You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2991415&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 52. Portability Support Group: development: 8.6b1.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Larry W. Virden (lvirden) Assigned to: Jan Nijtmans (nijtmans) Summary: tclport.h #include'd before limits.h Initial Comment: SunOS 8, Sun C compiler, Tcl 8.6 cvs head The tclport.h header appears set up to define a variety of macros if not already defined in the compile environment. In theory, then, it should be included after any general or os specific headers, such as limits.h, giving the OS the opportunity to define the values appropriately for the specific platform. with the current CVS head, I see the following warnings: cc .* /vol/tclsrcsol/tcl86/tcl/generic/regcomp.c "/usr/include/limits.h", line 236: warning: macro redefined: LLONG_MIN "/usr/include/limits.h", line 237: warning: macro redefined: LLONG_MAX : as well as most, if not all, of the rest of the tcl core c modules have the same warning being produced. There are a number of other warnings output during compilation of the tcl source - but none so consistent as these. The libtommath pkg modules don't generate the warning and some of the itcl pkg modules do not... ---------------------------------------------------------------------- >Comment By: Jan Nijtmans (nijtmans) Date: 2010-04-27 14:01 Message: "regguts.h" includes "regcustom.h", which includes "tclInt.h", which includes <stdio.h>, <stdlib.h>, <ctype.h>, <limits.h> and <string.h>. This means that inclusion of those header files in "regguts.h" serves no purpose. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-04-27 13:56 Message: I'm still not sure that this bug is really fixed when NO_LIMITS_H is set. Observation: tclUnixPort.h: #ifdef NO_LIMITS_H # include "../compat/limits.h" #else # include <limits.h> #endif But in a lot of places of the core, e.g. "regguts.h", <limits.h> is included regardless of the NO_LIMITS_H setting. Let's evaluate the use of some standard C header files (separate issues in separate comments) ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-04-23 17:46 Message: Added the include in "tclUnixPort.h". Should be fixed now. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-04-23 17:45 Message: I see what is going on. In tclInt.h: #ifdef NO_LIMITS_H # include "../compat/limits.h" #else # include <limits.h> #endif But files which only include tclPort.h and not tclInt.h will mis this. Those lines should be moved to tclPort.h. ---------------------------------------------------------------------- Comment By: Jan Nijtmans (nijtmans) Date: 2010-04-23 17:06 Message: Having a look ---------------------------------------------------------------------- Comment By: Larry W. Virden (lvirden) Date: 2010-04-23 16:53 Message: Okay, so the warning is telling me that the OS value for the define is being used. That's the good news. It would be nice if this particular pair of warnings were not being issued, IMO. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=2991415&group_id=10894 |