summary refs log tree commit diff
path: root/rt
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-24 23:39:37 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-24 23:39:37 +0000
commit9c0592ab3b82691480fff3732239d5892d367df9 (patch)
treecce17bc0b06043c7cc31f953dc0817f6436b60f6 /rt
parent2debc8c54bf6e752554f212be7e3d50524d2b867 (diff)
downloadglibc-9c0592ab3b82691480fff3732239d5892d367df9.tar.gz
glibc-9c0592ab3b82691480fff3732239d5892d367df9.tar.xz
glibc-9c0592ab3b82691480fff3732239d5892d367df9.zip
Update.
	* test-skeleton.c: Mark local functions as static to avoid warnings.

2000-11-23  H.J. Lu  <hjl@gnu.org>

	* rt/tst-aio6.c (do_test): Use pipe instead of STDIN_FILENO to
	support the background job.
	Fix a typo.

2000-11-24  Ulrich Drepper  <drepper@redhat.com>

	has same names but lower cost.
Diffstat (limited to 'rt')
-rw-r--r--rt/tst-aio6.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/rt/tst-aio6.c b/rt/tst-aio6.c
index c9a4d946fe..9ba08348f8 100644
--- a/rt/tst-aio6.c
+++ b/rt/tst-aio6.c
@@ -29,7 +29,7 @@
 
 
 #define TEST_FUNCTION do_test ()
-int
+static int
 do_test (void)
 {
   struct aiocb *arr[1];
@@ -38,11 +38,18 @@ do_test (void)
   struct timeval before;
   struct timeval after;
   struct timespec timeout;
+  int fd[2];
   int result = 0;
 
+  if (pipe (fd) != 0)
+    {
+      printf ("cannot create pipe: %m\n");
+      return 1;
+    }
+
   arr[0] = &cb;
 
-  cb.aio_fildes = STDIN_FILENO;
+  cb.aio_fildes = fd[0];
   cb.aio_lio_opcode = LIO_WRITE;
   cb.aio_reqprio = 0;
   cb.aio_buf = (void *) buf;
@@ -52,7 +59,7 @@ do_test (void)
   /* Try to read from stdin where nothing will be available.  */
   if (aio_read (arr[0]) < 0)
     {
-      printf ("aio_write failed: %m\n");
+      printf ("aio_read failed: %m\n");
       return 1;
     }