/* Dump Emacs in Mach-O format for use on Mac OS X.
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#undef free
#include "unexec.h"
+#include "lisp.h"
#include <stdio.h>
#include <fcntl.h>
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);
+ emacs_close (infd);
unexec_error ("cannot open output file `%s'", outfile);
}
dump_it ();
- close (outfd);
+ emacs_close (outfd);
}