mirror of https://github.com/mkerrisk/man-pages
Add "#include <stdlib.h>" (to declatre exit(3)) to example program.
This commit is contained in:
parent
c3c1773e57
commit
af9c7ff296
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -120,6 +120,7 @@ Handle with care.
|
|||
.sp
|
||||
.nf
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <envz.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -384,6 +384,7 @@ and
|
|||
.sp
|
||||
.nf
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
int
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue