From owner-freebsd-bugs Wed Oct 6 1:52:29 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BCA2614D9C for ; Wed, 6 Oct 1999 01:52:27 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id BAA40579; Wed, 6 Oct 1999 01:50:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Wed, 6 Oct 1999 01:50:03 -0700 (PDT) Message-Id: <199910060850.BAA40579@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/14142; it has been noted by GNATS. From: Bruce Evans To: netch@lucky.net Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Date: Wed, 6 Oct 1999 18:46:08 +1000 (EST) On Wed, 6 Oct 1999, Valentin Nechayev wrote: > Bruce Evans wrote: > > ... All these > > problems can be fixed better now by casting pointers to > > (u_long)(uintptr_t)(void *) and printing them with %lx, or if the format > > doesn't matter, by casting pointers to (void *) and printing them with %p. Except uintptr_t is not supported in RELENG_3. > > The original code was broken at runtime (it shows only the low 32 bits of > > pointers on FreeBSD-alpha). > > Of course, original code is broken also and really. Do you know the reason > of using integral formats instead of %p in original code? It's probably "portability". Some systems don't/didn't have %p. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message