1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-07 04:10:27 -08:00
emacs/admin
Paul Eggert 4c4c5b9121 Fix putenv race conditions with undefined behavior.
Do all putenv calls before Emacs creates any threads.
Use a safer way to modify the TZ environment variable in the
presence of multiple threads.  For further thread-safety,
prefer localtime_r and gmtime_r to localtime and gmtime,
and prefer struct tm's tm_gmtoff (if available) to calling
both localtime_r and gmtime_r.
* configure.ac (LOCALTIME_CACHE): Remove.
We needn't worry about SunOS 4 any more; Sun dropped support in 2003.
All uses of LOCALTIME_CACHE removed.  This simplifies the fix.
(tzalloc): Add check for this function.
* admin/merge-gnulib (GNULIB_MODULES): Add time_r, since Emacs now
calls localtime_r and gmtime_r directly.
* src/dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
(init_dbusbind): ... to this new function.
* src/emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
* src/xterm.c (x_term_init): Move xputenv call from here ...
(init_xterm): ... to this new function.
* src/emacs.c (main) [USE_GTK]: Call it before creating threads.
* src/editfns.c (HAVE_TM_GMTOFF): Default to false.
(dump_tz_string): New constant.
(init_editfns): Use it.  This centralizes the dump_tz stuff.
Call set_time_zone_rule here, so that its xputenv is done
before Emacs goes multithreaded.
(mktime_z) [!HAVE_TZALLOC]: New function, which is typically
thread-safe enough for Emacs.
(format_time_string, Fdecode_time, Fcurrent_time_string)
(Fcurrent_time_zone):
Prefer localtime_r and gmtime_r, which are more thread-safe, to
localtime and gmtime.  Remove now-unnecessary calls to block_input.
(tm_gmtoff): New static function.
(Fdecode_time, Fcurrent_time_zone): Use it.
(Fencode_time): Use mktime_z, for better thread-safety.
(set_time_zone_rule): Now static.  Rewrite to be mostly thread-safe,
i.e., not quite thread-safe but good enough for Emacs typical usage.
Do not reclaim storage that is in the environment; let it leak.
Always call tzset, since localtime_r does not.
* src/emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
This is now done in init_editfns.
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
New macros and declarations, for platforms lacking tzalloc & friends.

Fixes: debbugs:8705
2014-10-11 23:09:50 -07:00
..
charsets Fix copyright license notices for Adobe Unicode mapping files. 2014-01-15 11:38:44 -08:00
coccinelle * src/lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow extraction 2013-01-15 13:22:25 +04:00
grammars * admin/grammars/Makefile.in (bootstrap-clean): Don't delete Makefile, 2014-06-28 17:46:40 -07:00
notes * admin/notes/bzr: Some bisect tips. 2014-09-03 20:40:03 -04:00
nt Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
unidata * admin/unidata/Makefile.in: Check for deleted uni- files. 2014-10-07 16:17:09 -04:00
admin.el admin.el tweaks 2014-05-10 14:59:05 -07:00
alloc-colors.c Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
authors.el * admin/authors.el (authors-renamed-files-alist): Add package-x-test.el 2014-10-04 12:07:05 -07:00
build-configs Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
bzrmerge.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
ChangeLog Fix putenv race conditions with undefined behavior. 2014-10-11 23:09:50 -07:00
check-doc-strings * admin/check-doc-strings: Replace perl -w' with use warnings;'. 2014-01-02 16:47:40 +08:00
CPP-DEFINES Fix putenv race conditions with undefined behavior. 2014-10-11 23:09:50 -07:00
cus-test.el Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
diff-tar-files Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
find-gc.el Move lisp/emacs-lisp/find-gc.el to admin/ 2014-05-10 18:53:42 -07:00
FOR-RELEASE Refer to MS-DOS using the same name everywhere. 2014-08-07 10:55:09 +01:00
MAINTAINERS Refer to MS-DOS using the same name everywhere. 2014-08-07 10:55:09 +01:00
make-emacs Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
make-tarball.txt admin/make-tarball.txt: Misc small updates/edits 2014-05-02 15:45:17 -04:00
merge-gnulib Fix putenv race conditions with undefined behavior. 2014-10-11 23:09:50 -07:00
merge-pkg-config Don't require pkg-config when building from repository. 2014-05-16 08:49:13 -07:00
quick-install-emacs Remove lib-src/test-distrib.c and related 2014-03-22 15:52:47 -07:00
README Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
update-copyright Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
update_autogen * update_autogen: Find loaddefs targets rather than parsing lisp/Makefile.in 2014-06-29 17:01:51 -07:00
versioning [maint] Start Emacs versioning doc; nfc. 2014-10-10 09:54:08 +02:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Copyright (C) 2001-2014 Free Software Foundation, Inc.
See the end of the file for license conditions.


			 The admin directory

This directory contains scripts and other things useful for developing
and maintaining Emacs.  These files are not part of Emacs releases
because they are not deemed generally useful, and you have to know
what you do when using them.


* Instructions and scripts used to prepare an Emacs release.

** FOR-RELEASE

Living list of activities that must be completed before the next release.

** make-tarball.txt

Instructions to create pretest or release tarballs, announcements, etc.

** admin.el

Utilities for setting version numbers and alike.


* Scripts that can be used to build and test Emacs.

** build-configs

Build Emacs in various configurations.

** make-emacs

Build Emacs in various ways.

** quick-install-emacs

Install emacs quickly (`incrementally').

** alloc-colors.c

A utility program that allocates a given number of colors on X.  Can
be used to debug Emacs with dense colormaps (PseudoColor).

** check-doc-strings

Check doc strings against documentation.

** cus-test.el

Tests for custom types and load problems.

** diff-tar-files

Show files added/removed between two tar files.


Brief description of sub-directories:

charsets		scripts for generating charset map files
			in ../etc/charsets
unidata			scripts for generating character property files
			in ../lisp/international


This file is part of GNU Emacs.

GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.

Local variables:
mode: outline
paragraph-separate: "[ 	]*$"
end: