summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2011-05-30 22:12:19 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2011-05-30 22:12:19 -0700
commit48f1fc966038f48aa99eee937f3cca234d553c32 (patch)
treec71f5474924ff93f5b049ae2799784b33ecff509 /src/emacs.c
parent7120646cebfee52182e482b6615231293112da78 (diff)
downloademacs-48f1fc966038f48aa99eee937f3cca234d553c32.tar.gz
Make it possible to run ./temacs.
* callproc.c (set_initial_environment): Remove CANNOT_DUMP code, syms_of_callproc does the same thing. Remove test for "initialized", do it in the caller. * emacs.c (main): Avoid calling set_initial_environment when dumping.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index cf74963a816..3a7c5c0bf3d 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1423,8 +1423,11 @@ main (int argc, char **argv)
syms_of_callproc ();
/* egetenv is a pretty low-level facility, which may get called in
many circumstances; it seems flimsy to put off initializing it
- until calling init_callproc. */
- set_initial_environment ();
+ until calling init_callproc. Do not do it when dumping. */
+ if (initialized || ((strcmp (argv[argc-1], "dump") != 0
+ && strcmp (argv[argc-1], "bootstrap") != 0)))
+ set_initial_environment ();
+
/* AIX crashes are reported in system versions 3.2.3 and 3.2.4
if this is not done. Do it after set_global_environment so that we
don't pollute Vglobal_environment. */