Date: Mon, 12 Mar 2007 17:33:04 -0400 (EDT) From: Steve Ames <steve@energistic.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/110243: First pass at getting devel/pwlib to compile on 64bit under gcc4.1 Message-ID: <200703122133.l2CLX4gq025692@energistic.com> Resent-Message-ID: <200703122220.l2CMK4r0016169@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110243 >Category: ports >Synopsis: First pass at getting devel/pwlib to compile on 64bit under gcc4.1 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Mar 12 22:20:04 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Steve Ames >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD energistic.com 6.2-STABLE FreeBSD 6.2-STABLE #67: Thu Mar 8 11:50:58 EST 2007 steve@energistic.com:/usr/obj/usr/src/sys/VV i386 >Description: Using gcc4.1, devel/pwlib won't compile on 64bit machines due to an error in the way pointers are attempting to be cast. The attached patch (which has also been submitted upstream to vendor) should fix this problem allowing the application to compile. I don't have a 64bit machine to test on so this is a hypothetical belief and there may be additional problems. I have tested this patch on 32-bit machines and there are no negative results. >How-To-Repeat: >Fix: This patch should be applied to devel/pwlib and adds a new file (devel/pwlib/files/patch-src-ptlib-unix-svcproc.cxx) which changes a few pointer casts from 'unigned' to 'unsigned long'. These casts are only used for debugging output. Patch applies from ports/devel directory. diff -ruN pwlib.orig/files/patch-src-ptlib-unix-svcproc.cxx pwlib/files/patch-src-ptlib-unix-svcproc.cxx --- pwlib.orig/files/patch-src-ptlib-unix-svcproc.cxx Wed Dec 31 19:00:00 1969 +++ pwlib/files/patch-src-ptlib-unix-svcproc.cxx Mon Mar 12 17:25:16 2007 @@ -0,0 +1,26 @@ +--- src/ptlib/unix/svcproc.cxx.orig Mon Mar 12 17:03:44 2007 ++++ src/ptlib/unix/svcproc.cxx Mon Mar 12 17:04:53 2007 +@@ -388,7 +388,7 @@ + #elif defined(BE_THREADS) + thread_id tid = ::find_thread(NULL); + #else +- unsigned tid = (unsigned) pthread_self(); ++ unsigned long tid = (unsigned long) pthread_self(); + #endif + *out << "ThreadID=0x" + << setfill('0') << ::hex +@@ -938,12 +938,12 @@ + #elif defined(BE_THREADS) + thread_id tid = ::find_thread(NULL); + #else +- unsigned tid = (unsigned) pthread_self(); ++ unsigned long tid = (unsigned long) pthread_self(); + #endif + PThread * thread_ptr = activeThreads.GetAt(tid); + + char msg[200]; +- sprintf(msg, "\nCaught %s, thread_id=%u", sigmsg, tid); ++ sprintf(msg, "\nCaught %s, thread_id=%xu", sigmsg, tid); + + if (thread_ptr != NULL) { + PString thread_name = thread_ptr->GetThreadName(); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703122133.l2CLX4gq025692>