about summary refs log tree commit diff
path: root/libio/tst_putwc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/tst_putwc.c')
-rw-r--r--libio/tst_putwc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libio/tst_putwc.c b/libio/tst_putwc.c
index 60bb232a78..a78dfec093 100644
--- a/libio/tst_putwc.c
+++ b/libio/tst_putwc.c
@@ -26,8 +26,13 @@
 
 static const char outname[] = OBJPFX "tst_putwc.temp";
 
-
+/* Prototype for our test function.  */
+int do_test (void);
 #define TEST_FUNCTION do_test ()
+
+/* This defines the `main' function and some more.  */
+#include <test-skeleton.c>
+
 int
 do_test (void)
 {
@@ -37,6 +42,8 @@ do_test (void)
   FILE *fp;
   int res = 0;
 
+  add_temp_file (outname);
+
   fp = fopen (outname, "w+");
   if (fp == NULL)
     error (EXIT_FAILURE, errno, "cannot open temporary file");
@@ -113,6 +120,3 @@ do_test (void)
 
   return res;
 }
-
-
-#include "../test-skeleton.c"