1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00
emacs/lib
Paul Eggert 5745a7df2b Use putenv+unsetenv instead of modifying environ directly.
* admin/merge-gnulib (GNULIB_MODULES): Add putenv, unsetenv.
* lib/putenv.c, lib/unsetenv.c, m4/putenv.m4, m4/setenv.m4:
New files, copied automatically from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/alloc.c (xputenv): New function.
* src/dbusbind.c (Fdbus_init_bus):
* src/emacs.c (main):
* src/xterm.c (x_term_init):
Use xputenv instead of setenv or putenv, to detect memory exhaustion.
* src/editfns.c (initial_tz): Move static var decl up.
(tzvalbuf_in_environ): New static var.
(init_editfns):	Initialize these two static vars.
(Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
Save old TZ value on stack, if it's small.
(Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
instead, use xputenv+unsetenv to set and restore TZ.
(environbuf): Remove static var.  All uses removed.
(Fset_time_zone_rule): Do not save TZ and environ;
no longer needed here.
(set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
Move to inside set_time_zone_rule; they don't need file scope any more.
(set_time_zone_rule): Maintain the TZ=value string separately.
(syms_of_editfns): Don't initialize initial_tz;
init_editfns now does it.
* src/emacs.c (dump_tz) [HAVE_TZSET]: Now const.
* src/lisp.h (xputenv): New decl.

Fixes: debbugs:13070
2012-12-08 09:19:51 -08:00
..
alloca.in.h Merge from gnulib. 2012-07-04 01:35:34 -07:00
allocator.c Update from gnulib. 2011-04-08 14:53:30 -07:00
allocator.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
at-func.c Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
c-ctype.c Add gnulib files for Bug#11786 fix. 2012-07-06 15:19:44 -07:00
c-ctype.h Add gnulib files for Bug#11786 fix. 2012-07-06 15:19:44 -07:00
c-strcase.h Add gnulib files for Bug#11786 fix. 2012-07-06 15:19:44 -07:00
c-strcasecmp.c Add gnulib files for Bug#11786 fix. 2012-07-06 15:19:44 -07:00
c-strncasecmp.c Add gnulib files for Bug#11786 fix. 2012-07-06 15:19:44 -07:00
careadlinkat.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
careadlinkat.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
close-stream.c Fix data-loss with --batch. 2012-11-03 11:54:17 -07:00
close-stream.h Fix data-loss with --batch. 2012-11-03 11:54:17 -07:00
COPYING * lib/COPYING: New file, a copy of COPYING. 2011-01-08 23:43:55 -08:00
dosname.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
dtoastr.c Regenerate. 2011-01-08 17:20:28 -08:00
dtotimespec.c Add gnulib files to support higher-resolution time stamps. 2012-06-22 14:26:37 -07:00
dup2.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
euidaccess.c Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
execinfo.c * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4: New files. 2012-08-24 21:27:32 -07:00
execinfo.in.h * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4: New files. 2012-08-24 21:27:32 -07:00
faccessat.c Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
fcntl.in.h Use trunk version of gnulib lib/fcntl.in.h. 2012-11-13 21:29:54 -08:00
filemode.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
filemode.h Merge from gnulib. 2012-06-22 10:20:00 -07:00
fpending.c Fix data-loss with --batch. 2012-11-03 11:54:17 -07:00
fpending.h Fix data-loss with --batch. 2012-11-03 11:54:17 -07:00
ftoastr.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
ftoastr.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
getgroups.c Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
getloadavg.c Remove "#define unix" that is no longer needed (Bug#11905). 2012-07-10 17:01:21 -07:00
getopt1.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
getopt_.h Fix the MS-Windows build broken by 1995-02-25T20:57:45Z!rms@gnu.org. 2012-05-27 15:11:23 +03:00
getopt_int.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
getopt.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
getopt.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
gettext.h Merge from gnulib. 2012-07-15 11:18:37 -07:00
gettime.c Add gnulib files to support higher-resolution time stamps. 2012-06-22 14:26:37 -07:00
gettimeofday.c Add gnulib files to support higher-resolution time stamps. 2012-06-22 14:26:37 -07:00
gnulib.mk Use putenv+unsetenv instead of modifying environ directly. 2012-12-08 09:19:51 -08:00
group-member.c Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
ignore-value.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
intprops.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
inttypes.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
lstat.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
Makefile.am * lib/Makefile.am (DEFAULT_INCLUDES): Add -I$(top_srcdir)/lib for out-of-tree build. 2012-08-02 19:39:47 +09:00
makefile.w32-in Windows followup to 2012-12-08T02:30:51Z!eggert@cs.ucla.edu. 2012-12-08 11:57:43 +02:00
md5.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
md5.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
min-max.h [ChangeLog] 2011-02-21 15:22:34 -08:00
mktime-internal.h Regenerate. 2011-01-08 22:57:07 -08:00
mktime.c Merge from gnulib. 2012-08-19 16:31:24 -07:00
pathmax.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
pselect.c Merge from gnulib. 2012-10-04 00:15:42 -07:00
pthread_sigmask.c Merge from gnulib. 2012-07-15 11:18:37 -07:00
putenv.c Use putenv+unsetenv instead of modifying environ directly. 2012-12-08 09:19:51 -08:00
readlink.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
root-uid.h Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00
sha1.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
sha1.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
sha256.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
sha256.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
sha512.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
sha512.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
sig2str.c Assume POSIX 1003.1-1988 or later for signal.h. 2012-12-07 18:30:51 -08:00
sig2str.h Assume POSIX 1003.1-1988 or later for signal.h. 2012-12-07 18:30:51 -08:00
signal.in.h Merge from gnulib. 2012-06-22 10:20:00 -07:00
stat-time.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
stat-time.h Merge from gnulib, for extern-inline. 2012-08-01 21:46:10 -07:00
stat.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
stdalign.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
stdarg.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
stdbool.in.h Merge from gnulib. 2012-09-03 02:26:56 -07:00
stddef.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
stdint.in.h Merge from gnulib. 2012-06-22 10:20:00 -07:00
stdio.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
stdio.in.h Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
stdlib.in.h Spelling fixes. 2012-10-04 22:57:24 -07:00
strftime.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strftime.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtoimax.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtol.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtoll.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtoul.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtoull.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
strtoumax.c * Makefile.in (GNULIB_MODULES): Add strtoumax. 2011-04-21 12:12:13 -07:00
symlink.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
sys_select.in.h Merge from gnulib. 2012-08-19 16:31:24 -07:00
sys_stat.in.h Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
sys_time.in.h Add gnulib files to support higher-resolution time stamps. 2012-06-22 14:26:37 -07:00
sys_types.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
time_r.c Merge from gnulib. 2012-05-26 16:14:36 -07:00
time.in.h Merge from gnulib. 2012-05-26 16:14:36 -07:00
timespec-add.c Add gnulib files to support higher-resolution time stamps. 2012-06-22 14:26:37 -07:00
timespec-sub.c timespec-sub: avoid duplicate include 2012-07-06 10:53:26 -07:00
timespec.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
timespec.h Merge from gnulib, for extern-inline. 2012-08-01 21:46:10 -07:00
u64.c Merge from gnulib. 2012-08-02 17:42:11 -07:00
u64.h Merge from gnulib, for extern-inline. 2012-08-01 21:46:10 -07:00
unistd.c Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
unistd.in.h Merge from gnulib for 'inline'. 2012-11-30 10:25:59 -08:00
unsetenv.c Use putenv+unsetenv instead of modifying environ directly. 2012-12-08 09:19:51 -08:00
utimens.c Merge from gnulib, for extern-inline. 2012-08-01 21:46:10 -07:00
utimens.h Merge from gnulib, for extern-inline. 2012-08-01 21:46:10 -07:00
verify.h Merge from gnulib (comment changes only). 2012-07-21 21:16:53 -07:00
xalloc-oversized.h Use faccessat, not access, when checking file permissions. 2012-11-13 20:55:41 -08:00