Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: danpop@cernapo.cern.ch (Dan Pop)
Subject: Re: Need help investigating a port to a DEC AXP system running OSF/1
Date: Wed, 2 Nov 1994 00:33:53 GMT	[thread overview]
Message-ID: <CyM6wI.1pH@news.cern.ch> (raw)
In-Reply-To: CyLtJE.734@irvine.com

In <CyLtJE.734@irvine.com> jim@irvine.com (James Zarbock) writes:

>It appears that in C on an Alpha which is a true 64 bit machine the
>size of the type "int" is 4 bytes and the size of the type "*"
>(pointer) is 8 bytes. Period.
>
>Is there some sort of "32 bit compatibility mode" for the C compiler
>that will make the C compiler make longs and pointers 4 bytes?

RTFM. From the cc man page:

  -taso
      Tell the linker that the executable file should be loaded in the lower
      31-bit addressable virtual address range. The -T and -D flags to the ld
      command can also be used to ensure that the text and data segments
      addresses, respectively, are loaded into low memory. The -taso flag,
      however, in addition to setting default addresses for text and data
      segments, also causes shared libraries linked outside the 31-bit
      address space to be appropriately relocated by the loader. If you
      specify -taso and also specify text and data segment addresses with -T
      and -D, those addresses override the -taso default addresses. The -taso
      flag is useful for porting 32-bit programs to DEC OSF/1.

Of course, there is no compiler option (that I know of) to make long's
32 bit, but you can solve this problem with:

#define long int

But fixing your code to remove the silly assumptions about the sizes of
the different data types is, by far, the best solution.

Dan
--
Dan Pop 
CERN, CN Division
Email: danpop@cernapo.cern.ch
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland


  reply	other threads:[~1994-11-02  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-01 19:45 Need help investigating a port to a DEC AXP system running OSF/1 James Zarbock
1994-11-02  0:33 ` Dan Pop [this message]
1994-11-02 13:18   ` Dave Golden
1994-11-02 14:52 ` Alan Herrlich
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox