]> code.delx.au - gnu-emacs/blobdiff - src/unexmacosx.c
Use emacs_open more consistently when opening files.
[gnu-emacs] / src / unexmacosx.c
index 8d4e636fa5cd329033684190e9fdb98049b4fadb..2bc6de177ebe472a24d515f820a0de81cd1cc38b 100644 (file)
@@ -97,6 +97,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #undef free
 
 #include "unexec.h"
+#include "lisp.h"
 
 #include <stdio.h>
 #include <fcntl.h>
@@ -1322,13 +1323,13 @@ unexec (const char *outfile, const char *infile)
     unexec_error ("Unexec from a dumped executable is not supported.");
 
   pagesize = getpagesize ();
-  infd = open (infile, O_RDONLY, 0);
+  infd = emacs_open (infile, O_RDONLY, 0);
   if (infd < 0)
     {
       unexec_error ("cannot open input file `%s'", infile);
     }
 
-  outfd = open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
+  outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0755);
   if (outfd < 0)
     {
       close (infd);