diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2009-02-03 10:25:32 +1300 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2009-02-03 11:43:32 +1300 |
| commit | 56e50303bb6a460023aba27350b2aad8da5405db (patch) | |
| tree | 75d1f6cf410d7f90d5f5fa19c2401d8e2bb2c9c0 | |
| parent | b6898014c5c273c93f9144b54434b359cfa46879 (diff) | |
| download | man-pages-56e50303bb6a460023aba27350b2aad8da5405db.tar.gz | |
stpcpy.3: Add missing pieces/fix various problems in example program
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man3/stpcpy.3 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/man3/stpcpy.3 b/man3/stpcpy.3 index 40f28e6f9a..8a3071ab09 100644 --- a/man3/stpcpy.3 +++ b/man3/stpcpy.3 @@ -59,12 +59,16 @@ to concatenate \fBfoo\fP and .in +4n .nf +#define _GNU_SOURCE #include <string.h> +#include <stdio.h> int main(void) { + char buffer[20]; char *to = buffer; + to = stpcpy(to, "foo"); to = stpcpy(to, "bar"); printf("%s\\n", buffer); |
