diff options
| author | Paul Eggert | 2012-08-19 14:00:09 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-19 14:00:09 -0700 |
| commit | b69a6d228467365b4ed2545dcb1ecc3582d20e2a (patch) | |
| tree | 012d86b0c224f8c0f6666ad5efa4977d4d6f3281 /src | |
| parent | 22d7feb28c95cec0c940fc7b933491550730512b (diff) | |
| download | emacs-b69a6d228467365b4ed2545dcb1ecc3582d20e2a.tar.gz emacs-b69a6d228467365b4ed2545dcb1ecc3582d20e2a.zip | |
Rely on <unistd.h> to declare 'environ',
as gnulib does this if the system doesn't.
* lib-src/emacsclient.c (environ): Remove decl.
* src/callproc.c, src/editfns.c, src/process.c (environ) [!USE_CRT_DLL]:
* src/emacs.c (environ) [DOUG_LEA_MALLOC]:
* src/vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
* src/vm-limit.c: Include <unistd.h>, for 'environ'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/callproc.c | 4 | ||||
| -rw-r--r-- | src/editfns.c | 4 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/process.c | 3 | ||||
| -rw-r--r-- | src/vm-limit.c | 2 |
6 files changed, 8 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index e922ede7a0c..fa3eaa281d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,12 @@ | |||
| 1 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2012-08-19 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Rely on <unistd.h> to declare 'environ', | ||
| 4 | as gnulib does this if the system doesn't. | ||
| 5 | * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]: | ||
| 6 | * emacs.c (environ) [DOUG_LEA_MALLOC]: | ||
| 7 | * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl. | ||
| 8 | * vm-limit.c: Include <unistd.h>, for 'environ'. | ||
| 9 | |||
| 3 | * unexaix.c, unexcoff.c: Include "mem-limits.h". | 10 | * unexaix.c, unexcoff.c: Include "mem-limits.h". |
| 4 | (start_of_data): Remove decl; mem-limits.h provides it. | 11 | (start_of_data): Remove decl; mem-limits.h provides it. |
| 5 | 12 | ||
diff --git a/src/callproc.c b/src/callproc.c index 10a80168fb2..4bf1da04e1a 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -65,10 +65,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 65 | #include "nsterm.h" | 65 | #include "nsterm.h" |
| 66 | #endif | 66 | #endif |
| 67 | 67 | ||
| 68 | #ifndef USE_CRT_DLL | ||
| 69 | extern char **environ; | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #ifdef HAVE_SETPGID | 68 | #ifdef HAVE_SETPGID |
| 73 | #if !defined (USG) | 69 | #if !defined (USG) |
| 74 | #undef setpgrp | 70 | #undef setpgrp |
diff --git a/src/editfns.c b/src/editfns.c index c4725aa0ff3..fa57edead28 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -58,10 +58,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | #include "window.h" | 58 | #include "window.h" |
| 59 | #include "blockinput.h" | 59 | #include "blockinput.h" |
| 60 | 60 | ||
| 61 | #ifndef USE_CRT_DLL | ||
| 62 | extern char **environ; | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #define TM_YEAR_BASE 1900 | 61 | #define TM_YEAR_BASE 1900 |
| 66 | 62 | ||
| 67 | #ifdef WINDOWSNT | 63 | #ifdef WINDOWSNT |
diff --git a/src/emacs.c b/src/emacs.c index 8d458c612cc..9e7efcabbf7 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -642,10 +642,6 @@ argmatch (char **argv, int argc, const char *sstr, const char *lstr, | |||
| 642 | static void | 642 | static void |
| 643 | malloc_initialize_hook (void) | 643 | malloc_initialize_hook (void) |
| 644 | { | 644 | { |
| 645 | #ifndef USE_CRT_DLL | ||
| 646 | extern char **environ; | ||
| 647 | #endif | ||
| 648 | |||
| 649 | if (initialized) | 645 | if (initialized) |
| 650 | { | 646 | { |
| 651 | if (!malloc_using_checking) | 647 | if (!malloc_using_checking) |
diff --git a/src/process.c b/src/process.c index ea463cd9187..7f6f6bafbea 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -1623,9 +1623,6 @@ create_process (Lisp_Object process, char **new_argv, Lisp_Object current_dir) | |||
| 1623 | /* Use volatile to protect variables from being clobbered by longjmp. */ | 1623 | /* Use volatile to protect variables from being clobbered by longjmp. */ |
| 1624 | volatile int forkin, forkout; | 1624 | volatile int forkin, forkout; |
| 1625 | volatile int pty_flag = 0; | 1625 | volatile int pty_flag = 0; |
| 1626 | #ifndef USE_CRT_DLL | ||
| 1627 | extern char **environ; | ||
| 1628 | #endif | ||
| 1629 | 1626 | ||
| 1630 | inchannel = outchannel = -1; | 1627 | inchannel = outchannel = -1; |
| 1631 | 1628 | ||
diff --git a/src/vm-limit.c b/src/vm-limit.c index c313a900f2c..cf697b56fdf 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c | |||
| @@ -18,6 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 18 | 18 | ||
| 19 | #include <config.h> | 19 | #include <config.h> |
| 20 | #include <setjmp.h> | 20 | #include <setjmp.h> |
| 21 | #include <unistd.h> /* for 'environ', on AIX */ | ||
| 21 | #include "lisp.h" | 22 | #include "lisp.h" |
| 22 | #include "mem-limits.h" | 23 | #include "mem-limits.h" |
| 23 | 24 | ||
| @@ -268,7 +269,6 @@ start_of_data (void) | |||
| 268 | * is known to live at or near the start of the system crt0.c, and | 269 | * is known to live at or near the start of the system crt0.c, and |
| 269 | * we don't sweat the handful of bytes that might lose. | 270 | * we don't sweat the handful of bytes that might lose. |
| 270 | */ | 271 | */ |
| 271 | extern char **environ; | ||
| 272 | return ((POINTER) &environ); | 272 | return ((POINTER) &environ); |
| 273 | #else | 273 | #else |
| 274 | extern int data_start; | 274 | extern int data_start; |