This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 3.0 patch #22 patch #19, continued
[perl5.git] / h2pl / getioctlsizes
CommitLineData
154e51a4
LW
1#!/usr/bin/perl
2
3open (IOCTLS,'/usr/include/sys/ioctl.h') || die "ioctl open failed";
4
5while (<IOCTLS>) {
6 if (/^\s*#\s*define\s+\w+\s+_IO(R|W|WR)\(\w+,\s*\w+,\s*([^)]+)/) {
7 $need{$2}++;
8 }
9}
10
11foreach $key ( sort keys %need ) {
12 print $key,"\n";
13}