I have recently downloaded & compiled Perl5.6.1.
I am trying to use ioctl to access and setup a tty for modem use.
I keep getting an invalid argument returned by ioctl.
Perl 5.6.1 compiled cleanly, I ran "h2ph -r -l *" as root from
/usr/include.
Any help would be appreciated.
Thanks in advance
-Keith
Here is a sample of the test code:
==========================================================================
#!/usr/local/bin/perl
use POSIX;
use IO::Handle;
require 'sys/modem.ph';
require 'termios.ph';
require 'sys/termios.ph';
require 'sys/termiox.ph';
require 'sys/ttold.ph';
require 'sys/strtio.ph';
my $junk;
my $rc = 0;
my $fd = POSIX::open("/dev/tty2a7",&POSIX::O_RDWR | &POSIX::O_NOCTTY |
&POSIX::O_NONBLOCK ) ;
my $handle = new_from_fd IO::Handle ($fd, "r");
$tcgetx = defined(&TCGETX) ? &TCGETX :0;
print "\n\nTCGETX=>>$tcgetx<<\n\n";
$rc = ioctl($handle,$tcgetx, $junk);
print "\nIOCTL RC=>>$rc<<\nSYSTEM returned >>$!<<\n\n\n";
POSIX::close($fd);
==========================================================================