X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ea78b8829899bfd61f9a495fca198efdd797ef50..ddc30c996a3d14e0163df6946ba96c9bcf73bd2f:/src/unexmacosx.c diff --git a/src/unexmacosx.c b/src/unexmacosx.c index bec1d0a1b0..8cd80a7a54 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -1,5 +1,5 @@ /* Dump Emacs in Mach-O format for use on Mac OS X. - Copyright (C) 2001-2013 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -97,6 +97,7 @@ along with GNU Emacs. If not, see . */ #undef free #include "unexec.h" +#include "lisp.h" #include #include @@ -437,7 +438,7 @@ build_region_list (void) } -#define MAX_UNEXEC_REGIONS 800 +#define MAX_UNEXEC_REGIONS 400 static int num_unexec_regions; typedef struct { @@ -1322,16 +1323,16 @@ 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); + emacs_close (infd); unexec_error ("cannot open output file `%s'", outfile); } @@ -1345,7 +1346,7 @@ unexec (const char *outfile, const char *infile) dump_it (); - close (outfd); + emacs_close (outfd); }