From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7a20a3646391c150 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-04-10 10:43:38 PST Newsgroups: comp.unix.osf.osf1 Path: gmd.de!xlink.net!sol.ctr.columbia.edu!news.kei.com!world!mv!fastball.unimaster.com!cherkus From: cherkus@fastball.unimaster.com (Dave Cherkus) Subject: Re: Porting 32-bit programs, using gcc Message-ID: Nntp-Posting-Host: fastball.unimaster.com Sender: usenet@mv.mv.com (System Administrator) Reply-To: cherkus@UniMaster.COM Organization: UniMaster, Inc. Date: Sun, 10 Apr 1994 17:43:38 GMT References: <2nuhns$qb2@senator-bedfellow.MIT.EDU> In article <2nuhns$qb2@senator-bedfellow.MIT.EDU>, tuyo@mumford (Mike M. Tuyo) writes: |> I'm trying to port a *huge* program written for a 32-bit machine |> to the alpha, and my resident compiler is gcc (2.5.7). It seems |> to have quite a bit of problems with the longs being 8-bytes wide. |> |> Can someone tell my what options to give gcc so it makes longs 4-bytes |> wide instead of 8? |> |> Thank you |> -mike tuyo. Even if gcc had such a flag, its use would be problematic because any code you would link to would be build assuming that longs are eight bytes wide. Even if you could recompile all user mode code, the system call interface is coded that way as well so you would have to fix up all parameters to the system calls that were longs. I think you can see that there is a lot more to this than a compiler flag. Some people claim success with typedefs or global substitutions to avoid the problem, but again you need to make sure that all code that interfaces with libraries provides the properly sized arguments to those libraries. Others report that 'lint -Q' helps find portability problems. BTW Mike your news software doesn't include your proper email address (i.e. tuyo@mumford is insufficient). -- Dave Cherkus UniMaster, Inc. cherkus@unimaster.com