]> code.delx.au - gnu-emacs/blobdiff - src/unexmacosx.c
; Merge from origin/emacs-25
[gnu-emacs] / src / unexmacosx.c
index fe6637e2ef5ca4b28ce3ab4aefdc41ecca95b2b5..bfb8bd4ea58656cf29afb0b61d82b0d8c5fe0100 100644 (file)
@@ -1,5 +1,5 @@
 /* Dump Emacs in Mach-O format for use on Mac OS X.
-   Copyright (C) 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -99,6 +99,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "unexec.h"
 #include "lisp.h"
 
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -1264,14 +1265,14 @@ unexec (const char *outfile, const char *infile)
   infd = emacs_open (infile, O_RDONLY, 0);
   if (infd < 0)
     {
-      unexec_error ("cannot open input file `%s'", infile);
+      unexec_error ("%s: %s", infile, strerror (errno));
     }
 
   outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0777);
   if (outfd < 0)
     {
       emacs_close (infd);
-      unexec_error ("cannot open output file `%s'", outfile);
+      unexec_error ("%s: %s", outfile, strerror (errno));
     }
 
   build_region_list ();