From: reagan@hiyall.enet.dec.com (John R. Reagan)
Subject: Re: Dec Pascal
Date: 1995/11/16 [thread overview]
Message-ID: <48gbg8$d25@nntpd.lkg.dec.com> (raw)
In-Reply-To: 480jfl$os4@news.alaska.edu
In article <480jfl$os4@news.alaska.edu>, shane@saturn.uaamath.alaska.edu (Shane L. Kingry) writes...
>One of the classes in the department is having its students write a
>Pascal program. In this program, they need the 'clock' function
>
>This compiles fine, but fails miserably when trying to link:
>
>ld:
>Unresolved:
>pas$clock2
>Pascal: Severe: Failed while trying to link.
Unfortunately, there was a regression in the Pascal RTL (its in the
DPORTLxxx subset) such that the pas$clock2 RTL routine was accidently
left out. (We changed our build around and forgot a -D on a 'cc' command...)
Here's the source for pas$clock2 and pas$sysclock2 (the 2 routines missing
from DPORTL540)
#include <sys/resource.h>
long pas$clock2( void )
{
struct rusage r;
getrusage(RUSAGE_SELF,&r);
return ( (r.ru_utime.tv_sec*1000) + (r.ru_utime.tv_usec/1000) );
}
long pas$sysclock2( void )
{
struct rusage r;
getrusage(RUSAGE_SELF,&r);
return ( (r.ru_stime.tv_sec*1000) + (r.ru_stime.tv_usec/1000) );
}
Alternatively, you can go back an install an older DPORTLxxx subset.
There should be a DPORTL522 on the V3.2 CDROM itself (its near the '/'
directory, you'll have to look for it...) You'll loose any other
bug fixes and new features (like support for QUADRUPLE) added to
DPORTL540 however...
A corrected DPORTLxxx will be included in the next release of Digital
UNIX as well as in the next compiler kit. I'm planning on making a
'ECO' kit that should also be available from the support center as well
as Digital's ftp service (if I can figure out just how to do that).
---
John Reagan
DEC Pascal Project Leader
Application Compilers and Environments
Digital Equipment Corporation
reagan@hiyall.enet.dec.com
Disclaimer: The opinions and statements expressed by me are not
necessarily those of Digital Equipment Corporation.
---
prev parent reply other threads:[~1995-11-16 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-11-10 5:00 Dec Pascal Shane L. Kingry
1995-11-16 5:00 ` John R. Reagan [this message]
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