Click here to get back home

FAQ 8.21 Where do I get the include files to do ioctl() or syscall()?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? PerlFAQ Server 04-01-2008
Posted by PerlFAQ Server on April 1, 2008, 3:03 pm
Please log in for more thread options
This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.21: Where do I get the include files to do ioctl() or syscall()?

Historically, these would be generated by the h2ph tool, part of the
standard perl distribution. This program converts cpp(1) directives in C
header files to files containing subroutine definitions, like
&SYS_getitimer, which you can use as arguments to your functions. It
doesn't work perfectly, but it usually gets most of the job done. Simple
files like errno.h, syscall.h, and socket.h were fine, but the hard ones
like ioctl.h nearly always need to hand-edited. Here's how to install
the *.ph files:

1. become super-user
2. cd /usr/include
3. h2ph *.h */*.h

If your system supports dynamic loading, for reasons of portability and
sanity you probably ought to use h2xs (also part of the standard perl
distribution). This tool converts C header files to Perl extensions. See
perlxstut for how to get started with h2xs.

If your system doesn't support dynamic loading, you still probably ought
to use h2xs. See perlxstut and ExtUtils::MakeMaker for more information
(in brief, just use make perl instead of a plain make to rebuild perl
with a new static extension).



--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.

Similar ThreadsPosted
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? March 5, 2005, 6:03 am
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? June 9, 2005, 5:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? September 27, 2005, 10:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? February 2, 2006, 12:03 am
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? September 18, 2006, 3:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? November 24, 2006, 9:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? March 24, 2007, 9:03 am
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? June 9, 2007, 3:03 am
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? August 26, 2007, 3:03 pm
FAQ 8.21 Where do I get the include files to do ioctl() or syscall()? November 3, 2007, 9:03 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap