]> code.delx.au - gnu-emacs/blobdiff - src/unexcoff.c
Fix handling of face attributes in Fx_create_frame (Bug#16529).
[gnu-emacs] / src / unexcoff.c
index e79821251bac59b8590faca4bbb90eae208d63d3..5710ac0457061c8d75a38e7bb780d25dfdc5b8c4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1985-1988, 1992-1994, 2001-2013 Free Software
+/* Copyright (C) 1985-1988, 1992-1994, 2001-2014 Free Software
  * Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -127,9 +127,10 @@ static int pagemask;
 static void
 report_error (const char *file, int fd)
 {
+  int err = errno;
   if (fd)
-    close (fd);
-  report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil));
+    emacs_close (fd);
+  report_file_errno ("Cannot unexec", build_string (file), err);
 }
 
 #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1
@@ -139,7 +140,7 @@ report_error (const char *file, int fd)
 static void
 report_error_1 (int fd, const char *msg, int a1, int a2)
 {
-  close (fd);
+  emacs_close (fd);
   error (msg, a1, a2);
 }
 \f
@@ -511,7 +512,7 @@ adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
        }
     }
 #ifndef MSDOS
-  close (new);
+  emacs_close (new);
 #endif
   return 0;
 }
@@ -541,13 +542,13 @@ unexec (const char *new_name, const char *a_name)
       || adjust_lnnoptrs (new, a_out, new_name) < 0
       )
     {
-      close (new);
+      emacs_close (new);
       return;
     }
 
-  close (new);
+  emacs_close (new);
   if (a_out >= 0)
-    close (a_out);
+    emacs_close (a_out);
   mark_x (new_name);
 }