OSDN Git Service

PR fortran/31675
[pf3gnuchains/gcc-fork.git] / libgfortran / io / close.c
index 9dcc1a3..eb66f66 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
    Contributed by Andy Vaught
 
 This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -27,8 +27,6 @@ along with Libgfortran; see the file COPYING.  If not, write to
 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA.  */
 
-#include "config.h"
-#include "libgfortran.h"
 #include "io.h"
 #include <limits.h>
 
@@ -75,7 +73,7 @@ st_close (st_parameter_close *clp)
       if (u->flags.status == STATUS_SCRATCH)
        {
          if (status == CLOSE_KEEP)
-           generate_error (&clp->common, ERROR_BAD_OPTION,
+           generate_error (&clp->common, LIBERROR_BAD_OPTION,
                            "Can't KEEP a scratch file on CLOSE");
 #if !HAVE_UNLINK_OPEN_FILE
          path = (char *) gfc_alloca (u->file_len + 1);
@@ -103,5 +101,6 @@ st_close (st_parameter_close *clp)
 #endif
     }
 
+  /* CLOSE on unconnected unit is legal and a no-op: F95 std., 9.3.5. */ 
   library_end ();
 }