3 ($iam = $0) =~ s%.*/%%;
5 open (CODE,">$tmp.c") || die "$iam: cannot create $tmp.c: $!\n";
7 $mask = q/printf ("$sizeof{'%s'} = %d;\n"/;
13 #include <sys/param.h>
14 #include <sys/types.h>
15 #include <sys/socket.h>
16 #include <net/if_arp.h>
18 #include <net/route.h>
19 #include <sys/ioctl.h>
26 printf "\t%s, \n\t\t\"%s\", sizeof(%s));\n", $mask, $_,$_;
37 system "cc $tmp.c -o $tmp";
38 die "couldn't compile $tmp.c" if $?;
40 die "couldn't run $tmp" if $?;
42 unlink "$tmp.c", $tmp;