2 chdir 't' if -d 't/lib';
3 @INC = '../lib' if -d 'lib';
4 require Config; import Config;
5 if (-d 'lib' and $Config{'extensions'} !~ /\bOS2(::|\/)REXX\b/) {
13 $path = $ENV{LIBPATH} || $ENV{PATH} or die;
14 foreach $dir (split(';', $path)) {
15 next unless -f "$dir/YDBAUTIL.DLL";
16 $found = "$dir/YDBAUTIL.DLL";
19 $found or print "1..0 # skipped: cannot find YDBAUTIL.DLL\n" and exit;
23 $module = DynaLoader::dl_load_file($found) or die "not ok 1\n# load\n";
26 $address = DynaLoader::dl_find_symbol($module, "RXPROCID")
27 or die "not ok 2\n# find\n";
30 $result = OS2::REXX::_call("RxProcId", $address) or die "not ok 3\n# REXX";
33 ($pid, $ppid, $ssid) = split(/\s+/, $result);
34 $pid == $$ ? print "ok 4\n" : print "not ok 4\n# pid\n";
35 $ssid == 1 ? print "ok 5\n" : print "not ok 5\n# pid\n";
36 print "# pid=$pid, ppid=$ppid, ssid=$ssid\n";