emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109685: Rely on <unistd.h> to declar


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109685: Rely on <unistd.h> to declare 'environ',
Date: Sun, 19 Aug 2012 14:00:09 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109685
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Sun 2012-08-19 14:00:09 -0700
message:
  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'.
modified:
  lib-src/ChangeLog
  lib-src/emacsclient.c
  src/ChangeLog
  src/callproc.c
  src/editfns.c
  src/emacs.c
  src/process.c
  src/vm-limit.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2012-08-17 01:53:29 +0000
+++ b/lib-src/ChangeLog 2012-08-19 21:00:09 +0000
@@ -1,3 +1,8 @@
+2012-08-19  Paul Eggert  <address@hidden>
+
+       Rely on <unistd.h> to declare 'environ'.
+       * emacsclient.c (environ): Remove decl.
+
 2012-08-17  Juanma Barranquero  <address@hidden>
 
        * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.

=== modified file 'lib-src/emacsclient.c'
--- a/lib-src/emacsclient.c     2012-08-10 18:23:45 +0000
+++ b/lib-src/emacsclient.c     2012-08-19 21:00:09 +0000
@@ -1584,11 +1584,6 @@
   /* 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++)
         {

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-19 20:02:24 +0000
+++ b/src/ChangeLog     2012-08-19 21:00:09 +0000
@@ -1,5 +1,12 @@
 2012-08-19  Paul Eggert  <address@hidden>
 
+       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.
 

=== modified file 'src/callproc.c'
--- a/src/callproc.c    2012-08-04 14:17:10 +0000
+++ b/src/callproc.c    2012-08-19 21:00:09 +0000
@@ -65,10 +65,6 @@
 #include "nsterm.h"
 #endif
 
-#ifndef USE_CRT_DLL
-extern char **environ;
-#endif
-
 #ifdef HAVE_SETPGID
 #if !defined (USG)
 #undef setpgrp

=== modified file 'src/editfns.c'
--- a/src/editfns.c     2012-08-18 06:06:39 +0000
+++ b/src/editfns.c     2012-08-19 21:00:09 +0000
@@ -58,10 +58,6 @@
 #include "window.h"
 #include "blockinput.h"
 
-#ifndef USE_CRT_DLL
-extern char **environ;
-#endif
-
 #define TM_YEAR_BASE 1900
 
 #ifdef WINDOWSNT

=== modified file 'src/emacs.c'
--- a/src/emacs.c       2012-08-05 21:44:21 +0000
+++ b/src/emacs.c       2012-08-19 21:00:09 +0000
@@ -642,10 +642,6 @@
 static void
 malloc_initialize_hook (void)
 {
-#ifndef USE_CRT_DLL
-  extern char **environ;
-#endif
-
   if (initialized)
     {
       if (!malloc_using_checking)

=== modified file 'src/process.c'
--- a/src/process.c     2012-08-18 06:06:39 +0000
+++ b/src/process.c     2012-08-19 21:00:09 +0000
@@ -1623,9 +1623,6 @@
   /* 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;
 

=== modified file 'src/vm-limit.c'
--- a/src/vm-limit.c    2012-05-21 15:36:54 +0000
+++ b/src/vm-limit.c    2012-08-19 21:00:09 +0000
@@ -18,6 +18,7 @@
 
 #include <config.h>
 #include <setjmp.h>
+#include <unistd.h> /* for 'environ', on AIX */
 #include "lisp.h"
 #include "mem-limits.h"
 
@@ -268,7 +269,6 @@
    * 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;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]