]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - stdio-common/test-popen.c
[powerpc] No need to enter "Ignore Exceptions Mode"
[thirdparty/glibc.git] / stdio-common / test-popen.c
index 44b09fa129eb49986cc4aaddc86d9b718d4ca359..0ccd9e5d32b9a80046eb2ebca4fd236f1b14a07c 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <stdio.h>
@@ -59,7 +59,7 @@ do_test (void)
      the perhaps incompatible new shared libraries.  */
   unsetenv ("LD_LIBRARY_PATH");
 
-  output = popen ("/bin/cat >/tmp/tstpopen.tmp", "w");
+  output = popen ("/bin/cat >" OBJPFX "tstpopen.tmp", "w");
   if (output == NULL)
     {
       perror ("popen");
@@ -69,10 +69,10 @@ do_test (void)
   write_data (output);
   wstatus = pclose (output);
   printf ("writing pclose returned %d\n", wstatus);
-  input = popen ("/bin/cat /tmp/tstpopen.tmp", "r");
+  input = popen ("/bin/cat " OBJPFX "tstpopen.tmp", "r");
   if (input == NULL)
     {
-      perror ("/tmp/tstpopen.tmp");
+      perror (OBJPFX "tstpopen.tmp");
       puts ("Test FAILED!");
       exit (1);
     }
@@ -80,7 +80,7 @@ do_test (void)
   rstatus = pclose (input);
   printf ("reading pclose returned %d\n", rstatus);
 
-  remove ("/tmp/tstpopen.tmp");
+  remove (OBJPFX "tstpopen.tmp");
 
   errno = 0;
   output = popen ("/bin/cat", "m");