* window.h (struct window): Convert left_margin_cols and
[bpt/emacs.git] / src / lread.c
index ee387b8..57c7df7 100644 (file)
@@ -145,7 +145,6 @@ static int read_emacs_mule_char (int, int (*) (int, Lisp_Object),
 static void readevalloop (Lisp_Object, FILE *, Lisp_Object, bool,
                           Lisp_Object, Lisp_Object,
                           Lisp_Object, Lisp_Object);
-static void load_unwind (void *);
 \f
 /* Functions that read one byte from the current source READCHARFUN
    or unreads one byte.  If the integer argument C is -1, it returns
@@ -1176,7 +1175,12 @@ Return t if the file exists and loads successfully.  */)
 #endif
     }
 
-  if (0 <= fd)
+  if (fd < 0)
+    {
+      /* Pacify older GCC with --enable-gcc-warnings.  */
+      IF_LINT (fd_index = 0);
+    }
+  else
     {
       fd_index = SPECPDL_INDEX ();
       record_unwind_protect_int (close_file_unwind, fd);
@@ -1317,7 +1321,7 @@ Return t if the file exists and loads successfully.  */)
     }
   if (! stream)
     report_file_error ("Opening stdio stream", file);
-  set_unwind_protect_ptr (fd_index, load_unwind, stream);
+  set_unwind_protect_ptr (fd_index, fclose_unwind, stream);
 
   if (! NILP (Vpurify_flag))
     Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list);
@@ -1387,18 +1391,6 @@ Return t if the file exists and loads successfully.  */)
 
   return Qt;
 }
-
-static void
-load_unwind (void *arg)
-{
-  FILE *stream = arg;
-  if (stream != NULL)
-    {
-      block_input ();
-      fclose (stream);
-      unblock_input ();
-    }
-}
 \f
 static bool
 complete_filename_p (Lisp_Object pathname)