Commit 738db178 authored by Dan Nicolaescu's avatar Dan Nicolaescu

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.
parent 620c53a6
2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
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.
2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuf.c (Finternal_complete_buffer): Return `category' metadata.
......
......@@ -1603,20 +1603,13 @@ init_callproc (void)
void
set_initial_environment (void)
{
register char **envp;
#ifdef CANNOT_DUMP
Vprocess_environment = Qnil;
#else
if (initialized)
#endif
{
for (envp = environ; *envp; envp++)
Vprocess_environment = Fcons (build_string (*envp),
Vprocess_environment);
/* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
to use `delete' and friends on process-environment. */
Vinitial_environment = Fcopy_sequence (Vprocess_environment);
}
char **envp;
for (envp = environ; *envp; envp++)
Vprocess_environment = Fcons (build_string (*envp),
Vprocess_environment);
/* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
to use `delete' and friends on process-environment. */
Vinitial_environment = Fcopy_sequence (Vprocess_environment);
}
void
......
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment