Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!sics.se!sics.se!jw From: jw@sics.se (Johan Widen) Newsgroups: comp.lang.perl Subject: Re: statmon: monitor up/down and time status of hosts (makelib actually) Message-ID: <1990Mar16.223117.14948@sics.se> Date: 16 Mar 90 22:31:17 GMT References: <100508@convex.convex.com> Sender: news@sics.se Followup-To: comp.lang.perl Organization: Swedish Institute of Computer Science, Kista Lines: 52 In-Reply-To: tchrist@convex.com's message of 10 Mar 90 14:48:06 GMT >>>>> In article <100508@convex.convex.com>, tchrist@convex.com (Tom Christiansen) writes: tchrist> Porting notes: you'll need the following include files, probably in tchrist> the perl library directory, which you should have generated from the tchrist> corresponding C include files using the makelib program in the perl tchrist> source directory: tchrist> sys/errno.h tchrist> sys/socket.h tchrist> sys/ioctl.h Thanks for an interesting application. I had some trouble getting the include files to work. This was the first time I tried to use 'makelib'. I spent a couple of hours trying to understand what was going on and in desperation I eventually started to look at backissues of comp.lang.perl. I found that Tom Christiansen has published an article about makelib Subject: makelib and beyond (was: syscall.pl) Message-ID: <-1773786449@convex.convex.com> Date: 14 Feb 90 21:54:24 GMT This article solved my problem! Thanks!! It turns out that there is a big in the makelib script. Tom suggests the following change: tchrist>First of all, the makelib program can generate things like this tchrist> $X & $Y tchrist> or sans spaces: tchrist> $X&$Y tchrist>but if $Y were a subroutine, you'd have tchrist> $X & &Y tchrist> or sans spaces: tchrist> $X&&Y tchrist> tchrist>which is pretty clearly wrong, as perl will see this as tchrist> ($X)&&(Y) tchrist>and give you a syntax error. tchrist> tchrist>To fix this, you have to change line #157 of makelib from tchrist> $new .= '&' . $id; tchrist>to tchrist> $new .= "(&$id)"; tchrist> tchrist>and this gets better. This solved my problem. The article is available on tut.cis.ohio-state.edu in pub/perl/scripts/makelib.stuff. This article is a must for anyone interested in makelib. -- Johan Widen SICS, PO Box 1263, S-164 28 KISTA, SWEDEN Internet: jw@sics.se Tel: +46 8 752 15 32 Ttx: 812 61 54 SICS S Fax: +46 8 751 72 30