From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,466dba702f09621e X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1994-10-21 11:13:34 PST Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!news.duke.edu!news.mathworks.com!usenet.eel.ufl.edu!usenet.cis.ufl.edu!caen!crl.dec.com!crl.dec.com!nntpd.lkg.dec.com!tpwaxp.tay1.dec.com!herrlich From: herrlich@tpwaxp.tay1.dec.com (Alan Herrlich) Newsgroups: comp.unix.osf.misc Subject: Re: help, malloc 32 vs malloc 64 Date: 21 Oct 1994 13:36:04 GMT Organization: Digital Equipment Corporation Message-ID: References: <37olne$rqn@csugrad.cs.vt.edu> NNTP-Posting-Host: tpwaxp.tay1.dec.com In-reply-to: teak@csugrad.cs.vt.edu's message of 15 Oct 1994 09:33:34 -0400 In article <37olne$rqn@csugrad.cs.vt.edu> teak@csugrad.cs.vt.edu (Teak 'Teakster' Min) writes: > Problem: I am working on a DEC Alpha using OSF/1. I need to know > if there is anyway to #define an int in C to a long. What I am > having problems is that when I malloc and I get a memory location, > the address is assigned to a pointer of type int which is 32bit but > the system gives back an address with is greater than 32bit address. > cc and gcc. I was TOLD that c was a portable code, was I lied to? The short answer is to use the -taso switch on the OSF/1 C compiler. That will cause the C compiler to tell the linker to create a program that will only have 32 bit addresses. For the long answer I suggest that you ask about C portablility issues in a C related newsgroup. There are lots of assumptions that you can make in a C program that can make if non-portable. -- Alan Herrlich herrlich@microw.enet.dec.com Opinions herein are my own and do not necessarily reflect those of Digital. For a summary of Digital's Internet services, send mail to info@digital.com