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, committed] Allow open_errors.f90 to pass under sudo


I committed this minor patch to allow the test to pass when run under sudo.

Index: gfortran.dg/open_errors.f90
===================================================================
--- gfortran.dg/open_errors.f90 (revision 127175)
+++ gfortran.dg/open_errors.f90 (working copy)
@@ -25,7 +25,7 @@ if (msg /= "'./' is a directory" .and. m

 open(77,file=n,status="new")
 i = chmod(n, "-w")
-if (i == 0) then
+if (i == 0 .and. getuid() /= 0) then
  close(77, status="keep")
  open(77,file=n, iomsg=msg, iostat=i, action="write")
  if (i == 0) call abort()

Regards,

Jerry

2007-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>

* gfortran.dg/opem_errors.f90: Revise test to pass when run under sudo.


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