emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r111159: Fix putenv and unsetenv on M


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111159: Fix putenv and unsetenv on MS-Windows.
Date: Sat, 08 Dec 2012 20:27:37 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111159
fixes bug: http://debbugs.gnu.org/13070
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2012-12-08 20:27:37 +0200
message:
  Fix putenv and unsetenv on MS-Windows.
  
   src/w32.c (unsetenv): Return 0 if the input string is too long.
  
   nt/inc/ms-w32.h (sys_putenv): Add prototype.
modified:
  nt/ChangeLog
  nt/inc/ms-w32.h
  src/ChangeLog
  src/w32.c
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2012-12-08 11:32:10 +0000
+++ b/nt/ChangeLog      2012-12-08 18:27:37 +0000
@@ -1,6 +1,7 @@
 2012-12-08  Eli Zaretskii  <address@hidden>
 
        * inc/ms-w32.h (putenv): Redirect to sys_putenv.
+       (sys_putenv): Add prototype.
 
        * config.nt (HAVE_UNSETENV): Define to 1.
 

=== modified file 'nt/inc/ms-w32.h'
--- a/nt/inc/ms-w32.h   2012-12-08 11:32:10 +0000
+++ b/nt/inc/ms-w32.h   2012-12-08 18:27:37 +0000
@@ -381,6 +381,7 @@
 # undef putenv
 #endif
 #define putenv    sys_putenv
+extern int sys_putenv (char *);
 
 extern int getloadavg (double *, int);
 extern int getpagesize (void);

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-12-08 17:19:51 +0000
+++ b/src/ChangeLog     2012-12-08 18:27:37 +0000
@@ -1,3 +1,7 @@
+2012-12-08  Eli Zaretskii  <address@hidden>
+
+       * w32.c (unsetenv): Return 0 if the input string is too long.
+
 2012-12-08  Paul Eggert  <address@hidden>
 
        Use putenv+unsetenv instead of modifying environ directly (Bug#13070).

=== modified file 'src/w32.c'
--- a/src/w32.c 2012-12-08 11:32:10 +0000
+++ b/src/w32.c 2012-12-08 18:27:37 +0000
@@ -1562,7 +1562,7 @@
   if (name_len > 32767)
     {
       errno = ENOMEM;
-      return -1;
+      return 0;
     }
   /* It is safe to use 'alloca' with 32K size, since the stack is at
      least 2MB, and we set it to 8MB in the link command line.  */


reply via email to

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