]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/interrupt.c
* config/sh/tm-sh.h (BELIEVE_PCC_PROMOTION): Define, so that
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / interrupt.c
1 #include <errno.h>
2 #include <stdio.h>
3 int
4 main ()
5 {
6 char x;
7 int nbytes;
8 printf ("talk to me baby\n");
9 while (1)
10 {
11 nbytes = read (0, &x, 1);
12 if (nbytes < 0)
13 {
14 if (errno != EINTR)
15 perror ("");
16 }
17 else if (nbytes == 0)
18 {
19 printf ("end of file\n");
20 exit (0);
21 }
22 else
23 write (1, &x, 1);
24 }
25 }
26
27 int
28 func1 ()
29 {
30 return 4;
31 }