Fix up sys/wait.h header for XPG7.
[glibc.git] / manual / examples / memopen.c
blob682830fe5f8a4dfc965a00254619c4566828932a
1 #include <stdio.h>
3 static char buffer[] = "foobar";
5 int
6 main (void)
8 int ch;
9 FILE *stream;
11 stream = fmemopen (buffer, strlen (buffer), "r");
12 while ((ch = fgetc (stream)) != EOF)
13 printf ("Got %c\n", ch);
14 fclose (stream);
16 return 0;