Doing a non-standard ioctl in Perl

Roger Burton West roger at firedrake.org
Thu Nov 13 14:29:38 GMT 2008


On Fri, Nov 07, 2008 at 10:43:27AM +0000, Jonathan Stowe wrote:

>Is there a linux/input.ph or is it possible to generate one from the
>linux/input.h using h2ph ?

Apparently. Maybe.

cd /usr/include && h2ph -a linux/input.h produces lots and lots of
output. Whoopee.

Running the program with

require 'linux/input.ph';

produces a big pile of warnings (below), and while the ioctl doesn't
actually fail it doesn't appear to have any effect either.

(I'm invoking it with ioctl (HANDLE,&EVIOCGRAB,1); )

R


Constant subroutine __USE_POSIX undefined at /usr/local/lib/perl/5.8.8/features.ph line 8.
Constant subroutine __USE_POSIX2 undefined at /usr/local/lib/perl/5.8.8/features.ph line 9.
Constant subroutine __USE_POSIX199309 undefined at /usr/local/lib/perl/5.8.8/features.ph line 10.
Constant subroutine __USE_POSIX199506 undefined at /usr/local/lib/perl/5.8.8/features.ph line 11.
Constant subroutine __USE_XOPEN undefined at /usr/local/lib/perl/5.8.8/features.ph line 12.
Constant subroutine __USE_XOPEN_EXTENDED undefined at /usr/local/lib/perl/5.8.8/features.ph line 13.
Constant subroutine __USE_UNIX98 undefined at /usr/local/lib/perl/5.8.8/features.ph line 14.
Constant subroutine __USE_LARGEFILE undefined at /usr/local/lib/perl/5.8.8/features.ph line 16.
Constant subroutine __USE_LARGEFILE64 undefined at /usr/local/lib/perl/5.8.8/features.ph line 17.
Constant subroutine __USE_FILE_OFFSET64 undefined at /usr/local/lib/perl/5.8.8/features.ph line 18.
Constant subroutine __USE_BSD undefined at /usr/local/lib/perl/5.8.8/features.ph line 19.
Constant subroutine __USE_SVID undefined at /usr/local/lib/perl/5.8.8/features.ph line 20.
Constant subroutine __USE_MISC undefined at /usr/local/lib/perl/5.8.8/features.ph line 21.
Constant subroutine __USE_GNU undefined at /usr/local/lib/perl/5.8.8/features.ph line 22.
Constant subroutine __USE_REENTRANT undefined at /usr/local/lib/perl/5.8.8/features.ph line 23.
Constant subroutine _POSIX_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 48.
Constant subroutine _POSIX_C_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 50.
Constant subroutine _XOPEN_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 52.
Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at /usr/local/lib/perl/5.8.8/features.ph line 54.
Constant subroutine _LARGEFILE64_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 56.
Constant subroutine _LARGEFILE_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 98.
Constant subroutine __USE_ISOC99 undefined at /usr/local/lib/perl/5.8.8/features.ph line 102.
Constant subroutine __GNU_LIBRARY__ undefined at /usr/local/lib/perl/5.8.8/features.ph line 146.
Constant subroutine __need_size_t undefined at /usr/local/lib/perl/5.8.8/stddef.ph line 148.
Scalar found where operator expected at (eval 304) line 1, near "'int'  $__val"
	(Missing operator before   $__val?)
Unquoted string "typedef" may clash with future reserved word at (eval 307) lineroger at radiant:~/projects/cyberlink-pertelian/v2$ ./cyberlink-pertelian-remote radiant.ini 
Constant subroutine __USE_POSIX undefined at /usr/local/lib/perl/5.8.8/features.ph line 8.
Constant subroutine __USE_POSIX2 undefined at /usr/local/lib/perl/5.8.8/features.ph line 9.
Constant subroutine __USE_POSIX199309 undefined at /usr/local/lib/perl/5.8.8/features.ph line 10.
Constant subroutine __USE_POSIX199506 undefined at /usr/local/lib/perl/5.8.8/features.ph line 11.
Constant subroutine __USE_XOPEN undefined at /usr/local/lib/perl/5.8.8/features.ph line 12.
Constant subroutine __USE_XOPEN_EXTENDED undefined at /usr/local/lib/perl/5.8.8/features.ph line 13.
Constant subroutine __USE_UNIX98 undefined at /usr/local/lib/perl/5.8.8/features.ph line 14.
Constant subroutine __USE_LARGEFILE undefined at /usr/local/lib/perl/5.8.8/features.ph line 16.
Constant subroutine __USE_LARGEFILE64 undefined at /usr/local/lib/perl/5.8.8/features.ph line 17.
Constant subroutine __USE_FILE_OFFSET64 undefined at /usr/local/lib/perl/5.8.8/features.ph line 18.
Constant subroutine __USE_BSD undefined at /usr/local/lib/perl/5.8.8/features.ph line 19.
Constant subroutine __USE_SVID undefined at /usr/local/lib/perl/5.8.8/features.ph line 20.
Constant subroutine __USE_MISC undefined at /usr/local/lib/perl/5.8.8/features.ph line 21.
Constant subroutine __USE_GNU undefined at /usr/local/lib/perl/5.8.8/features.ph line 22.
Constant subroutine __USE_REENTRANT undefined at /usr/local/lib/perl/5.8.8/features.ph line 23.
Constant subroutine _POSIX_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 48.
Constant subroutine _POSIX_C_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 50.
Constant subroutine _XOPEN_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 52.
Constant subroutine _XOPEN_SOURCE_EXTENDED undefined at /usr/local/lib/perl/5.8.8/features.ph line 54.
Constant subroutine _LARGEFILE64_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 56.
Constant subroutine _LARGEFILE_SOURCE undefined at /usr/local/lib/perl/5.8.8/features.ph line 98.
Constant subroutine __USE_ISOC99 undefined at /usr/local/lib/perl/5.8.8/features.ph line 102.
Constant subroutine __GNU_LIBRARY__ undefined at /usr/local/lib/perl/5.8.8/features.ph line 146.
Constant subroutine __need_size_t undefined at /usr/local/lib/perl/5.8.8/stddef.ph line 148.
Scalar found where operator expected at (eval 166) line 1, near "'int'  $__val"
	(Missing operator before   $__val?)
Unquoted string "typedef" may clash with future reserved word at (eval 169) line 1.
Operator or semicolon missing before &typedef at (eval 169) line 1.
Ambiguous use of & resolved as operator & at (eval 169) line 1.
Constant subroutine __need_time_t undefined at /usr/local/lib/perl/5.8.8/time.ph line 34.
Constant subroutine __need_timeval undefined at /usr/local/lib/perl/5.8.8/bits/time.ph line 23.
Use of uninitialized value in hash element at (eval 954) line 1.
Use of uninitialized value in numeric eq (==) at (eval 954) line 1.
Use of uninitialized value in numeric eq (==) at (eval 954) line 1.
Use of uninitialized value in numeric lt (<) at (eval 954) line 1.
Use of uninitialized value in left bitshift (<<) at (eval 955) line 1.
Use of uninitialized value in hash element at (eval 957) line 1.
Use of uninitialized value in numeric eq (==) at (eval 957) line 1.
Use of uninitialized value in numeric eq (==) at (eval 957) line 1.
Use of uninitialized value in numeric lt (<) at (eval 957) line 1.
Use of uninitialized value in left bitshift (<<) at (eval 958) line 1.



More information about the london.pm mailing list