aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Colascione2012-12-11 19:26:52 -0800
committerDaniel Colascione2012-12-11 19:26:52 -0800
commitcc98b6842663b6fe30e0b7c7a628604959d5dc69 (patch)
tree8fae8652e7ab59422f3b8c782e654f8679c6bc38 /src
parent69e1c203e96afb6e95fdda422d00c07b0bcbf76c (diff)
downloademacs-cc98b6842663b6fe30e0b7c7a628604959d5dc69.tar.gz
emacs-cc98b6842663b6fe30e0b7c7a628604959d5dc69.zip
2012-12-12 Daniel Colascione <dancol@dancol.org>
* unexcw.c (fixup_executable): use posix_fallocate to ensure that the dumped Emacs is not a sparse file, greatly improving Cygwin "make bootstrap" performance.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/unexcw.c13
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3311f7c33a3..d19b7be7395 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12012-12-12 Daniel Colascione <dancol@dancol.org>
2
3 * unexcw.c (fixup_executable): use posix_fallocate to ensure that
4 the dumped Emacs is not a sparse file, greatly improving Cygwin
5 "make bootstrap" performance.
6
12012-12-11 Michael Albinus <michael.albinus@gmx.de> 72012-12-11 Michael Albinus <michael.albinus@gmx.de>
2 8
3 * inotify.c (inotify_callback): Generate an Emacs event for every 9 * inotify.c (inotify_callback): Generate an Emacs event for every
diff --git a/src/unexcw.c b/src/unexcw.c
index 8c5d574530d..7d1a72e0009 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -183,6 +183,19 @@ fixup_executable (int fd)
183 exe_header->file_optional_header.FileAlignment * 183 exe_header->file_optional_header.FileAlignment *
184 exe_header->file_optional_header.FileAlignment; 184 exe_header->file_optional_header.FileAlignment;
185 185
186 /* Make sure the generated bootstrap binary isn't
187 * sparse. NT doesn't use a file cache for sparse
188 * executables, so if we bootstrap Emacs using a sparse
189 * bootstrap-emacs.exe, bootstrap takes about twenty
190 * times longer than it would otherwise. */
191
192 ret = posix_fallocate (fd,
193 ( exe_header->section_header[i].s_scnptr +
194 exe_header->section_header[i].s_size ),
195 1);
196
197 assert (ret != -1);
198
186 ret = 199 ret =
187 lseek (fd, 200 lseek (fd,
188 (long) (exe_header->section_header[i].s_scnptr + 201 (long) (exe_header->section_header[i].s_scnptr +