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.
This commit is contained in:
Dan Nicolaescu 2011-05-30 22:12:19 -07:00
parent 620c53a664
commit 738db17859
3 changed files with 21 additions and 16 deletions

View file

@ -1,3 +1,12 @@
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.

View file

@ -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

View file

@ -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. */