/* fionread.c - determine local value of FIONREAD constant * Andrew Ho (andrew@zeuscat.com) * * Perl's ioctl() interface lets you determine the number of bytes to read * from a filehandle (see recipe 7.15 in the Perl Cookbook, first edition). * This program prints out the value of FIONREAD in case your local Perl * administrator hasn't run h2ph for you. * * Build: gcc -Wall -o fionread fionread.c * Usage: fionread */ #include #include #include int main() { printf("0x%08lx\n", (long)FIONREAD); return 0; }