|
From: Craig D. <c.d...@it...> - 2006-02-03 02:40:19
|
Just joining this list, so I can see this Subject line in the archives.
I don't see how I can join the thread with the web interface, but I can
add some inputs. First, the problem also occurs with Solaris 9 and
Studio 10. The real problem seems to be the definition of const. In
include/mutils/mutils.h, I put
#define const const
before the check
#if defined(const)
#define __const const
#endif
This makes the errors about the types go away. This is just a case of
one error cascading into multiple ones as the compiler helpfully tries
to keep compiling.
Other problems abound:
In lib/mhash_adler32.h. My copy has carriage returns at the end of the
lines, which causes the preprocessor to barf with things like this
"./mhash_adler32.h", line 1: warning: invalid white space character in
directive
lib/stdfns.c also has this problem, as does lib/crc32.c
The final error occurs in lib/mhash.c which complains about a use of
false, and 2 uses of true. The configure test in this regard is messed
up. It correctly detects there is no stdbool.h, but then it checks for
_Bool which passes since Sun Studio 10 supports C99 which does have the
_Bool type. However, the only values a _Bool can assume are 1 and 0.
It's actually stdbool.h which defines true and false for 1 and 0
(typedefs _Bool to bool) Thus, this code
#if defined(HAVE__BOOL)
#define mutils_boolean _Bool
#define MUTILS_FALSE false
#define MUTILS_TRUE true
gets included, but you should also have the lines
#ifndef false
#define false 0
#endif
#ifndef true
#define true 1
#endif
before you #define MUTILS_FALSE, and MUTILS_TRUE (and so that other
usages of true and false get caught). Now the code compiles, but make
check dies:
....
everything seems to be fine :-)
PASS: hash_test.sh
Segmentation Fault - core dumped
FAIL: hmac_test
Segmentation Fault - core dumped
FAIL: keygen_test
Segmentation Fault - core dumped
FAIL: rest_test
Checking fragmentation capabilities of MD5: Segmentation Fault - core dumped
FAIL: frag_test
===================
4 of 5 tests failed
===================
*** Error code 1
make: Fatal error: Command failed for target `check-TESTS'
Current working directory /usr/local/src/mhash/mhash-0.9.4/src
*** Error code 1
make: Fatal error: Command failed for target `check-am'
Current working directory /usr/local/src/mhash/mhash-0.9.4/src
*** Error code 1
make: Fatal error: Command failed for target `check-recursive'
--
/^^^\ Craig Dupree, Systems Analyst
/~O~O~\ c.d...@it... ITS, User Services
\ U / (512)471 - 5358 UNIX Tech. Support
-oOo-------oOo- (512)625 - 0321(pg) The University of Texas at Austin
c.d...@my...(pg email)
Democracy is two wolves and a sheep voting on what to have for dinner.
Liberty is two wolves attempting to have a sheep for dinner and
finding a well-informed, well-armed sheep.
|