[EMAIL PROTECTED] wrote on 08/13/2008 10:50:04 PM:

> I would think VMS::Monitor would do the trick:
> 
> http://search.cpan.org/~dsugal/VMS-Monitor-0_06/monitor/monitor.pm
> 
> It uses the EXE$GETSPI interface, which was the undocumented 
> predecessor to SYS$GETRMI.  It should be a fairly mechanical operation 
> to convert the $GETSPI calls to $GETRMI if that's needed for some 
> reason, but whether the item codes are all still the same, whether all 
> item codes of interest are included, whether it works as is on OVMS 
> v8.3 and Itanium -- those are all unknowns here.  It might well run 
> out of the box with no modifications, or it might need some TLC to get 
> modern, but I can't think of any reason to reinvent the wheel or start 
> from scratch.
> 
> I'm believe, as with all of Dan's modules, I'm "co-maintainer" of this 
> module, which means I can apply patches to the CPAN version if you 
> send them in.

In order to compile with more recent versions of perl we found 
we had to update some of the xs macro variables used in 
the Monitor.xs file.

Here is a gnu unified diff of the local changes we had to make
(taken on VMS hence the lowercase file name):

--- [.vms-monitor-0_06_orig]monitor.xs  Thu Aug 14 08:40:12 2008
+++ [.vms-monitor-0_06]monitor.xs       Thu Aug 14 08:39:35 2008
@@ -595,7 +595,7 @@
   int EventFlag;
 
   for (i = 0; MonitorInfoList[i].InfoName; i++) {
-    if (strEQ(MonitorInfoList[i].InfoName, SvPV(infoname, na))) {
+    if (strEQ(MonitorInfoList[i].InfoName, SvPV(infoname, PL_na))) {
       break;
     }
   }
@@ -603,7 +603,7 @@
   /* Did we find a match? If not, complain and exit */
   if (MonitorInfoList[i].InfoName == NULL) {
     warn("Invalid monitor info item");
-    ST(0) = &sv_undef;
+    ST(0) = &PL_sv_undef;
   } else {
     /* allocate our item list */
     ITMLST OneItem[2];
@@ -938,12 +938,12 @@
         free(ReturnStringBuffer);
         break;
       default:
-        ST(0) = &sv_undef;
+        ST(0) = &PL_sv_undef;
         break;
       }
     } else {
       SETERRNO(EVMSERR, status);
-      ST(0) = &sv_undef;
+      ST(0) = &PL_sv_undef;
       /* free up the buffer if we were looking for a string */
       if (MonitorInfoList[i].ReturnType == IS_STRING)
         free(ReturnStringBuffer);
End of Patch.

I hope that helps.

Peter Prymmer

Reply via email to