*BSD News Article 84369


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!howland.erols.net!newsfeed.internetmci.com!btnet!dispatch.news.demon.net!demon!cucumber.demon.co.uk!usenet
From: andrew@cucumber.demon.co.uk (Andrew Gabriel)
Newsgroups: comp.unix.solaris,comp.unix.bsd.misc,comp.unix.internals
Subject: Re: Solaris 2.6
Date: 5 Dec 1996 23:37:37 GMT
Organization: home
Lines: 26
Distribution: inet
Message-ID: <587mc1$1dc@cucumber.demon.co.uk>
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>
NNTP-Posting-Host: cucumber
X-NNTP-Posting-Host: cucumber.demon.co.uk
X-Newsreader: knews 0.9.6
Xref: euryale.cc.adfa.oz.au comp.unix.solaris:91609 comp.unix.bsd.misc:1699 comp.unix.internals:11478

In article <5869r2$175$1@asgard.sprintlink.co.za>,
	philips@asiatech.co.za (philip Shearer) writes:
>Casper H.S. Dik (casper@fwi.uva.nl) wrote:
>: Marco S Hyman <marc@dumbcat.codewright.com> writes:
>: 
>: >Stage 1:
>: >Keep long 32 bits but now with 64 bit pointers so you can catch every
>: >program that assumes a pointer can be stored in a long or int.
>
>I don't see why anyone needs to store pointers as ints or longs
>store the them as pointers.

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

This would not work for example (whereas is currently does on both
32 bit Solaris and 64 bit DU):

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

How should it be done portably?

-- 
Andrew Gabriel                        Home: Andrew@cucumber.demon.co.uk
Consultant Software Engineer          Work: Andrew.Gabriel@net-tel.co.uk