On Tue, May 01, 2007 at 11:50:46AM -0500, Peter O'Gorman wrote: > We built pth-2.0.7 on powerpc-ibm-aix5.1 5.2 and 5.3, with xlc. When > running the tests, test_std hangs forever. It may be a compiler bug, > as CFLAGS='-g -O0' does not hang, nor does gcc. AIX 4.3.3 with xlc > does not hang either. > > A problem is that pth strips -g flags during configure unless > --enable-debug is passed. It is not nice to remove/modify the users > CFLAGS settings. Please fix this. > > Have you heard of this hanging issue previously? Is there a solution?
Patch attached. The problem was the gettimeofday() test. Assuming an ANSI C compiler, the best way to test if a certain function accepts different args is to re-specify the prototype. The compiler will complain accordingly, and fail correctly. -- albert chin ([EMAIL PROTECTED]) -- snip snip Index: configure.ac =================================================================== --- configure.ac.orig 2006-06-08 17:54:01.000000000 +0000 +++ configure.ac 2007-08-08 19:26:53.702750697 +0000 @@ -263,6 +202,8 @@ #include <sys/types.h> #include <sys/time.h> #include <unistd.h> + +extern int gettimeofday(struct timeval *); ],[ struct timeval tv; (void)gettimeofday(&tv); @@ -271,10 +212,6 @@ , msg="no" ) -case $PLATFORM in - *-*-aix4* ) msg="no" ;; # on AIX the compiler test doesn't work - *-*-isc* ) msg="no" ;; # on ISC the compiler test doesn't work -esac if test ".$msg" = .yes; then AC_DEFINE(HAVE_GETTIMEOFDAY_ARGS1, 1, [define if gettimeofday(2) wants a single-argument only]) fi ______________________________________________________________________ GNU Portable Threads (Pth) http://www.gnu.org/software/pth/ Development Site http://www.ossp.org/pkg/lib/pth/ Distribution Files ftp://ftp.gnu.org/gnu/pth/ Distribution Snapshots ftp://ftp.ossp.org/pkg/lib/pth/ User Support Mailing List pth-users@gnu.org Automated List Manager (Majordomo) [EMAIL PROTECTED]