Add "#include <stdlib.h>" (to declatre exit(3)) to example program.

This commit is contained in:
Michael Kerrisk 2007-09-10 02:44:09 +00:00
parent c3c1773e57
commit af9c7ff296
8 changed files with 8 additions and 0 deletions

View File

@ -137,6 +137,7 @@ passed by-value or by-pointer (for aggregates like structs).
.sp
.nf
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <linux/unistd.h> /* for _syscallX macros/related stuff */
#include <linux/kernel.h> /* for struct sysinfo */

View File

@ -476,6 +476,7 @@ to a local variable and passing that variable to the system call.
.SH EXAMPLE
.nf
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>

View File

@ -120,6 +120,7 @@ Handle with care.
.sp
.nf
#include <stdio.h>
#include <stdlib.h>
#include <envz.h>
int

View File

@ -237,6 +237,7 @@ vpfmt(), lfmt(), and vlfmt()", and will be removed later.
.SH EXAMPLE
.nf
#include <stdio.h>
#include <stdlib.h>
#include <fmtmsg.h>
int

View File

@ -143,6 +143,7 @@ in the stream with all other threads.
#define _GNU_SOURCE
#include <grp.h>
#include <stdio.h>
#include <stdlib.h>
#define BUFLEN 4096
int

View File

@ -82,6 +82,7 @@ The result is the localtime of the computer 'linux'.
.sp
.nf
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <time.h>

View File

@ -384,6 +384,7 @@ and
.sp
.nf
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int

View File

@ -86,6 +86,7 @@ The output is approximately that of "ls [a-c]*.c".
.LP
.nf
#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>
int