// file: perror.c // // Synopsis: Simple illustration of system call // // This program just calls perror(). // // On Cygwin, cannot compile because "sys/systeminfo.h" // is not available...and "sysinfo" is not defined. // Chee Yap #include #include main() { char buffer[BUFSIZ]; if (sysinfo(1, buffer, BUFSIZ) == -1) { printf("%s\n", buffer); } perror("Just calling perror()\n"); exit(0); }