[Python-bugs-list] [Bug #115506] recent change to md5.h causes md5c.c compilation failure

noreply@sourceforge.net noreply@sourceforge.net
Wed, 27 Sep 2000 15:14:48 -0700


Bug #115506, was updated on 2000-Sep-27 14:51
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 7
Summary: recent change to md5.h causes md5c.c compilation failure

Details: Around the time 2.0b2 was released, a change to md5.h involving the removal of
#include <limits.h>
causes macros to become undefined, and compilation on Tru64 Unix to fail. The relevant code in md5.h is:

/* UINT4 defines a four byte word */
#if SIZEOF_LONG == 4
typedef unsigned long int UINT4;
#else
#if INT_MAX == 2147483647
typedef unsigned int UINT4;
#endif
/* Too bad if neither is; pyport.h would need to be fixed. */
#endif

md5c.c #includes only "config.h" and then "md5.h". Config.h defines SIZEOF_LONG, but not INT_MAX, and on a machine where SIZEOF_LONG is 8, as it is on Tru64 Unix, this results in UINT4 is not being typedef'ed, leading to compilation errors in md5c.c . The comment about pyport.h has no relevance here, since it doesn't get #included. The previous version of md5.h #included <limits.h>, causing INT_MAX to be defined, so things worked. The fix is either to re-include limits.h, or have INT_MAX defined in config.h when generated by configure.

Follow-Ups:

Date: 2000-Sep-27 15:14
By: tim_one

Comment:
All modules should #include Python.h.  The bug appears to be that md5c.c doesn't.  It shouldn't include config.h directly.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=115506&group_id=5470