Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: charette@ultoe.det.dec.com (Mark Charette)
Subject: Re: Sun C code compiled on OSF/1??
Date: 1995/07/21	[thread overview]
Message-ID: <3umt3a$r2i@eccdb1.pms.ford.com> (raw)
In-Reply-To: 3umh4p$amh@agate.berkeley.edu

Andy C. Hsia (hsiacc@prometheus.ME.Berkeley.EDU) wrote:

: I'm trying to compile C code written for Sun computer on our Alpha 3000/600 
: running OSF/1 2.0.  At first, I got a few errors like the following:

: /usr/lib/cmplrs/cc/cfe: Error: t3m..c, line 141: redeclaration of 
: 'random'; previous declaration at line 245 in file '/usr/include/stdlib.h'
:  long random();
:  -----^
...

: So I commented out the offending lines.  The code compiled with no
: warnings or errors, but doesn't run properly.  When run, the program
: should say, "Starting analysis" and "The volume fraction is..."  My
: program, however, just says "Starting analysis," and doesn't go on.  A 'ps
: ux' shows that the program is utilizing 99% of the CPU, but no output.  A

Chances are that commenting out the offending lines (such as long random();)
haven't caused any errors, since the correct prototype is in the system
include files (the reason you were getting the errors). However, fixing the
problem of longs and pointers being 8 bytes (64 bits) in length now rears its
head.

Try cc -migrate and check and correct any warnings
Use lint -Q and correct any pointer/integer mismatches
grep for long & make sure that the variables REALLY should be long, not an int.
Make sure every long & pointer passed as arguments are accepted as long & 
pointer.
Put protoypes in for all your codes.

There's more but this should get you pointed in the right direction.
--
Mark Charette                     charette@mika.com
MIKA Systems, Inc
17197 N. Laurel Park Dr Suite 115
Livonia, MI 48152



  parent reply	other threads:[~1995-07-21  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-20  4:00 Sun C code compiled on OSF/1?? Andy C. Hsia
1995-07-20  4:00 ` Mike Iglesias
1995-07-21  4:00 ` Mark Charette [this message]
1995-07-21  4:00 ` Eric Osborne
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