diff options
| author | Dan Nicolaescu | 2011-05-30 22:12:19 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2011-05-30 22:12:19 -0700 |
| commit | 738db17859465a4adaaf1d43bbb1d1eed307e712 (patch) | |
| tree | 5d37cea5f7f984c3ddd69344215075bc2dc888af /src | |
| parent | 620c53a664e41788f6d4f8e3f687e1a0d448b857 (diff) | |
| download | emacs-738db17859465a4adaaf1d43bbb1d1eed307e712.tar.gz emacs-738db17859465a4adaaf1d43bbb1d1eed307e712.zip | |
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')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/callproc.c | 21 | ||||
| -rw-r--r-- | src/emacs.c | 7 |
3 files changed, 21 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 813e590681d..536ba29cb2c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 2 | |||
| 3 | Make it possible to run ./temacs. | ||
| 4 | |||
| 5 | * callproc.c (set_initial_environment): Remove CANNOT_DUMP code, | ||
| 6 | syms_of_callproc does the same thing. Remove test for | ||
| 7 | "initialized", do it in the caller. | ||
| 8 | * emacs.c (main): Avoid calling set_initial_environment when dumping. | ||
| 9 | |||
| 1 | 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca> | 10 | 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 11 | ||
| 3 | * minibuf.c (Finternal_complete_buffer): Return `category' metadata. | 12 | * minibuf.c (Finternal_complete_buffer): Return `category' metadata. |
diff --git a/src/callproc.c b/src/callproc.c index 67d0b6aede3..7bb2ac05933 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1603,20 +1603,13 @@ init_callproc (void) | |||
| 1603 | void | 1603 | void |
| 1604 | set_initial_environment (void) | 1604 | set_initial_environment (void) |
| 1605 | { | 1605 | { |
| 1606 | register char **envp; | 1606 | char **envp; |
| 1607 | #ifdef CANNOT_DUMP | 1607 | for (envp = environ; *envp; envp++) |
| 1608 | Vprocess_environment = Qnil; | 1608 | Vprocess_environment = Fcons (build_string (*envp), |
| 1609 | #else | 1609 | Vprocess_environment); |
| 1610 | if (initialized) | 1610 | /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent |
| 1611 | #endif | 1611 | to use `delete' and friends on process-environment. */ |
| 1612 | { | 1612 | Vinitial_environment = Fcopy_sequence (Vprocess_environment); |
| 1613 | for (envp = environ; *envp; envp++) | ||
| 1614 | Vprocess_environment = Fcons (build_string (*envp), | ||
| 1615 | Vprocess_environment); | ||
| 1616 | /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent | ||
| 1617 | to use `delete' and friends on process-environment. */ | ||
| 1618 | Vinitial_environment = Fcopy_sequence (Vprocess_environment); | ||
| 1619 | } | ||
| 1620 | } | 1613 | } |
| 1621 | 1614 | ||
| 1622 | void | 1615 | void |
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) | |||
| 1423 | syms_of_callproc (); | 1423 | syms_of_callproc (); |
| 1424 | /* egetenv is a pretty low-level facility, which may get called in | 1424 | /* egetenv is a pretty low-level facility, which may get called in |
| 1425 | many circumstances; it seems flimsy to put off initializing it | 1425 | many circumstances; it seems flimsy to put off initializing it |
| 1426 | until calling init_callproc. */ | 1426 | until calling init_callproc. Do not do it when dumping. */ |
| 1427 | set_initial_environment (); | 1427 | if (initialized || ((strcmp (argv[argc-1], "dump") != 0 |
| 1428 | && strcmp (argv[argc-1], "bootstrap") != 0))) | ||
| 1429 | set_initial_environment (); | ||
| 1430 | |||
| 1428 | /* AIX crashes are reported in system versions 3.2.3 and 3.2.4 | 1431 | /* AIX crashes are reported in system versions 3.2.3 and 3.2.4 |
| 1429 | if this is not done. Do it after set_global_environment so that we | 1432 | if this is not done. Do it after set_global_environment so that we |
| 1430 | don't pollute Vglobal_environment. */ | 1433 | don't pollute Vglobal_environment. */ |