1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

195 Commits

Author SHA1 Message Date
Paul Eggert
b48197d8ed Merge from gnulib
This incorporates:
2016-03-15 std-gnu11: improve clang support
* m4/std-gnu11.m4: Copy from gnulib.
2016-03-15 13:59:45 -07:00
John Wiegley
63efcc2686 Merge from origin/emacs-25
facb5e2 Update Emacs manual section related to character folding
4efea8e ; * etc/DEBUG: Fix a typo.  (Bug#22984)
f8df21b Update admin/notes/unicode
950be68 Add symref-filepattern entries for c?perl-mode
8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them.
985dacf ; NEWS update for the last change in etags
741a6f8 Sync with gnulib
7352c6c Rework C source files to avoid ^(
a589e9a By default, etags produces unqualified Perl tag names
72c7438 Indent methods with keyword names correctly
28532a9 Propertize character literals and special global variables
        differently
a7d6f39 ; Fix last change in NEWS
83b2a20 Change how /etc/NEWS presents character folding
b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding
        off by default""
711ca36 Properly handle lambda as read function (bug 22961)
1b9d616 Propertize operator symbol names with symbol syntax class
9b16bc2 Stop recognizing :#{} as symbol in ruby-mode
366ec77 Allow using the left shift operator without spaces on both sides
02bf7cc Properly handle unquoting in wdired (bug 22938)
16cf469 ; Spelling fix and tighten up comment
f50bc04 Allow splat operator before percent literal
991c801 Don't apply the return value of goto-char as syntax class
6e63b3e Guard against nested percent literals
066f3bc Recognize iuwu-mod after an escaped newline
6f7a57c Fix symbolic mode string conversion for s and t
50b9826 Update 'ucs-names' database
993b2fb Improve doc string of 'shell-command'
b71c717 Make the code in movemail_strftime more general
cc057e4 Speed up redisplay of binary files with long series of nulls
e51b27e Remove the highlighting support for quoting 'like this' inside
        Lisp docstrings
b1abce1 Restore leading space in movemail pop output
98b8d44 Fix bidi-paragraph-direction in Rmail view buffer
dc9d837 Don't misindent computed property generator methods
7923112 Fix mbox files produced by movemail on MS-Windows
c45a1ca doc string file descriptor exhaustion fix
265141b Fix Bug#22814
2016-03-11 13:33:32 -08:00
Paul Eggert
741a6f8ed4 Sync with gnulib
This incorporates:
2016-03-08 intprops: make .h file license match module
2016-03-08 acl: fix missing return on Cygwin
2016-03-05 extern-inline: port to PGI CC
* doc/misc/texinfo.tex, lib/intprops.h, lib/set-permissions.c:
* m4/extern-inline.m4:
Copy from gnulib.
2016-03-10 07:59:19 -08:00
Paul Eggert
1f7feecaee Use Gnulib filevercmp for version comparison
* admin/merge-gnulib (GNULIB_MODULES): Add filevercmp.
* doc/lispref/strings.texi (Text Comparison):
* etc/NEWS, src/fns.c:
* test/src/fns-tests.el (fns-tests-string-version-lessp):
Rename newly-introduced function to string-version-lessp, by
analogy with strverscmp.
* lib/filevercmp.c, lib/filevercmp.h: New files, copied from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/fns.c: Include <filevercmp.h>.
(gather_number_from_string): Remove.
(Fstring_version_lessp): Reimplement via filevercmp.
2016-02-21 13:27:40 -08:00
Paul Eggert
8456ba1d49 - 2016-02-09 14:26:40 -08:00
Paul Eggert
f2e9d1b384 Sync with gnulib
This incorporates:
2016-02-09 stdalign: port to clang 3.7.0
2016-02-06 misc: port better to gcc -fsanitize=address
* doc/misc/texinfo.tex, lib/stdalign.in.h, m4/acl.m4, m4/getgroups.m4:
Copy from gnulib.
2016-02-09 09:07:23 -08:00
Paul Eggert
b50075dd05 Build with C11 if available
* admin/merge-gnulib (GNULIB_MODULES): Add std-gnu11.
* m4/std-gnu11.m4: New file, from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
2016-02-02 14:44:40 -08:00
Paul Eggert
1698036a43 Merge from gnulib
This incorporates:
2016-01-24 openat_proc_name: fix last '/' overwritten on OS/2 kLIBC
2016-01-24 closedir, dirfd, opendir: port to OpenSolaris 5.10
2016-01-15 detect utimes() correctly on OS/2 kLIBC
2016-01-15 openat_proc_name: port to OS/2 kLIBC
2016-01-14 stdint: check _INTPTR_T_DECLARED for intptr_t etc.
2016-01-14 opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
2016-01-14 dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
2016-01-14 binary-io: don't put fd in binary mode if a console on EMX
2016-01-14 sig2str: list all signals on FreeBSD >= 7
2016-01-13 acl-permissions: port to USE_ACL==0 platforms
2016-01-12 mktime: rename macro to avoid glibc clash
2016-01-12 Port "$@" to OpenIndiana ksh93
2016-01-12 Port Universal Time settings to strict POSIX
* build-aux/gitlog-to-changelog, build-aux/update-copyright:
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/binary-io.h, lib/dirent.in.h, lib/dirfd.c, lib/dup2.c:
* lib/fcntl.c, lib/fdopendir.c, lib/mktime.c, lib/openat-proc.c:
* lib/sig2str.h, lib/stdint.in.h, m4/dirfd.m4, m4/dup2.m4:
* m4/fcntl.m4, m4/utimes.m4:
Copy from gnulib.
* m4/gnulib-comp.m4: Regenerate.
2016-01-24 14:51:22 -08:00
Paul Eggert
fabb1fa31d Port cleanup attribute to OpenBSD
The OpenBSD C compiler issues false alarms about strcpy, strcat, and
sprintf, and this messes up 'configure' when it tests for the cleanup
attribute.  Work around the problem by using __has_attribute directly.
Problem reported by Joakim Jalap (Bug#22385).
* configure.ac: Don’t use AX_GCC_VAR_ATTRIBUTE.
* m4/ax_gcc_var_attribute.m4: Remove.
* src/conf_post.h (__has_attribute): Provide a substitute, for
non-GCC or older GCC compilers.  All uses changed to assume
the substitute.  Check for the cleanup attribute.
* src/emacs-module.c (module_has_cleanup): Just use __has_attribute.
2016-01-17 14:11:09 -08:00
Paul Eggert
e79b06e6de Avoid stdio in SIGINT handler
* admin/merge-gnulib (GNULIB_MODULES): Add ignore-value.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/ignore-value.h: New file, from gnulib.
* src/keyboard.c: Include it.
(write_stdout, read_stdin): New functions.
(handle_interrupt): Use them instead of printf and getchar,
and avoid fflush when handling signals.
2016-01-03 15:04:07 -08:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Paul Eggert
982530518f Merge from gnulib
This mostly just updates copyright dates of gnulib files.
It also updates to the latest version of texinfo.tex.
2016-01-01 01:13:18 -08:00
Paul Eggert
36649e0150 Spelling and grammar fixes 2015-11-29 21:52:17 -08:00
Aurélien Aptel
307e76c799 Add dynamic module module support
* configure.ac: Add '--with-modules' option.  Conditionally add
  dynlib.o and module.o to the list of objects.  Add any system
  specific flags to the linker flags to support dynamic libraries.
* m4/ax_gcc_var_attribute.m4: Add autoconf extension to test gcc
  attributes.
* src/Makefile.in: Conditionally add module objects and linker flags.
* src/alloc.c (garbage_collect_1): protect module local values from
  GC.
* src/lisp.h: Add 'module_init' and 'syms_of_module' prototypes.
* src/emacs_module.h: New header file included by modules.  Public
  module API.
* src/module.c: New module implementation file.

Co-authored-by: Philipp Stephani <phst@google.com>
2015-11-18 14:24:19 -05:00
Paul Eggert
e668176e7d Merge from gnulib
This incorporates:
2015-10-13 binary-io, u64, unistd: port to strict C
2015-09-26 c-ctype: do not worry about EBCDIC + char signed
2015-09-25 c-ctype: port better to z/OS EBCDIC
2015-09-25 gnulib-common.m4: fix gl_PROG_AR_RANLIB/AM_PROG_AR clash
* doc/misc/texinfo.tex, lib/binary-io.c, lib/c-ctype.h, lib/u64.c:
* lib/unistd.c, m4/gnulib-common.m4, m4/gnulib-comp.m4:
Copy from gnulib.
2015-10-13 23:34:47 -07:00
Paul Eggert
2856b1dd6f Merge from gnulib
This incorporates:
2015-07-27 time_rz: port better to MinGW
2015-07-27 time: port __need_time_t to MinGW
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/strftime.c, lib/time.in.h, lib/time_rz.c: Copy from gnulib.
* lib/time-internal.h: New file, from gnulib.
2015-07-27 16:51:22 -07:00
Paul Eggert
af32fa9562 New optional ZONE arg for format-time-string etc.
This simplifies time conversions in other time zones.
It also prevents display-time-world tampering with TZ (Bug#21020).
* admin/admin.el (add-release-logs):
Use improved add-log-time-format API.
* admin/merge-gnulib (GNULIB_MODULES): Add time_rz, timegm.
(GNULIB_TOOL_FLAGS): Avoid flexmember, setenv, unsetenv.
* configure.ac (tzalloc): Remove test for this, since
Emacs no longer uses HAVE_TZALLOC directly.
* doc/lispref/os.texi (Time of Day, Time Conversion)
(Time Parsing):
* etc/NEWS: Document the new behavior.
Merge from gnulib, incorporating:
2015-07-25 strftime: fix newly-introduced bug on Solaris
2015-07-23 fprintftime, strftime: use timezone_t args
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/strftime.c, lib/strftime.h, lib/time.in.h, m4/sys_time_h.m4:
* m4/time_h.m4:
Update from gnulib.
* lib/time_rz.c, lib/timegm.c, m4/time_rz.m4, m4/timegm.m4:
New files from gnulib.
* lisp/time-stamp.el (time-stamp-string):
* lisp/time.el (display-time-world-list)
(display-time-world-display):
Use new API, with time zone arg.
* lisp/time.el (display-time-world-display):
Fix race when current-time advances while we're running.
* lisp/vc/add-log.el (add-log-iso8601-time-zone)
(add-log-iso8601-time-string): Accept optional time zone arg.
* lisp/vc/add-log.el (add-change-log-entry):
* lisp/vc/log-edit.el (log-edit-changelog-ours-p): Use new arg.
* nt/gnulib.mk: Propagate lib/gnulib.mk changes here.
Add rules for the time module, since they're now needed
for tzalloc etc.
* src/conf_post.h (getenv_TZ, setenv_TZ): New macros.
(emacs_getenv_TZ, emacs_setenv_TZ): New decls.
* src/editfns.c: Include errno.h.
(set_time_zone_rule): Omit unnecessary forward decl.
(initial_tz): Remove, replacing with ...
(local_tz, wall_clock_tz, utc_tz): New static vars and constants.
(tzeqlen): New constant; prefer it to (sizeof "TZ=" - 1).
(emacs_localtime_rz, emacs_mktime_z, xtzalloc, xtzfree)
(tzlookup): New static functions.
(init_editfns): New arg DUMPING.  All uses changed.
(init_editfns): Omit most initialization if dumping, not if
!initialized.  Initialize wall_clock_tz and local_tz.
(emacs_nmemftime, format_time_string): Time zone argument can now
be any time zone, not just a boolean for UTC or local time.  All
callers changed.
(Fformat_time_string, Fencode_time, Fcurrent_time_string)
(Fcurrent_time_zone): New optional arg ZONE.
(Fdecode_time, Fset_time_zone_rule): ZONE arg can now also take
the same form as with the other new additions.
(decode_time_zone): Remove; no longer needed.
(tzvalbuf): Now file-scope.
(emacs_getenv_TZ, emacs_setenv_TZ): New functions.
(syms_of_editfns): Define Qwall.
* src/editfns.c (mktime_z) [!HAVE_TZALLOC]:
* src/systime.h (mktime_z, timezone_t, tzalloc, tzfree)
[!HAVE_TZALLOC]:
Remove; now supplied by gnulib.
* src/emacs.c (main):
* src/lisp.h (init_editfns): Adjust to init_editfns API change.
2015-07-26 12:44:54 -07:00
Paul Eggert
1323c13978 Merge from gnulib
This incorporates:
2015-07-04 file-has-acl, acl-permissions: fix HP-UX typos
2015-07-03 set-permissions.c: adjust acl_from_mode's cpp guard
2015-07-02 update-copyright: fix test failure with perl >= 5.22
2015-07-01 gnulib-common.m4: change the ARFLAGS default to 'cr'
2015-07-01 acl: fix definition of acl_from_mode on FreeBSD
* build-aux/update-copyright, doc/misc/texinfo.tex, lib/acl-internal.h:
* lib/set-permissions.c, m4/gnulib-common.m4: Copy from gnulib.
2015-07-05 08:23:11 -07:00
Paul Eggert
325bf192ae Merge from gnulib
This incorporates:
2015-06-06 acl-permissions: pacify -Wsuggest-attribute=const
2015-06-05 stdio: Don't redefine gets when using C++
2015-06-05 acl-permissions: port to AIX, C89 HP-UX
2015-06-02 file-has-acl: fix build on Mac OS X 10
2015-06-01 gnulib-tool: concatenate lib_SOURCES to a single line
2015-06-01 pthread_sigmask: discount system version if a simple macro
2015-05-31 readlinkat: avoid OS X 10.10 trailing slash bug
* doc/misc/texinfo.tex, lib/acl-internal.h, lib/get-permissions.c:
* lib/readlinkat.c, lib/set-permissions.c, lib/stdio.in.h:
* m4/acl.m4, m4/pthread_sigmask.m4, m4/readlinkat.m4: Copy from gnulib.
* lib/gnulib.mk: Regenerate.
2015-06-06 18:38:30 -07:00
Paul Eggert
6c52e9b93b Merge from gnulib
This incorporates:
2015-05-27 qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)
2015-05-27 file-has-acl: Split feature tests again (Bug#20667)
2015-05-27 string: fix build failure on BSD/OSX with FORTIFY_SOURCE
2015-05-26 stdio: limit __gnu_printf__ witness to gcc 4.4+
2015-05-26 inttypes: force correct mingw PRIdMAX even without <stdio.h>
2015-05-26 stdio: fix probe on mingw under gcc 5.1
* admin/merge-gnulib (GNULIB_MODULES):
Replace qacl with qcopy-acl, since we don't need the rest of qacl.
* doc/misc/texinfo.tex, lib/acl-internal.c, lib/acl-internal.h:
* lib/inttypes.in.h, lib/qcopy-acl.c, lib/qset-acl.c:
* lib/string.in.h, m4/acl.m4, m4/stdio_h.m4:
Get latest versions from gnulib.
* lib/get-permissions.c, lib/set-permissions.c: New files.
* lib/gnulib.mk, m4/gnulib-comp.m4:
Regenerate.
* nt/gnulib.mk: Merge lib/gnulib.mk changes by hand.
2015-05-27 17:55:06 -07:00
Paul Eggert
6eaa9a57a1 Merge from gnulib
This incorporates:
2015-04-29 extern-inline: no need for workaround in GCC 5.1
2015-04-26 file-has-acl: port to CentOS 6
* m4/acl.m4, m4/extern-inline.m4: Update from gnulib.
2015-04-29 20:12:24 -07:00
Paul Eggert
27e6afeb6f Merge from gnulib
This incorporates:
2015-04-24 file-has-acl: new module, split from acl
2015-04-24 manywarnings: add GCC 5.1 warnings
2015-04-21 lstat: fix cross-compilation 'ln -s' problem
2015-04-15 qacl: Simplify HP-UX acl_nontrivial check
2015-04-15 acl: On Linux, check for acls without libacl
2015-04-14 tempname: avoid unused parameter warnings (trivial)
* lib/acl-internal.c: New file, from gnulib.
* lib/file-has-acl.c: Remove; no longer imported from gnulib.
* lib/acl-internal.h, lib/gnulib.mk, lib/qcopy-acl.c, lib/tempname.c:
* m4/acl.m4, m4/gnulib-comp.m4, m4/lstat.m4, m4/manywarnings.m4:
Update from gnulib.
2015-04-24 22:41:56 -07:00
Paul Eggert
2346856168 Generate a ChangeLog file from commit logs
* .gitignore: Add 'ChangeLog'.
* build-aux/gitlog-to-changelog: New file, from Gnulib.
* build-aux/gitlog-to-emacslog: New file.
* CONTRIBUTE: Document the revised workflow.
* Makefile.in (clean): Remove *.tmp and etc/*.tmp*
instead of just special cases.
(CHANGELOG_HISTORY_INDEX_MAX, CHANGELOG_N, gen_origin): New vars.
(ChangeLog, unchanged-history-files, change-history)
(change-history-commit): New rules.
* admin/admin.el (make-manuals-dist--1):
Don't worry about doc/ChangeLog.
* admin/authors.el: Add a FIXME.
* admin/make-tarball.txt:
* lisp/calendar/icalendar.el:
* lisp/gnus/deuglify.el:
* lisp/obsolete/gulp.el:
* lwlib/README:
Adjust to renamed ChangeLog history files.
* admin/merge-gnulib (GNULIB_MODULES): Add gitlog-to-changelog.
* admin/notes/repo: Call it 'master' a la Git, not 'trunk' a la Bzr.
Remove obsolete discussion of merging ChangeLog files.
New section "Maintaining ChangeLog history".
* build-aux/git-hooks/pre-commit:
Reject attempts to commit files named 'ChangeLog'.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* make-dist: Make and distribute top-level ChangeLog if there's a
.git directory.  Distribute the new ChangeLog history files
instead of scattered ChangeLog files.  Distribute the new files
gitlog-to-changelog and gitlog-to-emacslog.
Fixes: bug#19113
2015-04-07 00:00:55 -07:00
Paul Eggert
ccf00107f7 Merge from gnulib
This incorporates:
2015-03-19 fdopendir: port better to MinGW
2015-03-18 fdopendir: fix typo in comment
2015-02-24 glob, etc.: port to MSVC v18 on MS-Windows 8.1
* lib/dirent.in.h, lib/fdopendir.c: Update from gnulib.
* lib/dirfd.c, m4/dirfd.m4: New files from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
2015-03-19 12:33:44 -07:00
Paul Eggert
27bd6dadf4 Merge from gnulib
* lib/getdtablesize.c, m4/dup2.m4, m4/fcntl.m4:
Update from gnulib, incorporating:
2015-02-23 dup2: doc and test for Android bug
2015-02-23 Replace dup2() on Android
2015-02-22 Android doesn't define RLIM_SAVED_*
2015-02-24 16:40:23 -08:00
Paul Eggert
066b17df68 Merge from gnulib
* doc/misc/texinfo.tex: Update from gnulib.
* lib/getdtablesize.c, lib/getopt.c, lib/signal.in.h, lib/tempname.c:
* lib/tempname.h, m4/dup2.m4, m4/fcntl.m4, m4/getdtablesize.m4:
Update from gnulib, incorporating:
2015-02-20 getdtablesize: port better for Android
2015-02-19 fcntl: Fix cross compiling
2015-02-18 dup2, fcntl: cross-compile better for Android
2015-02-18 getopt: don't crash on memory exhaustion
2015-02-17 tempname: allow compilation with C++ (trivial)
2015-02-17 dup2, fcntl: port to AIX
2015-02-16 getdtablesize, dup2, fcntl: port to Android
2015-02-11 getdtablesize, signal_h: Fix Android build
2015-02-11 maint: various whitespace cleanups in tempname
2015-02-20 23:32:45 -08:00
Paul Eggert
39c2fa3f4e Merge from gnulib and try to repair bad merge
This attempts to repair problems introduced by the bad merge
5491fd1098.  The easiest way for me
to fix the badly-merged gnulib files was to run
'admin/merge-gnulib', so I did that, which also imported the
following changes:
* build-aux/update-copyright, m4/gnulib.m4:
Update from gnulib, incorporating:
2015-01-15 time: port to MinGW32 3.21
2015-01-15 update-copyright: apply to self
2015-01-11 update-copyright: recognize groff's \(co marker
2015-01-27 22:24:47 -08:00
Fabián Ezequiel Gallina
8e9166c92c Merge from origin/emacs-24
a012c7b Fix copyright years by hand
732fd4c Update copyright year to 2015

Conflicts:
	INSTALL.REPO
	admin/notes/lel-TODO
	doc/man/grep-changelog.1
	doc/misc/eww.texi
	etc/CONTRIBUTE
	etc/GNU
	etc/NEWS
	etc/refcards/emacsver.tex
	etc/refcards/ru-refcard.tex
	lib-src/grep-changelog
	lib-src/test-distrib.c
	lib/alloca.in.h
	lib/binary-io.h
	lib/c-ctype.h
	lib/c-strcasecmp.c
	lib/c-strncasecmp.c
	lib/careadlinkat.c
	lib/close-stream.c
	lib/dosname.h
	lib/dup2.c
	lib/filemode.h
	lib/fpending.c
	lib/fpending.h
	lib/getgroups.c
	lib/getloadavg.c
	lib/getopt.in.h
	lib/getopt1.c
	lib/getopt_int.h
	lib/gettext.h
	lib/gettime.c
	lib/gettimeofday.c
	lib/group-member.c
	lib/md5.c
	lib/md5.h
	lib/memrchr.c
	lib/sha1.c
	lib/sig2str.c
	lib/stdarg.in.h
	lib/stdbool.in.h
	lib/stdlib.in.h
	lib/strftime.c
	lib/strtoimax.c
	lib/strtol.c
	lib/strtoll.c
	lib/strtoull.c
	lib/tempname.c
	lib/time_r.c
	lib/unsetenv.c
	lib/xalloc-oversized.h
	lisp/gnus/gnus-setup.el
	lisp/progmodes/cap-words.el
	lisp/w32-common-fns.el
	m4/alloca.m4
	m4/dup2.m4
	m4/filemode.m4
	m4/getgroups.m4
	m4/getloadavg.m4
	m4/gettime.m4
	m4/gettimeofday.m4
	m4/gnulib-common.m4
	m4/group-member.m4
	m4/manywarnings.m4
	m4/memrchr.m4
	m4/mktime.m4
	m4/pathmax.m4
	m4/pthread_sigmask.m4
	m4/sig2str.m4
	m4/ssize_t.m4
	m4/st_dm_mode.m4
	m4/stat-time.m4
	m4/stdarg.m4
	m4/stdbool.m4
	m4/stddef_h.m4
	m4/stdio_h.m4
	m4/strftime.m4
	m4/strtoimax.m4
	m4/strtoll.m4
	m4/strtoull.m4
	m4/strtoumax.m4
	m4/time_h.m4
	m4/timer_time.m4
	m4/timespec.m4
	m4/unistd_h.m4
	m4/utimbuf.m4
	nextstep/README
	nt/addsection.c
	src/insdel.c
	src/w32heap.c
	test/automated/package-x-test.el
2015-01-28 00:09:39 -03:00
Paul Eggert
215942da54 Merge from gnulib
* lib/stdio.in.h, m4/stdio_h.m4: Update from gnulib, incorporating:
2015-01-05 stdio: fix use of PRIdMAX on modern mingw
2015-01-06 09:15:29 -08:00
Paul Eggert
035f5aaa91 Merge from gnulib, incorporating:
2015-01-01 version-etc: new year
2015-01-01 11:06:53 -08:00
Paul Eggert
732fd4c7e1 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 09:18:06 -08:00
Paul Eggert
1e6879dbdb Prefer stpcpy to strcat
* admin/merge-gnulib (GNULIB_MODULES): Add stpcpy.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stpcpy.c, m4/stpcpy.m4: New files, from gnulib.
* lib-src/ebrowse.c (sym_scope_1, operator_name, open_file):
* lib-src/emacsclient.c (get_server_config, set_local_socket)
(start_daemon_and_retry_set_socket):
* lib-src/etags.c (main, C_entries, relative_filename):
* lib-src/pop.c (sendline):
* lib-src/update-game-score.c (main):
* lwlib/xlwmenu.c (resource_widget_value):
* src/callproc.c (child_setup):
* src/dbusbind.c (xd_signature_cat):
* src/doc.c (get_doc_string, Fsnarf_documentation):
* src/editfns.c (Fuser_full_name):
* src/frame.c (xrdb_get_resource):
* src/gtkutil.c (xg_get_file_with_chooser):
* src/tparam.c (tparam1):
* src/xfns.c (xic_create_fontsetname):
* src/xrdb.c (gethomedir, get_user_db, get_environ_db):
* src/xsmfns.c (smc_save_yourself_CB):
Rewrite to avoid the need for strcat, typically by using stpcpy
and/or lispstpcpy.  strcat tends to be part of O(N**2) algorithms.
* src/doc.c (sibling_etc):
* src/xrdb.c (xdefaults):
Now a top-level static constant.
2014-12-25 15:44:23 -08:00
Paul Eggert
e3040f2aee Merge from gnulib
2014-12-20 utimens: remove unnecessary assert
2014-12-16 stdalign: port better to HP compilers
2014-12-16 stdalign: work around Apple GCC 4.0 bug
* lib/stdalign.in.h, lib/utimens.c, m4/stdalign.m4: Update from gnulib.
2014-12-22 18:44:04 -08:00
Paul Eggert
b81a183791 Merge from gnulib
2014-12-12 stddef: support C11's max_align_t
2014-12-08 apply _GL_ATTRIBUTE_PURE to some inline functions
2014-12-02 support GNU format printf and scanf on mingw
* doc/misc/texinfo.tex, lib/stat-time.h, lib/stddef.in.h:
* lib/timespec.h, m4/extensions.m4, m4/stddef_h.m4, m4/stdio_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
2014-12-12 16:04:10 -08:00
Paul Eggert
dc7a3ba28b Merge from gnulib.
2014-11-14 extern-inline: update commentary about GCC bugs
2014-11-06 unistd: port to iOS
2014-11-04 update from texinfo
* doc/misc/texinfo.tex, lib/unistd.in.h, m4/extern-inline.m4:
Update from gnulib.
2014-11-14 12:25:11 -08:00
Paul Eggert
821339c944 Merge from gnulib.
This incorporates:
2014-10-18 readlinkat: port to AIX 7.1
2014-10-07 fcntl: fix error reporting by dupfd
* lib/fcntl.c, lib/readlinkat.c, lib/unistd.in.h, m4/readlinkat.m4:
* m4/unistd_h.m4: Update from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
2014-10-18 23:33:40 -07:00
Paul Eggert
dac5be10f3 Merge from gnulib.
This incorporates:
2014-09-11 fcntl-h: fix compilation with Intel C++ compiler
2014-09-04 pthread, pthread_sigmask, threadlib: port to Ubuntu 14.04
2014-09-23 11:20:38 -07:00
Paul Eggert
da25527e97 Merge from gnulib, incorporating:
2014-09-02 gnulib-common.m4: port to GCC 4.2.1 and Sun Studio 12 C++
2014-09-01 manywarnings: add GCC 4.9 warnings
* m4/gnulib-common.m4, m4/manywarnings.m4: Update from gnulib.
2014-09-02 12:17:23 -07:00
Paul Eggert
f9caea8233 Vector-sorting fixes.
It's not safe to call qsort or qsort_r, since they have undefined
behavior if the user-specified predicate is not a total order.
Also, watch out for garbage-collection while sorting vectors.
* admin/merge-gnulib (GNULIB_MODULES): Add vla.
* configure.ac (qsort_r): Remove, as we no longer use qsort-like
functions.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/vla.h, m4/vararrays.m4: New files, copied from gnulib.
* lib/stdlib.in.h, m4/stdlib_h.m4: Sync from gnulib, incorporating:
2014-08-29 qsort_r: new module, for GNU-style qsort_r
The previous two files' changes are boilerplate generated by
admin/merge-gnulib, and should not affect Emacs.
* src/fns.c: Include <vla.h>.
(sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
(sort_vector_compare): Remove, replacing with ....
(inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
... these new functions.
(sort_vector): Rewrite to use the new functions.
GCPRO locals, since the predicate can invoke the GC.
Since it's in-place return void; caller changed.
(merge): Use 'inorder', for clarity.

Fixes: debbugs:18361
2014-08-30 15:59:39 -07:00
Paul Eggert
c7d117f39e Merge from gnulib, incorporating:
2014-08-04 extern-inline: port to FreeBSD, DragonFly
* lib/gnulib.mk: Regenerate (comment change only).
* m4/extern-inline.m4: Update from gnulib.
2014-08-04 11:44:49 -07:00
Paul Eggert
5c6476b48a Simplify timerfd configuration and fix some minor glitches.
* configure.ac (HAVE_TIMERFD): Define only if TFD_CLOEXEC works,
since the code leaked file descriptors to children when !TFD_CLOEXEC.
(HAVE_TIMERFD_CLOEXEC): Remove; no longer used.
* m4/clock_time.m4 (gl_CLOCK_TIME): Don't check for clock_getres.
This reverts the previous change to this file, so it matches
gnulib again.
* src/atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
(alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
Fall back on timer_create if timerfd_create fails at runtime.
(resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
kernel primitives to do resolution.  All uses removed.
(timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
(turn_on_atimers): Clear timer_create-based timers too,
for consistency.
2014-07-31 13:17:01 -07:00
Dmitry Antipov
768b24eb0e On GNU/Linux, use timerfd for asynchronous timers.
* configure.ac (toplevel): Check whether GNU/Linux-specific
timerfd functions and macros are available.
* m4/clock_time.m4 (gl_CLOCK_TIME): Check for clock_getres as well.
* src/atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
(toplevel): Rename alarm_timer_ok to special_timer_available.
[HAVE_TIMERFD]: Declare timerfd.
[HAVE_CLOCK_GETRES]: Declare resolution.
(start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
system timer resolution.
(set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
(timerfd_callback) [HAVE_TIMERFD]: New function.
(atimer_result, debug_timer_callback, Fdebug_timer_check)
[ENABLE_CHECKING]: New function for the sake of automated tests.
(init_atimer) [HAVE_TIMERFD]: Setup timerfd.
[HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
[ENABLE_CHECKING]: Defsubr test function.
* src/atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
* src/lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
* src/process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
* test/automated/timer-tests.el (timer-tests-debug-timer-check): New test.
2014-07-28 10:28:15 +04:00
Paul Eggert
73bfe891e2 Omit redundant extern decls.
Most of this patch is from Dmitry Antipov, in:
http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
* configure.ac (WERROR_CFLAGS): Add -Wredundant-decls.
* lib-src/emacsclient.c (getenv): Remove decl.
* lib-src/make-docfile.c (write_globals): Add ATTRIBUTE_CONST for
Fbyteorder, Ftool_bar_height, Fmax_char, Fidentity.
* lwlib/lwlib-Xm.c (lw_motif_widget_p, xm_update_one_value)
(xm_create_dialog, xm_destroy_instance, xm_popup_menu)
(xm_set_keyboard_focus, xm_set_main_areas): Remove decls.
* src/commands.h (update_mode_lines):
* src/frame.h (Qbackground_color, Qforeground_color)
(x_set_menu_bar_lines):
* src/ftfont.c (ftfont_font_format):
* src/intervals.h (Qkeymap, Qfont):
* src/keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
* src/lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
(Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
(Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
(Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
(Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
(Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
(Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
(char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
(Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
(Qtool_bar, Qheader_line):
* src/macros.c (Fexecute_kbd_macro):
* src/xdisp.c (Ftool_bar_height, Ftool_bar_height):
* src/xterm.c (x_delete_terminal, XSetIMValues):
* src/xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
(x_implicitly_set_name, popup_activated)
(widget_store_internal_border):
Remove redundant decls.
* src/frame.c [USE_X_TOOLKIT]: Include widget.h.
* src/keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
Remove _Noreturn, as make-docfile now does that for us.
* src/lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
(Qregion_extract_function): New decl.
* src/window.c, src/xfns.c: Include menu.h.
2014-06-17 09:09:19 -07:00
Paul Eggert
0071d45b61 Backport fcntl.h AIX fix from the trunk.
This fixes a bug with the shell freezing.  See:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17598#185
Merge from gnulib, incorporating:
2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
* lib/fcntl.in.h, m4/dup2.m4, m4/fcntl.m4:
Update from gnulib.
2014-06-11 13:03:46 -07:00
Paul Eggert
eed652d649 Merge from gnulib.
This incorporates:
2014-06-02 acl: apply pure attribute to two functions
2014-06-01 gnulib-common.m4: add _GL_UNUSED_LABEL
2014-05-31 dup2, fcntl, fcntl-h: port to AIX 7.1
2014-05-30 ftoastr: work around compiler bug in IBM xlc 12.1
* lib/acl-internal.h, lib/fcntl.in.h, lib/ftoastr.h:
* m4/dup2.m4, m4/fcntl.m4, m4/gnulib-common.m4:
Update from gnulib.
2014-06-01 16:58:38 -07:00
Paul Eggert
035159ed54 Don't substitute sigprocmask for pthread_sigmask.
sigprocmask isn't portable in a multithreaded process.
* configure.ac (gl_THREADLIB): Remove dummy.
Merge from gnulib, incorporating:
2014-05-28 pthread_sigmask, timer-time: use gl_THREADLIB only if needed
* m4/pthread_sigmask.m4, m4/timer_time.m4: Update from gnulib.
* src/Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.

Fixes: debbugs:17561
2014-05-29 08:05:06 -07:00
Paul Eggert
8208d2bf95 Assume C99 or later.
* lib/stdarg.in.h, lib/stdbool.in.h, m4/stdarg.m4, m4/stdbool.m4:
Remove.
* configure.ac (_AC_PROG_CC_C89): Define a dummy, to keep 'configure'
smaller.
(gl_PROG_CC_C99): Use this to get C99 or later.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Remove stdarg, stdbool.
(GNULIB_TOOL_FLAGS): Avoid stdarg, stdbool.
* doc/lispref/internals.texi (C Dialect): Document this.
* etc/NEWS: Document this.
* nt/gnulib.mk: Remove stdarg and stdbool modules.
* src/bytecode.c (B__dummy__): Remove.
* src/conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
(FLEXIBLE_ARRAY_MEMBER): Now always empty.
* src/dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
* src/regex.c (DEBUG_PRINT): Assume varargs macros.
* src/lisp.h (DEFUN_FUNCTION_INIT): Remove.  All uses now assume C99.

Fixes: debbugs:17487
2014-05-17 01:11:31 -07:00
Paul Eggert
c56327b55d Don't require pkg-config when building from repository.
* INSTALL: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
* INSTALL.REPO: pkg-config is no longer required to build from
the repository.
* autogen.sh: Don't check for pkg-config.
(progs): Remove pkg-config.
(pkg_config_min, AUTORECONF_ENV, env_space, ACLOCAL_PATH):
Remove.  All uses removed.
* m4/pkg.m4: New file, built by admin/merge-pkg-config.
* configure.ac: Remove unnecessary m4_pattern_forbid of ^PKG_ and
an AC_ARG_VAR of PKG_CONFIG_PATH.  pkg.m4 does that for us.
(EMACS_CHECK_MODULES): Remove workaround for old pkg-config bug,
as we use pkg.m4 from a newer pkg-config.
* admin/merge-pkg-config: New script.
* admin/notes/copyright: Update for m4/*.m4, in particular m4/pkg.m4.
* etc/NEWS: Prefer './configure FOO=BAR' to 'FOO=BAR ./configure'.
* etc/PROBLEMS (Build-time-problems): Remove pkg-config problem
that is no longer an issue.
* nt/INSTALL: Remove no-longer-needed notes about pkg-config.
2014-05-16 08:49:13 -07:00
Paul Eggert
0d18109565 Merge from gnulib.
This incorporates:
2014-03-04 stdint: fix missing SIZE_MAX on Android
2013-03-02 sys_types: avoid autoconf warning about gl_SYS_TYPES_H
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/stdint.in.h, lib/sys_types.in.h, m4/sys_types_h.m4:
Update from gnulib.

Fix oversight preventing lib/sys/types.h from being generated.
* admin/merge-gnulib (GNULIB_TOOL_FLAGS): Don't avoid sys_types.
2014-03-07 10:57:11 -08:00
Paul Eggert
f1037d0b8b Merge from gnulib.
2014-02-21 timer: fix uClibc detection of threading
2014-02-21 maintainer-makefiles: provide AC_PROG_SED for older autoconf
* texinfo.tex: Update from gnulib.
2014-02-23 23:12:42 -08:00