1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

171 Commits

Author SHA1 Message Date
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
Paul Eggert
51fb39ec63 Merge from gnulib.
This incorporates:
2014-01-22 qacl: check for fchmod
* m4/acl.m4: Update from gnulib.
2014-01-22 18:48:44 -08:00
Paul Eggert
bada50fc50 Merge from gnulib.
This incorporates:
2014-01-07 update from texinfo
2014-01-06 md5, sha1, sha256, sha512: support older autoconf
2014-01-10 23:01:30 -08:00
Paul Eggert
3d81471038 Merge from gnulib.
This incorporates:
2014-01-02 manywarnings: remove -Wmudflap
This ports better to GCC 4.9-to-be.
2014-01-02 17:59:58 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Paul Eggert
9ebada6af6 Automate the procedure for updating copyright year.
* admin/merge-gnulib (GNULIB_MODULES): Add update-copyright.
* admin/notes/years: Mention admin/update-copyright.
* admin/update-copyright: New file.
* build-aux/update-copyright: New file.
* make-dist: Distribute it.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* msdos/autogen/Makefile.in: Update copyright year.
2013-12-24 10:27:53 -08:00
Paul Eggert
e9ad5665ed Merge from gnulib, incorporating:
2013-12-17 gettimeofday: port recent C++ fix to Emacs
2013-12-17 gettimeofday: fix C++ crosscompilation
2013-12-17 qacl: port to Windows better
* lib/file-has-acl.c, lib/time.in.h, m4/gettimeofday.m4, m4/time_h.m4:
Update from gnulib.
* lib/gnulib.mk: Regenerate.
2013-12-17 12:43:43 -08:00
Paul Eggert
a8f9bc05c3 Remove the option of using libcrypto.
This scorches the earth and waits for spring;
see Ted Zlatanov and Stefan Monnier in
<http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00323.html>.
* configure.ac (with_openssl_default, HAVE_LIB_CRYPTO): Remove.
Do not say whether Emacs is configured to use a crypto library,
since it's no longer an option.
(gl_CRYPTO_CHECK): Define a dummy.
* lib/gl_openssl.h, m4/gl-openssl.m4: Remove.
* admin/merge-gnulib: Remove lib/gl_openssh.h and m4/gl-openssl.m4.
* src/Makefile.in (LIB_CRYPTO): Remove.
(LIBES): Don't use it.
2013-12-10 21:37:30 -08:00
Paul Eggert
7d01e13ced * configure.ac: Disable libcrypto by default.
Merge from gnulib, incorporating:
2013-12-07 md5, sha1, sha256, sha512: fix link error with partial lib
* m4/gl-openssl.m4: Update from gnulib.
2013-12-09 18:44:28 -08:00
Paul Eggert
e9551b12f8 Use libcrypto's checksum implementations if available, for speed.
On commonly used platform libcrypto uses architecture-specific
assembly code, which is significantly faster than the C code we
were using.  See Pádraig Brady's note in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-12/msg00000.html>.
Merge from gnulib, incorporating:
2013-12-07 md5, sha1, sha256, sha512: add gl_SET_CRYPTO_CHECK_DEFAULT
2013-12-07 md5, sha1, sha256, sha512: add 'auto', and set-default method
2013-12-04 include_next: minimize code duplication
2013-12-03 md5, sha1, sha256, sha512: support mandating use of openssl
2013-12-02 md5, sha1, sha256, sha512: use openssl routines if available
* configure.ac (--without-all): Set with_openssl_default too.
Use gl_SET_CRYPTO_CHECK_DEFAULT to default to 'auto'.
(HAVE_LIB_CRYPTO): New var.
Say whether Emacs is configured to use a crypto library.
* lib/gl_openssl.h, m4/absolute-header.m4, m4/gl-openssl.m4:
New files, copied from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/md5.c, lib/md5.h, lib/sha1.c, lib/sha1.h:
* lib/sha256.c, lib/sha256.h, lib/sha512.c, lib/sha512.h:
* m4/include_next.m4, m4/md5.m4, m4/sha1.m4, m4/sha256.m4, m4/sha512.m4:
Update from gnulib.
* src/Makefile.in (LIB_CRYPTO): New macro.
(LIBES): Use it.
2013-12-08 00:05:36 -08:00
Paul Eggert
220a304ac3 Merge from gnulib.
This incorporates:
2013-11-08 extern-inline: port better to OS X 10.9
2013-11-08 fpending: fix regression on DragonFly BSD
* lib/fpending.h, m4/extern-inline.m4, m4/fpending.m4:
Update from gnulib.
2013-11-08 08:24:40 -08:00
Paul Eggert
758bed52af Merge from gnulib.
This incorporates:
2013-10-14 acl: allow cross-compilation to Gentoo
2013-10-18 extern-inline: make safe for -Wundef usage
2013-09-30 fpending: use pure+const function attrs
* lib/fpending.h, m4/acl.m4, m4/extern-inline.m4: Update from gnulib.
2013-10-22 21:01:46 -07:00
Paul Eggert
46e5e833d9 Merge from gnulib.
This incorporates:
2013-10-10 strtoumax: port to Solaris 8
2013-10-09 strtoimax, strtoumax: port to HP-UX 11.11
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* lib/inttypes.in.h, lib/strtoimax.c, m4/inttypes.m4, m4/strtoimax.m4:
* m4/strtoumax.m4:
Update from gnulib.
2013-10-12 13:00:38 -07:00
Paul Eggert
595e113b15 Improve support for popcount and counting trailing zeros.
Do this by using the Gnulib modules for this.
This should generate faster code on non-GCC, non-MSC platforms,
and make the code a bit more portable, at least in theory.
* admin/merge-gnulib (GNULIB_MODULES): Add count-one-bits
and count-trailing-zeros.
* lib/count-one-bits.c, lib/count-one-bits.h:
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
* m4/count-one-bits.m4, m4/count-trailing-zeros.m4:
New files, copied from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.
* src/data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
(USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
(NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
(popcount_size_t_msc, popcount_size_t_gcc):
Remove; now done by Gnulib.
(popcount_size_t): Now a macro that defers to Gnulib.
(count_trailing_zero_bits): Return int, for consistency with
Gnulib and because Emacs prefers signed to unsigned int.
Don't assume that size_t is either unsigned int or unsigned long
or unsigned long long.
(size_t_to_host_endian): Do not assume that size_t is either
exactly 32 or exactly 64 bits wide.
* src/lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
etc., so that it's now an enum constant, not a macro.
No need to assume that it's either 32 or 64.

Fixes: debbugs:15550
2013-10-07 14:37:19 -07:00
Paul Eggert
4eed315732 Use hardware support for byteswapping on glibc x86 etc.
On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
whereas the old swap64 needed 30.
* admin/merge-gnulib (GNULIB_MODULES): Add byteswap.
* lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* src/fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
* src/sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
Use byteswap.h's macros to swap bytes.
* src/lisp.h (swap16, swap32, swap64): Remove.
All uses replaced by bswap_16, bswap_32, bswap_64.
2013-10-04 00:36:22 -07:00
Paul Eggert
0a858ebfc5 Merge from gnulib.
* src/conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
* src/lisp.h: Include <verify.h>, for 'assume'.

This also incorpoprates:
2013-10-02 verify: new macro 'assume'
2013-09-26 dup2, dup3: work around another cygwin crasher
2013-09-26 getdtablesize: work around cygwin issue
2013-10-03 00:06:52 -07:00
Paul Eggert
959c3d24a7 Merge from gnulib.
This incorporates:
2013-09-24 manywarnings: enable nicer gcc warning messages
2013-09-23 warnings: port --enable-gcc-warnings to Solaris Studio 12.3
2013-09-21 timespec: use the new TIMESPEC_RESOLUTION elsewhere
* configure.ac (WERROR_CFLAGS): Omit -fdiagnostics-show-option
and -funit-at-a-time, since manywarnings does that for us now.
2013-09-24 20:44:34 -07:00
Paul Eggert
230fe2a5a1 Merge from gnulib.
This incorporates the following changes:
2013-09-19 stdio: OS X port of putc_unlocked + extern inline
2013-09-19 signal: OS X port of sigaddset etc. + extern inline
2013-09-19 extern-inline: do not always suppress extern inline on OS X
2013-09-17 getgroups: statement without effect
2013-08-28 headers: check that _GL_INLINE_HEADER_BEGIN is defined
2013-09-19 14:40:08 -07:00
Paul Eggert
12c4970d70 Minor merge from gnulib (mostly just for texinfo.tex). 2013-08-26 15:17:31 -07:00
Paul Eggert
51632863c2 Merge from gnulib.
This incorporates:
2013-08-15 warnings: minor optimization
2013-08-15 warnings: check -Wfoo rather than -Wno-foo
2013-08-18 22:23:05 -07:00
Paul Eggert
eaca0446e7 Merge from gnulib.
This incorporates:
2013-08-11 fpending: port to recent Cygwin change to stdio_ext.h
2013-08-10 sys_time: port to OpenBSD
2013-08-11 17:52:17 -07:00
Paul Eggert
e0fdb69430 Fix some minor races in hosts lacking mkostemp.
Gnulib's emulation of mkostemp doesn't have races that Emacs's does.
* configure.ac (mkostemp): Remove check for this function;
gnulib does the check now.
(mkstemp): Remove check for this no-longer-used function.
* lib/mkostemp.c, lib/secure_getenv.c, lib/tempname.c, lib/tempname.h:
* m4/mkostemp.m4, m4/secure_getenv.m4, m4/tempname.m4:
New files, copied from Gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Add mkostemp.
* lib-src/movemail.c (main):
* lib-src/update-game-score.c (write_scores):
Use mkostemp (which now works on all platforms, due to changes
in the portability layer) rather than mktemp (which has a race)
or mkstemp (which we no longer bother with).
* src/callproc.c (create_temp_file):
* src/filelock.c (create_lock_file):
Assume mkostemp, since it's now provided by Gnulib.

Fixes: debbugs:15015
2013-08-04 09:56:56 -07:00
Paul Eggert
7b154deff5 Port recent close-on-exec changes to Cygwin.
* lib/binary-io.c, lib/binary-io.h: New files.
Merge from gnulib, incorporating:
2013-07-09 accept4, dup3, pipe2: port to Cygwin
* lib/pipe2.c: Update from gnulib, as part of this merge.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.

Fixes: debbugs:14821
2013-07-09 10:16:21 -07:00
Paul Eggert
4ebbdd6712 Handle errno and exit status a bit more carefully.
* lib/ignore-value.h: Remove this gnulib-imported file.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* admin/merge-gnulib (GNULIB_MODULES): Remove ignore-value.
* src/callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
number into an exit status.  Instead, use EXIT_CANCELED.
(child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
* src/callproc.c (relocate_fd):
* src/emacs.c (close_output_streams, main):
* src/process.c (create_process):
* src/sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
Use emacs_perror for simplicity.
* src/callproc.c (relocate_fd, main):
* src/sysdep.c (sys_subshell):
Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
(shut_down_emacs): Use emacs_write, not write.
* src/emacs.c, src/sysdep.c: Don't include <ignore-value.h>.
* src/fileio.c (Fcopy_file, e_write):
* src/nsterm.m (ns_select):
* src/process.c (send_process):
* src/sound.c (vox_write):
Use emacs_write_sig, not emacs_write.
* src/lisp.h (emacs_write_sig, emacs_perror): New decls.
* src/process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
New constants.
* src/sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
of write.
(emacs_full_write): New function.
(emacs_write): Rewrite to use it.
(emacswrite_sig, emacs_perror): New functions.
* src/xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
2013-07-09 00:04:48 -07:00
Paul Eggert
2a74a90a03 Try to fix FreeBSD 9.1 porting problem.
This incorporates the following merge from gnulib:
2013-07-07 stdalign, verify: port to FreeBSD 9.1, to C11, and to C++11

Fixes: debbugs:14812
2013-07-07 23:15:38 -07:00