This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch/testsuite] Allow fortran.dg /dev_null.f90 to pass on mingw32 host


This allows the testcase to pass on mingw32.  (This also passes on cygwin,
with or without of definition of _WIN32).

2008-05-05 Danny Smith <dannysmith@users.sourceforge.net>

	* gfortran.dg /dev_null.f90. Remove and replace with...
	gfortran.dg /dev_null.F90: Use preprocessor define to
	generalize the DEV_NULL name.



--- dev_null.f90	2008-05-05 20:17:34.984375000 +1200
+++ dev_null.F90.new	2008-05-05 16:46:02.546875000 +1200
@@ -1,8 +1,13 @@
 ! { dg-do run }
 ! pr19478 read from /dev/null
 ! Thomas.Koenig@online.de
+#if defined  _WIN32
+#define DEV_NULL "nul"
+#else
+#define DEV_NULL "/dev/null"
+#endif
       character*20 foo
-      open(10,file="/dev/null")
+      open(10,file=DEV_NULL)
       write(10,'(A)') "Hello"
       rewind(10)
       read(10,'(A)',end=100) foo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]