]> code.delx.au - gnu-emacs/blobdiff - src/unexhp9k800.c
Use emacs_open more consistently when opening files.
[gnu-emacs] / src / unexhp9k800.c
index ce65faffd4e59d73b3f9e88b90bc945375efaaa9..0f6eb87ee017971c27ca4a664284e66ac838a336 100644 (file)
@@ -51,6 +51,7 @@
 \f
 #include <config.h>
 #include "unexec.h"
+#include "lisp.h"
 
 #include <stdio.h>
 #include <fcntl.h>
@@ -268,10 +269,10 @@ unexec (const char *new_name,      /* name of the new a.out file to be created *
      intact.  NOT implemented.  */
 
   /* Open the input and output a.out files */
-  old = open (old_name, O_RDONLY);
+  old = emacs_open (old_name, O_RDONLY, 0);
   if (old < 0)
     { perror (old_name); exit (1); }
-  new = open (new_name, O_CREAT|O_RDWR|O_TRUNC, 0777);
+  new = emacs_open (new_name, O_CREAT | O_RDWR | O_TRUNC, 0777);
   if (new < 0)
     { perror (new_name); exit (1); }