[1927] in testers
Re: perl
daemon@ATHENA.MIT.EDU (lwvanels@Athena.MIT.EDU)
Mon May 25 12:51:24 1992
From: lwvanels@Athena.MIT.EDU
Date: Mon, 25 May 92 12:50:55 -0400
To: "Richard Basch" <basch@MIT.EDU>
Cc: testers@MIT.EDU, marc@MIT.EDU
In-Reply-To: [1921]
Reply-To: lwvanels@MIT.EDU
There isn't a "syscall.h" because there isn't an equivalent to the `syscall'
routine under BSD. Since syscalls can be added dynamically under AIX,
apparently they didn't want to nail down what numbers corresponded to what
syscalls in a header file, but instead have you rely on the library
wrappers. Presumably, this way they could (if necessary) change the syscall
numbers in the kernel and change the shared libraries which provide wrappers
for these functions as well, with no user-visible effect. (This is in the
Technical library info-explorer CD, and was hashed over in comp.lang.perl a
couple of weeks ago- see perl [1314,1315,1317].)
Note that since both versions of perl were (rightly) compiled with
"HAS_SYSCALL" undefined, adding a syscall header file will just make it bomb
out with a "syscall() unimplemented" later on, when the syscall function is
actually used.
You might just want to do
chop($hostname = `hostname`);
instead- yes, the fork is slower than a system call, but it is unlikely
you'll need to do it more than once per invocation, and it will work on all
platforms.
-Lucien