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'.
+2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ Rely on <unistd.h> to declare 'environ'.
+ * emacsclient.c (environ): Remove decl.
+
2012-08-17 Juanma Barranquero <lekktu@gmail.com>
* makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
/* Send over our environment and current directory. */
if (!current_frame)
{
-#ifndef WINDOWSNT
- /* This is defined in stdlib.h on MS-Windows. It's defined in
- unistd.h on some POSIX hosts, but not all (Bug#10155). */
- extern char **environ;
-#endif
int i;
for (i = 0; environ[i]; i++)
{
2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
+ Rely on <unistd.h> to declare 'environ',
+ as gnulib does this if the system doesn't.
+ * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
+ * emacs.c (environ) [DOUG_LEA_MALLOC]:
+ * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
+ * vm-limit.c: Include <unistd.h>, for 'environ'.
+
* unexaix.c, unexcoff.c: Include "mem-limits.h".
(start_of_data): Remove decl; mem-limits.h provides it.
#include "nsterm.h"
#endif
-#ifndef USE_CRT_DLL
-extern char **environ;
-#endif
-
#ifdef HAVE_SETPGID
#if !defined (USG)
#undef setpgrp
#include "window.h"
#include "blockinput.h"
-#ifndef USE_CRT_DLL
-extern char **environ;
-#endif
-
#define TM_YEAR_BASE 1900
#ifdef WINDOWSNT
static void
malloc_initialize_hook (void)
{
-#ifndef USE_CRT_DLL
- extern char **environ;
-#endif
-
if (initialized)
{
if (!malloc_using_checking)
/* Use volatile to protect variables from being clobbered by longjmp. */
volatile int forkin, forkout;
volatile int pty_flag = 0;
-#ifndef USE_CRT_DLL
- extern char **environ;
-#endif
inchannel = outchannel = -1;
#include <config.h>
#include <setjmp.h>
+#include <unistd.h> /* for 'environ', on AIX */
#include "lisp.h"
#include "mem-limits.h"
* is known to live at or near the start of the system crt0.c, and
* we don't sweat the handful of bytes that might lose.
*/
- extern char **environ;
return ((POINTER) &environ);
#else
extern int data_start;