*BSD News Article 84359


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.caldera.com!enews.sgi.com!EU.net!sun4nl!fwi.uva.nl!not-for-mail
From: casper@fwi.uva.nl (Casper H.S. Dik)
Newsgroups: comp.unix.solaris,comp.unix.bsd.misc,comp.unix.internals
Subject: Re: Solaris 2.6
Supersedes: <cancel.casper.32a804ad@mail.fwi.uva.nl>
Date: 6 Dec 1996 12:34:05 +0100
Organization: Sun Microsystems, Netherlands
Lines: 22
Distribution: inet
Message-ID: <casper.32a804ad@mail.fwi.uva.nl>
References: <32986299.AC7@mail.esrin.esa.it> <57djlg$bks@agate.berkeley.edu>   <57dkbq$bsr@panix2.panix.com> <casper.329abb76@mail.fwi.uva.nl>   <x7917mx5gx.fsf@dumbcat.codewright.com> <casper.329d5a07@mail.fwi.uva.nl>   <5869r2$175$1@asgard.sprintlink.co.za> <587mc1$1dc@cucumber.demon.co.uk>
NNTP-Posting-Host: mail.fwi.uva.nl
Xref: euryale.cc.adfa.oz.au comp.unix.solaris:91588 comp.unix.bsd.misc:1696 comp.unix.internals:11475

andrew@cucumber.demon.co.uk (Andrew Gabriel) writes:

>Out of curiosity, how would you print a pointer (for debugging say)?

>char *ptr;
>printf("pointer = 0x%lx", (long) ptr);

>How should it be done portably?


Portably?  I don't know.  When we get a 64 bit Solaris, pointers and
longs will still be the same size.

Does DU have a %p printf directive?  Perhaps that is even on some
standards track?

Casper
-- 
Casper Dik - Sun Microsystems - via my guest account at the University
of Amsterdam.  My work e-mail address is: Casper.Dik@Holland.Sun.COM
Statements on Sun products included here are not gospel and may
be fiction rather than truth.